Re: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread Dakota Jack
What he is putting on the page and what is in his application
resources properties cannot determine, ever, what keyMethodMap is
returning.  These are wrong avenues IF Alexander is accurate when he
says the class is seeking the method "weiter".  That can ONLY be the
case if the keyMethodMap holds the value "weiter" under the key being
called.  If a method is being returned at all, everything else is
working the way it should.  Did you change "weiter" to "forward" and
forget to recompile?

Jack


On Wed, 8 Dec 2004 09:13:34 -0700, Jim Barrows <[EMAIL PROTECTED]> wrote:
> 
> 
> 
> 
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, December 08, 2004 8:03 AM
> > To: [EMAIL PROTECTED]
> > Subject: RE: LookupDispatchAction doesn't lookup mapping
> >
> >
> > Hi
> >
> > You write that : The LookupDispatchAction tries to call a method named
> > "weiter" instead
> > of "forward", while it calls the "back"-method as expected.
> >
> > As far as I remember "weiter" is the German word for "forward" - There
> > might be a locale issue here.
> 
> That would be possible if he was getting the english version instead of the 
> german version he's apparently putting on the page.
> 
> >
> > Hermod
> 
> 
> >
> >
> > -Original Message-
> > From: Alexander Czernay [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, December 08, 2004 2:14 PM
> > To: Struts Users Mailing List
> > Subject: Re: LookupDispatchAction doesn't lookup mapping
> >
> >
> > Dakota Jack wrote:
> > > My experience is that the computer is always right, so I
> > would look in
> > > my properites file, if I were you, and see whether or not I had
> > > reversed the myButtonForward=go to go=myButtonForward.  Did you?  I
> > > feel compelled to reiterate that LookupDispatchAction is a
> > fairly poor
> > > example of the code needed to do this stuff, in my opinion.
> > >
> > > Jack
> > >
> > >
> >
> > I will definitely try your suggestion out, but before that, I
> > wanted to
> > figure out, what I had done wrong using the LookupDispatchAction.
> >
> > So now some direct copy & paste from my code.
> > My ApplicationRessurces.properties looks like this:
> > 
> > authors-form.button.forward = weiter
> > authors-form.button.back = zurück
> > 
> >
> > The jsp:
> > 
> >  > property="submit"> > key="authors-form.button.back"/>
> >  > property="submit"> > key="authors-form.button.forward"/>
> > 
> >
> > And finally the Action-Map:
> > 
> >   protected Map getKeyMethodMap() {
> > Map map = new HashMap();
> > map.put("authors-form.button.create",
> > "create");
> > map.put("authors-form.button.edit",   "edit");
> > map.put("authors-form.button.remove",
> > "remove");
> > map.put("authors-form.button.forward",
> > "forward");
> > map.put("authors-form.button.back",   "back");
> > return map;
> >   }
> > 
> >
> > The back-button works, while the forward doesn't.
> >
> > The LookupDispatchAction tries to call a method named
> > "weiter" instead
> > of "forward", while it calls the "back"-method as expected.
> >
> > Alexander
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> > * * * * * * *
> >
> > This email with attachments is solely for the use of the individual or
> > entity to whom it is addressed. Please also be aware that the
> > DnB NOR Group
> > cannot accept any payment orders or other legally binding
> > correspondence with
> > customers as a part of an email.
> >
> > This email message has been virus checked by the virus programs used
> > in the DnB NOR Group.
> >
> > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> > * * * * * * *
> >
> >
> > -
> > 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]
> 
> 


-- 


"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

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



RE: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread Jim Barrows


> -Original Message-
> From: Dakota Jack [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 11:28 AM
> To: Struts Users Mailing List
> Subject: Re: LookupDispatchAction doesn't lookup mapping
> 
> 
> Sorry if this is not helpful to you, Jim.  However, I meant the
> opposite of what you are saying.  I am saying that the computer is
> doing exactly what is coded and, so, the answer lies in tracking the
> output.  I would never think that the impossible is possible or any
> other such philosophical drivel.  Sorry I gave that impression.  I am
> a preeminently practical person.  That is what I mean when I say "the
> computer is always right'.  Hopefully my next suggestion makes that
> clear.  I think this is really a simple problem to solve if one merely
> debugs following the LookupDispatchAction code and determines where
> the wrong value appears.  This is not a rocket science problem.  That
> is my point.

You missed my point.  Entirely.
Everything looks correct in your setup.  Looks exactly like what I'm using 
right now, in production.  Can't be that.
So.. what else is different.
The unecessary multiple use of  
> Jack
> 
> 
> On Wed, 8 Dec 2004 09:09:46 -0700, Jim Barrows 
> <[EMAIL PROTECTED]> wrote:
> > 
> > 
> > 
> > 
> > > -Original Message-
> > > From: Alexander Czernay [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, December 08, 2004 6:14 AM
> > > To: Struts Users Mailing List
> > > Subject: Re: LookupDispatchAction doesn't lookup mapping
> > >
> > >
> > > Dakota Jack wrote:
> > > > My experience is that the computer is always right, so I
> > > would look in
> > > > my properites file, if I were you, and see whether or not I had
> > > > reversed the myButtonForward=go to go=myButtonForward.  
> Did you?  I
> > > > feel compelled to reiterate that LookupDispatchAction is a
> > > fairly poor
> > > > example of the code needed to do this stuff, in my opinion.
> > > >
> > > > Jack
> > > >
> > > >
> > >
> > > I will definitely try your suggestion out, but before that, I
> > > wanted to
> > > figure out, what I had done wrong using the LookupDispatchAction.
> > >
> > > So now some direct copy & paste from my code.
> > > My ApplicationRessurces.properties looks like this:
> > > 
> > > authors-form.button.forward = weiter
> > > authors-form.button.back = zurück
> > > 
> > >
> > > The jsp:
> > 
> > This suggestion comes under the heading "When only the 
> impossible is left, the impossible must be possible".  I 
> don't think this is it.
> > Why do you have  with either button.  It shouldn't matter, but everything else 
> looks right, and exactly the way I have it working in my 
> code, except for the double form thing.  No idea why it would 
> make a difference... and don't really think it should... but..
> > 
> > 
> > 
> > 
> > > 
> > >  > > property="submit"> > > key="authors-form.button.back"/>
> > >  > > property="submit"> > > key="authors-form.button.forward"/>
> > > 
> > >
> > > And finally the Action-Map:
> > > 
> > >   protected Map getKeyMethodMap() {
> > > Map map = new HashMap();
> > > map.put("authors-form.button.create",
> > > "create");
> > > map.put("authors-form.button.edit",   
> "edit");
> > > map.put("authors-form.button.remove",
> > > "remove");
> > > map.put("authors-form.button.forward",
> > > "forward");
> > > map.put("authors-form.button.back",   
> "back");
> > > return map;
> > >   }
> > > 
> > >
> > > The back-button works, while the forward doesn't.
> > >
> > > The LookupDispatchAction tries to call a method named
> > > "weiter" instead
> > > of "forward", while it calls the "back"-method as expected.
> > >
> > > Alexander
> > >
> > > 
> -
> > > 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]
> > 
> > 
> 
> 
> -- 
> 
> 
> "You can't wake a person who is pretending to be asleep."
> 
> ~Native Proverb~
> 
> "Each man is good in His sight. It is not necessary for 
> eagles to be crows."
> 
> ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> 
> -
> 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]



Re: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread Dakota Jack
Given the accuracy of what Alexander has said, if the method return is
"weiter" from the keyMethodMap, then the key being called is returning
a value of "weiter" and that has to be in the key method map.  That is
not guesswork.  That is what has to be having, if the debug
information on this thread is correct.

Jack


On Wed, 8 Dec 2004 09:09:46 -0700, Jim Barrows <[EMAIL PROTECTED]> wrote:
> 
> 
> 
> 
> > -Original Message-
> > From: Alexander Czernay [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, December 08, 2004 6:14 AM
> > To: Struts Users Mailing List
> > Subject: Re: LookupDispatchAction doesn't lookup mapping
> >
> >
> > Dakota Jack wrote:
> > > My experience is that the computer is always right, so I
> > would look in
> > > my properites file, if I were you, and see whether or not I had
> > > reversed the myButtonForward=go to go=myButtonForward.  Did you?  I
> > > feel compelled to reiterate that LookupDispatchAction is a
> > fairly poor
> > > example of the code needed to do this stuff, in my opinion.
> > >
> > > Jack
> > >
> > >
> >
> > I will definitely try your suggestion out, but before that, I
> > wanted to
> > figure out, what I had done wrong using the LookupDispatchAction.
> >
> > So now some direct copy & paste from my code.
> > My ApplicationRessurces.properties looks like this:
> > 
> > authors-form.button.forward = weiter
> > authors-form.button.back = zurück
> > 
> >
> > The jsp:
> 
> This suggestion comes under the heading "When only the impossible is left, 
> the impossible must be possible".  I don't think this is it.
> Why do you have  It shouldn't matter, but everything else looks right, and exactly the way I 
> have it working in my code, except for the double form thing.  No idea why it 
> would make a difference... and don't really think it should... but..
> 
> 
> 
> 
> > 
> >  > property="submit"> > key="authors-form.button.back"/>
> >  > property="submit"> > key="authors-form.button.forward"/>
> > 
> >
> > And finally the Action-Map:
> > 
> >   protected Map getKeyMethodMap() {
> > Map map = new HashMap();
> > map.put("authors-form.button.create",
> > "create");
> > map.put("authors-form.button.edit",   "edit");
> > map.put("authors-form.button.remove",
> > "remove");
> > map.put("authors-form.button.forward",
> > "forward");
> > map.put("authors-form.button.back",   "back");
> > return map;
> >   }
> > 
> >
> > The back-button works, while the forward doesn't.
> >
> > The LookupDispatchAction tries to call a method named
> > "weiter" instead
> > of "forward", while it calls the "back"-method as expected.
> >
> > Alexander
> >
> > -
> > 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]
> 
> 


-- 


"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

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



Re: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread Dakota Jack
Sorry if this is not helpful to you, Jim.  However, I meant the
opposite of what you are saying.  I am saying that the computer is
doing exactly what is coded and, so, the answer lies in tracking the
output.  I would never think that the impossible is possible or any
other such philosophical drivel.  Sorry I gave that impression.  I am
a preeminently practical person.  That is what I mean when I say "the
computer is always right'.  Hopefully my next suggestion makes that
clear.  I think this is really a simple problem to solve if one merely
debugs following the LookupDispatchAction code and determines where
the wrong value appears.  This is not a rocket science problem.  That
is my point.

Jack


On Wed, 8 Dec 2004 09:09:46 -0700, Jim Barrows <[EMAIL PROTECTED]> wrote:
> 
> 
> 
> 
> > -Original Message-
> > From: Alexander Czernay [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, December 08, 2004 6:14 AM
> > To: Struts Users Mailing List
> > Subject: Re: LookupDispatchAction doesn't lookup mapping
> >
> >
> > Dakota Jack wrote:
> > > My experience is that the computer is always right, so I
> > would look in
> > > my properites file, if I were you, and see whether or not I had
> > > reversed the myButtonForward=go to go=myButtonForward.  Did you?  I
> > > feel compelled to reiterate that LookupDispatchAction is a
> > fairly poor
> > > example of the code needed to do this stuff, in my opinion.
> > >
> > > Jack
> > >
> > >
> >
> > I will definitely try your suggestion out, but before that, I
> > wanted to
> > figure out, what I had done wrong using the LookupDispatchAction.
> >
> > So now some direct copy & paste from my code.
> > My ApplicationRessurces.properties looks like this:
> > 
> > authors-form.button.forward = weiter
> > authors-form.button.back = zurück
> > 
> >
> > The jsp:
> 
> This suggestion comes under the heading "When only the impossible is left, 
> the impossible must be possible".  I don't think this is it.
> Why do you have  It shouldn't matter, but everything else looks right, and exactly the way I 
> have it working in my code, except for the double form thing.  No idea why it 
> would make a difference... and don't really think it should... but..
> 
> 
> 
> 
> > 
> >  > property="submit"> > key="authors-form.button.back"/>
> >  > property="submit"> > key="authors-form.button.forward"/>
> > 
> >
> > And finally the Action-Map:
> > 
> >   protected Map getKeyMethodMap() {
> > Map map = new HashMap();
> > map.put("authors-form.button.create",
> > "create");
> > map.put("authors-form.button.edit",   "edit");
> > map.put("authors-form.button.remove",
> > "remove");
> > map.put("authors-form.button.forward",
> > "forward");
> > map.put("authors-form.button.back",   "back");
> > return map;
> >   }
> > 
> >
> > The back-button works, while the forward doesn't.
> >
> > The LookupDispatchAction tries to call a method named
> > "weiter" instead
> > of "forward", while it calls the "back"-method as expected.
> >
> > Alexander
> >
> > -
> > 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]
> 
> 


-- 


"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

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



Re: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread Dakota Jack
The problem with this analysis, Hermod, is that the determination of
what method to call happens after the correct key is found, and the
correct key can be found only if there is no locale issue.

I am assuming that when Alexander says the method weiter is being
called he means that.

Jack


On Wed, 8 Dec 2004 16:03:27 +0100, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Hi
> 
> You write that : The LookupDispatchAction tries to call a method named
> "weiter" instead
> of "forward", while it calls the "back"-method as expected.
> 
> As far as I remember "weiter" is the German word for "forward" - There
> might be a locale issue here.
> 
> Hermod
> 
> 
> 
> 
> -Original Message-
> From: Alexander Czernay [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 2:14 PM
> To: Struts Users Mailing List
> Subject: Re: LookupDispatchAction doesn't lookup mapping
> 
> Dakota Jack wrote:
> > My experience is that the computer is always right, so I would look in
> > my properites file, if I were you, and see whether or not I had
> > reversed the myButtonForward=go to go=myButtonForward.  Did you?  I
> > feel compelled to reiterate that LookupDispatchAction is a fairly poor
> > example of the code needed to do this stuff, in my opinion.
> >
> > Jack
> >
> >
> 
> I will definitely try your suggestion out, but before that, I wanted to
> figure out, what I had done wrong using the LookupDispatchAction.
> 
> So now some direct copy & paste from my code.
> My ApplicationRessurces.properties looks like this:
> 
> authors-form.button.forward = weiter
> authors-form.button.back = zurück
> 
> 
> The jsp:
> 
>  property="submit"> key="authors-form.button.back"/>
>  property="submit"> key="authors-form.button.forward"/>
> 
> 
> 
> 
> And finally the Action-Map:
> 
> protected Map getKeyMethodMap() {
>   Map map = new HashMap();
>   map.put("authors-form.button.create",
> "create");
>   map.put("authors-form.button.edit",   "edit");
>   map.put("authors-form.button.remove",
> "remove");
>   map.put("authors-form.button.forward",
> "forward");
>   map.put("authors-form.button.back",   "back");
>   return map;
> }
> 
> 
> The back-button works, while the forward doesn't.
> 
> The LookupDispatchAction tries to call a method named "weiter" instead
> of "forward", while it calls the "back"-method as expected.
> 
> Alexander
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> 
> This email with attachments is solely for the use of the individual or
> entity to whom it is addressed. Please also be aware that the DnB NOR Group
> cannot accept any payment orders or other legally binding correspondence with
> customers as a part of an email.
> 
> This email message has been virus checked by the virus programs used
> in the DnB NOR Group.
> 
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 


"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

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



Re: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread Dakota Jack
The code in LookupDispatchAction is:


String key = (String) lookupMap.get(name);

String methodName = (String) keyMethodMap.get(key);

Therefore, if you know what your code is returning as "key" and you
know what your code is returning as "methodName" and if the "key" is
correct, the keyMethodMap has to contain the wrong value for the
"key".

Jack


On Wed, 08 Dec 2004 14:14:18 +0100, Alexander Czernay
<[EMAIL PROTECTED]> wrote:
> Dakota Jack wrote:
> > My experience is that the computer is always right, so I would look in
> > my properites file, if I were you, and see whether or not I had
> > reversed the myButtonForward=go to go=myButtonForward.  Did you?  I
> > feel compelled to reiterate that LookupDispatchAction is a fairly poor
> > example of the code needed to do this stuff, in my opinion.
> >
> > Jack
> >
> >
> 
> I will definitely try your suggestion out, but before that, I wanted to
> figure out, what I had done wrong using the LookupDispatchAction.
> 
> So now some direct copy & paste from my code.
> My ApplicationRessurces.properties looks like this:
> 
> authors-form.button.forward = weiter
> authors-form.button.back = zurück
> 
> 
> The jsp:
> 
>  property="submit"> key="authors-form.button.back"/>
>  property="submit"> key="authors-form.button.forward"/>
> 
> 
> And finally the Action-Map:
> 
> protected Map getKeyMethodMap() {
>   Map map = new HashMap();
>   map.put("authors-form.button.create", "create");
>   map.put("authors-form.button.edit",   "edit");
>   map.put("authors-form.button.remove", "remove");
>   map.put("authors-form.button.forward","forward");
>   map.put("authors-form.button.back",   "back");
>   return map;
> }
> 
> 
> The back-button works, while the forward doesn't.
> 
> The LookupDispatchAction tries to call a method named "weiter" instead
> of "forward", while it calls the "back"-method as expected.
> 
> 
> 
> Alexander
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 


"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

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



RE: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread Jim Barrows


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 8:03 AM
> To: [EMAIL PROTECTED]
> Subject: RE: LookupDispatchAction doesn't lookup mapping
> 
> 
> Hi
> 
> You write that : The LookupDispatchAction tries to call a method named
> "weiter" instead 
> of "forward", while it calls the "back"-method as expected.
> 
> As far as I remember "weiter" is the German word for "forward" - There
> might be a locale issue here.

That would be possible if he was getting the english version instead of the 
german version he's apparently putting on the page.


> 
> Hermod
> 
> 
> -Original Message-
> From: Alexander Czernay [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 2:14 PM
> To: Struts Users Mailing List
> Subject: Re: LookupDispatchAction doesn't lookup mapping
> 
> 
> Dakota Jack wrote:
> > My experience is that the computer is always right, so I 
> would look in
> > my properites file, if I were you, and see whether or not I had
> > reversed the myButtonForward=go to go=myButtonForward.  Did you?  I
> > feel compelled to reiterate that LookupDispatchAction is a 
> fairly poor
> > example of the code needed to do this stuff, in my opinion.
> > 
> > Jack
> > 
> > 
> 
> I will definitely try your suggestion out, but before that, I 
> wanted to 
> figure out, what I had done wrong using the LookupDispatchAction.
> 
> So now some direct copy & paste from my code.
> My ApplicationRessurces.properties looks like this:
> 
> authors-form.button.forward = weiter
> authors-form.button.back = zurück
> 
> 
> The jsp:
> 
>  property="submit"> key="authors-form.button.back"/>
>  property="submit"> key="authors-form.button.forward"/>
> 
> 
> And finally the Action-Map:
> 
>   protected Map getKeyMethodMap() {
> Map map = new HashMap();
> map.put("authors-form.button.create",
> "create");
> map.put("authors-form.button.edit",   "edit");
> map.put("authors-form.button.remove",
> "remove");
> map.put("authors-form.button.forward",
> "forward");
> map.put("authors-form.button.back",   "back");
> return map;
>   }
> 
> 
> The back-button works, while the forward doesn't.
> 
> The LookupDispatchAction tries to call a method named 
> "weiter" instead 
> of "forward", while it calls the "back"-method as expected.
> 
> Alexander
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
> * * * * * * *
> 
> This email with attachments is solely for the use of the individual or
> entity to whom it is addressed. Please also be aware that the 
> DnB NOR Group
> cannot accept any payment orders or other legally binding 
> correspondence with
> customers as a part of an email. 
> 
> This email message has been virus checked by the virus programs used
> in the DnB NOR Group.
> 
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
> * * * * * * *
> 
> 
> -
> 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]



RE: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread Jim Barrows


> -Original Message-
> From: Alexander Czernay [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 6:14 AM
> To: Struts Users Mailing List
> Subject: Re: LookupDispatchAction doesn't lookup mapping
> 
> 
> Dakota Jack wrote:
> > My experience is that the computer is always right, so I 
> would look in
> > my properites file, if I were you, and see whether or not I had
> > reversed the myButtonForward=go to go=myButtonForward.  Did you?  I
> > feel compelled to reiterate that LookupDispatchAction is a 
> fairly poor
> > example of the code needed to do this stuff, in my opinion.
> > 
> > Jack
> > 
> > 
> 
> I will definitely try your suggestion out, but before that, I 
> wanted to 
> figure out, what I had done wrong using the LookupDispatchAction.
> 
> So now some direct copy & paste from my code.
> My ApplicationRessurces.properties looks like this:
> 
> authors-form.button.forward = weiter
> authors-form.button.back = zurück
> 
> 
> The jsp:

This suggestion comes under the heading "When only the impossible is left, the 
impossible must be possible".  I don't think this is it.
Why do you have  
>  property="submit"> key="authors-form.button.back"/>
>  property="submit"> key="authors-form.button.forward"/>
> 
> 
> And finally the Action-Map:
> 
>   protected Map getKeyMethodMap() {
> Map map = new HashMap();
> map.put("authors-form.button.create", 
> "create");
> map.put("authors-form.button.edit",   "edit");
> map.put("authors-form.button.remove", 
> "remove");
> map.put("authors-form.button.forward",
> "forward");
> map.put("authors-form.button.back",   "back");
> return map;
>   }
> 
> 
> The back-button works, while the forward doesn't.
> 
> The LookupDispatchAction tries to call a method named 
> "weiter" instead 
> of "forward", while it calls the "back"-method as expected.
> 
> Alexander
> 
> -
> 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]



RE: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread hermod . opstvedt
Hi

You write that : The LookupDispatchAction tries to call a method named
"weiter" instead 
of "forward", while it calls the "back"-method as expected.

As far as I remember "weiter" is the German word for "forward" - There
might be a locale issue here.

Hermod


-Original Message-
From: Alexander Czernay [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 08, 2004 2:14 PM
To: Struts Users Mailing List
Subject: Re: LookupDispatchAction doesn't lookup mapping


Dakota Jack wrote:
> My experience is that the computer is always right, so I would look in
> my properites file, if I were you, and see whether or not I had
> reversed the myButtonForward=go to go=myButtonForward.  Did you?  I
> feel compelled to reiterate that LookupDispatchAction is a fairly poor
> example of the code needed to do this stuff, in my opinion.
> 
> Jack
> 
> 

I will definitely try your suggestion out, but before that, I wanted to 
figure out, what I had done wrong using the LookupDispatchAction.

So now some direct copy & paste from my code.
My ApplicationRessurces.properties looks like this:

authors-form.button.forward = weiter
authors-form.button.back = zurück


The jsp:





And finally the Action-Map:

protected Map getKeyMethodMap() {
  Map map = new HashMap();
  map.put("authors-form.button.create",
"create");
  map.put("authors-form.button.edit",   "edit");
  map.put("authors-form.button.remove",
"remove");
  map.put("authors-form.button.forward",
"forward");
  map.put("authors-form.button.back",   "back");
  return map;
}


The back-button works, while the forward doesn't.

The LookupDispatchAction tries to call a method named "weiter" instead 
of "forward", while it calls the "back"-method as expected.

Alexander

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


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


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



RE: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread Bala . Paranj

Please ignore this message.
-Original Message-
From: Dakota Jack [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 08, 2004 7:47 AM
To: Struts Users Mailing List
Subject: Re: LookupDispatchAction doesn't lookup mapping


My experience is that the computer is always right, so I would look in
my properites file, if I were you, and see whether or not I had
reversed the myButtonForward=go to go=myButtonForward.  Did you?  I
feel compelled to reiterate that LookupDispatchAction is a fairly poor
example of the code needed to do this stuff, in my opinion.

Jack


On Wed, 08 Dec 2004 09:51:58 +0100, Alexander Czernay
<[EMAIL PROTECTED]> wrote:
> Dakota Jack wrote:
> 
> 
> > On Tue, 07 Dec 2004 12:02:52 +0100, Alexander Czernay
> > <[EMAIL PROTECTED]> wrote:
> >
> >> The problem is, that only one of those buttons
> >>works, while the other throws a MissingResourceAction. That sounds like
> >>a typo, but the strange thing is, that it tries to lookup the button's
> >>value rather than it's name (eg. having a ressource mapping like
> >>mybutton.forward=go it would try to lookup "go").
> >
> >
> > I presume that you know that lookup dispatch action DOES lookup the
> > buttons value rather than its name?  I just mention this because your
> > wording half indicates that you find this surprising.
> >
> > Jack
> >
> 
> Well, as far as I understand it, it takes the button value (eg. "go")
> and tries to match it in Application.properties, where it should find
> "mybutton.forward" that it looks up in the getKeyMethodMap() inside the
> LookupDispatchAction. My problem is, that my application tries to lookup
> "go" rather than "mybutton.forward" for one button, while it works for
> the other.
> 
> I double-checked all occurences of the lookup-string and also tried to
> rename it in case of some cruel naming conflict. It just doesn't work.
> 
> Alexander
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 


"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

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

Note:  The information contained in this email and in any attachments is
intended only for the person or entity to which it is addressed and may
contain confidential and/or privileged material.  Any review,
retransmission, dissemination or other use of, or taking of any action in
reliance upon, this information by persons or entities other than the
intended recipient is prohibited.  The recipient should check this email and
any attachments for the presence of viruses.  Sender accepts no liability
for any damages caused by any virus transmitted by this email. If you have
received this email in error, please notify us immediately by replying to
the message and delete the email from your computer.  This e-mail is and any
response to it will be unencrypted and, therefore, potentially unsecure.
Thank you.  NOVA Information Systems, Inc.

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



Re: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread Alexander Czernay
Dakota Jack wrote:
My experience is that the computer is always right, so I would look in
my properites file, if I were you, and see whether or not I had
reversed the myButtonForward=go to go=myButtonForward.  Did you?  I
feel compelled to reiterate that LookupDispatchAction is a fairly poor
example of the code needed to do this stuff, in my opinion.
Jack

I will definitely try your suggestion out, but before that, I wanted to 
figure out, what I had done wrong using the LookupDispatchAction.

So now some direct copy & paste from my code.
My ApplicationRessurces.properties looks like this:

authors-form.button.forward = weiter
authors-form.button.back = zurück

The jsp:





And finally the Action-Map:

protected Map getKeyMethodMap() {
  Map map = new HashMap();
  map.put("authors-form.button.create",   "create");
  map.put("authors-form.button.edit", "edit");
  map.put("authors-form.button.remove",   "remove");
  map.put("authors-form.button.forward",  "forward");
  map.put("authors-form.button.back", "back");
  return map;
}

The back-button works, while the forward doesn't.
The LookupDispatchAction tries to call a method named "weiter" instead 
of "forward", while it calls the "back"-method as expected.

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


Re: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread Dakota Jack
I meant mybutton.forward=go to go=mybutton.forward


On Wed, 8 Dec 2004 04:46:58 -0800, Dakota Jack <[EMAIL PROTECTED]> wrote:
> My experience is that the computer is always right, so I would look in
> my properites file, if I were you, and see whether or not I had
> reversed the myButtonForward=go to go=myButtonForward.  Did you?  I
> feel compelled to reiterate that LookupDispatchAction is a fairly poor
> example of the code needed to do this stuff, in my opinion.
> 
> Jack
> 
> On Wed, 08 Dec 2004 09:51:58 +0100, Alexander Czernay
> 
> 
> <[EMAIL PROTECTED]> wrote:
> > Dakota Jack wrote:
> >
> >
> > > On Tue, 07 Dec 2004 12:02:52 +0100, Alexander Czernay
> > > <[EMAIL PROTECTED]> wrote:
> > >
> > >> The problem is, that only one of those buttons
> > >>works, while the other throws a MissingResourceAction. That sounds like
> > >>a typo, but the strange thing is, that it tries to lookup the button's
> > >>value rather than it's name (eg. having a ressource mapping like
> > >>mybutton.forward=go it would try to lookup "go").
> > >
> > >
> > > I presume that you know that lookup dispatch action DOES lookup the
> > > buttons value rather than its name?  I just mention this because your
> > > wording half indicates that you find this surprising.
> > >
> > > Jack
> > >
> >
> > Well, as far as I understand it, it takes the button value (eg. "go")
> > and tries to match it in Application.properties, where it should find
> > "mybutton.forward" that it looks up in the getKeyMethodMap() inside the
> > LookupDispatchAction. My problem is, that my application tries to lookup
> > "go" rather than "mybutton.forward" for one button, while it works for
> > the other.
> >
> > I double-checked all occurences of the lookup-string and also tried to
> > rename it in case of some cruel naming conflict. It just doesn't work.
> >
> > Alexander
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> --
> 
> "You can't wake a person who is pretending to be asleep."
> 
> ~Native Proverb~
> 
> "Each man is good in His sight. It is not necessary for eagles to be crows."
> 
> ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> 


-- 


"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

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



Re: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread Dakota Jack
My experience is that the computer is always right, so I would look in
my properites file, if I were you, and see whether or not I had
reversed the myButtonForward=go to go=myButtonForward.  Did you?  I
feel compelled to reiterate that LookupDispatchAction is a fairly poor
example of the code needed to do this stuff, in my opinion.

Jack


On Wed, 08 Dec 2004 09:51:58 +0100, Alexander Czernay
<[EMAIL PROTECTED]> wrote:
> Dakota Jack wrote:
> 
> 
> > On Tue, 07 Dec 2004 12:02:52 +0100, Alexander Czernay
> > <[EMAIL PROTECTED]> wrote:
> >
> >> The problem is, that only one of those buttons
> >>works, while the other throws a MissingResourceAction. That sounds like
> >>a typo, but the strange thing is, that it tries to lookup the button's
> >>value rather than it's name (eg. having a ressource mapping like
> >>mybutton.forward=go it would try to lookup "go").
> >
> >
> > I presume that you know that lookup dispatch action DOES lookup the
> > buttons value rather than its name?  I just mention this because your
> > wording half indicates that you find this surprising.
> >
> > Jack
> >
> 
> Well, as far as I understand it, it takes the button value (eg. "go")
> and tries to match it in Application.properties, where it should find
> "mybutton.forward" that it looks up in the getKeyMethodMap() inside the
> LookupDispatchAction. My problem is, that my application tries to lookup
> "go" rather than "mybutton.forward" for one button, while it works for
> the other.
> 
> I double-checked all occurences of the lookup-string and also tried to
> rename it in case of some cruel naming conflict. It just doesn't work.
> 
> Alexander
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 


"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

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



Re: LookupDispatchAction doesn't lookup mapping

2004-12-08 Thread Alexander Czernay
Dakota Jack wrote:
On Tue, 07 Dec 2004 12:02:52 +0100, Alexander Czernay
<[EMAIL PROTECTED]> wrote:
The problem is, that only one of those buttons
works, while the other throws a MissingResourceAction. That sounds like
a typo, but the strange thing is, that it tries to lookup the button's
value rather than it's name (eg. having a ressource mapping like
mybutton.forward=go it would try to lookup "go"). 

I presume that you know that lookup dispatch action DOES lookup the
buttons value rather than its name?  I just mention this because your
wording half indicates that you find this surprising.
Jack
Well, as far as I understand it, it takes the button value (eg. "go") 
and tries to match it in Application.properties, where it should find 
"mybutton.forward" that it looks up in the getKeyMethodMap() inside the 
LookupDispatchAction. My problem is, that my application tries to lookup 
"go" rather than "mybutton.forward" for one button, while it works for 
the other.

I double-checked all occurences of the lookup-string and also tried to 
rename it in case of some cruel naming conflict. It just doesn't work.

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


Re: LookupDispatchAction doesn't lookup mapping

2004-12-07 Thread Dakota Jack
On Tue, 07 Dec 2004 12:02:52 +0100, Alexander Czernay
<[EMAIL PROTECTED]> wrote:
>  The problem is, that only one of those buttons
> works, while the other throws a MissingResourceAction. That sounds like
> a typo, but the strange thing is, that it tries to lookup the button's
> value rather than it's name (eg. having a ressource mapping like
> mybutton.forward=go it would try to lookup "go"). 

I presume that you know that lookup dispatch action DOES lookup the
buttons value rather than its name?  I just mention this because your
wording half indicates that you find this surprising.

Jack

-- 


"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

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



RE: LookupDispatchAction doesn't lookup mapping

2004-12-07 Thread Jim Barrows


> -Original Message-
> From: Susan Bradeen [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 07, 2004 12:07 PM
> To: Struts Users Mailing List
> Subject: Re: LookupDispatchAction doesn't lookup mapping
> 
> 
> On Tue, 07 Dec 2004 15:54:20 +0100, Alexander Czernay
> <[EMAIL PROTECTED]> wrote:
> > Susan Bradeen wrote:
> > 
> > 
> > 
> > >
> > > 
> > >
> > >>/**
> > >> * Key method for mapping methods to buttons
> > >> */
> > >>protected Map getKeyMethodMap() {
> > >>  Map map = new HashMap();
> > >>  map.put("authors-form.button.create",   
>   "create");
> > >>  map.put("authors-form.button.edit", 
>   "edit");
> > >>  map.put("authors-form.button.remove",   
>   "remove");
> > >>  map.put("authors-form.button.forwar",   
>   "forward");
> > >
> > >
> > > Is the above line in your code correct ...  
> "authors-form.button.forwar" ?
> > >
> > 
> > That was just a copy & paste mistake. That's not actually 
> in my code.
> > Alexander
> > 
> > 
> 
> Ok, bummer. Doesn't look to me like there's any difference in your
> code set up for 'back' and 'forward', and if 'back' is working, I am
> not seeing where the problem is. Does stepping through a debugger tell
> you what class is actually throwing the "MissingResourceAction'
> exception? I've not heard of that one before, but I don't have a whole
> lof of experience with LookupDispatchAction.
> 

Haven't followed this thread but
I recently encountered this when then keys weren't in the 
ApplicationResource.properties file.  It was somewhat troublesome because it 
was a copy and paste error that looked like it was correct.  I  had org.blah 
instead of com.blah... both in the resource file and in the message 
configuration portion of the struts-config file.

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



Re: LookupDispatchAction doesn't lookup mapping

2004-12-07 Thread Susan Bradeen
On Tue, 07 Dec 2004 15:54:20 +0100, Alexander Czernay
<[EMAIL PROTECTED]> wrote:
> Susan Bradeen wrote:
> 
> 
> 
> >
> > 
> >
> >>/**
> >> * Key method for mapping methods to buttons
> >> */
> >>protected Map getKeyMethodMap() {
> >>  Map map = new HashMap();
> >>  map.put("authors-form.button.create", "create");
> >>  map.put("authors-form.button.edit",   "edit");
> >>  map.put("authors-form.button.remove", "remove");
> >>  map.put("authors-form.button.forwar", 
> >> "forward");
> >
> >
> > Is the above line in your code correct ...  "authors-form.button.forwar" ?
> >
> 
> That was just a copy & paste mistake. That's not actually in my code.
> Alexander
> 
> 

Ok, bummer. Doesn't look to me like there's any difference in your
code set up for 'back' and 'forward', and if 'back' is working, I am
not seeing where the problem is. Does stepping through a debugger tell
you what class is actually throwing the "MissingResourceAction'
exception? I've not heard of that one before, but I don't have a whole
lof of experience with LookupDispatchAction.


> 
> -
> 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]



Re: LookupDispatchAction doesn't lookup mapping

2004-12-07 Thread Alexander Czernay
Susan Bradeen wrote:

   /**
* Key method for mapping methods to buttons
*/
   protected Map getKeyMethodMap() {
 Map map = new HashMap();
 map.put("authors-form.button.create", "create");
 map.put("authors-form.button.edit",   "edit");
 map.put("authors-form.button.remove", "remove");
 map.put("authors-form.button.forwar", 
"forward");

Is the above line in your code correct ...  "authors-form.button.forwar" ?
That was just a copy & paste mistake. That's not actually in my code.
Alexander
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: LookupDispatchAction doesn't lookup mapping

2004-12-07 Thread Susan Bradeen
On Tue, 07 Dec 2004 12:02:52 +0100, Alexander Czernay
<[EMAIL PROTECTED]> wrote:
> I have a strange problem with LookupDispatchAction:
> I built a form displaying several entries from a db as a list. There are
> several buttons for editing/removing the entries an also two buttons for
> paging though the list. The problem is, that only one of those buttons
> works, while the other throws a MissingResourceAction. That sounds like
> a typo, but the strange thing is, that it tries to lookup the button's
> value rather than it's name (eg. having a ressource mapping like
> mybutton.forward=go it would try to lookup "go"). All this works
> perfectly well with my back-button on the same page, using the same action.
> 
> Any ideas?
> 
> Alexander
> 



> /**
>  * Key method for mapping methods to buttons
>  */
> protected Map getKeyMethodMap() {
>   Map map = new HashMap();
>   map.put("authors-form.button.create", "create");
>   map.put("authors-form.button.edit",   "edit");
>   map.put("authors-form.button.remove", "remove");
>   map.put("authors-form.button.forwar", 
> "forward");

Is the above line in your code correct ...  "authors-form.button.forwar" ?


>   map.put("authors-form.button.back",   "back");
>   return map;
> }
> 
> 



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



Re: LookupDispatchAction doesn't lookup mapping

2004-12-07 Thread Dakota Jack
You might want to look at
http://www.michaelmcgrady.com/button/jsp/dispatch_util.jsp.

This would mean, for example, that you could do what you want with the
following code, requiring nothing else:


JSP CODE  (changes property="submit" for example, to property="edit.dispatch")











ACTION CODE (you code the actions, e.g. edit(...) and remove( ...) in
your action as before)

ActionForward forward= null;

try {
forward = new 
DispatchUtil().dispatch(this,mapping,form,request,response);
} catch (Exception e) {
}
return forward;

LookupDispatchAction is pretty complicated, and perhaps unnecessarily
so: http://www.michaelmcgrady.com/button/jsp/button_talk.jsp .

Jack


On Tue, 07 Dec 2004 12:02:52 +0100, Alexander Czernay
<[EMAIL PROTECTED]> wrote:
> I have a strange problem with LookupDispatchAction:
> I built a form displaying several entries from a db as a list. There are
> several buttons for editing/removing the entries an also two buttons for
> paging though the list. The problem is, that only one of those buttons
> works, while the other throws a MissingResourceAction. That sounds like
> a typo, but the strange thing is, that it tries to lookup the button's
> value rather than it's name (eg. having a ressource mapping like
> mybutton.forward=go it would try to lookup "go"). All this works
> perfectly well with my back-button on the same page, using the same action.
> 
> Any ideas?
> 
> Alexander
> 
> ApplicationRessources.properties:
> # Form Labels
> authors-form.button.create = Autor hinzufügen
> authors-form.button.remove = Autor löschen
> authors-form.button.edit = Autor bearbeiten
> authors-form.button.list = Autoren auflisten
> authors-form.button.forward = weiter
> authors-form.button.back = zurück
> 
> list.jsp
> <%@ page language="java"%>
> <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"; prefix="bean"%>
> <%@ taglib uri="http://jakarta.apache.org/struts/tags-html"; prefix="html"%>
> <%@ taglib uri="http://jakarta.apache.org/struts/tags-logic";
> prefix="logic"%>
> 
> 
> 
>   
> 
> 
> 
> 
> 
> 
>   
> 
> 
> 
> 
>  property="submit"> key="authors-form.button.create"/>
>  property="submit"> key="authors-form.button.back"/>
> 
>  property="submit"> key="authors-form.button.forward"/>
> 
> 
> 
> CommandAuthor
> 
>  property="submit"> key="authors-form.button.edit"/> property="submit"> key="authors-form.button.remove"/> property="id" name="author"/> name="author" property="name"/> -  property="description"/>
> 
> 
> 
> 
>  property="submit"> key="authors-form.button.create"/>
> 
> 
> AuthorsActionList.java
> package de.sbow.struts.action.Authors;
> 
> import java.util.HashMap;
> import java.util.Map;
> 
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpServletResponse;
> 
> import org.apache.commons.beanutils.BeanUtils;
> import org.apache.commons.logging.Log;
> import org.apache.struts.action.ActionForm;
> import org.apache.struts.action.ActionForward;
> import org.apache.struts.action.ActionMapping;
> import org.apache.struts.actions.LookupDispatchAction;
> 
> import de.sbow.MSys.Authors.value.AuthorBeanValue;
> import de.sbow.common.ServiceLocator;
> import de.sbow.struts.form.AuthorEditForm;
> import de.sbow.struts.model.AuthorModel;
> 
> /**
>   * @author Alexander
>   *
>   * The Struts action-class for presenting
>   * the Authors list.
>   *
>   */
> public class AuthorsListAction extends LookupDispatchAction {
> private static Log log = ServiceLocator.getInstance().getLog(
> AuthorsListAction.class);
> 
> /**
>  * Key method for mapping methods to buttons
>  */
> protected Map getKeyMethodMap() {
>   Map map = new HashMap();
>   map.put("authors-form.button.create", "create");
>   map.put("authors-form.button.edit",   "edit");
>   map.put("authors-form.button.remove", "remove");
>   map.put("authors-form.button.forwar", 
> "forward");
>   map.put("authors-form.button.back",   "back");
>   return map;
> }
> 
> /**
>  * Method create
>  * @param mapping
>  * @param form
>  * @param request
>  * @param response
>  * @return ActionForward
>  */
> public ActionForward create(
> ActionMapping mapping,
> ActionForm form,
> HttpServletRequest request,
> HttpServletResponse response) throws Exception {
> 
> // get form
> AuthorEditForm authorForm = (AuthorEditForm) form;
> // TODO check if this makes sense!
> authorForm.reset(mapping, request);
> 
>   

LookupDispatchAction doesn't lookup mapping

2004-12-07 Thread Alexander Czernay
I have a strange problem with LookupDispatchAction:
I built a form displaying several entries from a db as a list. There are 
several buttons for editing/removing the entries an also two buttons for 
paging though the list. The problem is, that only one of those buttons 
works, while the other throws a MissingResourceAction. That sounds like 
a typo, but the strange thing is, that it tries to lookup the button's 
value rather than it's name (eg. having a ressource mapping like 
mybutton.forward=go it would try to lookup "go"). All this works 
perfectly well with my back-button on the same page, using the same action.

Any ideas?
Alexander
ApplicationRessources.properties:
# Form Labels
authors-form.button.create = Autor hinzufügen
authors-form.button.remove = Autor löschen
authors-form.button.edit = Autor bearbeiten
authors-form.button.list = Autoren auflisten
authors-form.button.forward = weiter
authors-form.button.back = zurück
list.jsp
<%@ page language="java"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"; prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"; prefix="html"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic"; 
prefix="logic"%>


	
	  
	




	
	  
	










CommandAuthor

 - 







AuthorsActionList.java
package de.sbow.struts.action.Authors;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.logging.Log;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.LookupDispatchAction;
import de.sbow.MSys.Authors.value.AuthorBeanValue;
import de.sbow.common.ServiceLocator;
import de.sbow.struts.form.AuthorEditForm;
import de.sbow.struts.model.AuthorModel;
/**
 * @author Alexander
 *
 * The Struts action-class for presenting
 * the Authors list.
 *
 */
public class AuthorsListAction extends LookupDispatchAction {
private static Log log = ServiceLocator.getInstance().getLog(
AuthorsListAction.class);
/**
 * Key method for mapping methods to buttons
 */
protected Map getKeyMethodMap() {
  Map map = new HashMap();
  map.put("authors-form.button.create",   "create");
  map.put("authors-form.button.edit", "edit");
  map.put("authors-form.button.remove",   "remove");
  map.put("authors-form.button.forwar",   
"forward");
  map.put("authors-form.button.back", "back");
  return map;
}
/**
 * Method create
 * @param mapping
 * @param form
 * @param request
 * @param response
 * @return ActionForward
 */
public ActionForward create(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception {

// get form
AuthorEditForm authorForm = (AuthorEditForm) form;
// TODO check if this makes sense!
authorForm.reset(mapping, request);


log.debug("Forwarding to \"authors create\".");
return mapping.findForward("create");
}   
/**
 * Method edit
 * @param mapping
 * @param form
 * @param request
 * @param response
 * @return ActionForward
 */
public ActionForward edit(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception {

// get form
AuthorEditForm authorForm = (AuthorEditForm) form;
// get author-model
AuthorModel am = new AuthorModel();
// retieve author via model
AuthorBeanValue author = am.findById(authorForm.getId());
// copy author into form
BeanUtils.copyProperties(authorForm, author);

log.debug("Forwarding to \"authors edit\".");
return mapping.findForward("edit");
}   
/**
 * Method remove
 * @param mapping
 * @param form
 * @param request
 * @param response
 * @return ActionForward
 */
public ActionForward remove(
ActionMapping mapping,
ActionForm form,
HttpServl