Author: jjamrich
Date: 2011-05-12 06:35:39 -0400 (Thu, 12 May 2011)
New Revision: 22486
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/withA4j.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/list.xhtml
Log:
Add demonstration problem with a4j:ajax within rich:tab
Add some different a4j:ajax with actionListener within rich:tab.
Demonstrate issue with firing-up event bound to tab.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/list.xhtml 2011-05-11
20:46:51 UTC (rev 22485)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/list.xhtml 2011-05-12
10:35:39 UTC (rev 22486)
@@ -34,6 +34,10 @@
<metamer:testPageLink id="simple" outcome="simple"
value="Simple">
Simple page containing rich:tabPanel with several
<b>rich:tab</b>s and input boxes for all its attributes.
</metamer:testPageLink>
+
+ <metamer:testPageLink id="withA4j" outcome="withA4j"
value="With a4j">
+ Simple page containing rich:tabPanel with several
<b>rich:tab</b>s and a4j:ajax
+ </metamer:testPageLink>
</ui:define>
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/withA4j.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/withA4j.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/withA4j.xhtml 2011-05-12
10:35:39 UTC (rev 22486)
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
+
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j" >
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="view">
+ <f:metadata>
+ <f:viewParam name="templates"
value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ </ui:define>
+
+ <ui:define name="component">
+
+ <rich:tabPanel id="tabPanel"
itemChangeListener="#{richBean.itemChangeListener}" >
+
+ <rich:tab id="tab1"
+ action="#{richBean.dummyAction}"
+ actionListener="#{richBean.actionListener}"
+
+
contentClass="#{richTabBean.attributes['contentClass'].value}"
+
bypassUpdates="#{richTabBean.attributes['bypassUpdates'].value}"
+ dir="#{richTabBean.attributes['dir'].value}"
+
disabled="#{richTabBean.attributes['disabled'].value}"
+
header="#{richTabBean.attributes['header'].value}"
+
headerClass="#{richTabBean.attributes['headerClass'].value}"
+
headerActiveClass="#{richTabBean.attributes['headerActiveClass'].value}"
+
headerDisabledClass="#{richTabBean.attributes['headerDisabledClass'].value}"
+
headerInactiveClass="#{richTabBean.attributes['headerInactiveClass'].value}"
+
headerStyle="#{richTabBean.attributes['headerStyle'].value}"
+
immediate="#{richTabBean.attributes['immediate'].value}"
+
lang="#{richTabBean.attributes['lang'].value}"
+
name="#{richTabBean.attributes['name'].value}"
+
onclick="#{richTabBean.attributes['onclick'].value}"
+
ondblclick="#{richTabBean.attributes['ondblclick'].value}"
+
onenter="#{richTabBean.attributes['onenter'].value}"
+
onheaderclick="#{richTabBean.attributes['onheaderclick'].value}"
+
onheaderdblclick="#{richTabBean.attributes['onheaderdblclick'].value}"
+
onheadermousedown="#{richTabBean.attributes['onheadermousedown'].value}"
+
onheadermousemove="#{richTabBean.attributes['onheadermousemove'].value}"
+
onheadermouseup="#{richTabBean.attributes['onheadermouseup'].value}"
+
onleave="#{richTabBean.attributes['onleave'].value}"
+
onmousedown="#{richTabBean.attributes['onmousedown'].value}"
+
onmousemove="#{richTabBean.attributes['onmousemove'].value}"
+
onmouseout="#{richTabBean.attributes['onmouseout'].value}"
+
onmouseover="#{richTabBean.attributes['onmouseover'].value}"
+
onmouseup="#{richTabBean.attributes['onmouseup'].value}"
+
rendered="#{richTabBean.attributes['rendered'].value}"
+
style="#{richTabBean.attributes['style'].value}"
+
styleClass="#{richTabBean.attributes['styleClass'].value}"
+
switchType="#{richTabBean.attributes['switchType'].value}"
+
title="#{richTabBean.attributes['title'].value}" >
+ <a4j:ajax
+ event="click"
+ listener="#{richBean.actionListener}" />
+ content of tab 1
+ </rich:tab>
+ <rich:tab id="tab2" name="tab2" header="tab2
header"
+
switchType="#{richTabBean.attributes['switchType'].value}">
+ content of tab 2
+ <a4j:ajax
+ event="enter"
+ listener="#{richBean.actionListener}" />
+ </rich:tab>
+ <rich:tab id="tab3" name="tab3" header="tab3
header"
+
switchType="#{richTabBean.attributes['switchType'].value}" >
+ content of tab 3
+ <a4j:ajax
+ event="click"
+ listener="#{richBean.actionListener}" />
+ </rich:tab>
+ <rich:tab id="tab4" name="tab4" header="tab4
header" disabled="true"
+
switchType="#{richTabBean.attributes['switchType'].value}">
+ content of tab 4
+ </rich:tab>
+ <rich:tab id="tab5" name="tab5" header="tab5
header"
+
switchType="#{richTabBean.attributes['switchType'].value}">
+ content of tab 5
+ </rich:tab>
+ </rich:tabPanel>
+
+ <br/><br/>
+
+ <h:commandButton id="firstTabButton" value="First
tab">
+ <rich:toggleControl targetPanel="tabPanel"
targetItem="@first" />
+ </h:commandButton>
+ <h:commandButton id="prevTabButton" value="Previous
tab">
+ <rich:toggleControl targetPanel="tabPanel"
targetItem="@prev" />
+ </h:commandButton>
+ <h:commandButton id="nextTabButton" value="Next
tab">
+ <rich:toggleControl targetPanel="tabPanel"
targetItem="@next" />
+ </h:commandButton>
+ <h:commandButton id="lastTabButton" value="Last
tab">
+ <rich:toggleControl targetPanel="tabPanel"
targetItem="@last" />
+ </h:commandButton>
+ <h:commandButton id="customTabButton" value="Custon tab
(#{richTabBean.attributes['name'].value})">
+ <rich:toggleControl targetPanel="tabPanel"
targetItem="#{richTabBean.attributes['name'].value}" />
+ </h:commandButton>
+
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ Attributes for the first tab:
+ <metamer:attributes value="#{richTabBean.attributes}"
id="attributes" render="log"/>
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file