Have in mind that in selects tags, you have a value and a text, and the
user sees the text, but the value is in fact the id, so if you shows the
value with <bean:write name="orderForm" property="productId"> user will
see the id and not the description.
For this problem we use a tag that extends WriteTag and uses Providers
(http://providers.sourceforge.net/) to show the description. And we use
providers to populate the Select Options.

Cheers.
Guillermo.

-----Original Message-----
From: Niall Pemberton [mailto:[EMAIL PROTECTED] 
Sent: Lunes, 16 de Febrero de 2004 09:19 p.m.
To: Struts Users Mailing List
Subject: Re: preview form


Isn't the easiest solution to have two separate pages, something along
the lines of

    <html:form action="reviewOrder">
           <html:text    name="orderForm" property="custNo">
           <html:select name="orderForm" property="productId">
                 <html:optionsCollection name="productCollection"
label="productDescription" value="productId"/>
           </html:select>
           <html:text    name="orderForm" property="orderQuantity">
     </html:form>

    <html:form action="placeOrder">
           <html:hidden name="orderForm" property="custNo">
           <html:hidden name="orderForm" property="productId">
           <html:hidden name="orderForm" property="orderQuantity">

           <bean:write name="orderForm" property="custNo">
           <bean:write name="orderForm" property="productId">
           <bean:write name="orderForm" property="productDescription">
     </html:form>



----- Original Message ----- 
From: "Janice" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 16, 2004 9:03 PM
Subject: preview form


> Hi Gang,
>
> I have a form that the client would like to be 'previewed' before 
> users
can
> submit.  The plan is to have a form with a button that takes the user 
> to
the
> exact same form, but with all the form elements set to readonly.  From
there
> the user can go back to the editable form or can submit.
>
> At least that's the plan.  I'm open to other suggestions, especially 
> of
the
> 'best practices' variety.
>
> I would have liked to display the form information on a non-form 
> looking page, but the problem I have is the drop-downs which have a 
> very different value from label.  I don't want the preview to display 
> something like:
> person: 12353
> instead of
> person: Jane Doe
>
> So I guess I need the drop-downs, unless you all have a workaround?
>
> My immediate problem is that <html:select /> doesn't support 
> readonly... what else can I do?
>
> TIA,
> JJ
>
>
> ---------------------------------------------------------------------
> 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]

NOTA DE CONFIDENCIALIDAD
Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las 
personas direccionadas en el mail y puede contener informacion (i)de propiedad 
exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier 
opinion en el contenido, es exclusiva de su autor y no representa necesariamente la 
opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion 
esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna 
por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha 
recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo 
inmediatamente junto con todas las copias del mismo, notificando al remitente. No 
debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus 
partes si usted no es el destinatario. Muchas gracias.



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

Reply via email to