You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dennis Muhlestein <de...@zserve.com> on 2003/10/13 23:13:03 UTC

Cross Module Forms

It's been a while since I posted.  Been busy.  We've been using 
struts/tiles for quite a while now.  Currently we're using version 1.1. 

Everything works great and the more we convert to struts, the more we 
like it.  We have one issue though that I just can't seem to find a good 
solution for.

We have a lot of modules.  We try to stick each new section of the site 
in a new module.  If we didn't we'd have way too many action and tile 
definitions for one xml file.  We don't much like the idea of listing 
multiple struts-config files in the default module and bypassing modules 
either because then we can't as easily take module and deploy them on 
other applications.

The problem is starting to arise that we have lots of places in the 
application that need to be tied together but are in different modules.  
This always works with links but when a form is involved a tile in one 
module can't find the form bean of an action that is in another module.  
I know this is a known issue.  I'm just wondering what the best practise 
would be to get around it. 

One thing we have already tried are listing those specific module 
crossing actions in a "struts-globals.xml" file.  Add struts-globals.xml 
to the web.xml in each module then the action in question is simply 
defined in all modules.  That seems to me like wasting resources a bit 
though.

Another way might be to make an xml file that just contains a specific 
action and then to only include that extra xml file within modules that 
needs the action in question.  That seems like it'd get kind of messy 
after a while too.

So, does anyone have a patch that fixes this?  Or has this been changed 
post 1.1?  Any other ideas for getting around the issue?

Comments Appreciated.
-Dennis


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


completely dynamic forms and jsp?

Posted by Sonam Belbase <So...@morganstanley.com>.
How would you do this using Struts?

User goes to a page where they can add profiles to a repository. There are
two
types of profiles a user can add. But the user can add as many profiles
of each type as they want on that page.

Profile type A requires input from 3 text boxes, and profile type B needs
input from 1 textbox and 1 drop down. Each has it own action to save it to
the repository.

At initial load of page, there are two buttons: "add profile of type A" and
"add profile of type B".

So, if user comes to the page and clicks ""add profile of type A" once, and
"add profile of type B" twice, at the end there should be 3 sections, the
first one with the 3 text boxes for profile type A, followed by the two
sections  each with the input fields for profile type B. Each section also
has it's own "save" button so although the user can set up the page to add 3
profiles, he/she can only save one profile at a time.

The main question is how do you dynamically add properties to the form and
display them at runtime? If one form is needed per profile added, how do you
keep adding <html:form> </html:form> to your jsp at runtime? Can tiles help?

Thanks,

SB


--
NOTICE: If received in error, please destroy and notify sender.  Sender does
not waive confidentiality or privilege, and use is prohibited.



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org