RE: populate html:select

2004-10-04 Thread Anna Kerekes
Yes, I was using the old  tag but now  works like a charm... 
thanks :)
 



From: Wendy Smoak [mailto:[EMAIL PROTECTED]
Sent: Fri 01/10/2004 4:03 PM
To: Struts Users Mailing List
Subject: Re: populate html:select



From: "Anna Kerekes" <[EMAIL PROTECTED]>
> Just the "select" list information is gone, all the textbox information is
preserved on the form.

Thanks for confirming that.

If you want Struts to "remember" the selected items, then you MUST use
Struts tags to display those items,  and  in this
case.

Both of those tags have an array of attributes, and it's not always clear
which ones you need to use in combination to make it do what you want.  The
simplest thing to do would be to change all of your  tags to
 tags.

>From your original note, it looks like you're hard-coding the options as
plain-old-HTML  tags.  Let us know if that's not the case.

--
Wendy Smoak


-
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: populate html:select

2004-10-01 Thread Wendy Smoak
From: "Anna Kerekes" <[EMAIL PROTECTED]>
> Just the "select" list information is gone, all the textbox information is
preserved on the form.

Thanks for confirming that.

If you want Struts to "remember" the selected items, then you MUST use
Struts tags to display those items,  and  in this
case.

Both of those tags have an array of attributes, and it's not always clear
which ones you need to use in combination to make it do what you want.  The
simplest thing to do would be to change all of your  tags to
 tags.

>From your original note, it looks like you're hard-coding the options as
plain-old-HTML  tags.  Let us know if that's not the case.

-- 
Wendy Smoak


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



RE: populate html:select

2004-10-01 Thread Anna Kerekes
Just the "select" list information is gone, all the textbox information is preserved 
on the form.



From: Wendy Smoak [mailto:[EMAIL PROTECTED]
Sent: Fri 01/10/2004 3:38 PM
To: Struts Users Mailing List
Subject: Re: populate html:select



From: "Anna Kerekes" <[EMAIL PROTECTED]>
> This case is different from the regular use of html:option because this
> information is never saved to a Collection (since the validation
failed)..
> so this information about the dropdown menu needs has to be retrieved
> from the request scope or some other place

What information-- the contents of the drop-down, or the item(s) the user
selected?

Is *all* of the user input gone if the form fails validation, or just this
select list?

--
Wendy Smoak


-
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: populate html:select

2004-10-01 Thread Wendy Smoak
From: "Anna Kerekes" <[EMAIL PROTECTED]>
> This case is different from the regular use of html:option because this
> information is never saved to a Collection (since the validation
failed)..
> so this information about the dropdown menu needs has to be retrieved
> from the request scope or some other place

What information-- the contents of the drop-down, or the item(s) the user
selected?

Is *all* of the user input gone if the form fails validation, or just this
select list?

-- 
Wendy Smoak


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



RE: populate html:select

2004-10-01 Thread Anna Kerekes
This case is different from the regular use of html:option because this information is 
never saved to a Collection (since the validation failed)..
 
so this information about the dropdown menu needs has to be retrieved from the request 
scope or some other place
 



From: Wendy Smoak [mailto:[EMAIL PROTECTED]
Sent: Fri 01/10/2004 2:35 PM
To: Struts Users Mailing List
Subject: Re: populate html:select



From: "Anna Kerekes" <[EMAIL PROTECTED]>
Hello,

1
...
> The problem is that the value selected from the drop-down menu (i.e.
html:select)
> before the "submit" button was hit is NOT preserved on the form

You need to use Struts tags for the options if you expect the framework to
pre-fill the form.  Take a look at  and  which
you can use with various attributes including creating the lists from a
Collection.

--
Wendy Smoak


-
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: populate html:select

2004-10-01 Thread Wendy Smoak
From: "Anna Kerekes" <[EMAIL PROTECTED]>
Hello,

1
...
> The problem is that the value selected from the drop-down menu (i.e.
html:select)
> before the "submit" button was hit is NOT preserved on the form

You need to use Struts tags for the options if you expect the framework to
pre-fill the form.  Take a look at  and  which
you can use with various attributes including creating the lists from a
Collection.

-- 
Wendy Smoak


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



populate html:select

2004-10-01 Thread Anna Kerekes
Hello,
 
I am using struts validation to validate an input form.  In my jsp I have:
 


1

2

3

4



The form is filled out.  After I hit the "submit" button Struts validation is run and 
the input form is displayed again with the errors on the form.  The problem is that 
the value selected from the drop-down menu (i.e. html:select) before the "submit" 
button was hit is NOT preserved on the form with the validation errors.  So the user 
has to re-enter whatever value he/she entered before validation.  This is 
annoying..is there a way I can make it so that the hmtl:select could be populated 
with the value that was entered before (if any).  I suspect that this value is stored 
somewhere (in request scope?) but I'm not sure how to get it.

What is strange is that other fields on my input form are preseved (i.e. textboxes, 
and textareas) but not drop-down menus, checkboxes, and file.

any help appreciated,

Anna:)

 


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