PS I'd strongly recommend figuring out how webwork works WITHOUT looking at the source first, and just using the docs.
On Nov 18, 2003, at 9:25 PM, Rajagopal. V wrote:
Hani Thanks for the reply. I did take a look at CDList class and the one thing thats puzzling me is that in the doStartTag and doAfterBody of IteratorTag, all its doing is a iterator.next() which should return a Object. My problem is how does that automatically get cast down to a CD Class. I come from a Struts background and in that case, the logic:iterate has a type attribute which specifies what is the type of the individual elements in a Collection. I couldnt find a similar match in Webwork.
Thanks Raj
--- Hani Suleiman <[EMAIL PROTECTED]> wrote:-------------------------------------------------------have a look at the webwork.examples.i18n.CDList class. That is the action class, so when the page makes a call to CDList, that automatically calls the getCDList method in that action class. The CDList is now iterated through and within the iterate block, the top of the value stack now has the current CD at the top, so when the propertytag tries to display 'album', the method called will be getAlbum() on the particular CD that the iterator now points at.
On Nov 18, 2003, at 8:25 PM, Rajagopal. V wrote:
theHello I just started looking at Webwork and checking outexamples. One thing i noticed in cdlist.jsp isthisvalue="album"/>">code <webwork:iterator value="CDList"> <option value="<webwork:propertyis<webwork:property value="album"/>, <webwork:property value="artist"/>, <webwork:property value="country"/>, <webwork:text name="'price'" value0="@pricer/computePrice(price)"/> </option> </webwork:iterator>
CDList is actually a List of "CD" objects, but i couldnt find anywhere in the code where this castmade back. So how does webwork know which objecttocall when the getAlbum() is called?AddressGuard
TIA Raj
__________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mailhttp://antispam.yahoo.com/whatsnewfree
https://lists.sourceforge.net/lists/listinfo/opensymphony-webworkThis SF.net email is sponsored by: SF.net GivebackProgram.Does SourceForge.net help you be more productive?Does ithelp you create better code? SHARE THE LOVE, andhelp us helpYOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED]
-------------------------------------------------------
https://lists.sourceforge.net/lists/listinfo/opensymphony-webworkThis SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED]
__________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree
------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork