You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by di...@jpmorgan.com on 2006/02/21 18:47:59 UTC

drop down list box question.

I have users list created in my dispatch action and populated in request.


in my form this works.
               ........
           <tr>
            <td class="tdLabel"><fmt:message key="label.endDate"/>:</td>
            <td><html:text property="endDate" size="40"/> <html:errors 
property="endDate"/></td>
        </tr>
        <tr>
            <td class="tdLabel"><fmt:message 
key="label.oddLotOwnerUserName"/>:</td>
            <td>
                <html:select property="oddLotOwnerUserId">
                    <c:forEach var="user" items="${users}">
                        <html:option value="${user.userId}">
                            <c:out value="${user.userNameShort}"/>
                        </html:option>
                    </c:forEach>
                </html:select>
            </td>
        </tr>
          .......

But This DOESN'T work.
         <tr>
            <td class="tdLabel"><fmt:message key="label.endDate"/>:</td>
            <td><html:text property="endDate" size="40"/> <html:errors 
property="endDate"/></td>
        </tr>

         <tr>
          <td class="tdLabel"><fmt:message 
key="label.oddLotOwnerUserName"/>:</td>
                <html:select property="oddLotOwnerUserId" >
                        <html:optionsCollection property="users"
                                value="${user.userId}" 
label="${user.userNameShort}" />
                        </html:select>
        </tr>
What am I doing wrong ??




Thanks:
Digant


This communication is for informational purposes only. It is not intended
as an offer or solicitation for the purchase or sale of any financial
instrument or as an official confirmation of any transaction. All market prices,
data and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein 
do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries 
and affiliates.

Re: drop down list box question.

Posted by Michael Jouravlev <jm...@gmail.com>.
On 2/21/06, digant.k.joshi@jpmorgan.com <di...@jpmorgan.com> wrote:
> I have users list created in my dispatch action and populated in request.
>
>
> in my form this works.
>                ........
>            <tr>
>             <td class="tdLabel"><fmt:message key="label.endDate"/>:</td>
>             <td><html:text property="endDate" size="40"/> <html:errors
> property="endDate"/></td>
>         </tr>
>         <tr>
>             <td class="tdLabel"><fmt:message
> key="label.oddLotOwnerUserName"/>:</td>
>             <td>
>                 <html:select property="oddLotOwnerUserId">
>                     <c:forEach var="user" items="${users}">
>                         <html:option value="${user.userId}">
>                             <c:out value="${user.userNameShort}"/>
>                         </html:option>
>                     </c:forEach>
>                 </html:select>
>             </td>
>         </tr>
>           .......
>
> But This DOESN'T work.
>          <tr>
>             <td class="tdLabel"><fmt:message key="label.endDate"/>:</td>
>             <td><html:text property="endDate" size="40"/> <html:errors
> property="endDate"/></td>
>         </tr>
>
>          <tr>
>           <td class="tdLabel"><fmt:message
> key="label.oddLotOwnerUserName"/>:</td>
>                 <html:select property="oddLotOwnerUserId" >
>                         <html:optionsCollection property="users"
>                                 value="${user.userId}"
> label="${user.userNameShort}" />
>                         </html:select>
>         </tr>
> What am I doing wrong ??

What exactly does not work? Do you use JSP 2.x container?

Michael.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org