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/12/06 21:26:06 UTC

svn commit: r483209 - /myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java

Author: bommel
Date: Wed Dec  6 12:26:01 2006
New Revision: 483209

URL: http://svn.apache.org/viewvc?view=rev&rev=483209
Log:
(TOBAGO-167) enable ajax popup in tc:link

Modified:
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java?view=diff&rev=483209&r1=483208&r2=483209
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java Wed Dec  6 12:26:01 2006
@@ -59,6 +59,7 @@
     String href;
 
     String clientId = component.getClientId(facesContext);
+    // TODO refactor it
     if (component.getAttributes().get(ATTR_ACTION_LINK) != null) {
       String action = (String) component.getAttributes().get(ATTR_ACTION_LINK);
       if (action == null) {
@@ -94,12 +95,11 @@
       onclick = HtmlRendererUtil.prepareOnClick(facesContext, component);
       href = HtmlRendererUtil.getEmptyHref(facesContext);
     } else { // default: Action.TYPE_SUBMIT
-      href = "javascript:Tobago.submitAction('" + clientId + "')";
+      href = "javascript:" + HtmlRendererUtil.createOnClick(facesContext, component);
+         //"Tobago.submitAction('" + clientId + "')";
     }
 
-    onclick =
-        HtmlRendererUtil.appendConfirmationScript(onclick, component,
-            facesContext);
+    onclick = HtmlRendererUtil.appendConfirmationScript(onclick, component, facesContext);
 
     TobagoResponseWriter writer
         = (TobagoResponseWriter) facesContext.getResponseWriter();