How would you like it to work?

David



From: "Mark" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: Is struts-config too verbose?
Date: Thu, 27 Feb 2003 22:04:11 -0600

Well, I left out a piece

What I had a problem with was the verbosity of struts-config.xml


For every instance of the form, i have to have a seperate, and almost otherwise duplicate <action> mapping. To me, this is redundant...


*********** REPLY SEPARATOR ***********

On 02/27/2003 at 9:59 PM Mark wrote:

>Looking at struts-config i see an inflexible application skeleton that makes it hard for me to do somethings, or maybe I dont know how the Struts way is...Can someone enlighten me please?
>
>I have a Contact form. I want to be able to reuse this contact form, which has standard information such as name, address, etc, in several places in my application.
>
>Looking at how action mappings work and all, the form's action field is constant.. Therefore, if i have this:
>
><action path="/Contact/save" ..... >
><forward name="success" path="contact.Saved"/>
></action>
>
>in my jsp:
>
><html:form name="contactForm" action="/Contact/save">
>....
>
>THen inside my action class I have the code to process the form, and forward to the "success" forward.
>
>The problem i see here is, this contact form will always be processed by the same action servlet, and forwarded to the same forward. What If I had several different scenarios that needed to edit/view the contact data, maybe even Different contact data such as User Contact, Customer Contact, etc. So that means that the "save" functionality might be different, and the next page, the "results" might be different.
>
>Im befuddled how to handle this elegantly. I want to reuse my views. That should be simple shouldnt it? I think im missing something.
>
>
>Thanks in advance.
>
>
>Regards,
>Mark
>
>
>
>---------------------------------------------------------------------
>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]


_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail



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



Reply via email to