File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Help me about html:select Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Help me about html:select" Watch "Help me about html:select" New topic
Author

Help me about html:select

johny nam
Greenhorn

Joined: Aug 15, 2008
Posts: 1
i have a table. when you select a record on the table it will bind data to textbox and combobox but it is only bind data to textbox and not bind to combobox.
please help me.
this is my code in jsp file
__________________________________________________________________************
<form action="Action/processCityAction.do" method="post" enctype="multipart/form-data" name="form1" id="form1">
<table width="500" border="1">
<tr>
<td width="974" height="38"><div align="center" class="style1"> City Informations </div></td>
</tr>
<tr>
<td><table width="660" border="1">
<tr>
<td width="114" bgcolor="#999999"><div align="center">City ID </div></td>
<td width="197" bgcolor="#999999"><div align="center">City Name </div></td>
<td width="149" bgcolor="#999999"><div align="center">Country ID </div></td>
<td width="187" bgcolor="#999999"><div align="center">Decriptions</div></td>
<td width="187" bgcolor="#999999"><div align="center">Delete</div></td>
</tr>
<logic:iterate id="list" name="cityActionForm" property="cityList">
<tr>
<td align="center">
<a href="Action/processCityAction.do?cityId=<bean:write name="list" property="cityId"/>&action=select"><bean:write name="list" property="cityId"/></a>
</td>
<td align="center"><bean:write name="list" property="cityName"/></td>
<td align="center"><bean:write name="list" property="countryID"/></td>
<td align="center"><bean:write name="list" property="descriptions"/></td>
<td align="center">
<a href="Action/processCityAction.do?cityId=<bean:write name="list" property="cityId"/>&action=delete">delete</a>
</td>
</tr>
</logic:iterate>l

</table></td>
</tr>
</table>
<table width="669" border="1">
<tr>
<td><div align="right">City ID : </div></td>
<td colspan="2"><input type="text" name="cityId" value="<bean:write name="cityActionForm" property="cityId"/>" /></td>
<td width="119"><div align="right">Country : </div></td>
<td width="252">Here
______________________________________________________________________
it is not bind data when i select row from above table. it alway show the first record from list
_________________________________________________________________________
<select name="countryID">
<logic:iterate id="list" name="cityActionForm" property="countryList">
<option value="<bean:write name="list" property="countryID"/>">
<bean:write name="list" property="countryName"/>
</logic:iterate>
</select>
_______________________________________**
</td>
</tr>
<tr>
<td><div align="right">City Name : </div></td>
<td colspan="2"><input type="text" name="cityName" value="<bean:write name="cityActionForm" property="cityName"/>" /></td>
<td width="119" rowspan="2"><div align="right">Descriptions : </div></td>
<td width="252" rowspan="2"><input type="text" name="descriptions" value="<bean:write name="cityActionForm" property="descriptions"/>" /></td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>

<tr>
<td colspan="3">
<div align="right">
<input name="btNew" type="reset" id="btNew" value="Reset" />
</div></td>
<td colspan="2">
<div align="left">
<input type="submit" id="btInsert" value=" OK " name="btInsert"/>
</div></td>
</tr>
</table>
<p> </p>
</form>
________________________________________________________________________**

please tell me when have you have answer.
namnguyencntt.apt@Gmail.com
 
Don't get me started about those stupid light bulbs.
 
subject: Help me about html:select