struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From as as <sam_str...@yahoo.com>
Subject RE: Showing selected in struts option tag
Date Thu, 04 Mar 2004 04:40:18 GMT
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 <jasper_lin18@yahoo.com.tw> 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

--- as as TG> Hi,
> 
> OK. I tried the following and it works fine (shows
> me the drop down.Thanks for the syntax, Wendy)
> I now want to show a default book as the selected
> item in the drop down..
> how do I do it....
> 
> Thanks in advance.
> My code (working) below...
> 
> 
> 
> 
> 
> 
> Book:
> 
> 
> 
> 
> 
> 
> 
> No books found in this site.
> 
> 
> 
> 
> 
> 
> 
> > 
> labelProperty="bookName"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Wendy Smoak wrote:
> > From: as as [mailto:sam_struts@yahoo.com] 
> > > > > > > > ="employeeID"/>">> > > >> >
> >
> 
> An example from my project that may get you started:
> 
> labelProperty="value"/>
> 
> 
> You can drop the '-el' in the tags, there are no
> expressions in this one
> anyway. The docs for and are here:
>
http://jakarta.apache.org/struts/userGuide/dev_html.html
> 
> Give it a try and post what you come up with!
> 
> -- 
> Wendy Smoak
> Application Systems Analyst, Sr.
> ASU IA Information Resources Management 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 
> 
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Search - Find what youre looking for faster. 

-----------------------------------------------------------------
Cѳ Yahoo!_
CB&shy;𮧡BRAūסAɦbHȩ
http://tw.promo.yahoo.com/mail_premium/stationery.html

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------
Do you Yahoo!?
Yahoo! Search - Find what youre looking for faster.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message