myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject [myfaces-tobago] branch tobago-4.x updated: TOBAGO-1973: AJAX inside <tc:selectOneChoice> inside a "begin"/"after" facet doesn't work
Date Thu, 10 Jan 2019 16:32:26 GMT
This is an automated email from the ASF dual-hosted git repository.

lofwyr pushed a commit to branch tobago-4.x
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git


The following commit(s) were added to refs/heads/tobago-4.x by this push:
     new fcb4e6c  TOBAGO-1973: AJAX inside <tc:selectOneChoice> inside a "begin"/"after"
facet doesn't work
fcb4e6c is described below

commit fcb4e6cf6f1a650730e109ca7b7eb5e895a355d1
Author: Udo Schnurpfeil <lofwyr@apache.org>
AuthorDate: Thu Jan 10 17:32:10 2019 +0100

    TOBAGO-1973: AJAX inside <tc:selectOneChoice> inside a "begin"/"after" facet doesn't
work
---
 .../internal/renderkit/renderer/SelectOneChoiceInsideInRenderer.java | 5 +++++
 .../tobago/internal/renderkit/renderer/SelectOneChoiceRenderer.java  | 2 +-
 .../java/org/apache/myfaces/tobago/example/demo/GroupController.java | 1 +
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SelectOneChoiceInsideInRenderer.java
b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SelectOneChoiceInsideInRenderer.java
index 14a3a1c..ac0d7ac 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SelectOneChoiceInsideInRenderer.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SelectOneChoiceInsideInRenderer.java
@@ -43,4 +43,9 @@ public class SelectOneChoiceInsideInRenderer extends SelectOneChoiceRenderer
{
   protected CssItem[] getCssItems(final FacesContext facesContext, final UISelectOneChoice
select) {
     return new CssItem[]{BootstrapClass.CUSTOM_SELECT};
   }
+
+  @Override
+  protected String getFieldId(final FacesContext facesContext, final UIComponent component)
{
+    return component.getClientId(facesContext);
+  }
 }
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SelectOneChoiceRenderer.java
b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SelectOneChoiceRenderer.java
index 0362945..1b4b444 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SelectOneChoiceRenderer.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SelectOneChoiceRenderer.java
@@ -52,7 +52,7 @@ public class SelectOneChoiceRenderer extends SelectOneRendererBase {
     final TobagoResponseWriter writer = getResponseWriter(facesContext);
 
     final String clientId = select.getClientId(facesContext);
-    final String fieldId = select.getFieldId(facesContext);
+    final String fieldId = getFieldId(facesContext, select);
     final Iterable<SelectItem> items = SelectItemUtils.getItemIterator(facesContext,
select);
     final String title = HtmlRendererUtils.getTitleFromTipAndMessages(facesContext, select);
     final boolean disabled = !items.iterator().hasNext() || select.isDisabled() || select.isReadonly();
diff --git a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/GroupController.java
b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/GroupController.java
index 75a390b..8265f24 100644
--- a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/GroupController.java
+++ b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/GroupController.java
@@ -57,6 +57,7 @@ public class GroupController implements Serializable {
     sendTo = "";
     value = 1000.0;
     currency = Currency.getInstance("EUR");
+    compute();
   }
 
   public String getChatlog() {


Mime
View raw message