1

GXT Paging Row Number

I got problem to display the row number for the paging grid.
The value always start from 1 to the end of row in the grid.
After trying several methods (actually several frustrated hours), finally I found the soultion.
It's very simple and I don't believe, why I not think of this before.

Here is the code

final RowNumberer rn = new RowNumberer();
rn.setWidth(30);
rn.setRenderer(new GridCellRenderer() {

public Object render(ModelData model, String property, ColumnData config, int rowIndex, int colIndex, ListStore store, Grid grid) {
int offset = 0;
if (store.getLoadConfig().get("offset") != null) {
offset = Integer.parseInt(store.getLoadConfig().get("offset").toString());
}
return offset + rowIndex + 1;
}
});
0

GWT - PHP on Apache 2nd Review

My latest project doesn't let quercus running on glassfish. I need to to remove quercus before the project can be deployed.

Finally I found a new way to enable data transfer from GWT application on GlassFish Server to Apache Web Server. The solution is simpler. No querchos and curl php script required.

How it can be possible?

Let say the Apache is running on port 80 and glassfish is running on port 8080.
Let say your GWT project is in /web1 folder on glassfish.
Let say your PHP project in in /web1 folder on Apache.

First you need to set Apache proxy settings. You might need to install the module if you don't have one on your Apache.

Open the apache httpd.conf file and add the following lines

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

Order deny,allow
Allow from all


ProxyRequests on
ProxyPreserveHost on

ProxyPass /web2 http://localhost:8080/web1/
ProxyPassReverse /web2 http://localhost:8080/web1/


using the setting your GWT project can be access using this following URL

http://localhost/web2

In your GWT project the data can be access using http://localhost/web1. Now it's on the same domain with your GWT project on http://localhost/web2. You can access to any php script on your Apache from GWT without creating any proxy servlet or curl script.
 
Copyright © peyotest