At your own risk, manipulate the ActionErrors and ActionMessages collections any way
you like.
They're in the request scope and named according to Globals.ERROR_KEY and
Globals.MESSAGE_KEY.
m
--- Shane Mingins <[EMAIL PROTECTED]> wrote:
> Hi
>
> I have a Swing app where the SwingView implements the view interface and has
> a method duplicateException(String s).
>
> In the SwingView it is implemented as
>
> public void duplicateException(String duplicateName)
> {
> JOptionPane.showMessageDialog(this, "That would result in a duplicate
> Channel", "Duplicate Channel",
> JOptionPane.ERROR_MESSAGE);
> }
>
> So if the business layer finds a duplicate it can inform the presentation
> layer. I am wondering how this would map on Struts?
>
> Using Struts, if I have an ActionForm implement the view interface, how
> would it create an ActionError or ActionMessage? It seems that from an
> ActionForm the validate() method can do it, and an Action can do it but is
> it possible to create an ActionError and save it from my
> duplicateException() method?
>
> Could I perhaps have my duplicateException() method add to collection
> variable in the ActionForm and then have the validate() method check that
> collection and generate the required ActionErrors?
>
> Any thoughts?
>
> Shane
>
>
> Shane Mingins
> Analyst Programmer
> Assure NZ Ltd
> Ph 644 494 2522
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]