Hi
I have a jsp with a form and 1text fields and a drop down in it. When the page loads, I populate the drop down using <html:select> of struts.
Usage:
<html:select name="guiSecurityBranchListForm" property="branchId" style='WIDTH:250PX' >
<htmlption value="" ></htmlption>
<htmlptionsCollection name="guiSecurityBranchListForm"
property="branchList" label="branchCode" value="branchId"/>
</html:select>
Now, when the user selects an item from the drop down, I need the the text field to be filled in based on the selection he/she makes. How do I do this?
Note:
"branchList" is an ArrayList containing "Branch" beans. The attributes in the Branch bean are 1) branchId 2) branchCode, 3) branchName. When the user selects a branchId from the drop down, I should be able to get the branchName from the Branch bean? I know I can do it by using pure Java code in my JSP, but is there a Struts taglib to help me out.
I have a jsp with a form and 1text fields and a drop down in it. When the page loads, I populate the drop down using <html:select> of struts.
Usage:
<html:select name="guiSecurityBranchListForm" property="branchId" style='WIDTH:250PX' >
<htmlption value="" ></htmlption>
<htmlptionsCollection name="guiSecurityBranchListForm"
property="branchList" label="branchCode" value="branchId"/>
</html:select>
Now, when the user selects an item from the drop down, I need the the text field to be filled in based on the selection he/she makes. How do I do this?
Note:
"branchList" is an ArrayList containing "Branch" beans. The attributes in the Branch bean are 1) branchId 2) branchCode, 3) branchName. When the user selects a branchId from the drop down, I should be able to get the branchName from the Branch bean? I know I can do it by using pure Java code in my JSP, but is there a Struts taglib to help me out.