problem loading a selected value in list box using struts

S

sreevneni

hi ..
i trying to display a selected value when the page is refreshed in a
list box using the following code ...but its working out ...please let
me know if anyone knew this
thanks in advance ....


<logic:equal name="usrolcd" property="roleCode"
value="SM">

<TR bgcolor="#660099">
<TD width="75%" align="center" bgcolor="#CCCCCC">
<div align="left"><FONT face="Arial, Helvetica,
sans-serif"
size="2" color="#000000"><B>Pricing Analyst
</B></FONT></div>
</TD>
</TR>
<TR bgcolor="#FFFFFF">
<TD align="left" width="75%">
<TABLE align="left" width="100%" border="0"
cellspacing="0"
cellpadding="2" bgcolor="#FFFFFF">
<TR>
<TD align="left" width="35%"><font size="2"
face="Arial, Helvetica,
sans-serif"><strong>Pricing
Analyst:</strong></font></TD>

<TD align="left" width="65%"><html:select
property="userAdmin.PA"
onchange="processPA(this);" value="">
<html:eek:ption value="" >Select Pricing
Analyst</html:eek:ption>
<nested:iterate id="element"
name="UserAdminForm"
property="userAdmin.PAList">

<logic:present
name="UserAdminForm" property="userAdmin.PA_ls">
<bean:define id="usrPA" name="UserAdminForm"
property="userAdmin.PA_ls" type="java.lang.String"/>

</logic:present>

<logic:equal name="element" property="empId"
value="<%usrPA%>">

<option value="<bean:write name="element"
property="empId"/>" selected >
<bean:write name="element" property="nameRev"
/></option>

</logic:equal>
<logic:notEqual name="element"
property="empId" value="<%usrPA%>">
<option value="<bean:write name="element"
property="empId"/>">
<bean:write name="element" property="nameRev"
/></option>
</logic:notEqual>

</nested:iterate>


</html:select></TD>
</TR>

</TABLE>
</TD>
</TR>


</logic:equal>

______________________________
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top