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 2006/05/10 10:49:56 UTC
svn commit: r405679 - in /myfaces/tobago/trunk:
contrib/facelets/src/main/java/org/apache/myfaces/tobago/facelets/
theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/
Author: bommel
Date: Wed May 10 01:49:54 2006
New Revision: 405679
URL: http://svn.apache.org/viewcvs?rev=405679&view=rev
Log:
avoid String +
minor change in AttributeHandler
Modified:
myfaces/tobago/trunk/contrib/facelets/src/main/java/org/apache/myfaces/tobago/facelets/AttributeHandler.java
myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeListboxRenderer.java
Modified: myfaces/tobago/trunk/contrib/facelets/src/main/java/org/apache/myfaces/tobago/facelets/AttributeHandler.java
URL: http://svn.apache.org/viewcvs/myfaces/tobago/trunk/contrib/facelets/src/main/java/org/apache/myfaces/tobago/facelets/AttributeHandler.java?rev=405679&r1=405678&r2=405679&view=diff
==============================================================================
--- myfaces/tobago/trunk/contrib/facelets/src/main/java/org/apache/myfaces/tobago/facelets/AttributeHandler.java (original)
+++ myfaces/tobago/trunk/contrib/facelets/src/main/java/org/apache/myfaces/tobago/facelets/AttributeHandler.java Wed May 10 01:49:54 2006
@@ -30,6 +30,7 @@
import com.sun.facelets.tag.TagConfig;
import com.sun.facelets.tag.TagException;
import com.sun.facelets.tag.TagHandler;
+import com.sun.facelets.tag.jsf.ComponentSupport;
public final class AttributeHandler extends TagHandler {
private static final Class [] VALIDATOR =
@@ -51,7 +52,7 @@
throw new TagException(tag, "Parent UIComponent was null");
}
- if (parent.getParent() == null) {
+ if (ComponentSupport.isNew(parent)) {
String nameValue = name.getValue(ctx);
if ("rendered".equals(nameValue)) {
parent.setRendered(value.getBoolean(ctx));
Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeListboxRenderer.java
URL: http://svn.apache.org/viewcvs/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeListboxRenderer.java?rev=405679&r1=405678&r2=405679&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeListboxRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeListboxRenderer.java Wed May 10 01:49:54 2006
@@ -66,10 +66,11 @@
writer.writeComponentClass();
writer.writeAttribute("style", null, ATTR_STYLE);
- String value = ";";
+ StringBuffer value = new StringBuffer(";");
List<UITreeNode> expandPath = tree.getExpandPath();
for (UITreeNode node : expandPath) {
- value += nodeStateId(facesContext, node) + ";";
+ value.append(nodeStateId(facesContext, node));
+ value.append(";");
}
writer.startElement("input", tree);
@@ -81,9 +82,10 @@
final Set<DefaultMutableTreeNode> selection = tree.getState().getSelection();
- value = ";";
+ value = new StringBuffer(";");
for (DefaultMutableTreeNode node : selection) {
- value += nodeStateId(facesContext, tree.findUITreeNode(root, node)) + ";";
+ value.append(nodeStateId(facesContext, tree.findUITreeNode(root, node)));
+ value.append(";");
}
writer.startElement("input", tree);
writer.writeAttribute("type", "hidden", null);