Hi,
I have two combo boxes. The first is a list of storerooms. When the user
picks a storeroom, the second combo is filled using the value in the first.
I have a session bean 'requisition' that is used over a number of forms.
My first combo is as follows:
<TR>
<TD><bean:message key="prompt.storeroom"/></TD>
<TD>
<html:select property="requisitionLines.storeroom.name"
onchange="javascript:requisition.submit()">
<app:OptionList listCmd="getStoreroomList" searchType="" />
</html:select>
</TD>
</TR>
I have my own tag that takes a cmd 'getStoreroomList' that returns option
tags. The value of the selection is placed into the property
'requisitionLines.storeroom.name'.
My second combo is as follows:
<logic:notEqual name="requisition"
property="requisitionLines.storeroom.name" value="" scope="session">
<TR>
<TD><bean:message key="prompt.location"/></TD>
<TD>
<html:select property="requisitionLines.location">
<app:OptionList listCmd="getDeliveryToLocationList"
searchType=<jsp:getProperty name="requisition"
property="requisitionLines.storeroom.name"/> />
</html:select>
</TD>
</TR>
</logic:notEqual>
My logic tag only shows the second combo box if the user has selected a
stockroom. The problem I am having is getting the value of the first combo
which has been placed in 'requisitionLines.storeroom.name' and passing it to
my OptionList function via the searchType parameter.
Any help in this matter would be appreciated.
Oh, on a second point, how do I get the first combo, after a selection has
been made and placed into 'requisitionLines.storeroom.name' on a refresh or
redirect back to this page automatically set the combo index to the last
selected storeroom.
Regards
Alex