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 2007/01/04 20:06:51 UTC

svn commit: r492687 - in /myfaces/tobago/trunk: contrib/facelets/src/main/java/org/apache/myfaces/tobago/facelets/PopupReferenceHandler.java core/src/main/java/org/apache/myfaces/tobago/taglib/component/PopupReferenceTag.java

Author: bommel
Date: Thu Jan  4 11:06:50 2007
New Revision: 492687

URL: http://svn.apache.org/viewvc?view=rev&rev=492687
Log:
(TOBAGO-217) Create a popup ref tag

Modified:
    myfaces/tobago/trunk/contrib/facelets/src/main/java/org/apache/myfaces/tobago/facelets/PopupReferenceHandler.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/PopupReferenceTag.java

Modified: myfaces/tobago/trunk/contrib/facelets/src/main/java/org/apache/myfaces/tobago/facelets/PopupReferenceHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/contrib/facelets/src/main/java/org/apache/myfaces/tobago/facelets/PopupReferenceHandler.java?view=diff&rev=492687&r1=492686&r2=492687
==============================================================================
--- myfaces/tobago/trunk/contrib/facelets/src/main/java/org/apache/myfaces/tobago/facelets/PopupReferenceHandler.java (original)
+++ myfaces/tobago/trunk/contrib/facelets/src/main/java/org/apache/myfaces/tobago/facelets/PopupReferenceHandler.java Thu Jan  4 11:06:50 2007
@@ -39,11 +39,11 @@
  */
 public class PopupReferenceHandler extends TagHandler {
 
-  private final TagAttribute _for;
+  private final TagAttribute forComponent;
 
   public PopupReferenceHandler(TagConfig config) {
     super(config);
-    _for = getAttribute("for");
+    forComponent = getAttribute("for");
   }
 
   public void apply(FaceletContext faceletContext, UIComponent parent)
@@ -52,7 +52,7 @@
       // only process if parent was just created
       if (parent.getParent() == null) {
         ActionSource actionSource = (ActionSource) parent;
-        actionSource.addActionListener(new PopupActionListener(_for.getValue()));
+        actionSource.addActionListener(new PopupActionListener(forComponent.getValue()));
       }
     } else {
       throw new TagException(tag, "Parent is not of type ActionSource, type is: " + parent);

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/PopupReferenceTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/PopupReferenceTag.java?view=diff&rev=492687&r1=492686&r2=492687
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/PopupReferenceTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/PopupReferenceTag.java Thu Jan  4 11:06:50 2007
@@ -41,14 +41,14 @@
  */
 @Tag(name = "popupReference", bodyContent = BodyContent.EMPTY)
 public class PopupReferenceTag extends TagSupport {
-  private String _for;
+  private String forComponent;
 
   /**
    * The id of a Popup.
    */
   @TagAttribute
   public void setFor(String popupId) {
-    this._for = popupId;
+    this.forComponent = popupId;
   }
 
   public int doStartTag() throws JspException {
@@ -75,7 +75,7 @@
       throw new JspException("Component "+ component.getClass().getName() + " is not instanceof ActionSource");
     }
     ActionSource actionSource = (ActionSource) component;
-    actionSource.addActionListener(new PopupActionListener(_for));
+    actionSource.addActionListener(new PopupActionListener(forComponent));
     return (SKIP_BODY);
   }
 
@@ -83,6 +83,6 @@
    * <p>Release references to any acquired resources.
    */
   public void release() {
-    this._for = null;
+    this.forComponent = null;
   }
 }