RE: preview form

2004-02-17 Thread Guillermo Meyer
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:textname=orderForm property=custNo
   html:select name=orderForm property=productId
 html:optionsCollection name=productCollection
label=productDescription value=productId/
   /html:select
   html:textname=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]



preview form

2004-02-16 Thread Janice
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]



Re: preview form

2004-02-16 Thread Dan Tran
select does support readonly , unfortunaely it does not understand
readonly attribute, but only disabled

-Dan




- Original Message - 
From: Janice [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 16, 2004 1: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]



RE: preview form

2004-02-16 Thread Nicholson, Robb
We needed a read only version of a selection list as well, but the need
wasn't apparent until after one of our developers had already finished
writing all the JSP's.

The solution I came up with was to write a subclass of the SelectionTag (and
OptionTag, OptionsTag) to override the functionality of the read-only
attribute. Basically, if it is read-only I render a read-only text box
instead of a selection list. 

Then it was quick to change all of our selection lists by globally changing
the prefix for the existing selection tags to the prefix we use for our own
custom tags.

Not sure if this was the best method, but in our case it was the quickest
and easiest.

Robb



-Original Message-
From: Janice [mailto:[EMAIL PROTECTED]
Sent: Monday, February 16, 2004 4:03 PM
To: [EMAIL PROTECTED]
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]


Re: preview form

2004-02-16 Thread Shyam A
Maybe you can use a read-only text field to display
the selected value of the drop-down on your preview
page. You can get the label of the drop down in your
action class for Preview , and then set the form
bean property for the same. Also, use logic:equal on
your JSP to check for the user action, and display
drop-down or text field accordingly.

HTH,
Shyam

P.S.
Wonder if the 'newbie' has come of age?;)

--- Janice [EMAIL PROTECTED] wrote:
 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]
 


__
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html

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



RE: preview form

2004-02-16 Thread Nicholson, Robb
Read-only and disabled don't have the same meaning here. 

For a read-only field, the value cannot be changed by the user, but it still
gets submitted with the rest of the form values. 

For a disabled field, the user cannot change the value, and the value does
NOT get submitted.


-Original Message-
From: Dan Tran [mailto:[EMAIL PROTECTED]
Sent: Monday, February 16, 2004 4:34 PM
To: Struts Users Mailing List
Subject: Re: preview form


select does support readonly , unfortunaely it does not understand
readonly attribute, but only disabled

-Dan




- Original Message - 
From: Janice [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 16, 2004 1: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]


Re: preview form

2004-02-16 Thread Niall Pemberton
Isn't the easiest solution to have two separate pages, something along the
lines of

html:form action=reviewOrder
   html:textname=orderForm property=custNo
   html:select name=orderForm property=productId
 html:optionsCollection name=productCollection
label=productDescription value=productId/
   /html:select
   html:textname=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]



Re: preview form

2004-02-16 Thread Janice
Hello again,

Thanks for the responses.

What I ended up with was having my original form take the user to the
preview form where all the form elements were disabled, instead of readonly.
It even provides a nice visual clue that the form isn't for input, since all
the fields are slightly greyed out (I just hope the users can still read
it!).  Then from there the user can either accept or reject the values
entered or changed.

Cheers,
Janice

- Original Message - 
From: Janice
To: [EMAIL PROTECTED]
Sent: Monday, February 16, 2004 1: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]