extending the Struts custom tags
we have developed a framework on our project which dynamically writes out correct tags on the page, including value data and properties. For example: xx:cmp name=person property=name could either write out an anchor tag or just the value of the person's name property - depending on permissions set for the current user. The tag property name person is the name of the person bean in the request. I can't figure out how to couple this with struts ActionForms. I can see these 2 possible solutions: 1. Extend the Struts custom tags to incorporate our component-security model 2. Add Struts functionality to our custom tags to work with ActionForms I would be really greatful for any ideas or suggestions. Mike -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: extending the Struts custom tags
(Ted) Well, the main features I'm after is the MVC model: i.e. the Controller with it's action mappings, the Actions and the Form handling. I really like how the ActionForms create a nice request handling and user entry model. The validate() method, the custom tags that populate with data if you have the form in the Request, etc. I guess we could extend the controller (if that's the right class) so that it would automatically populate our beans rather than the ActionForms... what do you think? How does the populating the ActionForm from the request data after the post work? Many thanks in advance! Mike On Sunday 10 February 2002 11:23 am, you wrote: The ActionForms are just JavaBeans, stored in the session or request, like any other. What Struts functionality would you need to add to your tags? -- Ted Husted, Husted dot Com, Fairport NY USA. -- Java Web Development with Struts. -- Tel +1 585 737-3463. -- Web http://www.husted.com/struts/ Mike D wrote: we have developed a framework on our project which dynamically writes out correct tags on the page, including value data and properties. For example: xx:cmp name=person property=name could either write out an anchor tag or just the value of the person's name property - depending on permissions set for the current user. The tag property name person is the name of the person bean in the request. I can't figure out how to couple this with struts ActionForms. I can see these 2 possible solutions: 1. Extend the Struts custom tags to incorporate our component-security model 2. Add Struts functionality to our custom tags to work with ActionForms I would be really greatful for any ideas or suggestions. Mike -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: extending the Struts custom tags
The typical approach is to populate existing beans from the ActionForms (in the Action), since most beans are really not suited for data entry in a hostile, String-centric HTTP environment. For output, the existing beans would actually be preferred, since the ActionForm beans are really tuned for input. Mike D wrote: (Ted) Well, the main features I'm after is the MVC model: i.e. the Controller with it's action mappings, the Actions and the Form handling. I really like how the ActionForms create a nice request handling and user entry model. The validate() method, the custom tags that populate with data if you have the form in the Request, etc. I guess we could extend the controller (if that's the right class) so that it would automatically populate our beans rather than the ActionForms... what do you think? How does the populating the ActionForm from the request data after the post work? Many thanks in advance! Mike On Sunday 10 February 2002 11:23 am, you wrote: The ActionForms are just JavaBeans, stored in the session or request, like any other. What Struts functionality would you need to add to your tags? -- Ted Husted, Husted dot Com, Fairport NY USA. -- Java Web Development with Struts. -- Tel +1 585 737-3463. -- Web http://www.husted.com/struts/ Mike D wrote: we have developed a framework on our project which dynamically writes out correct tags on the page, including value data and properties. For example: xx:cmp name=person property=name could either write out an anchor tag or just the value of the person's name property - depending on permissions set for the current user. The tag property name person is the name of the person bean in the request. I can't figure out how to couple this with struts ActionForms. I can see these 2 possible solutions: 1. Extend the Struts custom tags to incorporate our component-security model 2. Add Struts functionality to our custom tags to work with ActionForms I would be really greatful for any ideas or suggestions. Mike -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Ted Husted, Husted dot Com, Fairport NY USA. -- Java Web Development with Struts. -- Tel +1 585 737-3463. -- Web http://www.husted.com/struts/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]