Ted Husted wrote:
> 
> Gabriel Sidler wrote:
> > Ted,
> > could you clarify what exactly you mean by the last sentence? Which
> > 'it's own key'? Which 'message key'? I am not clear on that.
> 
> The ActionMessages object is stored as one request attribute, and the
> ActionErrors object is stored as another.
> 
> The statics used to identify the attributes are named MESSAGE_KEY and
> ERROR_KEY in the Action package.
> 

Ok thanks, I understand that now. 

The html:messages tag does look at ERROR_KEY by default and does look at
MESSAGES_KEY if the attribute 'message' is set to true. But it does not
look at both, if I understand the doc right.

Does it makes sense to have two sets of methods; one to handle the errors 
and one to handle the messages stored under MESSAGES_KEY.  Something like:

public boolean hasErrors();
public int errorSize();
public int errorSize(String property);
public HashMap errors();
public HashMap errors(String property);

public boolean hasMessages();
public int messageSize();
public int messageSize(String property);
public HashMap messages();
public HashMap messages(String property);

Or should the second set of methods handle both, Errors and Messages? (but 
that's not what the html:messsages tag seems to do). I guess I'm still
confused about the real purpose of ActionMessages. The way html:messages
is implemented does not really support the concept that action messages
are a superset of action errors. It's more like you have two types of
messages and you choose which one to operate on.

Anything that clears up my confusion is really appreciated.

Gabe









> -- Ted Husted, Husted dot Com
> -- For priority Struts support,
> -> visit http://husted.com/about/services
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland

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

Reply via email to