Use an action to set the form-bean and then save it to the necessary scope under the 
name published in the action mapping corresponding to the form being displayed.

Setting data to the bean via the action decouples the form and allows you to reuse the 
business logic that retreives the data from the persistent store.

Sri

-----Original Message-----
From: Mohan Radhakrishnan [mailto:MohanR@;hclcomnet.co.in] 
Sent: Saturday, November 09, 2002 6:33 AM
To: 'Struts Users Mailing List'
Subject: Set selected value


Hi,
     The selected value of a drop-down can be set by filling the String[] in the form 
with the required values. But the values eventually come from the database. So inside 
the form you have to have access to one of the scopes where you could store the 
retrieved values. Is this how this is done ? Accessing values like this just to set 
the selected value seems to be a roundabout method. I am using collections in the 
tags. Thanks, Mohan

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


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

Reply via email to