Server side paging with DLL on XML file
Using TreeGrid server library for server side paging upon XML file on disk
Do not run this file locally!
Run it from your local or remote web http server where is installed JAVA JRE.
Source files: File.html
(this html page),
FileDef.xml
(static XML layout),
File.jsp
(server script generates and processes XML data and generates XLS export; uses the TreeGrid.dll/so),
FileData.xml
(source XML data)
TreeGrid.jar
(support code to use TreeGrid server library),
TreeGrid.dll
or
TreeGrid.so
(library located in package root directory
/Server/TreeGrid32/ or
/Server/TreeGrid64/ depending on server system, used in
TreeGrid.jar),
tmp/
directory can be used for temporary data to free JAVA memory.
To use the TreeGrid server side library you have to copy file TreeGrid.jar to your JRE shared lib directory and restart your http server
The
TreeGrid.jar
is support code for using
TreeGrid server side DLL / SO
and is located in TreeGrid distribution in
/Server/Jsp/ directory.
The shared lib directory is usually jre_install_path/lib/ext and also e.g. in Tomcat is usually tomcat_install_path/shared/lib.
This example demonstrates using
TreeGrid server side DLL / SO
library
for
server side
paging,
calculations,
grouping,
sorting,
filtering,
Excel export and
updates.
It demonstrates also complex
grouping feature and cell editing in various groups.
This example loads all data from the
FileData.xml file and fills them to TreeGrid DLL and uses it for generating data, pages and export for client.
Uploaded changes are sent only to TreeGrid DLL and saved to temporary xml in
/tmp directory.
This example does not modify the source FileData.xml!
This example does not use any custom JavaScript or server script code, all features are set via XML data definitions and provided by TreeGrid!
In table there are fictive resellers around the world with their results from the first two months in year 2004.
In columns Registered, Since, Calls per and Rabat are data related to partner
and can be edited only when rows are grouped by Partner (or by Location and Partner).
In columns Orders, Income and Expenses are results from every partner's month and can be edited in any grouping.
Column Gross profit is calculated (Income - Expenses),
Discount is calculated (Gross profit x Rabat) and
Profit is calculated (Gross profit - Discount).
In bottom Total results row is summary of the results for whole table,
in individual group rows when the grid is grouped is summary for given group.
When are rows grouped by Location and Partner you can drag and drop partners to another location,
add new partner to the location or delete the partner. You can also change the whole location by choosing another.