struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ray Madigan" <...@madigans.org>
Subject RE: Map Backed Form/Tiles
Date Fri, 19 Sep 2003 16:49:35 GMT
I have narrowed the problem down to:

<html-el:text property='elementMap(${element.element})'
              value='${element.value}'/>

being in a tile.  If the tag is in the main body of the JSP
everything works as it should.

???? - Guess I better look harder at the tiles I use.

Thanks


-----Original Message-----
From: news [mailto:news@sea.gmane.org]On Behalf Of Navneet Karnani
Sent: Thursday, September 18, 2003 10:34 PM
To: struts-user@jakarta.apache.org
Subject: Re: Map Backed Form


I suggest that you look at the code once more. There is a possibility
that the error is not due to the problem that you see but something
else. And i'm nearly sure that the problem is not as complex as it seems.

If you want, I can look at the sources and test a fix at my side.

Let me know.

- Navneet Karnani
Umber Business Solutions Pvt. Ltd.

Ray Madigan said the following on 19/09/2003 3:15 AM:

> I tried this - same result? hmmmm
>
> -----Original Message-----
> From: Jason Lea [mailto:jason@kumachan.net.nz]
> Sent: Thursday, September 18, 2003 2:18 PM
> To: Struts Users Mailing List
> Subject: Re: Map Backed Form
>
>
> I read this somewhere (perhaps Struts in Action) and I use map-backed
> properties... the methods should have String keys, but Object values eg
>
> public Object getElementMap ( String key ) {
> public void setElementMap ( String key, Object value )
>
>
> Ray Madigan wrote:
>
>
>>I am having some difficulty with my Map Backed Form implementation.
>>
>>I have in my Form:
>>
>>private Properties elementMap = null;
>>
>>public String getElementMap ( String key ) {
>>    return ( String ) elementMap.getProperty ( key );
>>}
>>
>>public void setElementMap ( String key, String value ) {
>>    elementMap.put ( key, value );
>>}
>>
>>public void reset ( ActionMapping mapping, HttpServletRequest request ) {
>>    ...
>>    elementMap = new Properties ( );
>>}
>>
>>I have in my JSP:
>>
>><html-el:text property='elementMap(${element.element})'
>>value='${element.value}'/>
>>
>>If I enumerate the request parameters in the reset method of the form
>>the paramaters and values look like:
>>
>>name->elementMap(PerPage)
>>value->4
>>
>>I get the exception
>>java.lang.IllegalAccessError: try to access class
>>org.apache.commons.beanutils.MappedPropertyDescriptor$1 from class
>>org.apache.commons.beanutils.MappedPropertyDescriptor
>>
>>>>From past experience I get this exception when struts is looking for a
>>setter
>>in my form and can't find it.  I think that struts is looking for a method
>>'setElementMap(perPage)' and has not figured out it is a mapped property
>>for some reason.  And I can't write a method with name.
>>
>>Any help would be appreciated.
>>
>>Thanks
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>
>>
>
>
>
> --
> Jason Lea
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message