Re: OGNL InappropriateExpressionException

Malcolm Edgar <[email protected]> Wed, 15 Jan 2003 08:01:10 +1100
Newsgroups gmane.comp.java.tapestry.devel
Message-ID <[email protected]>
OGNL supports Maps using expression='myMap["key"]' style expressions which 
are read/write

regards Malcolm

At 08:05 PM 14/01/2003 +0100, [email protected] wrote:
>I try to use a Map-object to hold all the page variables, but
>have problems to set values.
>
>Here is my current code (which does not work):
>-----------page----------------------
>     <component id="message" type="TextArea">
>          <binding name="value" expression='attribute("message")'/>
>     </component>
>     <component id="message" type="TextField">
>          <binding name="value" expression='attribute("subject")'/>
>     </component>
>
>----------java-----------------------
>     HashMap attribute;
>     public String attribute(String sKey) {
>         return (String) attributes.get(sKey);
>     }
>
>     public void attribute(String sKey, String value) {
>         attributes.put(sKey, value);
>     }
>--------------------------------------
>
>The in-direction works, but when i submit the form
>and tapestry tries to set the value i get a
>InappropriateExpressionException.
>
>Is it possible at all? If so, please can anyone tell me what i'm missing.
>
>Kind regards,
>
>Oliver
>
>
>
>
>
>-------------------------------------------------------
>This SF.NET email is sponsored by: Take your first step towards giving
>your online business a competitive advantage. Test-drive a Thawte SSL
>certificate - our easy online guide will show you how. Click here to get
>started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en
>_______________________________________________
>Tapestry-developer mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/tapestry-developer



-------------------------------------------------------
This SF.NET email is sponsored by: Take your first step towards giving 
your online business a competitive advantage. Test-drive a Thawte SSL 
certificate - our easy online guide will show you how. Click here to get 
started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en