struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Angelo zerr" <>
Subject Re: How to make a SELECT list readonly? If set disabled, loses the value when submit.
Date Thu, 02 Nov 2006 07:57:40 GMT
if you see HTML specification at, select has not
readonly (just disabled, but you can't use it for submiut value). So
proposition of Rafael, is the same solution that I use. But when you have
several select in your JSP, it begin borring to manage it. So if you want
you can see FormView project at, which is a
taglib which manage state (READ-ONLY,READ-WRITE,...) in your JSP, to render
your inputs (eg : transform select into input hidden, without coding this
case in your JSP).

Regards Angelo

2006/11/1, Rafael Nami <>:
> You can choose to maintain the value from this select in a hidden field,
> that will be submitted with your page. I was used to use another approach,
> making the select enabled in the submit, but it was a great meal to
> hackers.
> 2006/11/1, Mississippi John Hurt <>:
> >
> > 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.
> >
> >

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message