Kawczynski, David wrote:
> 
> For this example pretend your field "firstname" has a max length of 15:
> <s:textfield name="firstname" maxlength="15" />
> 

LOL :)  I suspect that my difficulties in trying to use OGNL to insert the
length are related to the fact that the method call on a string is
String.length() not String.getLength and when I use size="%{attrib.length}"
OGNL is trying to call getAttrib().getLength() on my action -which won't
work. 

So, rephrasing slighly, how do I/can I use OGNL to call methods on
attributes in my actions that do not follow the Bean pattern.

Regards

> -----Original Message-----
> From: RogerV [mailto:roger.var...@googlemail.com] 
> Sent: Monday, November 16, 2009 10:29 AM
> To: user@struts.apache.org
> Subject: OGNL expression help
> 
> 
> Could someone show me the correct way to insert a string 
> field length into
> the size attribute of a <s:textfield> element. 
> 
> Regards
> -- 

-- 
View this message in context: 
http://old.nabble.com/OGNL-expression-help-tp26373897p26374503.html
Sent from the Struts - User mailing list archive at Nabble.com.


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

Reply via email to