struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: messages 101
Date Mon, 28 Jul 2003 16:56:24 GMT

in your <html:message> tag you need to set the "message" property to true.
You'd end up with something like this

<html:messages id="message" message="true">
   <bean:write name="message"/><br>

                      "Travis Stevens"                                                   
                      <Travis.Stevens@n        To:
            >                 cc:                                    
                                               Subject:  messages 101                    
                      07/28/2003 12:47                                                   
                      Please respond to                                                  
                      "Struts Users                                                      
                      Mailing List"                                                      

I can't seem to get messages to work.  My action code has this line of

//create a message
ActionMessages messages = new ActionMessages();
messages.add(ActionMessages.GLOBAL_MESSAGE, new
ActionMessage("",new Integer(record.getUID())));

//log it
if (log.isInfoEnabled()){"Record saved successfully:" + record.getUID());

and my view has this:
<html:messages id="error">
   <bean:write name="error"/><br />

and my struts-config has:
<message-resources parameter=""/>

Nothing prints out in my view.  What am I missing here?  The log message
"Record saved successfully" shows up, so I know that the messages are
being saved.  My ActionErrors work fine so I know my message-resources
are being used properly.

The javadoc for Action.saveMessages() reads:
 Save the specified messages keys into the appropriate request attribute
for use by the <html:messages> tag (if messages="true" is set), if any
messages are required.

Is this my problem?  Do I have to set messages to "true".  Where do I
set messages="true"?


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message