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 2008/08/05 19:41:53 UTC
svn commit: r682825 -
/myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/extension/TobagoLabelExtensionHandler.java
Author: bommel
Date: Tue Aug 5 10:41:52 2008
New Revision: 682825
URL: http://svn.apache.org/viewvc?rev=682825&view=rev
Log:
(TOBAGO-690) Markup attribute for Facelet Label Extension Tags doesn't work
Modified:
myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/extension/TobagoLabelExtensionHandler.java
Modified: myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/extension/TobagoLabelExtensionHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/extension/TobagoLabelExtensionHandler.java?rev=682825&r1=682824&r2=682825&view=diff
==============================================================================
--- myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/extension/TobagoLabelExtensionHandler.java (original)
+++ myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/extension/TobagoLabelExtensionHandler.java Tue Aug 5 10:41:52 2008
@@ -35,6 +35,7 @@
import org.apache.myfaces.tobago.facelets.SuggestMethodRule;
import org.apache.myfaces.tobago.facelets.SupportsMarkupRule;
import org.apache.myfaces.tobago.util.LayoutUtil;
+import org.apache.myfaces.tobago.util.ComponentUtil;
import javax.el.ELException;
import javax.el.ValueExpression;
@@ -55,12 +56,14 @@
private TagAttribute labelWidthAttribute;
private TagAttribute tipAttribute;
private TagAttribute labelAttribute;
+ private TagAttribute markupAttribute;
public TobagoLabelExtensionHandler(ComponentConfig config) {
super(config);
labelWidthAttribute = getAttribute("labelWidth");
tipAttribute = getAttribute(TobagoConstants.ATTR_TIP);
labelAttribute = getAttribute(TobagoConstants.ATTR_LABEL);
+ markupAttribute = getAttribute(TobagoConstants.ATTR_MARKUP);
}
protected abstract String getSubComponentType();
@@ -144,6 +147,14 @@
ELAdaptor.setExpression(label, TobagoConstants.ATTR_VALUE, expression);
}
}
+ if (markupAttribute != null) {
+ if (markupAttribute.isLiteral()) {
+ ComponentUtil.setMarkup(label, markupAttribute.getValue());
+ } else {
+ ValueExpression expression = markupAttribute.getValueExpression(faceletContext, Object.class);
+ ELAdaptor.setExpression(label, TobagoConstants.ATTR_MARKUP, expression);
+ }
+ }
panel.getChildren().add(label);
}