I just wanted to pass on a tidbit that might help one or two people out there.
I have a search page that displays the results with checkboxes. There are two or
three different places that i use this same search page, so rather than writing or
copying the search results jsp page to several copies (to allow me to post the form
thats on the results page to a different forward definition) i made a modifiecation to
struts.
In the FormTag.java I added some code to peek in the formbean for a property called
"formaction". If it finds one, it uses this new action instead of the hard coded one
in the jsp page.
Thus, in my action class i do this:
MyBean myBean=(MyBean)actionForm;
myBean.setFormaction("/Some/other/url");
return mapping.findforward("default");
now i have a jsp page which i can reuse its functionality in several places in my code.
I had thought about using a hidden field, but the problem really stems from the
statically coded form action="/Url" part. Since struts doesnt allow us much
flexibility here by default, I decided to add my own and it works great!
Regards,
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]