Do you maintain the actionform in the http session? If you do, it doesn't
matter whether the select is disabled or not. If it is disabled, the
actionform will not be changed since there is parameter in the request.

Regards

On 11/3/06, Dean, Michael <[EMAIL PROTECTED]> wrote:

MJ,

This is slightly tangential...but I faced a similar problem in trying to
prevent "double-submit"...

Below is the solution jsp code...refer embedded comments...

      <html:submit styleId="saveBtn" styleClass="hiddenItem"
tabindex="100" value = "Save" />
.
.
.

  <!--in order to selectively disable both submit buttons(prevent the
dreaded double submit), I moved the parameters/arguments required by the
Struts DispatchAction sub-class to hidden fields. These are then
selectively
disabled/enabled, in tandem with the actual buttons, depending on the
particular action - Refer AdvancedFilters.js -->

  <input id="saveProxy" type="hidden" name="method" value="Save"/>

The narrative: when the user selects the submit button, the onsubmit()
method (defined in some external javascript) disables the button and
enables a proxy hidden field which also ha a VALUE argument which
matches the method name required by the DispatchAction sub-class...

HTH,
M



-----Original Message-----
From: Mississippi John Hurt [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 01, 2006 12:18 PM
To: Struts Users Mailing List
Subject: How to make a SELECT list readonly? If set disabled, loses the
value when submit.

Help, I can make <html:text> readonly by setting readonly="true" which
works.
<html:select> has no readonly attribute, only a disabled. If I use
disabled
attribute, then the value of the select is no longer recognized and my
form
validation says its required.  How can I make the <html:select> disabled
or
readonly while keeping the values it has passing back to the action when
form is submitted. Thanks.

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




--
Yujun Liang
[EMAIL PROTECTED]

Reply via email to