Erik,

>I don't understand what you mean by application properties playing a role.
>How so?

buttons.add & buttons.delete have to be defined, which is not obvious for somebody
who does not take care about internationalization. In fact I would define the
resources in any case. But what about images ? How do you want to handle them ?

>Definitely an interesting indirection mapping scheme... but that means that
>every form there is an action mapping, and another action class and mapping
>for each button on the form.  struts-config.xml will already be huge in our
>application of hundreds of forms, so having a single mapping per form is
>important not only to keep the config smaller, but to keep it clearer.

Sure. It is a matter of taste. But perhaps not only. What would happen if one
day someone decides to move 2 from 5 submit buttons to another page ? Will you
rewrite the class ?
Single action are also helpful, if you want to call them from several places,
say from context-menu or even through short cuts. I prefer to have all actions
defined in separate classes. But this is just my preference and I accept
another solutions.


>>         // Go back to input (any other ideas ?)
>>         return new ActionForward(mapping.getInput());

>Ideas - How about returning ActionErrors if the mapping isn't found?  Or I
>personally would throw a JspException since this is truly a situation that
>cannot be handled wisely by the action in all cases and represents a
>situation that should not happen.

Yes. Throwing exception would be really better.

>In your design, struts-config.xml will have to be modified if a designer
>switches between using a graphic button and text buttons by adding or
>removing the ".x", or as in your example, name text buttons with ".x" on
>them - which I don't prefer.  My goals are to make the designers life as

I see no harm in this ".x" suffix, especially if you work with images.
But it is not the most nice in design for sure.

>I don't think using DispatchAction as you suggest will work.  What it
>would do in the "add" case is this:
>- call request.getParameter("add") - what would that return in your case?

Sure. It won't work if you don't add ".x" suffix ;-)

>>       <dispatch property="delete.x" path="/delete.do"/>
>> or
>>       <dispatch property="delete.x" method="delete"/>

>I think this kind of mapping puts unnecessary stuff in an already cluttered
>struts-config.xml file.  Having a subclass of my LookupDispatchAction to

Absolutely agree with you. I also prefer to 'misuse' forwards ;-)

Thank you for your feedback.

Dmitri




--

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn 
Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, 
informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das 
unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



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

Reply via email to