editing a form

2004-10-06 Thread Anna Kerekes
Hello,
 
The user wishes to edit a message that was previously created.  In my edit.jsp I wish 
to display a dropdown
with the option that was previously selected as selected.  Currently I have:
 
html:select property=expiryDay

html:options collection=days property=idValue  
labelProperty=displayValue /

/html:select

I want the value of expiryDay from the database to be selected (by default) on the 
dropdown.  The user can select another option from the dropdown if they want to change 
it...

how do i do it in struts?

any help appreciated,

Anna


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



Re: editing a form

2004-10-06 Thread Wendy Smoak
From: Anna Kerekes [EMAIL PROTECTED]
 I want the value of expiryDay from the database to be selected (by
default) on the dropdown.
 The user can select another option from the dropdown if they want to
change it...
 how do i do it in struts?

In the Action code, set the 'expiryDay' property of the form bean.  Then
forward to the JSP and the framework will automatically pre-select the
matching value.

Search the archives for 'prepopulate form' and you should find many posts
discussing this.

-- 
Wendy Smoak


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