From: "Tiller, Volker" <[EMAIL PROTECTED]>

I can't get started with the example about using LookupDispatchAction
of Ted Husted, Tip #3 (http://husted.com/struts/tips/index.html).
What is my error or can I get some working code ?

<forward name="testit" path="/test.do?method=button.add"/>

The 'method' parameter should be set to the _value_ from ApplicationResources.properties (not the key). I'm not sure how to encode the spaces to do this manually, maybe method=add+it+all or method=add%20it%20all. Or maybe the spaces will just work. (It's early...)

Here's what happens:
- the framework sees "add it all" as the value of the 'method' parameter
- it figures out that 'add it all' came from the 'button.add' property
- looks up 'button.add' in the keyMethodMap and finds 'add'
- calls the 'add' method in your Action

(Naming the parameter something other than 'method' may make things clearer-- maybe 'choice'.)

HTH,
--
Wendy Smoak



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

Reply via email to