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 2011/02/02 22:50:13 UTC
svn commit: r1066641 -
/myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/renderkit/LayoutableRendererBase.java
Author: bommel
Date: Wed Feb 2 21:50:12 2011
New Revision: 1066641
URL: http://svn.apache.org/viewvc?rev=1066641&view=rev
Log:
(TOBAGO-963) It would be nice to have an @autoId in onclick attribute of tc:command
thanks to Helmut Swaczinna
Modified:
myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/renderkit/LayoutableRendererBase.java
Modified: myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/renderkit/LayoutableRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/renderkit/LayoutableRendererBase.java?rev=1066641&r1=1066640&r2=1066641&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/renderkit/LayoutableRendererBase.java (original)
+++ myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/renderkit/LayoutableRendererBase.java Wed Feb 2 21:50:12 2011
@@ -24,6 +24,8 @@ import static org.apache.myfaces.tobago.
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_READONLY;
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_DISABLED;
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_TRANSITION;
+
+import org.apache.commons.lang.StringUtils;
import org.apache.myfaces.tobago.component.ComponentUtil;
import org.apache.myfaces.tobago.component.UICell;
import org.apache.myfaces.tobago.component.UICommand;
@@ -193,6 +195,9 @@ public abstract class LayoutableRenderer
if (facetAction == null) {
facetAction = "Tobago.submitAction2(this, '" + facetComponent.getClientId(facesContext) + "', "
+ ComponentUtil.getBooleanAttribute(facetComponent, ATTR_TRANSITION) + ", null, '" + clientId +"')";
+ } else {
+ // Replace @autoId
+ facetAction = StringUtils.replace(facetAction, "@autoId", facetComponent.getClientId(facesContext));
}
String script =
"var element = Tobago.element(\"" + clientId + "\");\n"