yes, I have a few pages, forms and actions. the
strange thing is that some works fine. I in one
particula action, I copy the key used in another
action which works, but it does not work in this
action.

Here is the action defintion:
<action path="/admin/SearchTemplate"
  name="searchTemplateForm"
  scope="request"
  validate="true"
  input=".searchTemplateDef"
  parameter="method"            
type="net.canal.admin.action.SearchTemplateAction">
 <forward name="success" path=".searchTemplateDef" />
 <forward name="notfound" path=".searchTemplateDef" />
 <forward name="found" path=".listTemplateDef" />
</action>

In SearchTemplateForm.java, I have validate() which is
indeed called and action errors is set when name is
null, but it just not displayed on the jsp.

The flow is, I click a menu item, which pass a
parameter 'Prepare' to a LookupDispatchAction. But
before that the Validate() is called and suppose to
return back with erros and then display the Tiles
right ?

Here is the validate():

ActionErrors errors = null;
String parameter = request.getParameter ("method");
if (parameter == null ||  !
parameter.equalsIgnoreCase("prepare")) {        
if ((name == null) || (name.length() < 1)) {
errors = new ActionErrors();                    
errors.add(ActionErrors.GLOBAL_ERROR, new
ActionError("errors.required", "Template name"));
}
}
return errors;

--------------------

very strange !!!



--- Bryce Fischer <[EMAIL PROTECTED]> wrote:

> I assume that when you say
> messages.add(ActionMessages.GLOBAL_MESSAGE, new
> ActionMessage("something 
> here");
> 
> the "something here" corresponds to a key in your
> messages.properties 
> file (or whichever file has your resource messages)?
> 
> > lixin chu wrote:
> >
> >> Here is how I prepare action messages in Action:
> >>
> >> ActionMessages messages = new ActionMessages();
> >> messages.add(ActionMessages.GLOBAL_MESSAGE, new
> >> ActionMaessage ("something here"));
> >> saveMessages(request, messages);
> >>
> >> anything wrong ? 
> >
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



                
_______________________________
Do you Yahoo!?
Shop for Back-to-School deals on Yahoo! Shopping.
http://shopping.yahoo.com/backtoschool

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

Reply via email to