struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Angelo zerr" <angelo.z...@gmail.com>
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
Hi,
if you see HTML specification at
http://www.w3.org/TR/html401/interact/forms.html#h-17.6, 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 http://formview.sourceforge.net/, 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

http://formview.sourceforge.net/

2006/11/1, Rafael Nami <rafanami@gmail.com>:
>
> 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 <johnhurt@gmail.com>:
> >
> > 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.
> >
> >
>
>

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