I am also looking for similar functionality. Does anyone know if there are any existing Struts Custom Tag extensions with this functionality (otherwise I will probably be implementing my own).
Ideally I am looking for replacement versions of the html:... custom tags that will be aware of a read-only/edit mode flag in the ActionForm, and then display either input fields or disabled input fields accordingly. Thanks, Kevin Hooke >From: Shishir K. Singh >Subject: RE: Best Practice for Reuse of JSPs for >Display and Input? >Date: Mon, 12 Jan 2004 09:22:01 -0800 > >----------------------------------------------------->--------------------------- > > I assume that you have a bean that stores all the >relevant data and you >read the bean to render the jsp. If so, I generally >a flag attribute >(display only) to the bean that I can set up in my >action. In the jsp, >if the flag is on, I just render it as a simple text >else .... > >Would that work for you ? > >-----Original Message----- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >Sent: Monday, January 12, 2004 11:07 AM >To: [EMAIL PROTECTED] >Subject: Best Practice for Reuse of JSPs for Display >and Input? > >I am designing a Struts application that has both >display-only and input >modes for all the data. Ideally, I would like to >reuse the same JSPs for >both the display-only and input modes without >compromising the >user-friendliness of the page produced. The JSP >pages are using the >Struts HTML tags for data input. >This sounds like a common issue that lots of >applications must face and >I would be very interested in what solutions other >people are using > >Possible design approaches I have currently in >mind: - > >1. Reusable JSPs could be built around the Struts >HTML tags setting the >"disabled" attribute for the display-only mode. This >should work but the >user gets greyed out text (on Internet Explorer) >which is hard to read >and the display-only mode still has input boxes >which can confuse the >end user 2. The "readonly" attribute is another >possibility but seems to >be ignored by some browsers (Netscape Communicator >4.76) 3. Maybe JSP >custom tags could be used but I am concerned that a >full solution for >this would be to extend the HTML Text tag and the >nested HTML Text tag > >Thoughts on the above approaches and/or alternatives >would be >appreciated > >Tim. __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]