struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charlie Toohey <>
Subject Re: html:text tag "indexed" attribute
Date Sun, 02 Feb 2003 05:47:34 GMT
Thanks David. That worked for the value attribute:

<logic:iterate name="aForm" property="stringArray" id="aString" >
   <html:text indexed="true" property="aString" value='<%= aString.toString() 
 %>' /> 

BUT, this resolves to an HTML text tag of:
<input type="text" name="org.apache.struts.taglib.html.BEAN[0].aString" 

This is my larger question --- what I'm trying to get is
<input type="text" name=aString[0] value="somevalue">

Using the Struts html:text tag with indexed="true", I am iterating over a 
collection of String objects, NOT a collection of bean objects with 
properties. Therefore, instead of using the bean name for the "name" 
attribute and the bean property for the "property" attribute, like all of the 
examples I have seen, I do not know what to put for the "name" and "property" 
attributes, because this is a collection of Strings, not beans, and the 
String objects do NOT have a property.

Please help !     I've been trying to get this to work for 2 days now.


On Friday 31 January 2003 07:43 pm, you wrote:
> > Charlie Toohey <> writes:
>Thanks David.
>     I tried your suggestion although I still have no idea what to
> use for the value of "property" --- any way, I can't get it work.
> I can not get my .jsp to compile using your suggested scriptlet
> for the "value" attribute. Here is what I have got:
>     <logic:iterate name="aForm" property="stringArray"
>              id="aString"> 
>        ..
>        <html:text indexed="true" property="aString"
>                value='<%= aString %>' Charlie> />
>        ..
>     </logic:iterate>
>     This gives me the following exception:
>     cannot resolve symbol
>     symbol  : method setValue (java.lang.Object)
>     location: class org.apache.struts.taglib.html.TextTag
>     _jspx_th_html_text_0.setValue(aString );
> Change '<%= aString %>' to '<%= aString.toString() %>', then see how far
> you get.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message