WHY go thru all that trouble...

all you have to do is, if you do have the "STATES_PROPERTIES_KEY" in
the application context, all you have to do is set the ListItem.value
in your java class DynaForm.

so when them page is displaying it would automatically detect what the
value is and auto select that value in the select menu




On Apr 7, 2005 3:01 PM, Brian McGovern <[EMAIL PROTECTED]> wrote:
> At least i think its simple. I have this code which doesnt error.. but also 
> doesnt work.
> 
> <select>
>   <c:forEach var="ListItem" 
> items="${applicationScope.STATES_PROPERTIES_KEY.keyValues}">
>         <option value="<c:out value="${ListItem.key}" />" <c:if 
> test="${sessionScope.INVESTORBEAN_SESSION_KEY.state} == ${ListItem.value}" > 
> SELECTED </c:if>><c:out value="${ListItem.value}" />
>    </c:forEach>
> </select>
> 
> This loops fine and i can c:out every single piece of that code, including 
> the session var.  The problem is that I cant get this to work
> 
> tried
> <c:if test="${sessionScope.INVESTORBEAN_SESSION_KEY.state} == 
> ${ListItem.value}" > SELECTED </c:if>
> 
> tried
> <c:if test="${sessionScope.INVESTORBEAN_SESSION_KEY.state} eq 
> ${ListItem.value}" > SELECTED </c:if>
> 
> In this case lets say sessionScope.INVESTORBEAN_SESSION_KEY.state = "GA"  and 
> one of the loop values at ${ListItem.value} = "GA".  How do i get this to 
> evaluate correctly?
> 
> Thanks
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to