Hans Hedung wrote:
In my frombean I have the values
String reportName = "";

String reportDescription = "";
With approiate getters and setter.... Im populating the reportName value in my formbean through the following in my jsp (dropdown) <%
java.util.ArrayList reportList = new ArrayList();
reportList.add(new LabelValueBean("reportDescription1", "reportName1"));
reportList.add(new LabelValueBean("reportDescription2", "reportName2"));
%>

This sort of logic really belongs in your action, not the JSP. Is there any special reason you want to do it here?

<html:select property="reportName" >
<html:options collection="reportList" property="value" labelProperty="label"/>
</html:select></td>
This works fine when I want to populate the reportName valkue in my formbean....however, id like to set the reportdescription in my formbean in the same tag....is that possible? In toher words I want to set the properties simultaneously from the dropdown. Or can someone suggest a other solution.

You can't really populate two properties from one input source; a select will only submit the selected value (or collection of values if you use multiple="true").

What you probably want is to build a map of report name --> report description and store it in your data layer, then do the lookup from key (report name) to value (description) in the action that handles the form submission.

However, without knowing more about your domain and requirements it's difficult to offer precise advice. You might try posting again with a more complete description of what it is you are trying to achieve (i.e. your functional requirements, rather than any particular implementation approach). That might yield some more targeted help.

L.


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

Reply via email to