You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by David Graham <dg...@hotmail.com> on 2002/09/13 18:47:39 UTC
Trouble with map backed form properties
Ok, so I upgraded to 1.1b2 so I could use map backed form properties but I
still can't get them to work. I get this exception:
javax.servlet.jsp.JspException:
No getter method for property categoryName(1) of bean
org.apache.struts.taglib.html.BEAN
My ActionForm has a getCategoryName(String key) method (I also tried it with
an int instead of String).
Any ideas?
Thanks,
Dave
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Trouble with map backed form properties
Posted by Hemanth Setty <hs...@buildview.com>.
For a similar problem I had, I used DynaValidationForms and in the
definition i had something like
<form-bean
name="myForm"
dynamic="true"
type="com.abc.MyForm">
<form-property name="category" type="java.util.Map"/>
</form-bean>
on the jsp all the form fields will have category(key) as the property
attribute where key is the key value of the Map.This worked for me. Now
I did not try using a normal ActionForm but I am guessing its going to
be a similar way of saying void getCategory(Map) and Map setCategory()
as they both are DynaObjects.
-hemanth
Donald Ball wrote:
>On 9/13/2002 at 10:47 AM David Graham wrote:
>
>
>
>>Ok, so I upgraded to 1.1b2 so I could use map backed form properties but
>>I
>>still can't get them to work. I get this exception:
>>
>>javax.servlet.jsp.JspException:
>>No getter method for property categoryName(1) of bean
>>org.apache.struts.taglib.html.BEAN
>>
>>My ActionForm has a getCategoryName(String key) method (I also tried it
>>with
>>an int instead of String).
>>
>>Any ideas?
>>
>>
>
>what does your jsp look like?
>
>- donald
>
>
>--
>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Trouble with map backed form properties
Posted by Donald Ball <db...@rhoworld.com>.
On 9/13/2002 at 10:47 AM David Graham wrote:
>Ok, so I upgraded to 1.1b2 so I could use map backed form properties but
>I
>still can't get them to work. I get this exception:
>
>javax.servlet.jsp.JspException:
>No getter method for property categoryName(1) of bean
>org.apache.struts.taglib.html.BEAN
>
>My ActionForm has a getCategoryName(String key) method (I also tried it
>with
>an int instead of String).
>
>Any ideas?
what does your jsp look like?
- donald
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Trouble with map backed form properties
Posted by Hemanth Setty <hs...@buildview.com>.
On the ActionForm you should have methods that take the complete map ..ie
public Map getCategoryName() and
public setCategoryName(Map catName)
I think this should work.
-hemanth
David Graham wrote:
> Ok, so I upgraded to 1.1b2 so I could use map backed form properties
> but I still can't get them to work. I get this exception:
>
> javax.servlet.jsp.JspException:
> No getter method for property categoryName(1) of bean
> org.apache.struts.taglib.html.BEAN
>
> My ActionForm has a getCategoryName(String key) method (I also tried
> it with an int instead of String).
>
> Any ideas?
>
> Thanks,
> Dave
>
>
>
> _________________________________________________________________
> MSN Photos is the easiest way to share and print your photos:
> http://photos.msn.com/support/worldwide.aspx
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>