JBoss Rich Faces SVN: r7168 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/columns/examples.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-03-25 09:52:05 -0400 (Tue, 25 Mar 2008)
New Revision: 7168
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/columns/examples/example.xhtml
Log:
columns example small addition
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/columns/examples/example.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/columns/examples/example.xhtml 2008-03-25 13:48:57 UTC (rev 7167)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/columns/examples/example.xhtml 2008-03-25 13:52:05 UTC (rev 7168)
@@ -6,10 +6,14 @@
xmlns:rich="http://richfaces.org/rich">
<h:form>
<rich:dataTable value="#{dataTableScrollerBean.model}" var="model">
+
+ <f:facet name="header">
+ <h:outputText value="Cars Available"></h:outputText>
+ </f:facet>
<rich:columns value="#{dataTableScrollerBean.columns}" var="columns"
index="ind" sortBy="#{model[ind].price}">
-
+
<f:facet name="header">
<h:outputText value="#{columns.header}" />
</f:facet>
16 years, 9 months
JBoss Rich Faces SVN: r7167 - in trunk/samples/richfaces-demo/src/main: java/org/richfaces/demo/fileUpload and 7 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-03-25 09:48:57 -0400 (Tue, 25 Mar 2008)
New Revision: 7167
Added:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/fileUpload/File.java
trunk/samples/richfaces-demo/src/main/webapp/images/cn_Columns.gif
trunk/samples/richfaces-demo/src/main/webapp/images/cn_ComboBox.gif
trunk/samples/richfaces-demo/src/main/webapp/images/cn_InplaceInput.gif
trunk/samples/richfaces-demo/src/main/webapp/images/cn_InplaceSelect.gif
trunk/samples/richfaces-demo/src/main/webapp/images/ico_ComboBox.gif
trunk/samples/richfaces-demo/src/main/webapp/images/ico_InplaceInput.gif
trunk/samples/richfaces-demo/src/main/webapp/images/ico_InplaceSelect.gif
trunk/samples/richfaces-demo/src/main/webapp/images/ico_columns.gif
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/fileUpload/FileUploadBean.java
trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/columns/examples/example.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/columns/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/fileUpload/examples/fileUpload.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/filteringFeature/examples/simpleFiltering.xhtml
Log:
columns example added and file Upload example started
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java 2008-03-25 13:45:17 UTC (rev 7166)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java 2008-03-25 13:48:57 UTC (rev 7167)
@@ -201,22 +201,22 @@
columns.clear();
String header;
String footer="";
- header = "Chevrolet Corvette";
+ header = "Chevrolet";
Facet facet = new Facet(header ,footer);
columns.add(facet);
- header = "Ford Explorer";
+ header = "Ford";
facet = new Facet(header ,footer);
columns.add(facet);
- header = "Nissan Maxima";
+ header = "Nissan";
facet = new Facet(header ,footer);
columns.add(facet);
- header = "Toyota Camry";
+ header = "Toyota";
facet = new Facet(header ,footer);
columns.add(facet);
- header = "GMC Yukon";
+ header = "GMC";
facet = new Facet(header ,footer);
columns.add(facet);
- header = "Infiniti G35";
+ header = "Infiniti";
facet = new Facet(header ,footer);
columns.add(facet);
}
Added: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/fileUpload/File.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/fileUpload/File.java (rev 0)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/fileUpload/File.java 2008-03-25 13:48:57 UTC (rev 7167)
@@ -0,0 +1,27 @@
+package org.richfaces.demo.fileUpload;
+
+public class File {
+
+ private String Name;
+ private int length;
+ private byte[] data;
+ public String getName() {
+ return Name;
+ }
+ public void setName(String name) {
+ Name = name;
+ }
+ public int getLength() {
+ return length;
+ }
+ public void setLength(int length) {
+ this.length = length;
+ }
+ public byte[] getData() {
+ return data;
+ }
+ public void setData(byte[] data) {
+ this.data = data;
+ }
+
+}
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/fileUpload/FileUploadBean.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/fileUpload/FileUploadBean.java 2008-03-25 13:45:17 UTC (rev 7166)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/fileUpload/FileUploadBean.java 2008-03-25 13:48:57 UTC (rev 7167)
@@ -3,7 +3,10 @@
*/
package org.richfaces.demo.fileUpload;
+import java.awt.Graphics2D;
import java.io.IOException;
+import java.io.OutputStream;
+import java.util.ArrayList;
import org.richfaces.event.UploadEvent;
import org.richfaces.model.UploadItem;
@@ -13,12 +16,32 @@
*
*/
public class FileUploadBean {
+
+ private ArrayList<File> files = new ArrayList<File>();
+
public FileUploadBean() {
}
public void listener(UploadEvent event) throws IOException{
UploadItem item = event.getUploadItem();
System.out.println("FileUploadBean.listener()");
- System.out.println("File : '" + item.getFileName() + "' was uploaded");
+ File file = new File();
+ file.setLength(item.getData().length);
+ file.setName(item.getFileName());
+ file.setData(item.getData());
+ files.add(file);
}
+
+ public void paint(OutputStream outputStream, Object obj) throws IOException {
+ outputStream.write((byte[])obj);
+ System.out.println("FileUploadBean.paint()");
+ }
+
+ public ArrayList<File> getFiles() {
+ return files;
+ }
+
+ public void setFiles(ArrayList<File> files) {
+ this.files = files;
+ }
}
Modified: trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
===================================================================
--- trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2008-03-25 13:45:17 UTC (rev 7166)
+++ trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2008-03-25 13:48:57 UTC (rev 7167)
@@ -69,14 +69,15 @@
portlet= ajaxMisc, Ajax Portlet, /images/ico_common.gif, /images/cn_AjaxPortlet.gif, RichFacesComponentsLibrary.html#portlet, jbossajax4jsf/freezone/docs/tlddoc/a4j/portlet.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIPortlet.html, /richfaces/portlet.jsf
effect= richMisc, Effect, /images/ico_common.gif, /images/cn_Effect.gif, RichFacesComponentsLibrary.html#effect, jbossrichfaces/freezone/docs/tlddoc/rich/effect.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIEffect.html, /richfaces/effect.jsf
contextMenu= richMenu, Context Menu, /images/ico_ContextMenu.gif, /images/cn_contextMenu.gif, RichFacesComponentsLibrary.html\#contextMenu, jbossrichfaces/freezone/docs/tlddoc/rich/contextMenu.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIContextMenu.html, /richfaces/contextMenu.jsf
-componentControl= richMisc, Component Control, /images/ico_common.gif, \t\t/images/cn_componentControl.gif, RichFacesComponentsLibrary.html\#componentControl, jbossrichfaces/freezone/docs/tlddoc/rich/componentControl.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIcomponentControl.html, /richfaces/componentControl.jsf
-orderingList= richSelect, Ordering List, \t \t/images/ico_OrderingList.gif, \t/images/cn_orderingList.gif, RichFacesComponentsLibrary.html\#orderingList, jbossrichfaces/freezone/docs/tlddoc/rich/orderingList.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIorderingList.html, \t\t/richfaces/orderingList.jsf
-listShuttle= richSelect, List Shuttle, \t\t \t\t/images/ico_ListShuttle.gif, /images/cn_listShuttle.gif, RichFacesComponentsLibrary.html\#listShuttle, jbossrichfaces/freezone/docs/tlddoc/rich/listShuttle.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIlistShuttle.html, \t\t/richfaces/listShuttle.jsf
-pickList= richSelect, Pick List, \t\t\t\t\t/images/ico_DataTable.gif, /images/cn_listShuttle.gif, RichFacesComponentsLibrary.html\#pickList, jbossrichfaces/freezone/docs/tlddoc/rich/pickList.html, \t\tjbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIpickList.html, \t\t\t\t/richfaces/pickList.jsf
-progressBar= richOutputs, Progress Bar, \t\t \t\t/images/ico_DataTable.gif, /images/cn_listShuttle.gif, RichFacesComponentsLibrary.html\#progressBar, jbossrichfaces/freezone/docs/tlddoc/rich/progressBar.html, \t\tjbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIprogressBar.html, \t/richfaces/progressBar.jsf
-comboBox= richInputs, Combo Box, \t\t/images/ico_ComboBox.gif, \t\t/images/cn_ComboBox.gif, RichFacesComponentsLibrary.html\#comboBox, jbossrichfaces/freezone/docs/tlddoc/rich/comboBox.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIcomboBox.html, \t\t\t\t\t/richfaces/comboBox.jsf
-inplaceInput= richInputs, Inplace Input, \t\t/images/ico_InplaceInput.gif, \t\t/images/cn_InplaceInput.gif, RichFacesComponentsLibrary.html\#inplaceInput, jbossrichfaces/freezone/docs/tlddoc/rich/inplaceInput.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIinplaceInput.html, \t\t\t\t\t/richfaces/inplaceInput.jsf
-inplaceSelect= richInputs, Inplace Select, \t\t/images/ico_InplaceSelect.gif, \t\t/images/cn_InplaceSelect.gif, RichFacesComponentsLibrary.html\#inplaceSelect, jbossrichfaces/freezone/docs/tlddoc/rich/inplaceSelect.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIinplaceSelect.html, \t\t\t\t\t/richfaces/inplaceSelect.jsf
-sorting= richDataIterators, Table Sorting, \t\t/images/ico_DataTable.gif, \t\t/images/cn_DataTable.gif, RichFacesComponentsLibrary.html\#dataTable, jbossrichfaces/freezone/docs/tlddoc/rich/dataTable.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIdataTable.html, \t\t\t\t\t/richfaces/sortingFeature.jsf
-filtering= richDataIterators, Table Filtering, \t\t/images/ico_DataTable.gif, \t\t/images/cn_DataTable.gif, RichFacesComponentsLibrary.html\#dataTable, jbossrichfaces/freezone/docs/tlddoc/rich/dataTable.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIdataTable.html, \t\t\t\t\t/richfaces/filteringFeature.jsf
-columns =richDataIterators, \t\tColumns, \t\t/images/ico_columns.gif, \t\t/images/cn_Columns.gif, \t\t\tRichFacesComponentsLibrary.html\#columns, jbossrichfaces/freezone/docs/tlddoc/rich/columns.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIColumns.html, \t\t\t\t\t/richfaces/columns.jsf
\ No newline at end of file
+componentControl= richMisc, Component Control, /images/ico_common.gif, \t\t/images/cn_componentControl.gif, RichFacesComponentsLibrary.html\#componentControl, jbossrichfaces/freezone/docs/tlddoc/rich/componentControl.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIcomponentControl.html, /richfaces/componentControl.jsf
+orderingList= richSelect, Ordering List, /images/ico_OrderingList.gif, \t/images/cn_orderingList.gif, RichFacesComponentsLibrary.html\#orderingList, jbossrichfaces/freezone/docs/tlddoc/rich/orderingList.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIorderingList.html, \t\t/richfaces/orderingList.jsf
+listShuttle= richSelect, List Shuttle, /images/ico_ListShuttle.gif, /images/cn_listShuttle.gif, RichFacesComponentsLibrary.html\#listShuttle, jbossrichfaces/freezone/docs/tlddoc/rich/listShuttle.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIlistShuttle.html, \t\t/richfaces/listShuttle.jsf
+pickList= richSelect, Pick List, /images/ico_DataTable.gif, /images/cn_listShuttle.gif, RichFacesComponentsLibrary.html\#pickList, jbossrichfaces/freezone/docs/tlddoc/rich/pickList.html, \t\tjbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIpickList.html, \t\t\t\t/richfaces/pickList.jsf
+progressBar= richOutputs, Progress Bar, /images/ico_DataTable.gif, /images/cn_listShuttle.gif, RichFacesComponentsLibrary.html\#progressBar, jbossrichfaces/freezone/docs/tlddoc/rich/progressBar.html, \t\tjbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIprogressBar.html, \t/richfaces/progressBar.jsf
+comboBox= richInputs, Combo Box, /images/ico_ComboBox.gif, \t\t/images/cn_ComboBox.gif, RichFacesComponentsLibrary.html\#comboBox, jbossrichfaces/freezone/docs/tlddoc/rich/comboBox.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIcomboBox.html, \t\t\t\t\t/richfaces/comboBox.jsf
+inplaceInput= richInputs, Inplace Input, /images/ico_InplaceInput.gif, \t\t/images/cn_InplaceInput.gif, RichFacesComponentsLibrary.html\#inplaceInput, jbossrichfaces/freezone/docs/tlddoc/rich/inplaceInput.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIinplaceInput.html, \t\t\t\t\t/richfaces/inplaceInput.jsf
+inplaceSelect= richInputs, Inplace Select, /images/ico_InplaceSelect.gif, \t\t/images/cn_InplaceSelect.gif, RichFacesComponentsLibrary.html\#inplaceSelect, jbossrichfaces/freezone/docs/tlddoc/rich/inplaceSelect.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIinplaceSelect.html, \t\t\t\t\t/richfaces/inplaceSelect.jsf
+sorting= richDataIterators, Table Sorting, /images/ico_DataTable.gif, \t\t/images/cn_DataTable.gif, RichFacesComponentsLibrary.html\#dataTable, jbossrichfaces/freezone/docs/tlddoc/rich/dataTable.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIdataTable.html, \t\t\t\t\t/richfaces/sortingFeature.jsf
+filtering= richDataIterators, Table Filtering, /images/ico_DataTable.gif, \t\t/images/cn_DataTable.gif, RichFacesComponentsLibrary.html\#dataTable, jbossrichfaces/freezone/docs/tlddoc/rich/dataTable.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIdataTable.html, \t\t\t\t\t/richfaces/filteringFeature.jsf
+columns = richDataIterators, Columns, /images/ico_columns.gif, \t\t/images/cn_Columns.gif, \t\t\tRichFacesComponentsLibrary.html\#columns, jbossrichfaces/freezone/docs/tlddoc/rich/columns.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIcolumns.html, \t\t\t\t\t/richfaces/columns.jsf
+fileUpload = richInputs, File Upload, /images/ico_FileUpload.gif, \t\t/images/cn_FileUpload.gif, \t\t\tRichFacesComponentsLibrary.html\#fileUpload, jbossrichfaces/freezone/docs/tlddoc/rich/fileUpload.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIfileUpload.html, \t\t\t\t\t/richfaces/fileUpload.jsf
\ No newline at end of file
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-03-25 13:45:17 UTC (rev 7166)
+++ trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-03-25 13:48:57 UTC (rev 7167)
@@ -328,6 +328,14 @@
<to-view-id>/richfaces/include/examples/wstep2.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
+ <navigation-rule>
+ <from-view-id>/richfaces/columns.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>sortingFeature</from-outcome>
+ <to-view-id>/richfaces/sortingFeature.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+ </navigation-rule>
<lifecycle>
<phase-listener>org.richfaces.treemodeladaptor.PostbackPhaseListener</phase-listener>
</lifecycle>
Modified: trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml 2008-03-25 13:45:17 UTC (rev 7166)
+++ trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml 2008-03-25 13:48:57 UTC (rev 7167)
@@ -67,7 +67,7 @@
<filter-class>org.ajax4jsf.Filter</filter-class>
<init-param>
<param-name>createTempFiles</param-name>
- <param-value>true</param-value>
+ <param-value>false</param-value>
</init-param>
<init-param>
<param-name>maxRequestSize</param-name>
Added: trunk/samples/richfaces-demo/src/main/webapp/images/cn_Columns.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/richfaces-demo/src/main/webapp/images/cn_Columns.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/richfaces-demo/src/main/webapp/images/cn_ComboBox.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/richfaces-demo/src/main/webapp/images/cn_ComboBox.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/richfaces-demo/src/main/webapp/images/cn_InplaceInput.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/richfaces-demo/src/main/webapp/images/cn_InplaceInput.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/richfaces-demo/src/main/webapp/images/cn_InplaceSelect.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/richfaces-demo/src/main/webapp/images/cn_InplaceSelect.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/richfaces-demo/src/main/webapp/images/ico_ComboBox.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/richfaces-demo/src/main/webapp/images/ico_ComboBox.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/richfaces-demo/src/main/webapp/images/ico_InplaceInput.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/richfaces-demo/src/main/webapp/images/ico_InplaceInput.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/richfaces-demo/src/main/webapp/images/ico_InplaceSelect.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/richfaces-demo/src/main/webapp/images/ico_InplaceSelect.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/richfaces-demo/src/main/webapp/images/ico_columns.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/richfaces-demo/src/main/webapp/images/ico_columns.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/columns/examples/example.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/columns/examples/example.xhtml 2008-03-25 13:45:17 UTC (rev 7166)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/columns/examples/example.xhtml 2008-03-25 13:48:57 UTC (rev 7167)
@@ -1,19 +1,26 @@
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:a4j="http://richfaces.org/a4j"
- xmlns:rich="http://richfaces.org/rich">
-
- <h:form>
- <rich:dataTable value="#{dataTableScrollerBean.model}" var="model">
- <rich:columns value="#{dataTableScrollerBean.columns}" var="columns" index="ind">
- <f:facet name="header">
- <h:outputText value="#{columns.header}"/>
- </f:facet>
- <h:outputText value="#{model[ind].model}"/>
- </rich:columns>
- </rich:dataTable>
- </h:form>
-
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+ <h:form>
+ <rich:dataTable value="#{dataTableScrollerBean.model}" var="model">
+
+ <rich:columns value="#{dataTableScrollerBean.columns}" var="columns"
+ index="ind" sortBy="#{model[ind].price}">
+
+ <f:facet name="header">
+ <h:outputText value="#{columns.header}" />
+ </f:facet>
+
+ <h:outputText value="#{model[ind].model} " />
+ <h:outputText value="#{model[ind].mileage} miles " />
+ <h:outputText value="#{model[ind].price}$"
+ style="font-style:italic;" />
+
+ </rich:columns>
+
+ </rich:dataTable>
+ </h:form>
</ui:composition>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/columns/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/columns/usage.xhtml 2008-03-25 13:45:17 UTC (rev 7166)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/columns/usage.xhtml 2008-03-25 13:48:57 UTC (rev 7167)
@@ -9,17 +9,36 @@
<ui:define name="sample">
<p>
- SHORT DESCRIPTION
+ The tag allows <b>dynamic columns</b> in a <i>rich:dataTable</i>. It is used like a
+ UIData component which iterates through a data model to create the columns.
</p>
+ <p>
+ The component uses standard <b>value/var</b> pair of attributes to provide provide
+ binding to data model and request scoped variable for iteration through
+ this data model.
+ </p>
+ <p>
+ Next simple example shows you simple use-case where the ten type of cars created
+ and list of models with prices generated for this type of car. In the dataTable
+ cars grouped by type in separate columns.
+ </p>
<div class="sample-container" >
<ui:include src="/richfaces/columns/examples/example.xhtml"/>
<ui:include src="/templates/include/sourceview.xhtml">
<ui:param name="sourcepath" value="/richfaces/columns/examples/example.xhtml"/>
</ui:include>
</div>
- <p>
- DESCRIPTION
- </p>
+ <h:form>
+ <p>
+ Additionally as you could see
+ <h:commandLink value="Sorting Feature" immediate="true" action="sortingFeature"/>
+ could be added to this component
+ in the same manner as for simple rich:column.
+ </p>
+ <p>
+ In this example every column provides sorting by car prices
+ </p>
+ </h:form>
</ui:define>
</ui:composition>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/fileUpload/examples/fileUpload.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/fileUpload/examples/fileUpload.xhtml 2008-03-25 13:45:17 UTC (rev 7166)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/fileUpload/examples/fileUpload.xhtml 2008-03-25 13:48:57 UTC (rev 7167)
@@ -4,8 +4,22 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
- <h:form>
+
+ <a4j:form>
<rich:fileUpload fileUploadListener="#{fileUploadBean.listener}"
- maxFilesQuantity="10" />
- </h:form>
+ maxFilesQuantity="5" reRender="table">
+ <a4j:support event="onuploadcomplete" reRender="table"></a4j:support>
+ </rich:fileUpload>
+ <rich:dataTable value="#{fileUploadBean.files}" var="file" id="table">
+ <rich:column>
+ <h:outputText value="#{file.name}"></h:outputText>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{file.length}"></h:outputText>
+ </rich:column>
+ <rich:column>
+ <a4j:mediaOutput createContent="#{fileUploadBean.paint}" value="file.data" mimeType="image/jpeg" element="img"/>
+ </rich:column>
+ </rich:dataTable>
+ </a4j:form>
</ui:composition>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/filteringFeature/examples/simpleFiltering.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/filteringFeature/examples/simpleFiltering.xhtml 2008-03-25 13:45:17 UTC (rev 7166)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/filteringFeature/examples/simpleFiltering.xhtml 2008-03-25 13:48:57 UTC (rev 7167)
@@ -9,24 +9,31 @@
.rich-inplace-view{
color:gray;
border-bottom-color:gray;
- }
+ }
+ .body{
+ background-color:red !important;
+ }
</style>
- <rich:dataTable value="#{capitalsBean.capitals}" var="cap" width="500px">
+ <input type="text" value="123" style="background : transparent; border : 0"/>
+ <rich:dataTable value="#{capitalsBean.capitals}" var="cap" width="500px" rows="15">
<f:facet name="header">
<h:outputText value="Filtering Example"/>
</f:facet>
- <rich:column>
- <f:facet name="header">
- <h:graphicImage value="/images/ico_DataTable.gif"></h:graphicImage>
- </f:facet>
- <h:graphicImage value="#{cap.stateFlag}"/>
- </rich:column>
<rich:column filterBy="#{cap.state}" filterDefaultLabel="click to filter">
- <h:outputText value="#{cap.state}"></h:outputText>
+ <h:outputText value="#{cap.state}"/>
</rich:column>
<rich:column filterBy="#{cap.name}" filterDefaultLabel="click to filter">
<h:outputText value="#{cap.name}"/>
</rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="State time zone:"/>
+ </f:facet>
+ <h:outputText value="#{cap.timeZone}"/>
+ </rich:column>
+ <f:facet name="footer">
+ <rich:datascroller renderIfSinglePage="false"/>
+ </f:facet>
</rich:dataTable>
</h:form>
</ui:composition>
\ No newline at end of file
16 years, 9 months
JBoss Rich Faces SVN: r7166 - in trunk/ui/scrollableDataTable/src: main/java/org/richfaces/renderkit/html and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2008-03-25 09:45:17 -0400 (Tue, 25 Mar 2008)
New Revision: 7166
Modified:
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/component/UIScrollableDataTable.java
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/ScrollableDataTableRendererTest.java
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/SelectionRendererContributorTest.java
Log:
http://jira.jboss.com/jira/browse/RF-1999
Modified: trunk/ui/scrollableDataTable/src/main/java/org/richfaces/component/UIScrollableDataTable.java
===================================================================
--- trunk/ui/scrollableDataTable/src/main/java/org/richfaces/component/UIScrollableDataTable.java 2008-03-25 13:42:47 UTC (rev 7165)
+++ trunk/ui/scrollableDataTable/src/main/java/org/richfaces/component/UIScrollableDataTable.java 2008-03-25 13:45:17 UTC (rev 7166)
@@ -9,6 +9,7 @@
import java.util.Iterator;
import java.util.List;
+import javax.faces.component.UIColumn;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.event.AbortProcessingException;
@@ -223,10 +224,10 @@
protected Iterator<UIComponent> dataChildren() {
IteratorChain chain = new IteratorChain();
- chain.addIterator(getFacets().values().iterator());
+ //chain.addIterator(getFacets().values().iterator());
for (Iterator<UIComponent> i = getChildren().iterator(); i.hasNext(); ) {
UIComponent kid = (UIComponent)i.next();
- if (kid instanceof Column) {
+ if (kid instanceof Column || kid instanceof UIColumn) {
chain.addIterator(kid.getChildren().iterator());
}
}
@@ -240,7 +241,7 @@
IteratorChain chain = new IteratorChain(getFacets().values().iterator());
for (Iterator<UIComponent> i = getChildren().iterator(); i.hasNext(); ) {
UIComponent kid = (UIComponent)i.next();
- if (kid instanceof Column) {
+ if (kid instanceof Column || kid instanceof UIColumn) {
chain.addIterator(kid.getFacets().values().iterator());
}
}
Modified: trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java
===================================================================
--- trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java 2008-03-25 13:42:47 UTC (rev 7165)
+++ trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java 2008-03-25 13:45:17 UTC (rev 7166)
@@ -18,8 +18,10 @@
import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.ajax4jsf.renderkit.ComponentVariables;
import org.ajax4jsf.renderkit.ComponentsVariableResolver;
+import org.ajax4jsf.renderkit.HeaderResourcesRendererBase;
import org.ajax4jsf.renderkit.RendererBase;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
+import org.ajax4jsf.resource.InternetResource;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.richfaces.component.UIScrollableDataTable;
@@ -30,6 +32,7 @@
import org.richfaces.model.SortOrder;
import org.richfaces.renderkit.CompositeRenderer;
import org.richfaces.renderkit.RendererContributor;
+import org.richfaces.renderkit.ScriptOptions;
import org.richfaces.utils.TemplateLoader;
@@ -39,8 +42,46 @@
*
*/
-public abstract class ScrollableDataTableBaseRenderer extends CompositeRenderer {
+public abstract class ScrollableDataTableBaseRenderer extends HeaderResourcesRendererBase {
+ private class CompositeRendererEnabler extends CompositeRenderer {
+ public CompositeRendererEnabler() {
+ addContributor(new SelectionRendererContributor());
+ }
+ @Override
+ protected Class<? extends UIComponent> getComponentClass() {
+ return ScrollableDataTableBaseRenderer.this.getComponentClass();
+ }
+
+ @Override
+ public void mergeScriptOptions(ScriptOptions scriptOptions,
+ FacesContext context, UIComponent component) {
+ super.mergeScriptOptions(scriptOptions, context, component);
+
+ }
+
+ @Override
+ public String getScriptContributions(String varString,
+ FacesContext context, UIComponent component) {
+ return super.getScriptContributions(varString, context, component);
+ }
+
+ @Override
+ public RendererContributor[] getContributors() {
+ return super.getContributors();
+ }
+
+ @Override
+ public InternetResource[] getScripts() {
+ return super.getScripts();
+ }
+
+ @Override
+ public InternetResource[] getStyles() {
+ return super.getStyles();
+ }
+ }
+
public static final String PARTIAL_UPDATE = "partialUpdate";
public static final String UPDATE_HEADER = "updateHeader";
@@ -61,6 +102,8 @@
private RendererBase footerCellTemplate = null;
private RendererBase headerItselfTemplate = null;
+
+ private CompositeRendererEnabler composite = new CompositeRendererEnabler();
private final Log log = LogFactory.getLog(ScrollableDataTableBaseRenderer.class);
@@ -403,6 +446,18 @@
}
};
+ @Override
+ protected InternetResource[] getScripts() {
+ // TODO Auto-generated method stub
+ return composite.getScripts();
+ }
+
+ @Override
+ protected InternetResource[] getStyles() {
+ // TODO Auto-generated method stub
+ return composite.getStyles();
+ }
+
// temporary solution RF-957
public String getFormattedWidth(String receivedWidth ) throws IOException{
@@ -417,10 +472,11 @@
return formattedWidth;
}
- public ScrollableDataTableBaseRenderer() {
- addContributor(new SelectionRendererContributor());
+ @Override
+ protected Class<? extends UIComponent> getComponentClass() {
+ return UIScrollableDataTable.class;
}
-
+
public static String getJavaScriptVarName(FacesContext context, UIScrollableDataTable grid) {
String name = grid.getScriptVar();
@@ -437,7 +493,7 @@
ScrollableDataTableOptions options = new ScrollableDataTableOptions(grid);
- mergeScriptOptions(options, context, grid);
+ composite.mergeScriptOptions(options, context, grid);
JSFunction function = new JSFunction("new ClientUI.controls.grid.ScrollableGrid");
function.addParameter(options);
@@ -445,7 +501,7 @@
}
protected String getScriptContributions(FacesContext context, UIScrollableDataTable grid) {
- return super.getScriptContributions(getJavaScriptVarName(context, grid), context, grid);
+ return composite.getScriptContributions(getJavaScriptVarName(context, grid), context, grid);
}
public boolean getRendersChildren() {
@@ -588,11 +644,13 @@
}
-
+ @Override
protected void doDecode(FacesContext context, UIComponent component) {
super.doDecode(context, component);
-
+
+ composite.decode(context, component);
+
component.getAttributes().remove(PARTIAL_UPDATE);
component.getAttributes().remove(UPDATE_HEADER);
@@ -788,6 +846,7 @@
return b != null && b.booleanValue() && AjaxContext.getCurrentInstance().isAjaxRequest();
}
+ @Override
public void encodeChildren(FacesContext context, UIComponent component
) throws IOException {
@@ -799,6 +858,7 @@
}
+ @Override
public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
if(component instanceof UIScrollableDataTable){
@@ -811,6 +871,7 @@
}
}
+ @Override
public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
if(component instanceof UIScrollableDataTable){
@@ -881,7 +942,7 @@
}
public void contributorsEncodeHere(FacesContext context, UIScrollableDataTable grid) throws IOException {
- RendererContributor [] contribs = getContributors();
+ RendererContributor [] contribs = composite.getContributors();
if (contribs != null) {
for (int i = 0; i < contribs.length; i++) {
Modified: trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/ScrollableDataTableRendererTest.java
===================================================================
--- trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/ScrollableDataTableRendererTest.java 2008-03-25 13:42:47 UTC (rev 7165)
+++ trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/ScrollableDataTableRendererTest.java 2008-03-25 13:45:17 UTC (rev 7166)
@@ -14,12 +14,11 @@
import org.ajax4jsf.javascript.PrototypeScript;
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
import org.apache.commons.lang.StringUtils;
+import org.richfaces.component.UIScrollableDataTable;
import com.gargoylesoftware.htmlunit.html.HtmlElement;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import com.gargoylesoftware.htmlunit.html.HtmlScript;
-
-import org.richfaces.component.UIScrollableDataTable;
/**
* @author Anton Belevich
*
@@ -74,7 +73,10 @@
grid.setFirst(0);
grid.setRows(40);
+
+
facesContext.getViewRoot().getChildren().add(grid);
+
}
public void tearDown() throws Exception {
Modified: trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/SelectionRendererContributorTest.java
===================================================================
--- trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/SelectionRendererContributorTest.java 2008-03-25 13:42:47 UTC (rev 7165)
+++ trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/SelectionRendererContributorTest.java 2008-03-25 13:45:17 UTC (rev 7166)
@@ -10,6 +10,7 @@
import org.richfaces.component.UIScrollableDataTable;
import org.richfaces.model.selection.ClientSelection;
import org.richfaces.model.selection.SelectionRange;
+import org.richfaces.renderkit.CompositeRenderer;
/**
* @author Maksim Kaszynski
@@ -19,7 +20,7 @@
private UIScrollableDataTable component;
private SelectionRendererContributor contributor;
- private ScrollableDataTableBaseRenderer renderer;
+ private CompositeRenderer renderer;
public SelectionRendererContributorTest(String name) {
super(name);
@@ -34,8 +35,8 @@
component.setValue(new ArrayList());
facesContext.getViewRoot().getChildren().add(component);
contributor = new SelectionRendererContributor();
- renderer = new ScrollableDataTableBaseRenderer(){
- protected Class getComponentClass() {
+ renderer = new CompositeRenderer(){
+ protected Class<? extends UIScrollableDataTable> getComponentClass() {
return UIScrollableDataTable.class;
}};
}
16 years, 9 months
JBoss Rich Faces SVN: r7165 - trunk/framework/api/src/main/java/org/ajax4jsf/resource.
by richfaces-svn-commits@lists.jboss.org
Author: vbaranov
Date: 2008-03-25 09:42:47 -0400 (Tue, 25 Mar 2008)
New Revision: 7165
Added:
trunk/framework/api/src/main/java/org/ajax4jsf/resource/ResourceComponent2.java
Modified:
trunk/framework/api/src/main/java/org/ajax4jsf/resource/ResourceComponent.java
Log:
http://jira.jboss.com/jira/browse/RF-2489
Modified: trunk/framework/api/src/main/java/org/ajax4jsf/resource/ResourceComponent.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/resource/ResourceComponent.java 2008-03-25 13:42:38 UTC (rev 7164)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/resource/ResourceComponent.java 2008-03-25 13:42:47 UTC (rev 7165)
@@ -23,7 +23,7 @@
import java.util.Date;
-import javax.el.MethodExpression;
+import javax.faces.el.MethodBinding;
/**
* @author shura (latest modification by $Author: alexsmirnov $)
@@ -111,11 +111,11 @@
* Get El binding to method in user bean to send resource. Method will called with two parameters - restored data object and servlet output stream.
* @return
*/
- public abstract MethodExpression getCreateContent();
+ public abstract MethodBinding getCreateContent();
/**
* Set El binding to method in user bean to send resource. Method will called with two parameters - restored data object and servlet output stream.
* @param newvalue
*/
- public abstract void setCreateContent(MethodExpression newvalue);
+ public abstract void setCreateContent(MethodBinding newvalue);
}
Added: trunk/framework/api/src/main/java/org/ajax4jsf/resource/ResourceComponent2.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/resource/ResourceComponent2.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/resource/ResourceComponent2.java 2008-03-25 13:42:47 UTC (rev 7165)
@@ -0,0 +1,53 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.resource;
+
+import javax.el.MethodExpression;
+
+/**
+ * Interface for the ResourceComponent introduced after refactoring
+ * to support MethodExpression. Old interface is left for the
+ * compatibility.
+ *
+ * @author Vladislav Baranov
+ */
+public interface ResourceComponent2 extends ResourceComponent {
+
+ /**
+ * Get MethodExpression to method in user bean to send resource. Method will
+ * called with two parameters - restored data object and servlet output
+ * stream.
+ *
+ * @return MethodExpression
+ */
+ public abstract MethodExpression getCreateContentExpression();
+
+ /**
+ * Set MethodExpression to method in user bean to send resource. Method will
+ * called with two parameters - restored data object and servlet output
+ * stream.
+ *
+ * @param newvalue - new MethodExpression value
+ */
+ public abstract void setCreateContentExpression(MethodExpression newvalue);
+
+}
Property changes on: trunk/framework/api/src/main/java/org/ajax4jsf/resource/ResourceComponent2.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
16 years, 9 months
JBoss Rich Faces SVN: r7164 - in trunk/ui/core/src/main: java/org/ajax4jsf/component and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: vbaranov
Date: 2008-03-25 09:42:38 -0400 (Tue, 25 Mar 2008)
New Revision: 7164
Modified:
trunk/ui/core/src/main/config/component/mediaOutput.xml
trunk/ui/core/src/main/java/org/ajax4jsf/component/UIMediaOutput.java
trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/MediaOutputHandler.java
Log:
http://jira.jboss.com/jira/browse/RF-2489
Modified: trunk/ui/core/src/main/config/component/mediaOutput.xml
===================================================================
--- trunk/ui/core/src/main/config/component/mediaOutput.xml 2008-03-25 13:29:47 UTC (rev 7163)
+++ trunk/ui/core/src/main/config/component/mediaOutput.xml 2008-03-25 13:42:38 UTC (rev 7164)
@@ -130,7 +130,7 @@
</description>
</property>
<property elonly="true">
- <name>createContent</name>
+ <name>createContentExpression</name>
<classname>javax.el.MethodExpression</classname>
<description>
<![CDATA[
@@ -142,6 +142,19 @@
java.io.OutputStream,java.lang.Object
</methodargs>
</property>
+ <property elonly="true">
+ <name>createContent</name>
+ <classname>javax.faces.el.MethodBinding</classname>
+ <description>
+ <![CDATA[
+ Method call expression to send generated resource to OutputStream. It must have two parameter with a type of java.io.OutputStream
+ and java.lang.Object ( deserialized value of data attribute )
+ ]]>
+ </description>
+ <methodargs>
+ java.io.OutputStream,java.lang.Object
+ </methodargs>
+ </property>
<property>
<name>converter</name>
<classname>javax.faces.convert.Converter</classname>
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/component/UIMediaOutput.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/component/UIMediaOutput.java 2008-03-25 13:29:47 UTC (rev 7163)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/component/UIMediaOutput.java 2008-03-25 13:42:38 UTC (rev 7164)
@@ -21,15 +21,21 @@
package org.ajax4jsf.component;
+import javax.el.MethodExpression;
+
import javax.faces.component.UIOutput;
+import javax.faces.el.MethodBinding;
-import org.ajax4jsf.resource.ResourceComponent;
+import org.ajax4jsf.resource.ResourceComponent2;
+import org.richfaces.webapp.taglib.MethodBindingMethodExpressionAdaptor;
+import org.richfaces.webapp.taglib.MethodExpressionMethodBindingAdaptor;
+
/**
* @author shura
*
*/
-public abstract class UIMediaOutput extends UIOutput implements ResourceComponent {
+public abstract class UIMediaOutput extends UIOutput implements ResourceComponent2 {
public static final String COMPONENT_TYPE = "org.ajax4jsf.MMedia";
@@ -57,5 +63,47 @@
*/
public abstract void setElement(String newvalue);
+ /**
+ * Get EL binding to method in user bean to send resource. Method will
+ * called with two parameters - restored data object and servlet output
+ * stream.
+ *
+ * @return MethodBinding to createContent
+ */
+ public MethodBinding getCreateContent() {
+ MethodBinding result = null;
+ MethodExpression me = getCreateContentExpression();
+ if (me != null) {
+ // if the MethodExpression is an instance of our private
+ // wrapper class.
+ if (me.getClass().equals(MethodExpressionMethodBindingAdaptor.class)) {
+ result = ((MethodExpressionMethodBindingAdaptor) me).getBinding();
+ } else {
+ // otherwise, this is a real MethodExpression. Wrap it
+ // in a MethodBinding.
+ result = new MethodBindingMethodExpressionAdaptor(me);
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Set EL binding to method in user bean to send resource. Method will
+ * called with two parameters - restored data object and servlet output
+ * stream.
+ *
+ * @param newvalue - new value of createContent method binding
+ */
+ public void setCreateContent(MethodBinding newvalue) {
+ MethodExpressionMethodBindingAdaptor adapter;
+ if (newvalue != null) {
+ adapter = new MethodExpressionMethodBindingAdaptor(newvalue);
+ setCreateContentExpression(adapter);
+ } else {
+ setCreateContentExpression(null);
+ }
+ }
+
}
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/MediaOutputHandler.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/MediaOutputHandler.java 2008-03-25 13:29:47 UTC (rev 7163)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/MediaOutputHandler.java 2008-03-25 13:42:38 UTC (rev 7164)
@@ -109,9 +109,8 @@
* @see com.sun.facelets.tag.Metadata#applyMetadata(com.sun.facelets.FaceletContext, java.lang.Object)
*/
public void applyMetadata(FaceletContext ctx, Object instance) {
- ((UIMediaOutput) instance)
- .setCreateContent(this._send.getMethodExpression(ctx, null,
- MMEDIA_ACTION_SIG));
+ ((UIMediaOutput) instance).setCreateContentExpression(this._send.getMethodExpression(ctx, null,
+ MMEDIA_ACTION_SIG));
}
}
16 years, 9 months
JBoss Rich Faces SVN: r7163 - trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-03-25 09:29:47 -0400 (Tue, 25 Mar 2008)
New Revision: 7163
Modified:
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
RF-2738
Modified: trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
===================================================================
--- trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-03-25 12:35:03 UTC (rev 7162)
+++ trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-03-25 13:29:47 UTC (rev 7163)
@@ -432,7 +432,9 @@
if (p.getWidth() != 0) {
o.style.width = p.getWidth() + "px";
o.style.height = p.getHeight() + "px";
- p.onmouseover = p._onmouseover;
+ if (p._onmouseover) {
+ p.onmouseover = p._onmouseover;
+ }
}else {
p._onmouseover = p.onmouseover;
p.onmouseover = function () {this.initFileInput(); p._onmouseover(); }.bind(this);
16 years, 9 months
JBoss Rich Faces SVN: r7162 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-03-25 08:35:03 -0400 (Tue, 25 Mar 2008)
New Revision: 7162
Added:
trunk/docs/userguide/en/src/main/resources/images/inplaceInputClasses.png
Log:
http://jira.jboss.com/jira/browse/RF-1226
Image describing CSS classes usage
Added: trunk/docs/userguide/en/src/main/resources/images/inplaceInputClasses.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/inplaceInputClasses.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 9 months
JBoss Rich Faces SVN: r7161 - in trunk/samples/richfaces-demo/src/main/webapp/richfaces/progressBar: examples and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-03-25 07:59:57 -0400 (Tue, 25 Mar 2008)
New Revision: 7161
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/progressBar/examples/client.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/progressBar/examples/polling.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/progressBar/usage.xhtml
Log:
[RF-2659] Demo site: corrections of Progress Bar demo layout
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/progressBar/examples/client.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/progressBar/examples/client.xhtml 2008-03-25 11:13:59 UTC (rev 7160)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/progressBar/examples/client.xhtml 2008-03-25 11:59:57 UTC (rev 7161)
@@ -32,6 +32,6 @@
<h:outputText value="Process Done"/>
</f:facet>
</rich:progressBar>
- <button type="button" onclick="startProgress();">Start Progress</button>
+ <button type="button" onclick="startProgress();" style="margin: 9px 0px 5px;">Start Progress</button>
</h:form>
</ui:composition>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/progressBar/examples/polling.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/progressBar/examples/polling.xhtml 2008-03-25 11:13:59 UTC (rev 7160)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/progressBar/examples/polling.xhtml 2008-03-25 11:59:57 UTC (rev 7161)
@@ -4,18 +4,20 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
-
+
<h:form>
<h:outputText value="http://jira.jboss.com/jira/browse/RF-2364"/>
- <a4j:outputPanel id="progressPanel">
- <a4j:commandButton action="#{progressBarBean.startProcess}" value="startProcess" reRender="progressPanel" rendered="#{not progressBarBean.enabled}"/>
-
+ <a4j:outputPanel id="progressPanel">
+ <br/>
+ <a4j:commandButton action="#{progressBarBean.startProcess}" value="startProcess" reRender="progressPanel" rendered="#{not progressBarBean.enabled}" style="margin: 9px 0px 5px;"/>
<rich:progressBar value="#{progressBarBean.currentValue}" interval="2000"
- label="#{progressBarBean.currentValue} %" enabled="#{progressBarBean.enabled}">
- <f:facet name="initial">
+ label="#{progressBarBean.currentValue} %" enabled="#{progressBarBean.enabled}">
+ <f:facet name="initial">
+ <br/>
<h:outputText value="Process doesn't started yet"/>
</f:facet>
- <f:facet name="complete">
+ <f:facet name="complete">
+ <br/>
<h:outputText value="Process Done"/>
</f:facet>
</rich:progressBar>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/progressBar/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/progressBar/usage.xhtml 2008-03-25 11:13:59 UTC (rev 7160)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/progressBar/usage.xhtml 2008-03-25 11:59:57 UTC (rev 7161)
@@ -11,33 +11,26 @@
SHORT DESCRIPTION
</p>
- <p>
- Server Side
- </p>
-
- <div class="sample-container" >
-
- <ui:include src="/richfaces/progressBar/examples/polling.xhtml"/>
- <ui:include src="/templates/include/sourceview.xhtml">
- <ui:param name="sourcepath" value="/richfaces/progressBar/examples/polling.xhtml"/>
- </ui:include>
- </div>
-
- <p>
- Client Side
- </p>
+ <fieldset class="demo_fieldset">
+ <legend class="demo_legend">Server Side</legend>
+ <div class="sample-container" >
+ <ui:include src="/richfaces/progressBar/examples/polling.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath" value="/richfaces/progressBar/examples/polling.xhtml"/>
+ </ui:include>
+ </div>
+ </fieldset>
- <div class="sample-container" >
-
- <ui:include src="/richfaces/progressBar/examples/client.xhtml"/>
- <ui:include src="/templates/include/sourceview.xhtml">
- <ui:param name="sourcepath" value="/richfaces/progressBar/examples/client.xhtml"/>
- </ui:include>
- </div>
-
-
+ <fieldset class="demo_fieldset">
+ <legend class="demo_legend">Client Side</legend>
+ <div class="sample-container" >
+ <ui:include src="/richfaces/progressBar/examples/client.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath" value="/richfaces/progressBar/examples/client.xhtml"/>
+ </ui:include>
+ </div>
+ </fieldset>
</ui:define>
-
</ui:composition>
</html>
16 years, 9 months
JBoss Rich Faces SVN: r7160 - trunk/ui/toolBar/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: vbaranov
Date: 2008-03-25 07:13:59 -0400 (Tue, 25 Mar 2008)
New Revision: 7160
Modified:
trunk/ui/toolBar/src/main/java/org/richfaces/renderkit/html/ToolBarRendererBase.java
Log:
http://jira.jboss.com/jira/browse/RF-2443
Update styles of custom separator defined with facet.
Modified: trunk/ui/toolBar/src/main/java/org/richfaces/renderkit/html/ToolBarRendererBase.java
===================================================================
--- trunk/ui/toolBar/src/main/java/org/richfaces/renderkit/html/ToolBarRendererBase.java 2008-03-25 11:07:05 UTC (rev 7159)
+++ trunk/ui/toolBar/src/main/java/org/richfaces/renderkit/html/ToolBarRendererBase.java 2008-03-25 11:13:59 UTC (rev 7160)
@@ -137,7 +137,7 @@
boolean isSeparatorFacetRendered = (separatorFacet != null) ? separatorFacet.isRendered() : false;
if (isSeparatorFacetRendered) {
writer.startElement(HTML.td_ELEM, component);
- writer.writeAttribute(HTML.align_ATTRIBUTE, "center", null);
+ writer.writeAttribute(HTML.class_ATTRIBUTE, "rich-toolbar-separator", null);
renderChild(context, separatorFacet);
writer.endElement(HTML.td_ELEM);
}
16 years, 9 months
JBoss Rich Faces SVN: r7159 - in trunk/ui: scrollableDataTable/src/main/javascript/ClientUI/controls/grid and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-03-25 07:07:05 -0400 (Tue, 25 Mar 2008)
New Revision: 7159
Modified:
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js
Log:
http://jira.jboss.com/jira/browse/RF-1604
Modified: trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2008-03-25 10:34:11 UTC (rev 7158)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2008-03-25 11:07:05 UTC (rev 7159)
@@ -1126,6 +1126,10 @@
}
},
+
+ collapse: function() {
+ this.doCollapse();
+ },
doExpand: function(e) {
this.skipEventOnCollapse = false;
@@ -1189,10 +1193,18 @@
Event.observe(window.document, "click", this.eventOnCollapse, false);
}
},
+
+ expand: function(e) {
+ this.doExpand(e);
+ },
doSwitch: function(e) {
this.isVisible ? this.doCollapse() : this.doExpand(e);
},
+
+ switchState: function(e) {
+ this.doSwitch(e);
+ },
eventOnCollapse: function (e) {
if (this.skipEventOnCollapse)
@@ -2289,4 +2301,4 @@
applyControl: CalendarView.applyControl,
timeEditorFields: CalendarView.timeEditorFields,
timeEditorLayout: CalendarView.timeEditorLayout
-});
\ No newline at end of file
+});
Modified: trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js
===================================================================
--- trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2008-03-25 10:34:11 UTC (rev 7158)
+++ trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2008-03-25 11:07:05 UTC (rev 7159)
@@ -97,6 +97,10 @@
this.hideColumn(index, frozen);
}
},
+
+ collapse: function(index) {
+ this.doCollapse(index);
+ },
hideColumn: function(index, frozen) {
this.getHeader().hideColumn(index, frozen);
@@ -104,4 +108,4 @@
if(this.getFooter()) {this.getFooter().hideColumn(index, frozen);}
this.updateLayout();
}
-});
\ No newline at end of file
+});
16 years, 9 months