stripes:options-map example?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

stripes:options-map example?

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: stripes:options-map example?

Freddy D.
your getter should not be static
cheers
freddy


On Fri, Apr 28, 2017, at 04:28 PM, William Krick wrote:
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


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users