Mercurial > dive4elements > river
annotate gwt-client/src/main/java/org/dive4elements/river/client/client/ui/WikiImgLink.java @ 8443:df65f24af5bc
(issue1762) Use getValue to obtain dateRange values
The getToValue was always the initial value regardless
of what has been entered in the form.
According to the documentation both getToValue and getFromValue
should return the "initial value" of the form field. But wether
this means the value before validation corrections or the value
the field is initialized with (which is also not true in both
cases as the field is set only after creation) It returned
the real value for the from date but not for the to date.
With an explicit getValue we workaround this issue.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 22 Oct 2014 17:33:43 +0200 |
parents | 244beb29418e |
children | 5e38e2924c07 |
rev | line source |
---|---|
6231
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde |
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
2 * Software engineering by Intevation GmbH |
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
3 * |
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
4 * This file is Free Software under the GNU AGPL (>=v3) |
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the |
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
6 * documentation coming with Dive4Elements River for details. |
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
7 */ |
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
8 |
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
9 package org.dive4elements.river.client.client.ui; |
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
10 |
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
11 import com.smartgwt.client.types.Overflow; |
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
12 |
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
13 import org.dive4elements.river.client.client.FLYS; |
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
14 |
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
15 public class WikiImgLink extends ImgLink { |
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
16 |
6233
a8613826bcac
Call update after setting the instance
Andre Heinecke <aheinecke@intevation.de>
parents:
6231
diff
changeset
|
17 protected FLYS instance; |
6231
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
18 |
6233
a8613826bcac
Call update after setting the instance
Andre Heinecke <aheinecke@intevation.de>
parents:
6231
diff
changeset
|
19 public WikiImgLink(String imgUrl, String href, int width, int height, FLYS instance) { |
6231
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
20 super(imgUrl, href, width, height, false); |
6233
a8613826bcac
Call update after setting the instance
Andre Heinecke <aheinecke@intevation.de>
parents:
6231
diff
changeset
|
21 this.instance = instance; |
a8613826bcac
Call update after setting the instance
Andre Heinecke <aheinecke@intevation.de>
parents:
6231
diff
changeset
|
22 update(); |
6231
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
23 } |
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
24 |
6233
a8613826bcac
Call update after setting the instance
Andre Heinecke <aheinecke@intevation.de>
parents:
6231
diff
changeset
|
25 @Override |
6231
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
26 protected void update() { |
6602
244beb29418e
Fix for SAML authentication in FLYSHeader's Info button (#702).
Christian Lins <christian.lins@intevation.de>
parents:
6546
diff
changeset
|
27 setContents(WikiLinks.imageLinkForm(instance, href, imgUrl, "wikiImgLink" + toString())); |
6231
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
28 setWidth(width); |
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
29 setHeight(height); |
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
30 setOverflow(Overflow.VISIBLE); |
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
31 } |
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
32 } |