You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2016/10/07 11:25:54 UTC

svn commit: r1763740 - in /myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main: java/org/apache/myfaces/tobago/example/demo/PartialReloadController.java webapp/content/30-concept/50-partial/partial.xhtml

Author: lofwyr
Date: Fri Oct  7 11:25:53 2016
New Revision: 1763740

URL: http://svn.apache.org/viewvc?rev=1763740&view=rev
Log:
TOBAGO-1544 Revise Demo Application for Tobago 3.0
* rename value to separate from the listener

Modified:
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/PartialReloadController.java
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/50-partial/partial.xhtml

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/PartialReloadController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/PartialReloadController.java?rev=1763740&r1=1763739&r2=1763740&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/PartialReloadController.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/PartialReloadController.java Fri Oct  7 11:25:53 2016
@@ -38,7 +38,7 @@ public class PartialReloadController {
 
   private static final Logger LOG = LoggerFactory.getLogger(PartialReloadController.class);
 
-  private String navigateAction;
+  private String navigateActionValue;
 
   @Inject
   private NavigationState navigationState;
@@ -84,30 +84,30 @@ public class PartialReloadController {
       navigationState = (NavigationState) expression.getValue(elContext);
     }
 
-    LOG.info("navigateAction = \"" + navigateAction + "\"");
-    if (navigateAction == null) {
+    LOG.info("navigateActionValue = \"" + navigateActionValue + "\"");
+    if (navigateActionValue == null) {
       logAndNavigate(null);
-    } else if ("left".equals(navigateAction)) {
+    } else if ("left".equals(navigateActionValue)) {
       AjaxUtils.addRenderIds("page:mainForm:left");
-      navigateAction = null;
+      navigateActionValue = null;
       logAndNavigate(null);
-    } else if ("right".equals(navigateAction)) {
+    } else if ("right".equals(navigateActionValue)) {
       AjaxUtils.addRenderIds("page:mainForm:right");
-      navigateAction = null;
+      navigateActionValue = null;
       logAndNavigate(null);
-    } else if ("both".equals(navigateAction)) {
+    } else if ("both".equals(navigateActionValue)) {
       AjaxUtils.addRenderIds("page:mainForm:left", "page:mainForm:right");
-      navigateAction = null;
+      navigateActionValue = null;
       logAndNavigate(null);
-    } else if ("parent".equals(navigateAction)) {
-      navigateAction = null;
+    } else if ("parent".equals(navigateActionValue)) {
+      navigateActionValue = null;
       AjaxUtils.addRenderIds("page:mainForm:parent");
       logAndNavigate(null);
-    } else if ("prev".equals(navigateAction)) {
-      navigateAction = null;
+    } else if ("prev".equals(navigateActionValue)) {
+      navigateActionValue = null;
       AjaxUtils.navigate(facesContext, logAndNavigate(navigationState.gotoPrevious()));
-    } else if ("next".equals(navigateAction)) {
-      navigateAction = null;
+    } else if ("next".equals(navigateActionValue)) {
+      navigateActionValue = null;
       AjaxUtils.navigate(facesContext, logAndNavigate(navigationState.gotoNext()));
     }
     logAndNavigate(null);
@@ -119,11 +119,11 @@ public class PartialReloadController {
   }
 
 
-  public String getNavigateAction() {
-    return navigateAction;
+  public String getNavigateActionValue() {
+    return navigateActionValue;
   }
 
-  public void setNavigateAction(final String navigateAction) {
-    this.navigateAction = navigateAction;
+  public void setNavigateActionValue(final String navigateActionValue) {
+    this.navigateActionValue = navigateActionValue;
   }
 }

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/50-partial/partial.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/50-partial/partial.xhtml?rev=1763740&r1=1763739&r2=1763740&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/50-partial/partial.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/50-partial/partial.xhtml Fri Oct  7 11:25:53 2016
@@ -126,7 +126,7 @@
         <tc:panel id="navTest">
           <tc:gridLayoutConstraint columnSpan="2"/>
 
-          <tc:selectOneChoice fieldId="navSelect" value="#{partialReloadController.navigateAction}" label="On Change">
+          <tc:selectOneChoice fieldId="navSelect" value="#{partialReloadController.navigateActionValue}" label="On Change">
             <f:ajax execute="navTest"
                     render="navTest :page:header:headerInfo"
                     listener="#{partialReloadController.navigateAction}"/>