Sove Error By <s:iterator value="getDTl">this is for first element<s:property value="top[1]"></s:iterator>
Sébastien Domergue wrote: > > When you are inside an iterator, the context becomes the objet as it is > in a "for" except that there is no explicit name for the property > handled. In struts, it's a generic name : [0]. If you just want to > display the toString() result, you just have to write : <s:property/> > without more parameter. If you want to print a special field of your > bean, you can access it the same way as in the jsp with <s:property > value="..."/> where [0] will be the current object in the iterator. > > If you want more examples, you should go [1] and see the third example. > > Regards > > [1] : http://struts.apache.org/2.x/docs/iterator.html > > > > Hardik Shah a écrit : >> Thnaks >> >> but when i print like >> <s:property value="[0].{1}"/> >> >> >> it shows value in all same like [1,1] >> i could not understand properly >> >> what it do >> please help more and be more descriptive >> >> >> Sébastien Domergue wrote: >> >>> Hi, >>> >>> in an iterator, the object can be accessed by [0]. After that, it is as >>> in Java. So, with something like that it should work : >>> >>> <s:iterator value="getDTl"> >>> <s:prpoerty value="[0].{1}"/> >>> </s:iterator> >>> >>> >>> Regards >>> >>> Sébastien >>> >>> Hardik Shah a écrit : >>> >>>> hi >>>> i am using struts 2.0.11.2 >>>> >>>> i m filling vector somthing like >>>> >>>> while (rs.next()) { >>>> Object [] record = { >>>> new Integer(rs.getInt("NodeId")), // Node >>>> Id >>>> rs.getString("NodeDisplayName"), >>>> // Display Name >>>> new Integer(rs.getInt("ParentNodeId")), >>>> // Parent Id >>>> rs.getString("FolderName"), >>>> // Folder Name >>>> rs.getString("CanReadFlag"), >>>> // Can Read Flag >>>> rs.getString("CanAddFlag"), >>>> // Can Add Flag >>>> rs.getString("CanEditFlag"), >>>> // Can Edit Flag >>>> rs.getString("canDeleteFlag"), >>>> // Can Delete Flag >>>> new Integer(rs.getInt("iformNo")), >>>> // No of comments >>>> rs.getString("Filename"), >>>> //filename >>>> rs.getDate("ModifyOn"), >>>> //file last modified on >>>> rs.getString("UserDefineVersionId") >>>> }; >>>> nodeInfo.addElement(record); >>>> >>>> >>>> >>>> how can i get particular field at jsp side in s:iterator >>>> >>>> somthing like >>>> that >>>> >>>> <s:iterator value="getDTl"> >>>> <s:prpoerty value="{1}"/> >>>> </s:iterator> >>>> >>>> but i can not please help me >>>> >>>> >>>> >>>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >>> For additional commands, e-mail: user-h...@struts.apache.org >>> >>> >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > -- View this message in context: http://www.nabble.com/about-s%3Aiterator-tp22119987p22134055.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