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 2024/09/02 15:38:11 UTC

(myfaces-tobago) branch main updated: demo: show workaround (#5399)

This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
     new a8c753bb0b demo: show workaround (#5399)
a8c753bb0b is described below

commit a8c753bb0b08065f62fd1e81abdde30ef86195c8
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Mon Sep 2 17:38:07 2024 +0200

    demo: show workaround (#5399)
    
    TabChangeListener with Ajax fires event when clicking on tab content
    
    issue: TOBAGO-2342
---
 .../main/webapp/content/070-tab/01-ajax/Tab_Ajax.xhtml | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/070-tab/01-ajax/Tab_Ajax.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/070-tab/01-ajax/Tab_Ajax.xhtml
index fe96f198b3..4fc40b47e7 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/070-tab/01-ajax/Tab_Ajax.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/070-tab/01-ajax/Tab_Ajax.xhtml
@@ -95,21 +95,23 @@
     <p>The <code class="language-markup">&lt;tc:tabChangeListener/></code> tag is used to bind a
       <code>TabChangeListener</code>. The <code>TabChangeListener</code> is an interface,
       which is implemented in this example by <code>SimpleTabChangeListener</code>.</p>
-    <code class="language-markup">&lt;tc:tabChangeListener type="org.apache.myfaces.tobago.example
-      .demo.actionlistener.SimpleTabChangeListener"
+    <code
+        class="language-markup">&lt;tc:tabChangeListener type="org.apache.myfaces.tobago.example.demo.actionlistener.SimpleTabChangeListener"
       binding="\#{tabController.tabChangeListener}"/></code>
-    <tc:tabGroup switchType="reloadTab">
-      <f:ajax render="outPanel"/>
+    <tc:tabGroup id="tabgroup" switchType="reloadTab">
       <tc:tabChangeListener type="org.apache.myfaces.tobago.example.demo.actionlistener.SimpleTabChangeListener"
                             binding="#{tabController.tabChangeListener}"/>
-      <tc:tab label="One">
+      <tc:tab id="tab1" label="One">
+        <f:ajax render="::outPanel"/>
         <p>Changed to tab one.</p>
       </tc:tab>
-      <tc:tab label="Two">
-       <!-- <f:ajax render=":page:header:headerInfo"/> -->
+      <tc:tab id="tab2" label="Two">
+        <f:ajax render="::outPanel"/>
+        <!-- <f:ajax render=":page:header:headerInfo"/> -->
         <p>Changed to tab two.</p>
       </tc:tab>
-      <tc:tab label="Three">
+      <tc:tab id="tab3" label="Three">
+        <f:ajax render="::outPanel"/>
         <p>Changed to tab three.</p>
       </tc:tab>
     </tc:tabGroup>