You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2009/12/07 17:28:01 UTC
svn commit: r887986 - in /myfaces/tobago/trunk/theme:
scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/
standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/property/
Author: bommel
Date: Mon Dec 7 16:27:57 2009
New Revision: 887986
URL: http://svn.apache.org/viewvc?rev=887986&view=rev
Log:
(TOBAGO-606) Layout-Manager
- Messages tag
Modified:
myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessagesRenderer.java
myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/property/tobago-theme-config.properties
Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessagesRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessagesRenderer.java?rev=887986&r1=887985&r2=887986&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessagesRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessagesRenderer.java Mon Dec 7 16:27:57 2009
@@ -37,8 +37,10 @@
import org.apache.myfaces.tobago.component.UIMessages;
import org.apache.myfaces.tobago.component.UIPanel;
import org.apache.myfaces.tobago.component.UIPopup;
+import org.apache.myfaces.tobago.config.Configurable;
import org.apache.myfaces.tobago.context.ResourceManagerUtil;
import org.apache.myfaces.tobago.context.TobagoFacesContext;
+import org.apache.myfaces.tobago.layout.Measure;
import org.apache.myfaces.tobago.layout.PixelMeasure;
import org.apache.myfaces.tobago.renderkit.LayoutComponentRendererBase;
import org.apache.myfaces.tobago.renderkit.css.Style;
@@ -229,4 +231,11 @@
writer.endElement(HtmlConstants.BR);
}
+ @Override
+ public Measure getPreferredHeight(FacesContext facesContext, Configurable component) {
+ Measure measure = super.getPreferredHeight(facesContext, component);
+ UIMessages messages = (UIMessages) component;
+ int count = messages.createMessageList(facesContext).size();
+ return measure.multiply(count);
+ }
}
Modified: myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/property/tobago-theme-config.properties
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/property/tobago-theme-config.properties?rev=887986&r1=887985&r2=887986&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/property/tobago-theme-config.properties (original)
+++ myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/property/tobago-theme-config.properties Mon Dec 7 16:27:57 2009
@@ -40,6 +40,8 @@
Label.css.padding-right=0
Label.css.padding-bottom=0
+Messages.preferredHeight=20
+
Page.leftOffset=0
Page.topOffset=0
Page.rightOffset=0