Jim Barrows 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.



The JSP page is read and the tags there are used to do whatever is required to respond to a call to that page. Usually that is writing a JSP page. While you cannot use the struts tags between the JSP page and the ultimate HTML page, you can do something like that with code in the background. So, instead of dynamically generating Struts tags as follows:


   JSP page <your tags> ----> JSP page <struts tags> -----> HTML page
   <html tags>


You could somewhat easily work up something like the following:

   JSP page <your tags> ----> Model Use of <struts tags> logic to
   generate ----> HTML page <html tags> from <your tags>


That clear?

Michael


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



Reply via email to