Author: ilya_shaikovsky
Date: 2010-05-27 08:27:33 -0400 (Thu, 27 May 2010)
New Revision: 17313
Added:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/SlidesBean.java
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/model/slides/
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/model/slides/Picture.java
root/examples/richfaces-showcase/trunk/src/main/webapp/images/icons/
root/examples/richfaces-showcase/trunk/src/main/webapp/images/icons/scroller/
root/examples/richfaces-showcase/trunk/src/main/webapp/images/icons/scroller/arr_left.png
root/examples/richfaces-showcase/trunk/src/main/webapp/images/icons/scroller/arr_right.png
root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/
root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/pic1.jpg
root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/pic2.jpg
root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/pic3.jpg
root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/pic4.jpg
root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/pic5.jpg
root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/pic6.jpg
root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/pic7.jpg
root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/pic8.jpg
root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/pic9.jpg
Modified:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/component-sample.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/dataScrollerCustomization.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/simpleScrolling.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/templates/includes/skin-chooser.xhtml
Log:
dataScroller sample
+highlight of current menu items choosen at skin-selector and samples toolbar
Added:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/SlidesBean.java
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/SlidesBean.java
(rev 0)
+++
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/SlidesBean.java 2010-05-27
12:27:33 UTC (rev 17313)
@@ -0,0 +1,48 @@
+package org.richfaces.demo.tables;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.demo.tables.model.slides.Picture;
+
+/**
+ * @author Ilya Shaikovsky
+ *
+ */
+@ManagedBean
+@ViewScoped
+public class SlidesBean {
+
+ private static final String FILE_EXT = ".jpg";
+ private static final int FILES_COUNT = 9;
+ private static final String PATH_PREFIX = "/images/nature/";
+ private static final String PIC_NAME = "pic";
+ private List<Picture> pictures;
+ private int currentIndex = 1;
+
+ public SlidesBean() {
+ pictures = new ArrayList<Picture>();
+ for (int i = 1; i <= FILES_COUNT; i++) {
+ pictures.add(new Picture(PATH_PREFIX + PIC_NAME + i + FILE_EXT, PIC_NAME +
i));
+ }
+ }
+
+ public int getCurrentIndex() {
+ return currentIndex;
+ }
+
+ public void setCurrentIndex(int currentIndex) {
+ this.currentIndex = currentIndex;
+ }
+
+ public List<Picture> getPictures() {
+ return pictures;
+ }
+
+ public void setPictures(List<Picture> pictures) {
+ this.pictures = pictures;
+ }
+}
Added:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/model/slides/Picture.java
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/model/slides/Picture.java
(rev 0)
+++
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/model/slides/Picture.java 2010-05-27
12:27:33 UTC (rev 17313)
@@ -0,0 +1,28 @@
+package org.richfaces.demo.tables.model.slides;
+
+public class Picture {
+ private String name;
+ private String uri;
+
+ public Picture(String uri, String name) {
+ this.name = name;
+ this.uri = uri;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getUri() {
+ return uri;
+ }
+
+ public void setUri(String uri) {
+ this.uri = uri;
+ }
+
+}
Added:
root/examples/richfaces-showcase/trunk/src/main/webapp/images/icons/scroller/arr_left.png
===================================================================
(Binary files differ)
Property changes on:
root/examples/richfaces-showcase/trunk/src/main/webapp/images/icons/scroller/arr_left.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
root/examples/richfaces-showcase/trunk/src/main/webapp/images/icons/scroller/arr_right.png
===================================================================
(Binary files differ)
Property changes on:
root/examples/richfaces-showcase/trunk/src/main/webapp/images/icons/scroller/arr_right.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/pic1.jpg
===================================================================
(Binary files differ)
Property changes on:
root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/pic1.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/pic2.jpg
===================================================================
(Binary files differ)
Property changes on:
root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/pic2.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/pic3.jpg
===================================================================
(Binary files differ)
Property changes on:
root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/pic3.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/pic4.jpg
===================================================================
(Binary files differ)
Property changes on:
root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/pic4.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/pic5.jpg
===================================================================
(Binary files differ)
Property changes on:
root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/pic5.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/pic6.jpg
===================================================================
(Binary files differ)
Property changes on:
root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/pic6.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/pic7.jpg
===================================================================
(Binary files differ)
Property changes on:
root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/pic7.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/pic8.jpg
===================================================================
(Binary files differ)
Property changes on:
root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/pic8.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/pic9.jpg
===================================================================
(Binary files differ)
Property changes on:
root/examples/richfaces-showcase/trunk/src/main/webapp/images/nature/pic9.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/component-sample.xhtml
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/component-sample.xhtml 2010-05-27
09:58:42 UTC (rev 17312)
+++
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/component-sample.xhtml 2010-05-27
12:27:33 UTC (rev 17313)
@@ -18,7 +18,7 @@
<h:link value="#{s.name}" includeViewParams="true">
<f:param name="sample" value="#{s.id}" />
</h:link>
- <h:outputText value="CUR" style="color:orange"
rendered="#{(s.id == sample) or (status.index==0 and sample=='')}"/>
+ <h:outputText value="CUR" style="color:orange"
rendered="#{s.id == demoNavigator.currentSample.id}"/>
<h:outputText value=" | " />
</ui:repeat>
<fieldset><legend>#{demoNavigator.currentSample.name}</legend>
Modified:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/dataScrollerCustomization.xhtml
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/dataScrollerCustomization.xhtml 2010-05-27
09:58:42 UTC (rev 17312)
+++
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/dataScrollerCustomization.xhtml 2010-05-27
12:27:33 UTC (rev 17313)
@@ -5,47 +5,28 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:tbl="http://richfaces.org/rich"
-
xmlns:ds="http://richfaces.org/datascroller"
- >
+
xmlns:ds="http://richfaces.org/datascroller">
<ui:composition>
+ <style>
+.calign {
+ text-align: center;
+}
+</style>
<h:form id="form">
- <tbl:dataTable value="#{carsBean.allInventoryItems}" var="car"
- id="table" rows="10">
- <tbl:column accept="#{carsFiteringBean.acceptVendor}">
- <f:facet name="header">
- <h:outputText value="Vendor " />
- </f:facet>
- <h:outputText value="#{car.vendor}" />
- </tbl:column>
- <tbl:column>
- <f:facet name="header">
- <h:outputText value="Model" />
- </f:facet>
- <h:outputText value="#{car.model}" />
- </tbl:column>
- <tbl:column>
- <f:facet name="header">
- <h:outputText value="Price" />
- </f:facet>
- <h:outputText value="#{car.price}" />
- </tbl:column>
- <tbl:column>
- <f:facet name="header">
- <h:outputText value="Mileage" />
- </f:facet>
- <h:outputText value="#{car.mileage}" />
- </tbl:column>
- <tbl:column>
- <f:facet name="header">
- <h:outputText value="VIN " />
- </f:facet>
- <h:outputText value="#{car.vin}" />
- </tbl:column>
- <f:facet name="footer">
- <ds:dataScroller/>
- </f:facet>
- </tbl:dataTable>
+ <h:panelGrid columns="1" rowClasses="calign">
+ <h:panelGrid columns="3" id="repeat">
+ <h:graphicImage value="/images/icons/scroller/arr_left.png"
+ onclick="document.getElementById('form:ds').richfaces.component.previous()"
/>
+ <a4j:repeat rows="3" value="#{slidesBean.pictures}"
var="pic"
+ id="pics">
+ <h:graphicImage value="#{pic.uri}" style="padding:5px;"/>
+ </a4j:repeat>
+ <h:graphicImage value="/images/icons/scroller/arr_right.png"
+ onclick="document.getElementById('form:ds').richfaces.component.next()"
/>
+ </h:panelGrid>
+ <ds:dataScroller for="pics" id="ds" render="repeat"
stepControls="false" boundaryControls="false"
fastControls="false" maxPages="10"/>
+ </h:panelGrid>
</h:form>
</ui:composition>
Modified:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/simpleScrolling.xhtml
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/simpleScrolling.xhtml 2010-05-27
09:58:42 UTC (rev 17312)
+++
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/simpleScrolling.xhtml 2010-05-27
12:27:33 UTC (rev 17313)
@@ -10,6 +10,7 @@
<ui:composition>
<h:form id="form">
+ <ds:dataScroller for="table"/>
<tbl:dataTable value="#{carsBean.allInventoryItems}" var="car"
id="table" rows="10">
<tbl:column accept="#{carsFiteringBean.acceptVendor}">
@@ -42,10 +43,8 @@
</f:facet>
<h:outputText value="#{car.vin}" />
</tbl:column>
- <f:facet name="footer">
- <ds:dataScroller/>
- </f:facet>
</tbl:dataTable>
+ <ds:dataScroller for="table"/>
</h:form>
</ui:composition>
Modified:
root/examples/richfaces-showcase/trunk/src/main/webapp/templates/includes/skin-chooser.xhtml
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/webapp/templates/includes/skin-chooser.xhtml 2010-05-27
09:58:42 UTC (rev 17312)
+++
root/examples/richfaces-showcase/trunk/src/main/webapp/templates/includes/skin-chooser.xhtml 2010-05-27
12:27:33 UTC (rev 17313)
@@ -12,6 +12,7 @@
<h:link value="#{skin}" includeViewParams="true">
<f:param name="skin" value="#{skin}"/>
</h:link>
+ <h:outputText value="CUR!" rendered="#{skin==skinBean.skin}"
style="color:orange"/>
<h:outputText value = " | "/>
</a4j:repeat>
</rich:panel>