You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by vladimir lenin <ch...@yahoo.com> on 2006/02/11 00:53:02 UTC
struts mapped properties
I have a List of HashMaps (both the key and value are
strings)
List list=new ArrayList();
for(int i=0;i<10;i++)
{
Map map=new HashMap();
for(int j=0;j<10;j++)
{
map.put("key"+j,"value"+j);
}
list.add(map);
}
This list is in an action form. what is syntax to
get/set values in the map?
What is the naming convention I should follow so that
struts can populate the map values when we submit the
form?
thank you
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: struts mapped properties
Posted by vladimir lenin <ch...@yahoo.com>.
Laurie Harper <laurie <at> holoweb.net> writes:
>
> http://struts.apache.org/struts-doc-
1.2.x/userGuide/building_view.html#indexed
>
Thank you for the link.
I tried list[0](key1) to get the value of "key1" in the map in the list at
location 1.
but it is not working
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: struts mapped properties
Posted by Laurie Harper <la...@holoweb.net>.
vladimir lenin wrote:
> I have a List of HashMaps (both the key and value are
> strings)
>
> List list=new ArrayList();
>
> for(int i=0;i<10;i++)
> {
> Map map=new HashMap();
>
> for(int j=0;j<10;j++)
> {
> map.put("key"+j,"value"+j);
> }
> list.add(map);
> }
>
> This list is in an action form. what is syntax to
> get/set values in the map?
>
> What is the naming convention I should follow so that
> struts can populate the map values when we submit the
> form?
> thank you
http://struts.apache.org/struts-doc-1.2.x/userGuide/building_view.html#indexed
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org