Discussion:
[Stripes-users] stripes:options-map example?
William Krick
2017-04-28 20:28:26 UTC
Permalink
Is there an example somewhere that shows how to use the stripes:options-map
tag?

I'm trying to get it working with a Map<String, String> object but not
having any luck.

I'm using this syntax...

<stripes:options-map map="${actionBean.myMap}"/>

The map is defined in my ActionBean like this...

private static final Map<String,String> myMap = new HashMap<String,
String>();
static {
myMap.put("key1","Value 1");
myMap.put("key2","Value 2");
myMap.put("key3","Value 3");
}

public static Map<String, String> getMyMap() {
return myMap;
}
Fred Daoud
2017-04-28 20:53:59 UTC
Permalink
your getter should not be static
cheers
freddy
Post by William Krick
Is there an example somewhere that shows how to use the stripes:options-
map tag?>
I'm trying to get it working with a Map<String, String> object but not
having any luck.>
I'm using this syntax...
<stripes:options-map map="${actionBean.myMap}"/>
The map is defined in my ActionBean like this...
private static final Map<String,String> myMap = new HashMap<String,
String>();> static {
myMap.put("key1","Value 1");
myMap.put("key2","Value 2");
myMap.put("key3","Value 3");
}
public static Map<String, String> getMyMap() {
return myMap;
}
----------------------------------------------------------------------
--------> Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_________________________________________________
Stripes-users mailing list
https://lists.sourceforge.net/lists/listinfo/stripes-users
Loading...