like this ?

/**
*
* @author <a href="mailto:[EMAIL PROTECTED]">shomburg</a>
* @version $Id$
*/
public class MessageDisplay
{
   /**
    * message that should displayed.
    */
   @Parameter
   private String _infoMessage;

   /**
    * message that should displayed.
    */
   @Parameter
   private String _errorMessage;

   /**
* The CSS class for the div element rendered by the component. The default value is "t5c-info".
    */
   private String _class = "t5c-info";

   void beginRender(MarkupWriter writer)
   {
       String displayMessage = null;

       if (_errorMessage != null && _errorMessage.length() > 0)
       {
           displayMessage = _errorMessage;
           _class = "t5c-error";
       }
       else if (_infoMessage != null && _infoMessage.length() > 0)
           displayMessage = _infoMessage;

       if (displayMessage == null)
           return;

       writer.element("div", "class", _class);
       writer.write(displayMessage);
       writer.end();
   }
}

best regards
S.Homburg




Joshua Jackson schrieb:
Dear all,

Is there a message component in T5? Usually I use this in struts to
display message after succession upon one process. What I've found is
only the t:errors component.

Thanks in advance.


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

Reply via email to