Hello,
<logic:iterate id="vect1" collection="<%=vect%>" indexId="ijk">
<bean:write name="vect1" property="firstName" />
</logic:iterate>
The above code shows that I have a vector "vect" of objects and "firstName" is the property of the object. However, the <bean:write> does not show the value of the property "firstName".
What can be the possible solution?
Regards,
Medha
-
Struts <logic:iterate> (5 messages)
- Posted by: Medha Vyas
- Posted on: May 26 2003 04:30 EDT
Threaded Messages (5)
- Struts <logic:iterate> by Chetans on May 26 2003 04:58 EDT
- Struts <logic:iterate> by Ashok Madhavan on June 14 2003 15:57 EDT
- Struts <logic:iterate> by Chetans on May 26 2003 05:02 EDT
- Try by Web Master on June 14 2003 15:33 EDT
- I am sulochana ahankari's brother by girish ahankari on June 16 2003 02:08 EDT
-
Struts <logic:iterate>[ Go to top ]
- Posted by: Chetans
- Posted on: May 26 2003 04:58 EDT
- in response to Medha Vyas
Medha:
> <logic:iterate id="vect1" collection="<%=vect%>" indexId="ijk">
>
> <bean:write name="vect1" property="firstName" />
>
> </logic:iterate>
I see a glitch in your code snippet. the section <%=vect%> is not what you are looking for. If you dry run through this code, then i guess the result should be the toString() representation of your vect object as a value for collection.
Run you code and do view source in your browser. the logic tag is not getting proper collection handle is the problem.
Regards
Chetan -
Struts <logic:iterate>[ Go to top ]
- Posted by: Ashok Madhavan
- Posted on: June 14 2003 15:57 EDT
- in response to Chetans
I guess you cant use "<% xxxxxx %. within any struts tags.
reg
ashok -
Struts <logic:iterate>[ Go to top ]
- Posted by: Chetans
- Posted on: May 26 2003 05:02 EDT
- in response to Medha Vyas
Medha:
> <logic:iterate id="vect1" collection="<%=vect%>" indexId="ijk">
>
> <bean:write name="vect1" property="firstName" />
>
> </logic:iterate>
I see a glitch in your code snippet. the section <%=vect%> is not what you are looking for. If you dry run through this code, then i guess the result should be the toString() representation of your vect object as a value for collection attribute in logic:iterate tag.
Run your code and do view source in your browser. the logic tag is not getting proper collection handle is the problem.
One more important thing is, if you post your queries on apache site then you will get more immd. response for your struts related queries.
http://jakarta.apache.org/struts/faqs/index.html try this site.
or subscribe to apache-struts maililing list where you will get lot of help.
Regards
Chetan
Regards
Chetan -
Try[ Go to top ]
- Posted by: Web Master
- Posted on: June 14 2003 15:33 EDT
- in response to Medha Vyas
I haven't tried iterating through a vector, but I use the following for an ArrayList:
<logic:iterate id="items" name="beanName" property="ArrayListName">
<bean:write name="items" property="ArrayListMemberAttribute" />
</logic:iterate>
This iterates through an ArrayList of objects and writes the appropriate getter. In my case "ArrayListMemberAttribute" is actually "modelnum."
So, I'd suggest actually referencing vect instead of writing it between the quotes.
Hope this helps,
Jeremy -
I am sulochana ahankari's brother[ Go to top ]
- Posted by: girish ahankari
- Posted on: June 16 2003 02:08 EDT
- in response to Medha Vyas
r u prasas vyas,solapur's sister. please mail me at girish_ahankari at yahoo dot com
HI iam girish ahankari s/o sulochana ahankari.