> Doesn't help unfortunately as the
> length of the string
> in characters is not the same as the space required to
> display it in full!
Have you tried adding 2 or 3 to the length value?
Neil
--
Neil Aggarwal, (281)846-8957, http://UnmeteredVPS.net
Host your struts app on a CentOS VP
the string. Doesn't help unfortunately as the length of the string
in characters is not the same as the space required to display it in full!
Regards
--
View this message in context:
http://old.nabble.com/OGNL-expression-help-tp26373897p26387022.html
Sent from the Struts - User mail
> Extending String? String is final so it isn't doable ;-)
I did not check that.
I see someone posted a better solution than this but
I guess if someone wanted to have a getLength() for
a String, they could write a container class that
holds a String and then implement all the methods to
call
2009/11/16 Neil Aggarwal :
> You could create your own MyString class that
> extends String and then have a getLength() method
> that calls super.length().
Extending String? String is final so it isn't doable ;-)
Regards
--
Lukasz
http://www.lenart.org.pl/
-
t; -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 st
> 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
You could create your own MyString class that
extends String and then have a getLengt
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
> t
> > Could someone show me the correct way to insert a string
> > field length into
> > the size attribute of a element.
>
I think he was looking for something more involved,
something like:
I have not tested code to do this, so I don't know if
that would work. Also, what if the myString
For this example pretend your field "firstname" has a max length of 15:
> -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
>
&g
Could someone show me the correct way to insert a string field length into
the size attribute of a element.
Regards
--
View this message in context:
http://old.nabble.com/OGNL-expression-help-tp26373897p26373897.html
Sent from the Struts - User mailing list archive at Nabble.com
10 matches
Mail list logo