aspose file tools*
The moose likes Struts and the fly likes doubt regarding <html:select> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "doubt regarding <html:select>" Watch "doubt regarding <html:select>" New topic
Author

doubt regarding <html:select>

parthiban thrangaraju
Greenhorn

Joined: Feb 06, 2011
Posts: 25
Hi All,



<table class="col-1">
<html:form action="/clientsForm" styleId="contacts-form">
<tr>
<td>
<bean:message key="clientscomment.title3"/><br/>
</td>
<td>
<html:text property="name"/>
</td>
<td>
<html:errors property="name"/><br/>
</td>
</tr>
<tr>
<td>
<bean:message key="clientscomment.title8"/>

</td>
<td>

<html:select property="typeofbusiness" onchange="call(this);">

<htmlption value="">Select TypeofBusiness</htmlption>
<htmlption value="1"><%="NemoTravels"%></htmlption>
<htmlption value="2">NemoHotels</htmlption>
<htmlption value="3">NemoCorporateTravels</htmlption>
<htmlption value="4">NemoAgriCulture</htmlption>
<htmlption value="5"><%="NemoConstructions"%></htmlption>
<htmlption value="6">NemoFoundation</htmlption>
<htmlption value="7">NemoItSolutions</htmlption>
<htmlption value="8">Nemo</htmlption>
<htmlption value="9">Nemo</htmlption>
<htmlption value="10">Nemo</htmlption>
<htmlption value="11">Nemo</htmlption>

</html:select>
</td>

<td>
<html:errors property="typeofbusiness"/><br/>

</td>
</tr>

<tr>
<td colspan="3">
<select id="combo" name="combo2"/>
<%--<html:select property="typeofbusiness" onfocus="combo" onchange="combo2" />--%>
</td>
</tr>
<tr>
<td>
<bean:message key="clientscomment.title4"/>
</td>
<td>

<html:text property="email" />
</td>
<td>
<html:errors property="email"/>
</td>
</tr>
<tr>
<td>
<bean:message key="clientscomment.title7"/>
</td>
<td>
<html:text property="contactno" />
</td>
<td>
<html:errors property="contactno"/>
</td>
</tr>
<tr>
<td>
<bean:message key="clientscomment.title5"/><br/>
</td>
<td>
<html:text property="state" />
</td>
<td>
<html:errors property="state"/>
</td>
</tr>
<tr>
<td>
<bean:message key="clientscomment.title6"/>
</td>
<td>
<html:textarea property="message" />
</td>
<td>
<html:errors property="message"/>
</td>
</tr>
<tr class="wrapper">
<td colspan="3">
<html:submit value="SUBMIT" styleId="submit"/>
</td>
</tr>
</html:form>
</table>


in the above code hot to convert this code <select id="combo" name="combo2"/> to <html:select>

can any one help me

thanks in advance
parthiban
debraj mallick
Ranch Hand

Joined: Mar 08, 2011
Posts: 188

hi thrangaraju,

take a look at these examples,
http://struts.apache.org/2.0.14/docs/select.html
http://struts.apache.org/2.2.3/docs/struts-2-form-tags.html
http://www.mkyong.com/struts2/struts-2-sselect-drop-down-box-example/

tag reference:
http://struts.apache.org/2.0.14/docs/tag-reference.html
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: doubt regarding <html:select>