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/02/24 17:09:27 UTC

svn commit: r1732181 - in /myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main: java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/

Author: lofwyr
Date: Wed Feb 24 16:09:27 2016
New Revision: 1732181

URL: http://svn.apache.org/viewvc?rev=1732181&view=rev
Log:
TOBAGO-1524: Use standard ajax mechanism
* progress on calling an action in AJAX case: fix TO_PAGE and TO_ROW jump in sheet

Modified:
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetPageCommandRenderer.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetPageCommandRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetPageCommandRenderer.java?rev=1732181&r1=1732180&r2=1732181&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetPageCommandRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetPageCommandRenderer.java Wed Feb 24 16:09:27 2016
@@ -60,7 +60,7 @@ public class SheetPageCommandRenderer ex
           Integer target = (Integer) ComponentUtils.getAttribute(component, Attributes.pagingTarget);
           if (target == null) {
             final Map map = facesContext.getExternalContext().getRequestParameterMap();
-            final Object value = map.get(id + ComponentUtils.SUB_SEPARATOR + "value");
+            final Object value = map.get(id);
             try {
               target = Integer.parseInt((String) value);
             } catch (final NumberFormatException e) {

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.java?rev=1732181&r1=1732180&r2=1732181&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.java Wed Feb 24 16:09:27 2016
@@ -489,8 +489,8 @@ public class SheetRenderer extends Rende
             writer.writeText(Integer.toString(first));
             writer.endElement(HtmlElements.SPAN);
             writer.startElement(HtmlElements.INPUT);
-            writer.writeIdAttribute(pagerCommandId + ComponentUtils.SUB_SEPARATOR + "value");
-            writer.writeNameAttribute(pagerCommandId + ComponentUtils.SUB_SEPARATOR + "value");
+            writer.writeIdAttribute(pagerCommandId);
+            writer.writeNameAttribute(pagerCommandId);
             writer.writeAttribute(HtmlAttributes.TYPE, HtmlInputTypes.TEXT);
             writer.writeClassAttribute(TobagoClass.SHEET__PAGING_INPUT);
             writer.writeAttribute(HtmlAttributes.VALUE, first);
@@ -584,8 +584,8 @@ public class SheetRenderer extends Rende
             writer.writeText(Integer.toString(first));
             writer.endElement(HtmlElements.SPAN);
             writer.startElement(HtmlElements.INPUT);
-            writer.writeIdAttribute(pagerCommandId + ComponentUtils.SUB_SEPARATOR + "value");
-            writer.writeNameAttribute(pagerCommandId + ComponentUtils.SUB_SEPARATOR + "value");
+            writer.writeIdAttribute(pagerCommandId);
+            writer.writeNameAttribute(pagerCommandId);
             writer.writeAttribute(HtmlAttributes.TYPE, HtmlInputTypes.TEXT);
             writer.writeClassAttribute(TobagoClass.SHEET__PAGING_INPUT);
             writer.writeAttribute(HtmlAttributes.VALUE, first);

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js?rev=1732181&r1=1732180&r2=1732181&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js Wed Feb 24 16:09:27 2016
@@ -443,8 +443,7 @@ Tobago.Sheet.hideInputOrSubmit = functio
   var sheetId = input.parents(".tobago-sheet:first").attr("id");
   output.html(input.val());
   if (changed) {
-    var commandId = input.attr("id").substr(0, input.attr("id").lastIndexOf("::value"));
-    Tobago.Sheets.get(sheetId).reloadWithAction(input.get(0), commandId);
+    Tobago.Sheets.get(sheetId).reloadWithAction(input.get(0), input.attr("id"));
   } else {
     console.info("no update needed"); // @DEV_ONLY
     input.hide();