If you're calculating your value with s:set and setting a variable
called, "len" did you try the following -

<s:textarea label="Request Definition"
                    name="requestDefinition"
                    labelSeparator=""
                    labelposition="left"
                    readonly="true"
                    cols="80"
                    rows="%{#len}" />

On Thu, Feb 4, 2010 at 2:27 PM, Jim Talbut <jim.tal...@groupgti.com> wrote:
> Hi,
>
> I have:
>                    <s:textarea label="Request Definition" 
> name="requestDefinition" labelSeparator="" labelposition="left" 
> readonly="true" cols="80" rows="5" />
> Sometimes I have a LOT of data to display in the box, other times I have none 
> at all.
> I'd like the box to resize based on the amount of data.
>
> My best effort involved getting the length of requestDefinition (using 
> s:set), calculating a decent row count based on that and then trying to set 
> the rows="<%=len%>"
> Unfortunately that's against the DTD and struts blows up.
>
> Apart from a long series of ugly s:if elements is there any way to get a 
> dynamic rowcount?
>
> I may resort to use javascript, but that'd be quite a faff (these textareas 
> are in a series of forms generated by an iterator).
>
> Thanks
>
> Jim
>
>



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

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

Reply via email to