Mercurial > dive4elements > river
changeset 6192:165020640d7b
Instantiate RiverInfoPanel with a FLYS reference for SSO.
Part of flys/issue1265
author | Bernhard Herzog <bh@intevation.de> |
---|---|
date | Tue, 04 Jun 2013 17:40:00 +0200 |
parents | 9b521dfb8920 |
children | 56e8bd0958a9 |
files | gwt-client/src/main/java/org/dive4elements/river/client/client/ui/RiverInfoPanel.java gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/InfoPanel.java |
diffstat | 2 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/RiverInfoPanel.java Tue Jun 04 17:38:35 2013 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/RiverInfoPanel.java Tue Jun 04 17:40:00 2013 +0200 @@ -17,6 +17,7 @@ import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.Widget; +import org.dive4elements.river.client.client.FLYS; import org.dive4elements.river.client.client.FLYSConstants; import org.dive4elements.river.client.shared.model.RiverInfo; @@ -27,6 +28,9 @@ */ public class RiverInfoPanel extends HorizontalPanel { + /** The flys instance */ + protected FLYS flys; + /** The message class that provides i18n strings.*/ protected FLYSConstants MSG = GWT.create(FLYSConstants.class); @@ -35,7 +39,9 @@ public final static int PADDING = 8; public final static int MARGIN = 10; - public RiverInfoPanel(RiverInfo riverinfo) { + public RiverInfoPanel(FLYS flys, RiverInfo riverinfo) { + this.flys = flys; + setStyleName("riverinfopanel"); setHeight("" + HEIGHT + "px"); setVerticalAlignment(ALIGN_MIDDLE);
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/InfoPanel.java Tue Jun 04 17:38:35 2013 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/InfoPanel.java Tue Jun 04 17:40:00 2013 +0200 @@ -86,7 +86,7 @@ protected void render(RiverInfo riverinfo) { if (this.riverinfopanel == null) { - this.riverinfopanel = new RiverInfoPanel(riverinfo); + this.riverinfopanel = new RiverInfoPanel(this.flys, riverinfo); this.addMember(this.riverinfopanel, 0); }