Mercurial > dive4elements > river
view flys-client/src/main/java/de/intevation/flys/client/client/ui/range/DischargeInfoDataSource.java @ 5462:f2371f3aaf03
Show top level folder icons only if node has no factory
If you have an empty folder the folder icon is still shown.
This makes it possible to add functional "Top Level" entries
in the Datacage
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Tue, 26 Mar 2013 18:29:13 +0100 |
parents | 651b93c10dc5 |
children |
line wrap: on
line source
package de.intevation.flys.client.client.ui.range; import com.google.gwt.core.client.GWT; import com.smartgwt.client.data.DataSource; import com.smartgwt.client.data.DataSourceField; import com.smartgwt.client.types.DSDataFormat; import com.smartgwt.client.types.FieldType; public class DischargeInfoDataSource extends DataSource { public static final String XPATH_DISCHARGE_DEFAULT = "/discharges/discharge"; public DischargeInfoDataSource(String url, long gauge) { setDataFormat(DSDataFormat.XML); setRecordXPath(XPATH_DISCHARGE_DEFAULT); DataSourceField desc = new DataSourceField( "description", FieldType.TEXT, "description"); DataSourceField start = new DataSourceField( "start", FieldType.TEXT, "start"); DataSourceField end = new DataSourceField( "end", FieldType.TEXT, "end"); setFields(desc, start, end); setDataURL(getServiceURL(url, gauge)); } protected String getServiceURL(String server, long gauge) { String url = GWT.getModuleBaseURL(); url += "dischargeinfoxml"; url += "?server=" + server; url += "&gauge=" + String.valueOf(gauge); return url; } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :