# HG changeset patch # User Sascha L. Teichmann # Date 1367922689 -7200 # Node ID b96a293d30f3b15caf1c7dc60872df07a55d789b # Parent b8adee716970da09e9f37c72692575481b68f1a9 GWT client: Fixed flys/issue1246 diff -r b8adee716970 -r b96a293d30f3 gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java Tue May 07 11:33:02 2013 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java Tue May 07 12:31:29 2013 +0200 @@ -360,6 +360,8 @@ String resultCount(); + String bfg_id(); + String start_year(); String end_year(); diff -r b8adee716970 -r b96a293d30f3 gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties --- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties Tue May 07 11:33:02 2013 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties Tue May 07 12:31:29 2013 +0200 @@ -82,6 +82,7 @@ calculationCanceled = The calculation has been canceled. range = Range resultCount = Hits +bfg_id = BfG-ID start_year = Start end_year = End period = Period diff -r b8adee716970 -r b96a293d30f3 gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties --- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties Tue May 07 11:33:02 2013 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties Tue May 07 12:31:29 2013 +0200 @@ -82,6 +82,7 @@ calculationCanceled = Die Berechnung wurde abgebrochen. range = Bereich resultCount = Treffer +bfg_id = BfG-ID start_year = Start end_year = Ende period = Zeitraum diff -r b8adee716970 -r b96a293d30f3 gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_en.properties --- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_en.properties Tue May 07 11:33:02 2013 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_en.properties Tue May 07 12:31:29 2013 +0200 @@ -82,6 +82,7 @@ calculationCanceled = The calculation has been canceled. range = Range resultCount = Hits +bfg_id = BfG-ID start_year = Start end_year = end period = Period diff -r b8adee716970 -r b96a293d30f3 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/GaugeTimeRangePanel.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/GaugeTimeRangePanel.java Tue May 07 11:33:02 2013 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/GaugeTimeRangePanel.java Tue May 07 12:31:29 2013 +0200 @@ -333,16 +333,21 @@ desc.setType(ListGridFieldType.TEXT); desc.setWidth("*"); + ListGridField bfgid = + new ListGridField("bfgid", MESSAGES.bfg_id()); + bfgid.setType(ListGridFieldType.TEXT); + bfgid.setWidth(50); + ListGridField start = new ListGridField("start", MESSAGES.start_year()); start.setType(ListGridFieldType.INTEGER); - start.setWidth(100); + start.setWidth(75); start.setCellFormatter(cf); ListGridField end = new ListGridField("end", MESSAGES.end_year()); end.setType(ListGridFieldType.INTEGER); - end.setWidth(100); + end.setWidth(75); end.setCellFormatter(cf); yearTable.setFields(addstart, addend, desc, start, end); diff -r b8adee716970 -r b96a293d30f3 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/range/DischargeInfoDataSource.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/range/DischargeInfoDataSource.java Tue May 07 11:33:02 2013 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/range/DischargeInfoDataSource.java Tue May 07 12:31:29 2013 +0200 @@ -27,13 +27,16 @@ DataSourceField desc = new DataSourceField( "description", FieldType.TEXT, "description"); + DataSourceField bfgid = new DataSourceField( + "bfg-id", FieldType.TEXT, "bfgid"); + DataSourceField start = new DataSourceField( "start", FieldType.TEXT, "start"); DataSourceField end = new DataSourceField( "end", FieldType.TEXT, "end"); - setFields(desc, start, end); + setFields(desc, bfgid, start, end); setDataURL(getServiceURL(url, gauge)); } diff -r b8adee716970 -r b96a293d30f3 gwt-client/src/main/java/org/dive4elements/river/client/server/DischargeInfoServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/DischargeInfoServiceImpl.java Tue May 07 11:33:02 2013 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/DischargeInfoServiceImpl.java Tue May 07 12:31:29 2013 +0200 @@ -123,15 +123,17 @@ protected DischargeInfoObject buildDischargeInfoObject(Element node) { - String desc = node.getAttribute("description").trim(); - String start = node.getAttribute("start").trim(); - String end = node.getAttribute("end").trim(); + String desc = node.getAttribute("description").trim(); + String start = node.getAttribute("start").trim(); + String end = node.getAttribute("end").trim(); + String bfgId = node.getAttribute("bfg-id").trim(); if (start.length() > 0 && end.length() > 0) { try { - Integer startYear = new Integer(start); - Integer endYear = new Integer(end); - return new DischargeInfoObjectImpl(desc, startYear, endYear); + Integer startYear = Integer.valueOf(start); + Integer endYear = Integer.valueOf(end); + return new DischargeInfoObjectImpl( + desc, startYear, endYear, bfgId); } catch (NumberFormatException nfe) { logger.warn(nfe.getLocalizedMessage()); diff -r b8adee716970 -r b96a293d30f3 gwt-client/src/main/java/org/dive4elements/river/client/shared/model/DischargeInfoObject.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/shared/model/DischargeInfoObject.java Tue May 07 11:33:02 2013 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/shared/model/DischargeInfoObject.java Tue May 07 12:31:29 2013 +0200 @@ -21,5 +21,7 @@ Integer getStartYear(); Integer getEndYear(); + + String getBfGId(); } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : diff -r b8adee716970 -r b96a293d30f3 gwt-client/src/main/java/org/dive4elements/river/client/shared/model/DischargeInfoObjectImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/shared/model/DischargeInfoObjectImpl.java Tue May 07 11:33:02 2013 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/shared/model/DischargeInfoObjectImpl.java Tue May 07 12:31:29 2013 +0200 @@ -20,6 +20,8 @@ protected Integer endYear; + protected String bfgId; + public DischargeInfoObjectImpl() { } @@ -28,25 +30,35 @@ public DischargeInfoObjectImpl( String description, Integer startYear, - Integer endYear + Integer endYear, + String bfgId ) { this.description = description; this.startYear = startYear; this.endYear = endYear; + this.bfgId = bfgId; } + @Override public String getDescription() { return description; } + @Override public Integer getStartYear() { return startYear; } + @Override public Integer getEndYear() { return endYear; } + + @Override + public String getBfGId() { + return bfgId; + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :