Author: ilya_shaikovsky
Date: 2010-05-19 10:51:23 -0400 (Wed, 19 May 2010)
New Revision: 17128
Modified:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoDescriptor.java
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoNavigator.java
root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml
Log:
https://jira.jboss.org/browse/RF-8663
Modified:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoDescriptor.java
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoDescriptor.java 2010-05-19
14:21:23 UTC (rev 17127)
+++
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoDescriptor.java 2010-05-19
14:51:23 UTC (rev 17128)
@@ -7,7 +7,6 @@
public class DemoDescriptor extends BaseDescriptor {
private static final String BASE_SAMPLES_DIR = "/richfaces/";
- private String samplesFolder;
private List<SampleDescriptor> samples;
public SampleDescriptor getSampleById(String id) {
@@ -29,13 +28,4 @@
this.samples = samples;
}
- @XmlElement(name = "samples-folder")
- public String getSamplesFolder() {
- return samplesFolder;
- }
-
- public void setSamplesFolder(String samplesFolder) {
- this.samplesFolder = samplesFolder;
- }
-
}
Modified:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoNavigator.java
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoNavigator.java 2010-05-19
14:21:23 UTC (rev 17127)
+++
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoNavigator.java 2010-05-19
14:51:23 UTC (rev 17128)
@@ -16,6 +16,7 @@
public class DemoNavigator {
private static final String DEMO_VIEW_PARAMETER = "demo";
private static final String SAMPLE_VIEW_PARAMETER = "sample";
+ private static final String SEPARATOR = "/";
@ManagedProperty(value = "#{navigationParser.groupsList}")
private List<GroupDescriptor> groups;
@@ -84,7 +85,8 @@
if (handler instanceof ConfigurableNavigationHandler) {
ConfigurableNavigationHandler navigationHandler =
(ConfigurableNavigationHandler) handler;
- NavigationCase navCase = navigationHandler.getNavigationCase(context, null,
currentDemo.getSamplesFolder()
+ NavigationCase navCase = navigationHandler.getNavigationCase(context, null,
currentDemo.getId()
+ + SEPARATOR
+ getCurrentSample().getId());
return navCase.getToViewId(context);
Modified:
root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-05-19
14:21:23 UTC (rev 17127)
+++
root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-05-19
14:51:23 UTC (rev 17128)
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- NOTES(TODO: move to some readme in future): id for sample should equals to xhtml
page name with the sample -->
+<!-- NOTES(TODO: move to some readme in future): id for sample should equals to xhtml
page name with the sample
+the same for demo id - it should be equals to name of the folder where samples placed
-->
<root>
<group>
<name>Ajax Action</name>
@@ -7,7 +8,6 @@
<demo>
<id>ajax</id>
<name>a4j:ajax</name>
- <samples-folder>ajax/</samples-folder>
<samples>
<sample>
<id>ajax</id>
@@ -22,7 +22,6 @@
<demo new="true">
<id>commandButton</id>
<name>a4j:commandButton</name>
- <samples-folder>commandButton/</samples-folder>
<samples>
<sample>
<id>commandButton</id>
@@ -32,8 +31,7 @@
</demo>
<demo new="true">
<id>commandLink</id>
- <name>a4j:commandLink</name>
- <samples-folder>commandLink/</samples-folder>
+ <name>a4j:commandLink</name>
<samples>
<sample>
<id>commandLink</id>
@@ -43,8 +41,7 @@
</demo>
<demo new="true">
<id>jsFunction</id>
- <name>a4j:jsFunction</name>
- <samples-folder>jsFunction/</samples-folder>
+ <name>a4j:jsFunction</name>
<samples>
<sample>
<id>jsFunction</id>
@@ -55,7 +52,6 @@
<demo new="true">
<id>poll</id>
<name>a4j:poll</name>
- <samples-folder>poll/</samples-folder>
<samples>
<sample>
<id>poll</id>
@@ -66,7 +62,6 @@
<demo new="true">
<id>push</id>
<name>a4j:push</name>
- <samples-folder>push/</samples-folder>
<samples>
<sample>
<id>push</id>
@@ -82,7 +77,6 @@
<demo new="true">
<id>queue</id>
<name>a4j:queue</name>
- <samples-folder>queue/</samples-folder>
<samples>
<sample>
<id>queue</id>
@@ -93,7 +87,6 @@
<demo new="true">
<id>attachQueue</id>
<name>a4j:attachQueue</name>
- <samples-folder>attachQueue/</samples-folder>
<samples>
<sample>
<id>attachQueue</id>
@@ -109,7 +102,6 @@
<demo new="true">
<id>outputPanel</id>
<name>a4j:outputPanel</name>
- <samples-folder>outputPanel/</samples-folder>
<samples>
<sample>
<id>simple</id>
@@ -124,7 +116,6 @@
<demo new="true">
<id>status</id>
<name>a4j:status</name>
- <samples-folder>status</samples-folder>
<samples>
<sample>
<id>simple</id>
@@ -141,9 +132,8 @@
</samples>
</demo>
<demo new="true">
- <id>mediaoutput</id>
+ <id>mediaOutput</id>
<name>a4j:mediaOutput</name>
- <samples-folder>mediaOutput</samples-folder>
<samples>
<sample>
<id>imgUsage</id>
@@ -158,7 +148,6 @@
<demo new="true">
<id>log</id>
<name>a4j:log</name>
- <samples-folder>log</samples-folder>
<samples>
<sample>
<id>log</id>
@@ -176,9 +165,11 @@
<name>rich:dataTable</name>
<samples>
<sample>
+ <id>simpleTable</id>
<name>Data Table Basic</name>
</sample>
<sample>
+ <id>tableSorting</id>
<name>Data Table Sorting</name>
</sample>
</samples>