> -----Original Message----- > From: Victor Grazi [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 17, 2004 1:13 PM > To: [EMAIL PROTECTED] > Subject: RE: Generating struts tags from a Java Bean > > > The custom tag approach seems like the way to go. Is there any > documentation for considerations besides just perusing the > source code for > exisiting html tags?
There's a real nice tutorial on the java.sun.com site. > Regards > Victor > > ...... Original Message ....... > On Tue, 17 Aug 2004 10:53:29 -0700 "Jim Barrows" > <[EMAIL PROTECTED]> wrote: > > > > > >> -----Original Message----- > >> From: Victor Grazi [mailto:[EMAIL PROTECTED] > >> Sent: Tuesday, August 17, 2004 10:35 AM > >> To: Struts Users Mailing List > >> Subject: RE: Generating struts tags from a Java Bean > >> > >> > >> the problem we are trying to solve is that depending on user > >> entitlements > >> and application state, some fields need to either be a drop > >> down or just > >> text. > > > >What I would suggest then, is to figure that out in your > action class, and > pass boolean values as part of the form bean. Then on the > jsp page, use > <logic:equal or <c:if to determine what to show. > > > >Alternatively you could write your own tag library for the > field, which > would figure out what html to generate based on the > attributes you give it. > Something like: > ><myCompany:inputField value="${formName.fieldName}" > applicationState="${applicationState}"/> > >You can of course get a list of roles from isUserInRole(), > or hand them in if your doing > something else. > > > >If you have only 1 or 2 pages, then the first option may be > easier, but if you're doing it a > lot then the taglib option might be better. > > > >> > >> > >> ___ > >> Sent with SnapperMail > >> www.snappermail.com > >> > >> ...... Original Message ....... > >> On Tue, 17 Aug 2004 09:46:49 -0700 "Jim Barrows" > >> <[EMAIL PROTECTED]> wrote: > >> > > >> > > >> >> -----Original Message----- > >> >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > >> >> Sent: Tuesday, August 17, 2004 9:42 AM > >> >> To: Struts Users Mailing List > >> >> Subject: Generating struts tags from a Java Bean > >> >> > >> >> > >> >> I would like to generate struts tags from a Java bean, which > >> >> would decide > >> >> what tags to generate based on context. > >> >> Is there any way to configure the JSP so that it will > evaluate the > >> >> JavaBean first, before the struts tags, so that the struts > >> >> tags can be > >> >> generated by the beans? > >> > > >> >I don't believe so. Since struts tags only generate html, > >> you could have > >> beans that generate html based on context. However, given > >> that struts and > >> jstl have some rather powerful logical statements, you might > >> be able to > >> achieve what you want without doing away with struts tags, > >> which is what > >> you are basically asking. > >> > > >> >What problem are you trying to solve? > >> > > >> > > >> > >--------------------------------------------------------------------- > >> >To unsubscribe, e-mail: [EMAIL PROTECTED] > >> >For additional commands, e-mail: [EMAIL PROTECTED] > >> > > >> > >> > >> > --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]