Adding to my question.  

The parameter error is caused because velocity-struts
takes the $text.get("add.button.label") key and turns
it into "Add" for English or "Tsuika" for Japanese.

So what do you do in the dispatch action to get struts
to look at the key "add.button.label" instead of the
value that Velocity creates "Add" or "Tsuika"?  In
Struts:html tags, this is taken care of.  Does
Velocity-Struts have a way of taking care of this?  

I could do something like this, but it's pretty messy:

    
    protected Map getKeyMethodMap()
    {
        Map map = new HashMap();
        map.put("Add", "add");  // When English
        map.put("Tsuika", "add"); // When Japanese
        map.put("sumar", "add"); // When Spanish
        return map;
    }


Any input,example code on how other Velocity-Struts
users implement this would be appreciated.

Cheers,

--- David Sperling <[EMAIL PROTECTED]> wrote:

> Hi-
> 
> I'm trying to create an Add Update Delete(AUD) page
> with VelocityStruts.  The page links to Struts
> Action
> that extends LookupDispatchAction.  I'm having
> trouble
> figuring out how to do this in Velocity:
> 
> <%     if( mode.equals("add") )  
> {                                                   
>  
>                                 %>
>  
> 
>             <html:submit property="action">
>               <bean:message key="add.button.label"/>
>             </html:submit>
> <% 
> }else...
> 
> I tried this: 
> #if( $mode == "add" )
>               <td><INPUT TYPE=SUBMIT
> VALUE="$text.get("add.button.label")"></td>
>               $request.setAttribute("action", "add")
> #else ...
> 
> But I get this error:
> 
> Request[/admin/vendorAUD] does not contain handler
> parameter named 'action'.  This may be caused by
> whitespace in the label text.
> 
> Any ideas on how to pass the handler parameter the
> velocityStruts way?
> 
> 
> Cheers,
> 
> David
>  
> 
> 
> BTW here's a snip from my struts-config.xml
> 
>               <action path="/admin/vendorAUD" type = 
>               
> "com.mydomain.cuisine.action.PerformVendorAUDAction"
> name = 
>                       "vendorFormBean" input = ".admin.EditVendor"
> validate="true" scope 
>                       ="request" parameter = "action" >
>                       <forward name ="added"
> path=".admin.VendorUpdated"
> redirect="true"/>
>                       <forward name ="updated"
> path=".admin.VendorUpdated" redirect="true"/>
>                       <forward name ="deleted"
> path=".admin.VendorUpdated" redirect="true"/>
>                       <forward name ="cancel"
> path=".admin.VendorCancelled" redirect="true"/>
>               </action>
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 



                
__________________________________ 
Yahoo! Mail 
Stay connected, organized, and protected. Take the tour: 
http://tour.mail.yahoo.com/mailtour.html 


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

Reply via email to