Author: dsvyatobatsko
Date: 2008-06-13 12:11:18 -0400 (Fri, 13 Jun 2008)
New Revision: 9036
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java
trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/effect.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/filteringFeature.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/sortingFeature.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tabPanel.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/toolTip.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree.xhtml
trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-group.xhtml
trunk/samples/richfaces-demo/src/main/webapp/templates/include/tab-panel.xhtml
Log:
http://jira.jboss.com/jira/browse/RF-3688
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java
===================================================================
---
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java 2008-06-13
15:28:07 UTC (rev 9035)
+++
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java 2008-06-13
16:11:18 UTC (rev 9036)
@@ -26,7 +26,7 @@
}
public ComponentDescriptor getCurrentComponent() {
- String id = getComponentParam();
+ String id = getComponentParam("c");
if (id!=null) {
setCurrentComponent(findComponentById(id));
lastCompId = id;
@@ -36,15 +36,25 @@
String uri = getComponentUri();
setCurrentComponent(findComponentByUri(uri));
}
+
+ //set active tab for current component if any
+ if (null != currentComponent) {
+ String tab = getComponentParam("tab");
+ if (null != tab) {
+ currentComponent.setActiveTab(tab);
+ }
+ }
+
return currentComponent;
}
+
private String getComponentUri() {
FacesContext fc = FacesContext.getCurrentInstance();
return ((HttpServletRequest)fc.getExternalContext().getRequest()).getRequestURI();
}
- private String getComponentParam() {
+ private String getComponentParam(String name) {
FacesContext fc = FacesContext.getCurrentInstance();
- String param = (String)
fc.getExternalContext().getRequestParameterMap().get("c");
+ String param = (String) fc.getExternalContext().getRequestParameterMap().get(name);
if (param!=null && param.trim().length()>0) {
return param;
} else {
Modified: trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-06-13
15:28:07 UTC (rev 9035)
+++ trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-06-13
16:11:18 UTC (rev 9036)
@@ -126,7 +126,7 @@
<managed-bean>
<managed-bean-name>componentNavigator</managed-bean-name>
<managed-bean-class>org.richfaces.demo.common.ComponentNavigator</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
+ <managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>report</managed-bean-name>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar.xhtml 2008-06-13
15:28:07 UTC (rev 9035)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar.xhtml 2008-06-13
16:11:18 UTC (rev 9036)
@@ -7,20 +7,22 @@
<ui:composition template="/templates/main.xhtml">
<ui:define name="title">RichFaces - Open Source Rich JSF Components -
Rich Calendar</ui:define>
<ui:define name="body">
- <rich:tabPanel switchType="server" styleClass="top_tab"
contentClass="content_tab" headerClass="header_tabs_class"
inactiveTabClass="inactive_tab" activeTabClass="active_tab">
- <rich:tab label="Usage">
- <ui:include src="/richfaces/calendar/usage.xhtml"/>
- </rich:tab>
- <rich:tab label="Calendar Model">
- <ui:include src="/richfaces/calendar/model.xhtml"/>
- </rich:tab>
- <rich:tab label="Client Side API">
- <ui:include src="/richfaces/calendar/jsAPI.xhtml"/>
+ <rich:tabPanel switchType="server" styleClass="top_tab"
contentClass="content_tab" headerClass="header_tabs_class"
+ inactiveTabClass="inactive_tab" activeTabClass="active_tab"
selectedTab="#{componentNavigator.currentComponent.activeTab}">
+ <rich:tab name="usage" label="Usage">
+ <ui:include src="/richfaces/calendar/usage.xhtml" />
</rich:tab>
- <rich:tab label="Tag Information">
- <rich:insert
src="/WEB-INF/#{componentNavigator.currentComponent.tagInfoLocation}"
- errorContent="/templates/include/tagInfoNotes.xhtml"/>
+ <rich:tab name="model" label="Calendar Model">
+ <ui:include src="/richfaces/calendar/model.xhtml" />
</rich:tab>
+ <rich:tab name="api" label="Client Side API">
+ <ui:include src="/richfaces/calendar/jsAPI.xhtml" />
+ </rich:tab>
+ <rich:tab name="info" label="Tag Information">
+ <rich:insert
+ src="/WEB-INF/#{componentNavigator.currentComponent.tagInfoLocation}"
+ errorContent="/templates/include/tagInfoNotes.xhtml" />
+ </rich:tab>
</rich:tabPanel>
</ui:define>
</ui:composition>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/effect.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/effect.xhtml 2008-06-13
15:28:07 UTC (rev 9035)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/effect.xhtml 2008-06-13
16:11:18 UTC (rev 9036)
@@ -7,14 +7,15 @@
<ui:composition template="/templates/main.xhtml">
<ui:define name="title">RichFaces - Open Source Rich JSF Components -
Rich Effects</ui:define>
<ui:define name="body">
- <rich:tabPanel switchType="server" styleClass="top_tab"
contentClass="content_tab" headerClass="header_tabs_class"
inactiveTabClass="inactive_tab" activeTabClass="active_tab">
- <rich:tab label="Usage">
+ <rich:tabPanel switchType="server" styleClass="top_tab"
contentClass="content_tab" headerClass="header_tabs_class"
+ inactiveTabClass="inactive_tab" activeTabClass="active_tab"
selectedTab="#{componentNavigator.currentComponent.activeTab}">
+ <rich:tab name="usage" label="Usage">
<ui:include src="/richfaces/effect/usage.xhtml"/>
- </rich:tab>
- <rich:tab label="Key Attributes">
+ </rich:tab>
+ <rich:tab name="key" label="Key Attributes">
<ui:include src="/richfaces/effect/attributes.xhtml"/>
</rich:tab>
- <rich:tab label="Tag Information">
+ <rich:tab name="info" label="Tag Information">
<rich:insert
src="/WEB-INF/#{componentNavigator.currentComponent.tagInfoLocation}"
errorContent="/templates/include/tagInfoNotes.xhtml"/>
</rich:tab>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/filteringFeature.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/filteringFeature.xhtml 2008-06-13
15:28:07 UTC (rev 9035)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/filteringFeature.xhtml 2008-06-13
16:11:18 UTC (rev 9036)
@@ -7,13 +7,14 @@
<ui:composition template="/templates/main.xhtml">
<ui:define name="title">RichFaces - Open Source Rich JSF Components -
Table Filtering Feature</ui:define>
<ui:define name="body">
- <rich:tabPanel switchType="server" styleClass="top_tab"
contentClass="content_tab" headerClass="header_tabs_class"
inactiveTabClass="inactive_tab" activeTabClass="active_tab">
- <rich:tab label="Built-In Filtering Usage">
- <ui:include src="/richfaces/filteringFeature/filteringUsage.xhtml"/>
- </rich:tab>
- <rich:tab label="External Filtering Usage">
- <ui:include
src="/richfaces/filteringFeature/externalFilteringUsage.xhtml"/>
- </rich:tab>
+ <rich:tabPanel switchType="server" styleClass="top_tab"
contentClass="content_tab" headerClass="header_tabs_class"
+ inactiveTabClass="inactive_tab" activeTabClass="active_tab"
selectedTab="#{componentNavigator.currentComponent.activeTab}">
+ <rich:tab name="usage" label="Built-In Filtering Usage">
+ <ui:include src="/richfaces/filteringFeature/filteringUsage.xhtml"
/>
+ </rich:tab>
+ <rich:tab name="ex-usage" label="External Filtering Usage">
+ <ui:include
src="/richfaces/filteringFeature/externalFilteringUsage.xhtml" />
+ </rich:tab>
</rich:tabPanel>
</ui:define>
</ui:composition>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel.xhtml 2008-06-13 15:28:07
UTC (rev 9035)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel.xhtml 2008-06-13 16:11:18
UTC (rev 9036)
@@ -9,16 +9,17 @@
<ui:define name="title">RichFaces - Open Source Rich JSF Components -
Panel</ui:define>
<ui:define name="current">panel</ui:define>
<ui:define name="body">
- <rich:tabPanel switchType="server" styleClass="top_tab"
headerClass="header_tabs_class" contentClass="content_tab"
inactiveTabClass="inactive_tab" activeTabClass="active_tab">
- <rich:tab label="Usage">
- <ui:include src="/richfaces/panel/usage.xhtml"/>
- </rich:tab>
- <rich:tab label="Look Customization">
- <ui:include src="/richfaces/panel/look-customization.xhtml"/>
- </rich:tab>
- <rich:tab label="Tag Information">
+ <rich:tabPanel switchType="server" styleClass="top_tab"
headerClass="header_tabs_class" contentClass="content_tab"
+ inactiveTabClass="inactive_tab" activeTabClass="active_tab"
selectedTab="#{componentNavigator.currentComponent.activeTab}">
+ <rich:tab name="usage" label="Usage">
+ <ui:include src="/richfaces/panel/usage.xhtml" />
+ </rich:tab>
+ <rich:tab name="look" label="Look Customization">
+ <ui:include src="/richfaces/panel/look-customization.xhtml" />
+ </rich:tab>
+ <rich:tab name="info" label="Tag Information">
<rich:insert
src="/WEB-INF/#{componentNavigator.currentComponent.tagInfoLocation}"
- errorContent="/templates/include/tagInfoNotes.xhtml"/>
+ errorContent="/templates/include/tagInfoNotes.xhtml" />
</rich:tab>
</rich:tabPanel>
</ui:define>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/sortingFeature.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/sortingFeature.xhtml 2008-06-13
15:28:07 UTC (rev 9035)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/sortingFeature.xhtml 2008-06-13
16:11:18 UTC (rev 9036)
@@ -7,13 +7,14 @@
<ui:composition template="/templates/main.xhtml">
<ui:define name="title">RichFaces - Open Source Rich JSF Components -
Table Sorting Feature</ui:define>
<ui:define name="body">
- <rich:tabPanel switchType="server" styleClass="top_tab"
contentClass="content_tab" headerClass="header_tabs_class"
inactiveTabClass="inactive_tab" activeTabClass="active_tab">
- <rich:tab label="Built-in Sorting Feature">
- <ui:include src="/richfaces/sortingFeature/sortingUsage.xhtml"/>
- </rich:tab>
- <rich:tab label="External Sorting">
- <ui:include
src="/richfaces/sortingFeature/externalSortingUsage.xhtml"/>
- </rich:tab>
+ <rich:tabPanel switchType="server" styleClass="top_tab"
contentClass="content_tab" headerClass="header_tabs_class"
+ inactiveTabClass="inactive_tab" activeTabClass="active_tab"
selectedTab="#{componentNavigator.currentComponent.activeTab}">
+ <rich:tab name="usage" label="Built-in Sorting Feature">
+ <ui:include src="/richfaces/sortingFeature/sortingUsage.xhtml" />
+ </rich:tab>
+ <rich:tab name="ex-usage" label="External Sorting">
+ <ui:include src="/richfaces/sortingFeature/externalSortingUsage.xhtml"
/>
+ </rich:tab>
</rich:tabPanel>
</ui:define>
</ui:composition>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/tabPanel.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/tabPanel.xhtml 2008-06-13
15:28:07 UTC (rev 9035)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/tabPanel.xhtml 2008-06-13
16:11:18 UTC (rev 9036)
@@ -7,17 +7,19 @@
<ui:composition template="/templates/main.xhtml">
<ui:define name="title">RichFaces - Open Source Rich JSF Components -
TabPanel</ui:define>
<ui:define name="body">
- <rich:tabPanel switchType="server" styleClass="top_tab"
contentClass="content_tab" headerClass="header_tabs_class"
inactiveTabClass="inactive_tab" activeTabClass="active_tab">
- <rich:tab label="Usage">
- <ui:include src="/richfaces/tabPanel/usage.xhtml"/>
- </rich:tab>
- <rich:tab label="Look Customization">
- <ui:include src="/richfaces/tabPanel/look-customization.xhtml"/>
- </rich:tab>
- <rich:tab label="Tag Information">
- <rich:insert
src="/WEB-INF/#{componentNavigator.currentComponent.tagInfoLocation}"
- errorContent="/templates/include/tagInfoNotes.xhtml"/>
+ <rich:tabPanel switchType="server" styleClass="top_tab"
contentClass="content_tab" headerClass="header_tabs_class"
+ inactiveTabClass="inactive_tab" activeTabClass="active_tab"
selectedTab="#{componentNavigator.currentComponent.activeTab}">
+ <rich:tab name="usage" label="Usage">
+ <ui:include src="/richfaces/tabPanel/usage.xhtml" />
</rich:tab>
+ <rich:tab name="look" label="Look Customization">
+ <ui:include src="/richfaces/tabPanel/look-customization.xhtml" />
+ </rich:tab>
+ <rich:tab name="info" label="Tag Information">
+ <rich:insert
+ src="/WEB-INF/#{componentNavigator.currentComponent.tagInfoLocation}"
+ errorContent="/templates/include/tagInfoNotes.xhtml" />
+ </rich:tab>
</rich:tabPanel>
</ui:define>
</ui:composition>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/toolTip.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/toolTip.xhtml 2008-06-13
15:28:07 UTC (rev 9035)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/toolTip.xhtml 2008-06-13
16:11:18 UTC (rev 9036)
@@ -9,17 +9,19 @@
<ui:define name="title">RichFaces - Open Source Rich JSF Components -
PanelBar</ui:define>
<ui:define name="current">panel</ui:define>
<ui:define name="body">
- <rich:tabPanel switchType="server" styleClass="top_tab"
contentClass="content_tab" headerClass="header_tabs_class"
inactiveTabClass="inactive_tab" activeTabClass="active_tab">
- <rich:tab label="Usage">
- <ui:include src="/richfaces/toolTip/usage.xhtml"/>
- </rich:tab>
- <rich:tab label="Use ToolTip with DataTable">
- <ui:include src="/richfaces/toolTip/use-with-data-table.xhtml"/>
- </rich:tab>
- <rich:tab label="Tag Information">
- <rich:insert
src="/WEB-INF/#{componentNavigator.currentComponent.tagInfoLocation}"
- errorContent="/templates/include/tagInfoNotes.xhtml"/>
+ <rich:tabPanel switchType="server" styleClass="top_tab"
contentClass="content_tab" headerClass="header_tabs_class"
+ inactiveTabClass="inactive_tab" activeTabClass="active_tab"
selectedTab="#{componentNavigator.currentComponent.activeTab}">
+ <rich:tab name="usage" label="Usage">
+ <ui:include src="/richfaces/toolTip/usage.xhtml" />
</rich:tab>
+ <rich:tab name="table" label="Use ToolTip with DataTable">
+ <ui:include src="/richfaces/toolTip/use-with-data-table.xhtml" />
+ </rich:tab>
+ <rich:tab name="info" label="Tag Information">
+ <rich:insert
+ src="/WEB-INF/#{componentNavigator.currentComponent.tagInfoLocation}"
+ errorContent="/templates/include/tagInfoNotes.xhtml" />
+ </rich:tab>
</rich:tabPanel>
</ui:define>
</ui:composition>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree.xhtml 2008-06-13 15:28:07
UTC (rev 9035)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree.xhtml 2008-06-13 16:11:18
UTC (rev 9036)
@@ -9,16 +9,17 @@
<ui:define name="title">RichFaces - Open Source Rich JSF Components -
Tree</ui:define>
<ui:define name="current">panel</ui:define>
<ui:define name="body">
- <rich:tabPanel switchType="server" styleClass="top_tab"
contentClass="content_tab" headerClass="header_tabs_class"
inactiveTabClass="inactive_tab" activeTabClass="active_tab">
- <rich:tab label="Usage">
- <ui:include src="/richfaces/tree/usage.xhtml"/>
- </rich:tab>
- <rich:tab label="Default Tree Model">
- <ui:include src="/richfaces/tree/simple-tree.xhtml"/>
- </rich:tab>
- <rich:tab label="Tag Information">
+ <rich:tabPanel switchType="server" styleClass="top_tab"
contentClass="content_tab" headerClass="header_tabs_class"
+ inactiveTabClass="inactive_tab" activeTabClass="active_tab"
selectedTab="#{componentNavigator.currentComponent.activeTab}">
+ <rich:tab name="usage" label="Usage">
+ <ui:include src="/richfaces/tree/usage.xhtml" />
+ </rich:tab>
+ <rich:tab name="model" label="Default Tree Model">
+ <ui:include src="/richfaces/tree/simple-tree.xhtml" />
+ </rich:tab>
+ <rich:tab name="info" label="Tag Information">
<rich:insert
src="/WEB-INF/#{componentNavigator.currentComponent.tagInfoLocation}"
- errorContent="/templates/include/tagInfoNotes.xhtml"/>
+ errorContent="/templates/include/tagInfoNotes.xhtml" />
</rich:tab>
</rich:tabPanel>
</ui:define>
Modified:
trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-group.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-group.xhtml 2008-06-13
15:28:07 UTC (rev 9035)
+++
trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-group.xhtml 2008-06-13
16:11:18 UTC (rev 9036)
@@ -16,6 +16,7 @@
#{component.name}
</span>
<f:param value="#{component.id}" name="c"/>
+ <f:param value="#{component.activeTab}" name="tab"/>
</h:outputLink>
</td>
</tr>
Modified: trunk/samples/richfaces-demo/src/main/webapp/templates/include/tab-panel.xhtml
===================================================================
(Binary files differ)