--- Robert Leland <[EMAIL PROTECTED]> wrote:
> Yes, This has been brought up many times over the last 3 years,
> and probably has been implemented several times extending the Struts
> tags.
> 
> I am not opposed to such a feature, and would support it,
> though other committers might not.
> 
> The key argument against it is that it would transform the html tags 
> into a non-standard
> implementation. The html tags are ment to be a thin module aware layer 
> over the browsers tags,
> and nothing more. That is why we don't have a Calender tag or Date 
> chooser tag.
> Though I suppose if you really --knocked our socks off !-- with a spiffy
> 
> implementation it could
> become part of Struts.
> 
> I believe since we still support Netscape 4.X series browsers, a 
> read-only attribute has
> not been added.

As you know, we don't support browsers we support standard specifications.
 

The tags are coded to the XHTML 1.0 and HTML 4.01 standards which do
support a readonly attribute on input fields.  The <html:text> tag
supports a readonly attribute which seems to be the easiest way to
accomplish the requested feature.

http://jakarta.apache.org/struts/userGuide/struts-html.html#text

David

> 
> Since struts is trying to get out of the JSP tag business since 40-50% 
> of our bugs are there.
> which subtracts from our limited time for the core framework. You might 
> consider contributing
> the tag to http://struts.sf.net
> 
> -Rob
> 
> Chris Gastin wrote:
> 
> >Has anyone considered a feature which toggles between an editable form
> >element and read only text / static text.
> >
> >I find myself developing JSPs where depending  on the Use Case "fieldA"
> >could be an editalbe text box (<input name="fieldA" value="My Text
> Value"
> >/>)  in Use Case 1 on xyz.jsp and readonly text /static text  in Use
> Case 2
> >(My Text Value) on the same jsp. Presently I am using the
> ><logic:equal></logic:equal> tags. Which get really messy. Here is some
> >sample code.
> >
> ><logic:equals name="actionForm" property="myFieldEditable"
> value="true">
> >    <html:text name="actionForm" property"myField" />
> ></logic:equal>
> ><logic:equals name="actionForm" property="myFieldEditable"
> value="false">
> >    <bean:write name="actionForm" property"myField" />
> ></logic:equal>
> >
> >
> >It would be nice to add an attribute to the current tag libraries,
> which is
> >a boolean, and does this toggling for you. Here is what I am
> envisioning
> >
> >If actionForm.myField = "My Text Value"; This tag  <html:text
> >name="actionForm" property"myField" readOnlyText="true"/> would output
> "My
> >Text Value".
> >
> >Where <html:text name="actionForm" property"myField"
> readOnlyText="false"/>
> >the following tag would output
> ><input name="fieldA" value="My Text Value" />
> >
> >As you can imagine this would not be a huge undertaking to add this
> feature
> >to the current tag libraries in struts. I could use this feature, and I
> am
> >sure other could too. I am willing to contribute my time to the
> development
> >effort. I am not stuck on the attribute name "readOnlyText", and would
> >welcome suggestions. Does this sound like a good idea, and if the
> answer is
> >yes, what is the next step.
> >
> >Chris Gastin
> >  
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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

Reply via email to