Thanks much Vincent.
Just curious as to how to do in jsp.
please let me know
That way may be i can also try mentioing it in the table row in the jsp for the drop 
down
meanwile i will post back my results of mentioing in the action form as default
 
Thanks
Sam

Vincent Lin <[EMAIL PROTECTED]> wrote:
Actually, you can set the default value to the select
attribute of the form bean 
anywhere before the tag. You can do it
either in JSP or action class.
I suggest doing it in your action class.
For example: 

int defaultValue = getDefaultISBN(bookId);
form.setISBN(defaultValue);
...

Regards,
Vincent

--- as as ªº°T®§¡G> Thanks
much!
> That helps.
> But also, i have a table with rows.each row has
> details about a specific book(like bookname is a
> column and so is ISBN)
> so when a user clicks on a row, those details are
> displayed of that book, with a drop down saying
> order the book from this bookStoreName (shown as a
> drop down, with a default bookStoreName for each
> book).so this value is defualt for that row but not
> for the whole table /struts form
> so wondering how I can implement default to the
> whole form.....in my books object in my
> logic:iterate tag, iterating over id=book
> 
> Thanks in advance.
> sam
> 
> Vincent Lin wrote:
> Hi,
> 
> You can specify a default value to ISBN in the form
> bean. Then the selected option will jump to the
> default value you set when the page is rendered.
> 
> For example, in the form bean you declare ISBN:
> 
> private int ISBN = 12345;
> 
> And you have an option "12345" as the property value
> in your option collection. The select object will
> jump
> to "12345" (struts will give it a "selected"
> attribute
> in tag) when the page is loaded.
> 
> Regard,
> Vincent
> 


-----------------------------------------------------------------
¨C¤Ñ³£ Yahoo!©_¼¯
®üªºÃC¦â¡B&shy;·ªº®ð®§¡B·R§Aªº·Å«×¡AºÉ¦b«H¯È©³¹Ï
http://tw.promo.yahoo.com/mail_premium/stationery.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster.

Reply via email to