aspose file tools*
The moose likes Struts and the fly likes Help Needed Not able to display two drop downs in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Help Needed Not able to display two drop downs in jsp" Watch "Help Needed Not able to display two drop downs in jsp" New topic
Author

Help Needed Not able to display two drop downs in jsp

Revanth reddy
Ranch Hand

Joined: Oct 10, 2008
Posts: 52
Hi Guys,
I have a jsp with 12 fileds. out of which 5 fields are drop downs.
I have a onchange function which populates the data from SQL server to 2 dropdowns.(FLEX VERSION and FLSHVERSION)but the problem is when i go to this page , i am not able to see those 2 dropdowns.but when i enter SALESMODEL then Onchage function calling and displaying the those two dropdown, but this time it is hiding 2 dropdows(NEXTEST RECIPE and TECHNOLOGY) dropdowns.i.e at any point of time i am viewing only 10 fileds.

Here is my jsp.Any help is greatly appriciated.
by the way 2 drop downs are editable.



<html:form action ="/ProgrammingAdd.do?method=addPrimaryConfig" >
<font size="4" color='#2B60DE'><h3><u>Add Primary Configuration</u></h3>
</font>


<table>
<li><font color='#2B60DE'><h3>BLUE Fields are Required</h3></li>
<br/><br/>
<table>
<TR>
<TD><font color='#2B60DE'><h3>SALES MODEL </h3><br/></TD>
<TD><html:text name= "ProgrammingAddForm" property= "salesModel" tabindex="8" maxlength="40" style="text-transform:uppercase" onchange="javascript:loadOnChangeModel()"></html:text></TD>


<TD><font color='#2B60DE'><h3>SVN KIT </h3><br/></TD>
<TD><html:text name="ProgrammingAddForm" property= "svnkit" tabindex="8" maxlength="40" style="text-transform:uppercase" ></html:text></TD>
</TR>

<TR>
<TD><font color='#2B60DE'><h3>FAMILY </h3><br/></TD>
<TD><html:text name="ProgrammingAddForm" property= "family" tabindex="8" maxlength="40" style="text-transform:uppercase" ></html:text></TD>

<TD><font color='#2B60DE'><h3>REFLASH</h3><br/></TD>
<TD><html:select name="ProgrammingAddForm" property="type" tabindex="8">
<htmlption value="Y">Y</htmlption>
<htmlption value="N">N</htmlption>
</html:select>
</TD></font>
</tr>


<logic:present name = "ProgrammingAddForm" property = "techList">
<tr><td><h3><font color='#2B60DE'>TECHNOLOGY</font></h3></td><td>
<select id = "tech1" name="tech1" onKeyDownn="fnKeyDownHandler(this, event);" onKeyUpp="fnKeyUpHandler_A(this, event); return false;" onKeyPresss = "return fnKeyPressHandler_A(this, event);"onChange="fnChangeHandler_A(this, event);" >
<logic:notPresent name = "ProgrammingAddForm" property = "tech">
<option value="">SELECT ONE or ENTER NEW TECH</option>
</logic:notPresent>
<logic:present name = "ProgrammingAddForm" property = "tech">
<logic:equal name = "ProgrammingAddForm" property = "tech" value = "0">
<option value="" selected = "selected">SELECT ONE or ENTER NEW TECH</option>
</logic:equal>
<logic:notEqual name = "ProgrammingAddForm" property = "tech" value = "0">
<option value="<bean:write name = "ProgrammingAddForm" property="tech"/>" selected = "selected"><bean:write name = "ProgrammingAddForm" property="tech"/></option>
</logic:notEqual>
</logic:present>
<nested:iterate name="ProgrammingAddForm" property="techList" indexId="index">
<option value="<nested:write property=""/>"><nested:write property=""/></option>
</nested:iterate>
</select></td>
</logic:present>




<logic:present name = "ProgrammingAddForm" property = "recipeList">
<td><h3><font color='#2B60DE'>NEXTEST RECIPE</font></h3></td><td>
<select id = "recipe1" name="recipe1" onKeyDownn="fnKeyDownHandler(this, event);" onKeyUpp="fnKeyUpHandler_A(this, event); return false;" onKeyPresss = "return fnKeyPressHandler_A(this, event);" onChange="fnChangeHandler_A(this, event);" >
<logic:notPresent name = "ProgrammingAddForm" property = "recipe">
<option value="">SELECT ONE or ENTER NEW RECIPE</option>
</logic:notPresent>
<logic:present name = "ProgrammingAddForm" property = "recipe">
<logic:equal name = "ProgrammingAddForm" property = "recipe" value = "0">
<option value="" selected = "selected">SELECT ONE or ENTER NEW RECIPE</option>
</logic:equal>
<logic:notEqual name = "ProgrammingAddForm" property = "recipe" value = "0">
<option value="<bean:write name = "ProgrammingAddForm" property="recipe"/>" selected = "selected"><bean:write name = "ProgrammingAddForm" property="recipe"/></option>
</logic:notEqual>
</logic:present>
<nested:iterate name="ProgrammingAddForm" property="recipeList" indexId="index">
<option value="<nested:write property=""/>"><nested:write property=""/></option>
</nested:iterate>
</select></td>
</logic:present>


<tr>
<TD><h3>FASTT ID</h3></TD>
<TD><html:text name="ProgrammingAddForm" property= "fasttid" tabindex="8" maxlength="40" style="text-transform:uppercase" ></html:text></TD>

<TD><h3>LANGUAGE</h3></TD>
<TD><html:text name="ProgrammingAddForm" property= "lang" tabindex="8" maxlength="40" style="text-transform:uppercase" ></html:text></TD>
</TR>

<tr>
<td><h3>FLASH FILE NAME</h3></TD>
<TD><html:text name="ProgrammingAddForm" property= "flashFile" tabindex="8" maxlength="40" style="text-transform:uppercase" ></html:text></TD>

<TD><h3>FLEX FILE NAME</h3></TD>
<TD><html:text name="ProgrammingAddForm" property= "flexFile" tabindex="8" maxlength="40" style="text-transform:uppercase" ></html:text></TD>
</tr>

<logic:present name = "ProgrammingAddForm" property = "flashVersionList">
<tr><td><h3>FLASH VERSION</h3></td><td>
<select id = "flashVersion1" name="flashVersion1">
<logic:notPresent name = "ProgrammingAddForm" property = "flashVersion">
<option value=""></option>
</logic:notPresent>
<logic:present name = "ProgrammingAddForm" property = "flashVersion">
<logic:equal name = "ProgrammingAddForm" property = "flashVersion" value = "0">
<option value="" selected = "selected"></option>
</logic:equal>
<logic:notEqual name = "ProgrammingAddForm" property = "flashVersion" value = "0">
<option value="<bean:write name = "ProgrammingAddForm" property="flashVersion"/>" selected = "selected"><bean:write name = "ProgrammingAddForm" property="flashVersion"/></option>
</logic:notEqual>
</logic:present>
<nested:iterate name="ProgrammingAddForm" property="flashVersionList" indexId="index">
<option value="<nested:write property=""/>"><nested:write property=""/></option>
</nested:iterate>
</select></td>
</logic:present>




<logic:present name = "ProgrammingAddForm" property = "flexVersionList">
<td><h3>FLEX VERSION</h3></td><td>
<select id = "flexVersion1" name="flexVersion1">
<logic:notPresent name = "ProgrammingAddForm" property = "flexVersion">
<option value=""></option>
</logic:notPresent>
<logic:present name = "ProgrammingAddForm" property = "flexVersion">
<logic:equal name = "ProgrammingAddForm" property = "flexVersion" value = "0">
<option value="" selected = "selected"></option>
</logic:equal>
<logic:notEqual name = "ProgrammingAddForm" property = "flexVersion" value = "0">
<option value="<bean:write name = "ProgrammingAddForm" property="flexVersion"/>" selected = "selected"><bean:write name = "ProgrammingAddForm" property="flexVersion"/></option>
</logic:notEqual>
</logic:present>
<nested:iterate name="ProgrammingAddForm" property="flexVersionList" indexId="index">
<option value="<nested:write property=""/>"><nested:write property=""/></option>
</nested:iterate>
</select></td></tr>
</logic:present>

</table>
<br/><br/>
<html:submit></html:submit>
</html:form>
Satya Maheshwari
Ranch Hand

Joined: Jan 01, 2007
Posts: 368
Please use code tags to make your code understandable to others.


Thanks and Regards
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61424
    
  67

And do not replace < with &lt;


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61424
    
  67

Also, please be sure to post Struts questions in the Struts forum. I've moved this there for you.
Revanth reddy
Ranch Hand

Joined: Oct 10, 2008
Posts: 52
Ok Here is my code again

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Help Needed Not able to display two drop downs in jsp