myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From drobin...@apache.org
Subject svn commit: r557388 [1/13] - in /myfaces/trinidad/trunk/trinidad: trinidad-build/src/main/resources/META-INF/maven-faces-plugin/renderers/trinidad/ trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ trinidad-impl/src/...
Date Wed, 18 Jul 2007 20:32:45 GMT
Author: drobinson
Date: Wed Jul 18 13:32:41 2007
New Revision: 557388

URL: http://svn.apache.org/viewvc?view=rev&rev=557388
Log:
Migrated old MessageBoxRenderer.
TRINIDAD-110

Added:
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/MessageBoxRenderer.java
Modified:
    myfaces/trinidad/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/renderers/trinidad/Messages.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelBoxRenderer.java
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelHeaderRenderer.java
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SkinSelectors.java
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/MessageUtils.java
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/adf/styles/base-desktop.xss
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messages-minimal-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messages-minimalIE-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messages-minimalIERtl-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messages-minimalInacc-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messages-minimalPPC-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messages-minimalSaf-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messages-minimalScrRdr-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesError-minimal-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesError-minimalIE-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesError-minimalIERtl-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesError-minimalInacc-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesError-minimalPPC-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesError-minimalSaf-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesError-minimalScrRdr-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesFatal-minimal-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesFatal-minimalIE-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesFatal-minimalIERtl-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesFatal-minimalInacc-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesFatal-minimalPPC-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesFatal-minimalSaf-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesFatal-minimalScrRdr-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesInfo-minimal-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesInfo-minimalIE-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesInfo-minimalIERtl-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesInfo-minimalInacc-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesInfo-minimalPPC-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesInfo-minimalSaf-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesInfo-minimalScrRdr-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesWarn-minimal-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesWarn-minimalIE-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesWarn-minimalIERtl-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesWarn-minimalInacc-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesWarn-minimalPPC-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesWarn-minimalSaf-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messagesWarn-minimalScrRdr-golden.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/testScripts/messages.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/testScripts/messagesError.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/testScripts/messagesFatal.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/testScripts/messagesInfo.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/testScripts/messagesWarn.xml

Modified: myfaces/trinidad/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/renderers/trinidad/Messages.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/renderers/trinidad/Messages.xml?view=diff&rev=557388&r1=557387&r2=557388
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/renderers/trinidad/Messages.xml (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/renderers/trinidad/Messages.xml Wed Jul 18 13:32:41 2007
@@ -25,7 +25,8 @@
     <renderer>
       <component-family>org.apache.myfaces.trinidad.Messages</component-family>
       <renderer-type>org.apache.myfaces.trinidad.Messages</renderer-type>
-      <renderer-class>org.apache.myfaces.trinidadinternal.renderkit.uix.MessageBoxRenderer</renderer-class>
+      <!--renderer-class>org.apache.myfaces.trinidadinternal.renderkit.uix.MessageBoxRenderer</renderer-class-->
+      <renderer-class>org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.MessageBoxRenderer</renderer-class>
       <renderer-extension>
         <mfp:component-type>org.apache.myfaces.trinidad.CoreMessages</mfp:component-type>
       </renderer-extension>

Added: myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/MessageBoxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/MessageBoxRenderer.java?view=auto&rev=557388
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/MessageBoxRenderer.java (added)
+++ myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/MessageBoxRenderer.java Wed Jul 18 13:32:41 2007
@@ -0,0 +1,472 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.myfaces.trinidadinternal.renderkit.core.xhtml;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.apache.myfaces.trinidad.bean.FacesBean;
+import org.apache.myfaces.trinidad.bean.PropertyKey;
+import org.apache.myfaces.trinidad.component.core.output.CoreMessages;
+
+import org.apache.myfaces.trinidad.context.RenderingContext;
+import org.apache.myfaces.trinidad.context.RequestContext;
+import org.apache.myfaces.trinidad.skin.Icon;
+import org.apache.myfaces.trinidad.util.LabeledFacesMessage;
+import org.apache.myfaces.trinidadinternal.util.MessageUtils;
+
+/**
+ * Renderer for org.apache.myfaces.trinidad.Messages, family org.apache.myfaces.trinidad.Messages.
+ * 
+ */
+public class MessageBoxRenderer extends XhtmlRenderer
+{
+  public MessageBoxRenderer()
+  {
+    this(CoreMessages.TYPE);
+  }
+
+  protected MessageBoxRenderer(FacesBean.Type type)
+  {
+    super(type);
+  }
+
+  @Override
+  protected void findTypeConstants(FacesBean.Type type)
+  {
+    super.findTypeConstants(type);
+    _textKey     = type.findKey("text");
+    _messageKey     = type.findKey("message");
+    _globalOnlyKey  = type.findKey("globalOnly");
+
+    _headerRenderer = new HeaderRenderer(type);
+    _boxRenderer = new BoxRenderer(type);
+  }
+
+  @Override
+  public boolean getRendersChildren()
+  {
+    return true;
+  }
+  
+  @Override
+  protected void encodeAll(FacesContext context, RenderingContext arc,
+      UIComponent component, FacesBean bean) throws IOException
+  {
+    // Force MessageBox to be re-rendered via PPR, since the set
+    // of messages may have changed.
+    RequestContext afContext = RequestContext.getCurrentInstance();
+    if (afContext != null)
+      afContext.addPartialTarget(component);
+
+    ResponseWriter writer = context.getResponseWriter();
+
+    // Only when there's at least one message queued
+    if (context.getMessages().hasNext())
+    {
+      // Setup the arc, so that default skin selectors of
+      // delegate renderers are mapped to those of this renderer
+      arc.setSkinResourceKeyMap(_RESOURCE_KEY_MAP);
+      
+      // Delegate rendering of the outer shell to the BoxRenderer class
+      // which will call back to this renderer to output the messages
+      _boxRenderer.encodeAll(context, arc, component, bean);
+    }
+    else
+    {
+      // Always render an element, for update at PPR-time
+      writer.startElement(XhtmlConstants.SPAN_ELEMENT, component);
+      renderId(context, component);
+      writer.endElement(XhtmlConstants.SPAN_ELEMENT);
+    }
+  }
+  
+  protected void _renderContent(
+      FacesContext context,
+      RenderingContext arc,
+      UIComponent component,
+      FacesBean bean) 
+      throws IOException
+  {
+    ResponseWriter writer = context.getResponseWriter();
+    
+    boolean globalOnly = isGlobalOnly(bean);
+    
+    // TODO - Merge styles into AF_MESSAGES_STYLE_CLASS
+    writer.startElement(XhtmlConstants.DIV_ELEMENT, component);
+    renderStyleClass(context, arc, SkinSelectors.AF_MESSAGES_BODY_STYLE_CLASS);
+
+    _renderHeader(context, arc, component, bean);
+    
+    // Render the 'message' attribute if specified
+    String message = getMessage(bean);
+    if (message != null)
+    {
+      writer.startElement(XhtmlConstants.DIV_ELEMENT, null);
+      renderStyleClass(context, arc, SkinSelectors.AF_MESSAGES_MESSAGE_TEXT_STYLE_CLASS);
+      writer.write(message);
+      writer.endElement(XhtmlConstants.DIV_ELEMENT);
+    }
+
+    // Render messages as a list
+    writer.startElement("ol", null);
+    
+    // Switch list style depending if no. of messages is 1 or >1
+    String[] styleClasses = null;
+    if (MessageUtils.multipleMessagesQueued(context, globalOnly))
+      styleClasses = new String[] {SkinSelectors.AF_MESSAGES_LIST_STYLE_CLASS};
+    else
+      styleClasses = new String[] {SkinSelectors.AF_MESSAGES_LIST_STYLE_CLASS, 
+        SkinSelectors.AF_MESSAGES_LIST_SINGLE_STYLE_CLASS};
+
+    renderStyleClasses(context, arc, styleClasses);
+    
+    _renderGlobalMessages(context, arc, component, bean);
+    
+    if (!globalOnly)
+      _renderComponentMessages(context, arc, component, bean);
+    
+    // End of list
+    writer.endElement("ol");
+    
+    writer.endElement(XhtmlConstants.DIV_ELEMENT);
+  }  
+  
+  @SuppressWarnings("unchecked")
+  protected void _renderGlobalMessages(
+      FacesContext context,
+      RenderingContext arc,
+      UIComponent component,
+      FacesBean bean) 
+      throws IOException
+  {
+    ResponseWriter writer = context.getResponseWriter();
+
+    // Get all messages without and id
+    Iterator<FacesMessage> msgIter = context.getMessages(null);
+    while (msgIter.hasNext())
+    {
+      FacesMessage msg = msgIter.next();
+
+      writer.startElement("li", null);
+
+      String text = MessageUtils.getGlobalMessage(arc, msg.getSummary(), msg.getDetail());
+      renderPossiblyFormattedText(context, text);
+      
+      writer.endElement("li");
+    }
+  }
+  
+  @SuppressWarnings("unchecked")
+  protected void _renderComponentMessages(
+      FacesContext context,
+      RenderingContext arc,
+      UIComponent component,
+      FacesBean bean) 
+      throws IOException
+  {
+    ResponseWriter writer = context.getResponseWriter();
+    
+    Iterator<String> idIter = context.getClientIdsWithMessages();
+    while (idIter.hasNext())
+    {
+      String id = idIter.next();
+      
+      // Skip global messages
+      if (id == null)
+        continue;
+
+      Iterator<FacesMessage> msgIter = context.getMessages(id);
+      while (msgIter.hasNext())
+      {
+        FacesMessage msg = msgIter.next();
+
+        writer.startElement("li", null);
+        
+        _renderMessageAnchor(context, arc, msg, id);
+        
+        String text = MessageUtils.getClientMessage(arc, msg.getSummary(), msg.getDetail());
+
+        renderPossiblyFormattedText(context, text);
+        
+        writer.endElement("li");
+      }
+    }
+  }
+  
+  protected void _renderHeader(
+      FacesContext        context,
+      RenderingContext arc,
+      UIComponent         component,
+      FacesBean           bean) throws IOException
+  {
+    delegateRenderer(context, arc, component, bean, _headerRenderer);
+  }
+
+  protected void _renderMessageAnchor(
+      FacesContext        context,
+      RenderingContext arc,
+      FacesMessage msg,
+      String componentId) throws IOException
+  {
+    ResponseWriter writer = context.getResponseWriter();
+    
+    if (componentId == null)
+      return;
+
+    // Anchor rendering currently only possible for messages that 
+    // contain a label, but we could use summary text in future
+    if (msg instanceof LabeledFacesMessage)
+    {
+      LabeledFacesMessage labeledMsg = (LabeledFacesMessage)msg;
+      String anchor = MessageUtils.getAnchor(componentId);
+      if (anchor != null)
+      {
+        writer.startElement(XhtmlConstants.LINK_ELEMENT, null);
+        renderStyleClass(context, arc, SkinSelectors.LINK_STYLE_CLASS);
+        writer.writeAttribute(XhtmlConstants.HREF_ATTRIBUTE, "#" + anchor, null);
+        writer.write(labeledMsg.getLabel().toString());
+        writer.endElement(XhtmlConstants.LINK_ELEMENT);
+      } 
+    }
+  }
+
+  // Rendering delegate to handle output of the header for the message box
+  private class HeaderRenderer extends PanelHeaderRenderer
+  {
+    public HeaderRenderer(FacesBean.Type type)
+    {
+      super(type);
+    }
+    
+    @Override
+    protected boolean shouldRenderId(FacesContext context, UIComponent component)
+    {
+      // Header will always be refreshed as sub-element of parent
+      return false;
+    }
+    
+    @Override
+    protected void renderEventHandlers(FacesContext context, FacesBean bean)
+        throws IOException
+    {
+      // Prevent HeaderRenderer from re-rendering event handlers
+    }    
+
+    @Override
+    protected String getMessageType(FacesBean bean)
+    {
+      String messageType = null;
+      
+      FacesMessage.Severity maxSeverity = 
+        FacesContext.getCurrentInstance().getMaximumSeverity();
+      
+      // Map FacesMessage severity to levels expected by panelHeaderRenderer
+      if (FacesMessage.SEVERITY_FATAL.equals(maxSeverity))
+        messageType = XhtmlConstants.MESSAGE_TYPE_ERROR;
+      else if (FacesMessage.SEVERITY_ERROR.equals(maxSeverity))
+        messageType = XhtmlConstants.MESSAGE_TYPE_ERROR;
+      else if (FacesMessage.SEVERITY_WARN.equals(maxSeverity))
+        messageType = XhtmlConstants.MESSAGE_TYPE_WARNING;
+      else if (FacesMessage.SEVERITY_INFO.equals(maxSeverity))
+        messageType = XhtmlConstants.MESSAGE_TYPE_INFO;
+
+      return messageType;
+    }
+    
+    @Override
+    protected String getText(RenderingContext arc, FacesBean bean,
+        String messageType)
+    {
+      String text = MessageBoxRenderer.this.getText(bean);
+      if (text != null)
+        // Use Text attribute of this component for header text
+        return text;
+      
+      // Otherwise parent will decide text & style based on messageType
+      return super.getText(arc, bean, messageType);
+    }
+    
+    @Override
+    protected String getMessageIconName(String messageType)
+    {
+      String iconName = null;
+
+      // Use the af|messages skin selectors instead of those
+      // used by panelHeader
+      if (XhtmlConstants.MESSAGE_TYPE_ERROR.equals(messageType))
+        iconName = SkinSelectors.AF_MESSAGES_ERROR_ICON_NAME;
+      else if (XhtmlConstants.MESSAGE_TYPE_WARNING.equals(messageType))
+        iconName = SkinSelectors.AF_MESSAGES_WARNING_ICON_NAME;
+      else if (XhtmlConstants.MESSAGE_TYPE_INFO.equals(messageType))
+        iconName = SkinSelectors.AF_MESSAGES_INFO_ICON_NAME;
+      else if (XhtmlConstants.MESSAGE_TYPE_CONFIRMATION.equals(messageType))
+        iconName = SkinSelectors.AF_MESSAGES_CONFIRMATION_ICON_NAME;
+
+      assert ((iconName != null) ||
+              XhtmlConstants.MESSAGE_TYPE_NONE.equals(messageType));
+
+      return iconName;
+    }
+
+  }
+  
+  // Delegate renderer, handles the outer element rendering and
+  // provides option to wrap message box using rounded borders etc.
+  private class BoxRenderer extends PanelBoxRenderer
+  {
+   
+    public BoxRenderer(FacesBean.Type type)
+    {
+      super(type);
+    }
+    
+    @Override
+    protected boolean shouldRenderId(FacesContext context, UIComponent component)
+    {
+      // As panelBox is handling the outer rendering, then it should render
+      // the id of the MessageBox component
+      return true;
+    }
+   
+    @Override
+    protected String getBackground(FacesBean bean)
+    {
+      // Force use of 'light' style, so we know which style
+      // to re-map in _RESOURCE_KEY_MAP
+      return "light";
+    }
+    
+    @Override
+    protected boolean hasChildren(UIComponent component)
+    {
+      // Required to force panelBox to call render properly
+      return true;
+    }
+    
+    @Override
+    protected void renderBody(FacesContext context, RenderingContext arc,
+        UIComponent component, FacesBean bean, Object icon, Object text) throws IOException
+    {
+      // Pass control back to MessageBoxRenderer to continue rendering
+      // the content of the message box.
+      MessageBoxRenderer.this._renderContent(context, arc, component, bean);
+    }
+  }
+    
+  @Override
+  protected boolean shouldRenderId(FacesContext context, UIComponent component)
+  {
+    // Normally BoxRenderer will output the id for this component, but
+    // if we're just outputting an empty element for PPR purposes, then
+    // this renderer should output the id.
+    return true;
+  }
+
+  protected String getText(FacesBean bean)
+  {
+    if (_textKey == null)
+      return null;
+    return toString(bean.getProperty(_textKey));
+  }
+
+  protected String getMessage(FacesBean bean)
+  {
+    if (_messageKey == null)
+      return null;
+    return toString(bean.getProperty(_messageKey));
+  }
+
+  protected boolean isGlobalOnly(FacesBean bean)
+  {
+    Object o = bean.getProperty(_globalOnlyKey);
+    if (o == null)
+      o = _globalOnlyKey.getDefault();
+    return Boolean.TRUE.equals(o);
+  }
+
+  private PropertyKey _textKey;
+  private PropertyKey _messageKey;
+  private PropertyKey _globalOnlyKey;
+  private XhtmlRenderer _headerRenderer;
+  private PanelBoxRenderer _boxRenderer;
+
+  // Map panelHeader & panelBox Styles/Icons etc. to this renderer's selectors.
+  private static final Map<String, String> _RESOURCE_KEY_MAP;
+
+  static
+  {
+    _RESOURCE_KEY_MAP = new HashMap<String, String>();
+    
+    // translation keys
+    _RESOURCE_KEY_MAP.put("af_panelHeader.INFORMATION",
+                              "af_messages.INFORMATION");
+    _RESOURCE_KEY_MAP.put("af_panelHeader.WARNING",
+                              "af_messages.WARNING");
+    _RESOURCE_KEY_MAP.put("af_panelHeader.ERROR",
+                              "af_messages.ERROR");
+    _RESOURCE_KEY_MAP.put("af_panelHeader.CONFIRMATION",
+                              "af_messages.CONFIRMATION");
+    // icons
+    _RESOURCE_KEY_MAP.put(SkinSelectors.AF_PANEL_HEADER_ERROR_ICON_NAME,
+        SkinSelectors.AF_MESSAGES_ERROR_ICON_NAME);
+    _RESOURCE_KEY_MAP.put(SkinSelectors.AF_PANEL_HEADER_WARNING_ICON_NAME,
+        SkinSelectors.AF_MESSAGES_WARNING_ICON_NAME);
+    _RESOURCE_KEY_MAP.put(SkinSelectors.AF_PANEL_HEADER_INFO_ICON_NAME,
+        SkinSelectors.AF_MESSAGES_INFO_ICON_NAME);
+    _RESOURCE_KEY_MAP.put(SkinSelectors.AF_PANEL_HEADER_CONFIRMATION_ICON_NAME,
+        SkinSelectors.AF_MESSAGES_CONFIRMATION_ICON_NAME);
+
+    // styles
+    _RESOURCE_KEY_MAP.put(SkinSelectors.AF_PANEL_HEADER_ERROR_STYLE_CLASS,
+        SkinSelectors.AF_MESSAGES_ERROR_STYLE_CLASS);
+    _RESOURCE_KEY_MAP.put(SkinSelectors.AF_PANEL_HEADER_STYLE_CLASS,
+        SkinSelectors.AF_MESSAGES_HEADER_STYLE_CLASS);
+    
+    // We forced the use of 'light' style above, so now map it
+    _RESOURCE_KEY_MAP.put(SkinSelectors.AF_PANEL_BOX_LIGHT_STYLE_CLASS, 
+        SkinSelectors.AF_MESSAGES_STYLE_CLASS);
+
+    // frame styles
+    _RESOURCE_KEY_MAP.put(SkinSelectors.AF_PANEL_BOX_TOP_START_STYLE_CLASS, 
+        SkinSelectors.AF_MESSAGES_TOP_START_STYLE_CLASS);
+    _RESOURCE_KEY_MAP.put(SkinSelectors.AF_PANEL_BOX_TOP_STYLE_CLASS, 
+        SkinSelectors.AF_MESSAGES_TOP_STYLE_CLASS);
+    _RESOURCE_KEY_MAP.put(SkinSelectors.AF_PANEL_BOX_TOP_END_STYLE_CLASS, 
+        SkinSelectors.AF_MESSAGES_TOP_END_STYLE_CLASS);
+    _RESOURCE_KEY_MAP.put(SkinSelectors.AF_PANEL_BOX_START_STYLE_CLASS, 
+        SkinSelectors.AF_MESSAGES_START_STYLE_CLASS);
+    _RESOURCE_KEY_MAP.put(SkinSelectors.AF_PANEL_BOX_END_STYLE_CLASS, 
+        SkinSelectors.AF_MESSAGES_END_STYLE_CLASS);
+    _RESOURCE_KEY_MAP.put(SkinSelectors.AF_PANEL_BOX_BOTTOM_START_STYLE_CLASS, 
+        SkinSelectors.AF_MESSAGES_BOTTOM_START_STYLE_CLASS);
+    _RESOURCE_KEY_MAP.put(SkinSelectors.AF_PANEL_BOX_BOTTOM_STYLE_CLASS, 
+        SkinSelectors.AF_MESSAGES_BOTTOM_STYLE_CLASS);
+    _RESOURCE_KEY_MAP.put(SkinSelectors.AF_PANEL_BOX_BOTTOM_END_STYLE_CLASS, 
+        SkinSelectors.AF_MESSAGES_BOTTOM_END_STYLE_CLASS);
+  } 
+  
+}

Modified: myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelBoxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelBoxRenderer.java?view=diff&rev=557388&r1=557387&r2=557388
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelBoxRenderer.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelBoxRenderer.java Wed Jul 18 13:32:41 2007
@@ -264,7 +264,7 @@
     
     // Render body
     writer.startElement(XhtmlConstants.TABLE_DATA_ELEMENT, null);
-    _renderBody(context, arc, component, bean, icon, text);
+    renderBody(context, arc, component, bean, icon, text);
     writer.endElement(XhtmlConstants.TABLE_DATA_ELEMENT);
 
     // Render right edge
@@ -288,7 +288,7 @@
     writer.endElement(XhtmlConstants.TABLE_ROW_ELEMENT);
   }
   
-  private void _renderBody(
+  protected void renderBody(
       FacesContext      context,
       RenderingContext  arc,
       UIComponent       component,
@@ -319,7 +319,7 @@
       // Render content
       writer.startElement(XhtmlConstants.TABLE_ROW_ELEMENT, null);
       writer.startElement(XhtmlConstants.TABLE_DATA_ELEMENT, null);
-      _renderContent(context, arc, bean, component);
+      renderContent(context, arc, bean, component);
       writer.endElement(XhtmlConstants.TABLE_DATA_ELEMENT);
       writer.endElement(XhtmlConstants.TABLE_ROW_ELEMENT);
       
@@ -337,7 +337,7 @@
     {
       // We only have a content, use a div as style class placeholder
       writer.startElement(XhtmlConstants.DIV_ELEMENT, null);
-      _renderContent(context, arc, bean, component);
+      renderContent(context, arc, bean, component);
       writer.endElement(XhtmlConstants.DIV_ELEMENT);
     }
   }
@@ -392,7 +392,7 @@
     }
   }
   
-  private void _renderContent(
+  protected void renderContent(
       FacesContext      context,
       RenderingContext  arc,
       FacesBean         bean,
@@ -415,21 +415,29 @@
 
   protected String getText(FacesBean bean)
   {
+    if (_textKey == null)
+      return null;
     return toString(bean.getProperty(_textKey));
   }
 
   protected String getIcon(FacesBean bean)
   {
+    if (_iconKey == null)
+      return null;
     return toUri(bean.getProperty(_iconKey));
   }
 
   protected String getContentStyle(FacesBean bean)
   {
+    if (_contentStyleKey == null)
+      return null;
     return toString(bean.getProperty(_contentStyleKey));
   }
 
   protected String getBackground(FacesBean bean)
   {
+    if (_backgroundKey == null)
+      return null;
     return toString(bean.getProperty(_backgroundKey));
   }
   

Modified: myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelHeaderRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelHeaderRenderer.java?view=diff&rev=557388&r1=557387&r2=557388
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelHeaderRenderer.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelHeaderRenderer.java Wed Jul 18 13:32:41 2007
@@ -163,7 +163,7 @@
         !XhtmlConstants.MESSAGE_TYPE_NONE.equals(messageType))
     {
       // If we've got a message type, get the Icon
-      String iconName = _getMessageIconName(messageType);
+      String iconName = getMessageIconName(messageType);
       if (iconName != null)
       {
         Icon icon = arc.getIcon(iconName);
@@ -198,8 +198,6 @@
     }
   }
 
-
-
   /**
   * Returns text of header
   */
@@ -240,17 +238,23 @@
   protected String getIconUri(
     FacesBean           bean)
   {
+    if (_iconKey == null)
+      return null;
     return toUri(bean.getProperty(_iconKey));
   }
 
   protected Number getSize(FacesBean bean)
   {
+    if (_sizeKey == null)
+      return null;
     return (Number) bean.getProperty(_sizeKey);
   }
 
 
   protected String getMessageType(FacesBean bean)
   {
+    if (_messageTypeKey == null)
+      return null;
     return toString(bean.getProperty(_messageTypeKey));
   }
 
@@ -318,9 +322,16 @@
                             Integer.valueOf(headerNestLevel - 1));
   }
 
-
-  // Returns the icon name for the specfied messageType
-  private String _getMessageIconName(String messageType)
+  /**
+   * This method compares the messageType to a number of
+   * possible message types (e.g. SkinSelectors.MESSAGE_TYPE_ERROR)
+   * and returns an icon name for the appropriate type.
+   * This method should be overridden to change the standard
+   * icons used for this component.
+   * @param messageType
+   * @return The icon name for the specfied messageType.
+   */
+  protected String getMessageIconName(String messageType)
   {
     String iconName = null;
 

Modified: myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SkinSelectors.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SkinSelectors.java?view=diff&rev=557388&r1=557387&r2=557388
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SkinSelectors.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SkinSelectors.java Wed Jul 18 13:32:41 2007
@@ -549,6 +549,8 @@
      "af|messages::message-text";
    public static final String AF_MESSAGES_LIST_STYLE_CLASS =
      "af|messages::list";
+   public static final String AF_MESSAGES_LIST_SINGLE_STYLE_CLASS =
+     "af|messages::list-single";
    
    // ================================ Icons ================================ //
    public static final String AF_MESSAGES_ERROR_ICON_NAME =
@@ -560,6 +562,23 @@
    public static final String AF_MESSAGES_CONFIRMATION_ICON_NAME =
      "af|messages::confirmation-icon";
 
+   // ================================ Frame ================================ //
+   public static final String AF_MESSAGES_TOP_START_STYLE_CLASS =
+     AF_MESSAGES_STYLE_CLASS + "::top-start";
+   public static final String AF_MESSAGES_TOP_STYLE_CLASS =
+     AF_MESSAGES_STYLE_CLASS + "::top";
+   public static final String AF_MESSAGES_TOP_END_STYLE_CLASS =
+     AF_MESSAGES_STYLE_CLASS + "::top-end";
+   public static final String AF_MESSAGES_START_STYLE_CLASS =
+     AF_MESSAGES_STYLE_CLASS + "::start";
+   public static final String AF_MESSAGES_END_STYLE_CLASS =
+     AF_MESSAGES_STYLE_CLASS + "::end";
+   public static final String AF_MESSAGES_BOTTOM_START_STYLE_CLASS =
+     AF_MESSAGES_STYLE_CLASS + "::bottom-start";
+   public static final String AF_MESSAGES_BOTTOM_STYLE_CLASS =
+     AF_MESSAGES_STYLE_CLASS + "::bottom";
+   public static final String AF_MESSAGES_BOTTOM_END_STYLE_CLASS =
+     AF_MESSAGES_STYLE_CLASS + "::bottom-end";
     
    //                                                                         //
    //                                                                         //

Modified: myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/MessageUtils.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/MessageUtils.java?view=diff&rev=557388&r1=557387&r2=557388
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/MessageUtils.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/MessageUtils.java Wed Jul 18 13:32:41 2007
@@ -21,15 +21,18 @@
 import java.util.Iterator;
 
 import javax.faces.application.FacesMessage;
+import javax.faces.application.FacesMessage.Severity;
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 
 import org.apache.myfaces.trinidad.component.core.output.CoreMessage;
+import org.apache.myfaces.trinidad.context.RenderingContext;
 import org.apache.myfaces.trinidad.render.RenderUtils;
+import org.apache.myfaces.trinidad.util.FastMessageFormat;
 
-import org.apache.myfaces.trinidadinternal.share.util.FastMessageFormat;
 import org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext;
 import org.apache.myfaces.trinidadinternal.ui.laf.base.BaseLafRenderer;
+import org.apache.myfaces.trinidadinternal.ui.laf.base.desktop.MessageWrapper;
 
 /**
  * Utility functions used for messaging.
@@ -84,8 +87,40 @@
   {
     return RenderUtils.getRelativeId(context, from, forParam);
   }
+  
+  /**
+   * Returns true if there is more than one FacesMessage queued.
+   * @param context
+   * @param globalOnly Count only global messages
+   * @return true if multiple messages queued.
+   */
+  @SuppressWarnings("unchecked")
+  public static boolean multipleMessagesQueued(
+      FacesContext context,
+      boolean globalOnly)
+  {
+    Iterator<FacesMessage> msgIter = null;
+    if (globalOnly)
+      // All messages without id's
+      msgIter = context.getMessages(null);
+    else
+      // All messages, inc those without id's
+      msgIter = context.getMessages();
+    
+    if (msgIter.hasNext())
+    {
+      // At least one message
+      msgIter.next();
 
-
+      if (msgIter.hasNext())
+      {
+        // At least two messages
+        return true;
+      }
+    }
+    return false;
+  }
+  
   /**
    * @todo right now I'm just appending '_msgAnc_' to the front of the
    * client id for the anchor.
@@ -95,8 +130,7 @@
    * return an anchor on ie6.
    */
   public static String getAnchor(
-    String clientID
-  )
+    String clientID)
   {
     if (clientID == null)
       return null;
@@ -104,23 +138,51 @@
     return "_msgAnc_" + clientID;
   }
 
+  @Deprecated
   public static String getGlobalMessage(
-     UIXRenderingContext context,
-     String summary,
-     String detail)
+      UIXRenderingContext context,
+      String summary,
+      String detail)
+  {
+     if ((summary != null) && summary.equals(detail))
+       return summary;
+
+     String[] parameters = new String[] { summary, detail };
+     String pattern = BaseLafRenderer.getTranslatedString(context,
+                                                       _GLOBAL_FORMAT_KEY);
+
+    return (new FastMessageFormat(pattern)).format(parameters);
+  }
+
+  public static String getGlobalMessage(
+      RenderingContext arc,
+      String summary,
+      String detail)
   {
     if ((summary != null) && summary.equals(detail))
       return summary;
 
     String[] parameters = new String[] { summary, detail };
-    String pattern = BaseLafRenderer.getTranslatedString(context,
-                                                      _GLOBAL_FORMAT_KEY);
+    String pattern = arc.getTranslatedString(_GLOBAL_FORMAT_KEY);
 
     return (new FastMessageFormat(pattern)).format(parameters);
   }
 
+  public static String getClientMessage(
+      RenderingContext arc,
+      String summary,
+      String detail)
+  {
+
+    String[] parameters = new String[] { summary };
+    String pattern = arc.getTranslatedString(_MESSAGE_BOX_LIST_FORMAT_KEY);
 
+    return (new FastMessageFormat(pattern)).format(parameters);
+  }
 
   static private final String _GLOBAL_FORMAT_KEY =
     "af_messages.GLOBAL_MESSAGE_FORMAT";
+  static private final String _MESSAGE_BOX_LIST_FORMAT_KEY =
+    "af_messages.LIST_FORMAT_private";
+  
 }

Modified: myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/adf/styles/base-desktop.xss
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/adf/styles/base-desktop.xss?view=diff&rev=557388&r1=557387&r2=557388
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/adf/styles/base-desktop.xss (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/adf/styles/base-desktop.xss Wed Jul 18 13:32:41 2007
@@ -2176,6 +2176,7 @@
     <includeStyle name="AFDefaultFont"/>
     <!--includeStyle name="AFMediumAccentBackground"/-->
     <includeStyle name="AFVeryDarkForeground"/>
+    <property name="width">100%</property>  
   </style>
   <!-- since we render in standards mode, images don't take up the entire 
        table cell unless we use vertical-align:bottom.-->  
@@ -3156,7 +3157,8 @@
   -->
 
   <style name="MessageBoxMargin">
-    <property name="margin-left">25px</property>
+    <property name="margin">0px 0px 0px 0px</property>
+    <property name="padding">5px 30px 5px 30px</property>
   </style>
   
   <!--style selector=".OraMessageBoxList"-->
@@ -3164,9 +3166,12 @@
     <includeStyle name="AFDefaultFont"/>
     <includeStyle name="AFDarkForeground"/>
     <includeStyle name="MessageBoxMargin"/>
-    <property name="margin-top">5px</property>
   </style>
 
+	<!-- List with only one entry -->
+  <style selector="af|messages::list-single">
+    <property name="list-style-type">none</property>
+  </style>
 
   <style selector="af|singleStepButtonBar"/>
 

Modified: myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messages-minimal-golden.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messages-minimal-golden.xml?view=diff&rev=557388&r1=557387&r2=557388
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messages-minimal-golden.xml (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/messages-minimal-golden.xml Wed Jul 18 13:32:41 2007
@@ -6,50 +6,100 @@
            class="af_messages"
            id="mainId"
            summary=""
-           width="100%"
           >
         
-        <tr
+        <tbody
             >
           
-          <td
-               class="af_messages_body"
+          <tr
               >
             
-            <div
+            <td
+                 class="af_messages_top-start"
                 >
               
-              <h1
-                   class="af_messages_header"
+            </td>
+            <td
+                 class="af_messages_top"
+                >
+              
+            </td>
+            <td
+                 class="af_messages_top-end"
+                >
+              
+            </td>
+          </tr>
+          <tr
+              >
+            
+            <td
+                 class="af_messages_start"
+                >
+              
+            </td>
+            <td
+                >
+              
+              <div
+                   class="af_messages_body"
                   >
                 
-                <span
-                     class="af_messages_error"
+                <div
                     >
-                  Error
-                </span>
-              </h1>
-            </div>
-            <div
-                 class="af_messages_message-text"
+                  
+                  <h1
+                       class="af_messages_header"
+                      >
+                    
+                    <span
+                         class="af_messages_error"
+                        >
+                      Error
+                    </span>
+                  </h1>
+                </div>
+                <ol
+                     class="af_messages_list af_messages_list-single"
+                    >
+                  
+                  <li
+                      >
+                    message summary - message detail
+                  </li>
+                  <li
+                      >
+                    - message summary
+                  </li>
+                </ol>
+              </div>
+            </td>
+            <td
+                 class="af_messages_end"
+                >
+              
+            </td>
+          </tr>
+          <tr
+              >
+            
+            <td
+                 class="af_messages_bottom-start"
                 >
               
-            </div>
-            <ol
-                 class="af_messages_list"
+            </td>
+            <td
+                 class="af_messages_bottom"
                 >
               
-              <li
-                  >
-                message summary - message detail
-              </li>
-              <li
-                  >
-                - message summary
-              </li>
-            </ol>
-          </td>
-        </tr>
+            </td>
+            <td
+                 class="af_messages_bottom-end"
+                >
+              
+            </td>
+          </tr>
+        </tbody>
       </table>
 <!-- MessageTest[ id:null,ERROR ]-->
 
@@ -60,50 +110,100 @@
            class="af_messages"
            id="mainId"
            summary=""
-           width="100%"
           >
         
-        <tr
+        <tbody
             >
           
-          <td
-               class="af_messages_body"
+          <tr
+              >
+            
+            <td
+                 class="af_messages_top-start"
+                >
+              
+            </td>
+            <td
+                 class="af_messages_top"
+                >
+              
+            </td>
+            <td
+                 class="af_messages_top-end"
+                >
+              
+            </td>
+          </tr>
+          <tr
               >
             
-            <div
+            <td
+                 class="af_messages_start"
                 >
               
-              <h1
-                   class="af_messages_header"
+            </td>
+            <td
+                >
+              
+              <div
+                   class="af_messages_body"
                   >
                 
-                <span
-                     class="af_messages_error"
+                <div
+                    >
+                  
+                  <h1
+                       class="af_messages_header"
+                      >
+                    
+                    <span
+                         class="af_messages_error"
+                        >
+                      Error
+                    </span>
+                  </h1>
+                </div>
+                <ol
+                     class="af_messages_list af_messages_list-single"
                     >
-                  Error
-                </span>
-              </h1>
-            </div>
-            <div
-                 class="af_messages_message-text"
+                  
+                  <li
+                      >
+                    message summary - message detail
+                  </li>
+                  <li
+                      >
+                    - message summary
+                  </li>
+                </ol>
+              </div>
+            </td>
+            <td
+                 class="af_messages_end"
+                >
+              
+            </td>
+          </tr>
+          <tr
+              >
+            
+            <td
+                 class="af_messages_bottom-start"
                 >
               
-            </div>
-            <ol
-                 class="af_messages_list"
+            </td>
+            <td
+                 class="af_messages_bottom"
                 >
               
-              <li
-                  >
-                message summary - message detail
-              </li>
-              <li
-                  >
-                - message summary
-              </li>
-            </ol>
-          </td>
-        </tr>
+            </td>
+            <td
+                 class="af_messages_bottom-end"
+                >
+              
+            </td>
+          </tr>
+        </tbody>
       </table>
 <!--AttributeTest[id,id_val]-->
 
@@ -114,50 +214,100 @@
            class="af_messages"
            id="id_val"
            summary=""
-           width="100%"
           >
         
-        <tr
+        <tbody
             >
           
-          <td
-               class="af_messages_body"
+          <tr
               >
             
-            <div
+            <td
+                 class="af_messages_top-start"
+                >
+              
+            </td>
+            <td
+                 class="af_messages_top"
+                >
+              
+            </td>
+            <td
+                 class="af_messages_top-end"
                 >
               
-              <h1
-                   class="af_messages_header"
+            </td>
+          </tr>
+          <tr
+              >
+            
+            <td
+                 class="af_messages_start"
+                >
+              
+            </td>
+            <td
+                >
+              
+              <div
+                   class="af_messages_body"
                   >
                 
-                <span
-                     class="af_messages_error"
+                <div
+                    >
+                  
+                  <h1
+                       class="af_messages_header"
+                      >
+                    
+                    <span
+                         class="af_messages_error"
+                        >
+                      Error
+                    </span>
+                  </h1>
+                </div>
+                <ol
+                     class="af_messages_list af_messages_list-single"
                     >
-                  Error
-                </span>
-              </h1>
-            </div>
-            <div
-                 class="af_messages_message-text"
+                  
+                  <li
+                      >
+                    message summary - message detail
+                  </li>
+                  <li
+                      >
+                    - message summary
+                  </li>
+                </ol>
+              </div>
+            </td>
+            <td
+                 class="af_messages_end"
+                >
+              
+            </td>
+          </tr>
+          <tr
+              >
+            
+            <td
+                 class="af_messages_bottom-start"
                 >
               
-            </div>
-            <ol
-                 class="af_messages_list"
+            </td>
+            <td
+                 class="af_messages_bottom"
                 >
               
-              <li
-                  >
-                message summary - message detail
-              </li>
-              <li
-                  >
-                - message summary
-              </li>
-            </ol>
-          </td>
-        </tr>
+            </td>
+            <td
+                 class="af_messages_bottom-end"
+                >
+              
+            </td>
+          </tr>
+        </tbody>
       </table>
 <!--AttributeTest[inlineStyle,background-color:red]-->
 
@@ -169,50 +319,101 @@
            id="mainId"
            style="background-color:red"
            summary=""
-           width="100%"
           >
         
-        <tr
+        <tbody
             >
           
-          <td
-               class="af_messages_body"
+          <tr
+              >
+            
+            <td
+                 class="af_messages_top-start"
+                >
+              
+            </td>
+            <td
+                 class="af_messages_top"
+                >
+              
+            </td>
+            <td
+                 class="af_messages_top-end"
+                >
+              
+            </td>
+          </tr>
+          <tr
               >
             
-            <div
+            <td
+                 class="af_messages_start"
                 >
               
-              <h1
-                   class="af_messages_header"
+            </td>
+            <td
+                >
+              
+              <div
+                   class="af_messages_body"
                   >
                 
-                <span
-                     class="af_messages_error"
+                <div
+                     style="background-color:red"
+                    >
+                  
+                  <h1
+                       class="af_messages_header"
+                      >
+                    
+                    <span
+                         class="af_messages_error"
+                        >
+                      Error
+                    </span>
+                  </h1>
+                </div>
+                <ol
+                     class="af_messages_list af_messages_list-single"
                     >
-                  Error
-                </span>
-              </h1>
-            </div>
-            <div
-                 class="af_messages_message-text"
+                  
+                  <li
+                      >
+                    message summary - message detail
+                  </li>
+                  <li
+                      >
+                    - message summary
+                  </li>
+                </ol>
+              </div>
+            </td>
+            <td
+                 class="af_messages_end"
+                >
+              
+            </td>
+          </tr>
+          <tr
+              >
+            
+            <td
+                 class="af_messages_bottom-start"
                 >
               
-            </div>
-            <ol
-                 class="af_messages_list"
+            </td>
+            <td
+                 class="af_messages_bottom"
                 >
               
-              <li
-                  >
-                message summary - message detail
-              </li>
-              <li
-                  >
-                - message summary
-              </li>
-            </ol>
-          </td>
-        </tr>
+            </td>
+            <td
+                 class="af_messages_bottom-end"
+                >
+              
+            </td>
+          </tr>
+        </tbody>
       </table>
 <!--AttributeTest[message,message_val]-->
 
@@ -223,50 +424,105 @@
            class="af_messages"
            id="mainId"
            summary=""
-           width="100%"
           >
         
-        <tr
+        <tbody
             >
           
-          <td
-               class="af_messages_body"
+          <tr
               >
             
-            <div
+            <td
+                 class="af_messages_top-start"
+                >
+              
+            </td>
+            <td
+                 class="af_messages_top"
                 >
               
-              <h1
-                   class="af_messages_header"
+            </td>
+            <td
+                 class="af_messages_top-end"
+                >
+              
+            </td>
+          </tr>
+          <tr
+              >
+            
+            <td
+                 class="af_messages_start"
+                >
+              
+            </td>
+            <td
+                >
+              
+              <div
+                   class="af_messages_body"
                   >
                 
-                <span
-                     class="af_messages_error"
+                <div
+                    >
+                  
+                  <h1
+                       class="af_messages_header"
+                      >
+                    
+                    <span
+                         class="af_messages_error"
+                        >
+                      Error
+                    </span>
+                  </h1>
+                </div>
+                <div
+                     class="af_messages_message-text"
                     >
-                  Error
-                </span>
-              </h1>
-            </div>
-            <div
-                 class="af_messages_message-text"
-                >
-              message_val
-            </div>
-            <ol
-                 class="af_messages_list"
+                  message_val
+                </div>
+                <ol
+                     class="af_messages_list af_messages_list-single"
+                    >
+                  
+                  <li
+                      >
+                    message summary - message detail
+                  </li>
+                  <li
+                      >
+                    - message summary
+                  </li>
+                </ol>
+              </div>
+            </td>
+            <td
+                 class="af_messages_end"
+                >
+              
+            </td>
+          </tr>
+          <tr
+              >
+            
+            <td
+                 class="af_messages_bottom-start"
                 >
               
-              <li
-                  >
-                message summary - message detail
-              </li>
-              <li
-                  >
-                - message summary
-              </li>
-            </ol>
-          </td>
-        </tr>
+            </td>
+            <td
+                 class="af_messages_bottom"
+                >
+              
+            </td>
+            <td
+                 class="af_messages_bottom-end"
+                >
+              
+            </td>
+          </tr>
+        </tbody>
       </table>
 <!--AttributeTest[messageType,error]-->
 
@@ -277,50 +533,100 @@
            class="af_messages"
            id="mainId"
            summary=""
-           width="100%"
           >
         
-        <tr
+        <tbody
             >
           
-          <td
-               class="af_messages_body"
+          <tr
+              >
+            
+            <td
+                 class="af_messages_top-start"
+                >
+              
+            </td>
+            <td
+                 class="af_messages_top"
+                >
+              
+            </td>
+            <td
+                 class="af_messages_top-end"
+                >
+              
+            </td>
+          </tr>
+          <tr
               >
             
-            <div
+            <td
+                 class="af_messages_start"
                 >
               
-              <h1
-                   class="af_messages_header"
+            </td>
+            <td
+                >
+              
+              <div
+                   class="af_messages_body"
                   >
                 
-                <span
-                     class="af_messages_error"
+                <div
+                    >
+                  
+                  <h1
+                       class="af_messages_header"
+                      >
+                    
+                    <span
+                         class="af_messages_error"
+                        >
+                      Error
+                    </span>
+                  </h1>
+                </div>
+                <ol
+                     class="af_messages_list af_messages_list-single"
                     >
-                  Error
-                </span>
-              </h1>
-            </div>
-            <div
-                 class="af_messages_message-text"
+                  
+                  <li
+                      >
+                    message summary - message detail
+                  </li>
+                  <li
+                      >
+                    - message summary
+                  </li>
+                </ol>
+              </div>
+            </td>
+            <td
+                 class="af_messages_end"
+                >
+              
+            </td>
+          </tr>
+          <tr
+              >
+            
+            <td
+                 class="af_messages_bottom-start"
                 >
               
-            </div>
-            <ol
-                 class="af_messages_list"
+            </td>
+            <td
+                 class="af_messages_bottom"
                 >
               
-              <li
-                  >
-                message summary - message detail
-              </li>
-              <li
-                  >
-                - message summary
-              </li>
-            </ol>
-          </td>
-        </tr>
+            </td>
+            <td
+                 class="af_messages_bottom-end"
+                >
+              
+            </td>
+          </tr>
+        </tbody>
       </table>
 <!--AttributeTest[shortDesc,shortDesc_val]-->
 
@@ -332,50 +638,101 @@
            id="mainId"
            summary=""
            title="shortDesc_val"
-           width="100%"
           >
         
-        <tr
+        <tbody
             >
           
-          <td
-               class="af_messages_body"
+          <tr
               >
             
-            <div
+            <td
+                 class="af_messages_top-start"
+                >
+              
+            </td>
+            <td
+                 class="af_messages_top"
+                >
+              
+            </td>
+            <td
+                 class="af_messages_top-end"
                 >
               
-              <h1
-                   class="af_messages_header"
+            </td>
+          </tr>
+          <tr
+              >
+            
+            <td
+                 class="af_messages_start"
+                >
+              
+            </td>
+            <td
+                >
+              
+              <div
+                   class="af_messages_body"
                   >
                 
-                <span
-                     class="af_messages_error"
+                <div
+                     title="shortDesc_val"
+                    >
+                  
+                  <h1
+                       class="af_messages_header"
+                      >
+                    
+                    <span
+                         class="af_messages_error"
+                        >
+                      Error
+                    </span>
+                  </h1>
+                </div>
+                <ol
+                     class="af_messages_list af_messages_list-single"
                     >
-                  Error
-                </span>
-              </h1>
-            </div>
-            <div
-                 class="af_messages_message-text"
+                  
+                  <li
+                      >
+                    message summary - message detail
+                  </li>
+                  <li
+                      >
+                    - message summary
+                  </li>
+                </ol>
+              </div>
+            </td>
+            <td
+                 class="af_messages_end"
+                >
+              
+            </td>
+          </tr>
+          <tr
+              >
+            
+            <td
+                 class="af_messages_bottom-start"
                 >
               
-            </div>
-            <ol
-                 class="af_messages_list"
+            </td>
+            <td
+                 class="af_messages_bottom"
                 >
               
-              <li
-                  >
-                message summary - message detail
-              </li>
-              <li
-                  >
-                - message summary
-              </li>
-            </ol>
-          </td>
-        </tr>
+            </td>
+            <td
+                 class="af_messages_bottom-end"
+                >
+              
+            </td>
+          </tr>
+        </tbody>
       </table>
 <!--AttributeTest[styleClass,styleClass_val]-->
 
@@ -383,53 +740,104 @@
            border="0"
            cellpadding="0"
            cellspacing="0"
-           class="af_messages"
+           class="styleClass_val af_messages"
            id="mainId"
            summary=""
-           width="100%"
           >
         
-        <tr
+        <tbody
             >
           
-          <td
-               class="af_messages_body"
+          <tr
+              >
+            
+            <td
+                 class="af_messages_top-start"
+                >
+              
+            </td>
+            <td
+                 class="af_messages_top"
+                >
+              
+            </td>
+            <td
+                 class="af_messages_top-end"
+                >
+              
+            </td>
+          </tr>
+          <tr
               >
             
-            <div
+            <td
+                 class="af_messages_start"
+                >
+              
+            </td>
+            <td
                 >
               
-              <h1
-                   class="af_messages_header"
+              <div
+                   class="af_messages_body"
                   >
                 
-                <span
-                     class="af_messages_error"
+                <div
+                     class="styleClass_val"
                     >
-                  Error
-                </span>
-              </h1>
-            </div>
-            <div
-                 class="af_messages_message-text"
+                  
+                  <h1
+                       class="af_messages_header"
+                      >
+                    
+                    <span
+                         class="af_messages_error"
+                        >
+                      Error
+                    </span>
+                  </h1>
+                </div>
+                <ol
+                     class="af_messages_list af_messages_list-single"
+                    >
+                  
+                  <li
+                      >
+                    message summary - message detail
+                  </li>
+                  <li
+                      >
+                    - message summary
+                  </li>
+                </ol>
+              </div>
+            </td>
+            <td
+                 class="af_messages_end"
+                >
+              
+            </td>
+          </tr>
+          <tr
+              >
+            
+            <td
+                 class="af_messages_bottom-start"
                 >
               
-            </div>
-            <ol
-                 class="af_messages_list"
+            </td>
+            <td
+                 class="af_messages_bottom"
                 >
               
-              <li
-                  >
-                message summary - message detail
-              </li>
-              <li
-                  >
-                - message summary
-              </li>
-            </ol>
-          </td>
-        </tr>
+            </td>
+            <td
+                 class="af_messages_bottom-end"
+                >
+              
+            </td>
+          </tr>
+        </tbody>
       </table>
 <!--AttributeTest[text,text_val]-->
 
@@ -440,49 +848,99 @@
            class="af_messages"
            id="mainId"
            summary=""
-           width="100%"
           >
         
-        <tr
+        <tbody
             >
           
-          <td
-               class="af_messages_body"
+          <tr
+              >
+            
+            <td
+                 class="af_messages_top-start"
+                >
+              
+            </td>
+            <td
+                 class="af_messages_top"
+                >
+              
+            </td>
+            <td
+                 class="af_messages_top-end"
+                >
+              
+            </td>
+          </tr>
+          <tr
               >
             
-            <div
+            <td
+                 class="af_messages_start"
                 >
               
-              <h1
-                   class="af_messages_header"
+            </td>
+            <td
+                >
+              
+              <div
+                   class="af_messages_body"
                   >
                 
-                <span
-                     class="af_messages_error"
+                <div
+                    >
+                  
+                  <h1
+                       class="af_messages_header"
+                      >
+                    
+                    <span
+                         class="af_messages_error"
+                        >
+                      text_val
+                    </span>
+                  </h1>
+                </div>
+                <ol
+                     class="af_messages_list af_messages_list-single"
                     >
-                  text_val
-                </span>
-              </h1>
-            </div>
-            <div
-                 class="af_messages_message-text"
+                  
+                  <li
+                      >
+                    message summary - message detail
+                  </li>
+                  <li
+                      >
+                    - message summary
+                  </li>
+                </ol>
+              </div>
+            </td>
+            <td
+                 class="af_messages_end"
+                >
+              
+            </td>
+          </tr>
+          <tr
+              >
+            
+            <td
+                 class="af_messages_bottom-start"
                 >
               
-            </div>
-            <ol
-                 class="af_messages_list"
+            </td>
+            <td
+                 class="af_messages_bottom"
                 >
               
-              <li
-                  >
-                message summary - message detail
-              </li>
-              <li
-                  >
-                - message summary
-              </li>
-            </ol>
-          </td>
-        </tr>
+            </td>
+            <td
+                 class="af_messages_bottom-end"
+                >
+              
+            </td>
+          </tr>
+        </tbody>
       </table>
 </results>



Mime
View raw message