JBoss Rich Faces SVN: r17206 - root/ui/misc/trunk/ui/src/main/java/org/richfaces/function.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-05-24 09:58:27 -0400 (Mon, 24 May 2010)
New Revision: 17206
Modified:
root/ui/misc/trunk/ui/src/main/java/org/richfaces/function/RichFunction.java
Log:
Changed component lookup function in RichFunction
Modified: root/ui/misc/trunk/ui/src/main/java/org/richfaces/function/RichFunction.java
===================================================================
--- root/ui/misc/trunk/ui/src/main/java/org/richfaces/function/RichFunction.java 2010-05-24 13:28:11 UTC (rev 17205)
+++ root/ui/misc/trunk/ui/src/main/java/org/richfaces/function/RichFunction.java 2010-05-24 13:58:27 UTC (rev 17206)
@@ -76,7 +76,7 @@
String element = element(id);
if (element != null) {
//TODO nick - what if jQuery.RichFaces doesn't exist?
- return "jQuery.RichFaces.$(" + clientId(id) + ")";
+ return "RichFaces.$(" + clientId(id) + ")";
}
return null;
14 years, 1 month
JBoss Rich Faces SVN: r17205 - root/core/trunk/impl/src/main/java/org/richfaces/resource.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-05-24 09:28:11 -0400 (Mon, 24 May 2010)
New Revision: 17205
Modified:
root/core/trunk/impl/src/main/java/org/richfaces/resource/DefaultResourceCodec.java
Log:
Fixed wrong request parameter encoding in DefaultResourceCodec#getResourceKey(...) method
Modified: root/core/trunk/impl/src/main/java/org/richfaces/resource/DefaultResourceCodec.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/resource/DefaultResourceCodec.java 2010-05-24 12:33:38 UTC (rev 17204)
+++ root/core/trunk/impl/src/main/java/org/richfaces/resource/DefaultResourceCodec.java 2010-05-24 13:28:11 UTC (rev 17205)
@@ -68,7 +68,9 @@
return context.getExternalContext().getRequestParameterMap().get(RESOURCE_VERSION_PARAM);
}
- public String encodeResource(FacesContext context, String resourceName, Object resourceData, String resourceVersion) {
+ private String encodeResource(FacesContext context, String resourceName, String encodedResourceData,
+ boolean dataIsBytesArray, String resourceVersion) {
+
boolean parameterAppended = false;
StringBuilder sb = new StringBuilder();
@@ -85,45 +87,50 @@
sb.append(Util.encodeURIQueryPart(resourceVersion));
}
+ if (encodedResourceData != null && encodedResourceData.length() != 0) {
+ if (!parameterAppended) {
+ sb.append('?');
+ parameterAppended = true;
+ } else {
+ sb.append('&');
+ }
+
+ sb.append(dataIsBytesArray ? RESOURCE_DATA_BYTES_ARRAY_PARAM : RESOURCE_DATA_OBJECT_PARAM);
+ sb.append('=');
+ sb.append(Util.encodeURIQueryPart(encodedResourceData));
+ }
+
+ return sb.toString();
+ }
+
+ public String encodeResource(FacesContext context, String resourceName, Object resourceData, String resourceVersion) {
+ String encodedDataString = null;
+ boolean isBytesArray = false;
if (resourceData != null) {
- String encodedDataString = null;
- boolean isBytesArray = false;
-
if (resourceData instanceof byte[]) {
isBytesArray = true;
encodedDataString = Util.encodeBytesData((byte[]) resourceData);
} else {
encodedDataString = Util.encodeObjectData(resourceData);
}
-
- if (encodedDataString != null) {
- if (!parameterAppended) {
- sb.append('?');
- parameterAppended = true;
- } else {
- sb.append('&');
- }
-
- sb.append(isBytesArray ? RESOURCE_DATA_BYTES_ARRAY_PARAM : RESOURCE_DATA_OBJECT_PARAM);
- sb.append('=');
- sb.append(Util.encodeURIQueryPart(encodedDataString));
- }
}
- return sb.toString();
+ return encodeResource(context, resourceName, encodedDataString, isBytesArray, resourceVersion);
}
public String getResourceKey(FacesContext context, String requestPath) {
Map<String, String> paramMap = context.getExternalContext().getRequestParameterMap();
+ boolean isBytesArray = true;
String resourceDataString = paramMap.get(RESOURCE_DATA_BYTES_ARRAY_PARAM);
if (resourceDataString == null) {
resourceDataString = paramMap.get(RESOURCE_DATA_OBJECT_PARAM);
+ isBytesArray = false;
}
String resourceVersionString = paramMap.get(RESOURCE_VERSION_PARAM);
return encodeResource(context, decodeResourceName(context, requestPath),
- resourceDataString, resourceVersionString);
+ resourceDataString, isBytesArray, resourceVersionString);
}
}
14 years, 1 month
JBoss Rich Faces SVN: r17204 - root/core/trunk/impl/src/main/resources/META-INF/resources.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2010-05-24 08:33:38 -0400 (Mon, 24 May 2010)
New Revision: 17204
Modified:
root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-queue.js
Log:
Modified: root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-queue.js
===================================================================
--- root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-queue.js 2010-05-24 11:23:59 UTC (rev 17203)
+++ root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-queue.js 2010-05-24 12:33:38 UTC (rev 17204)
@@ -85,8 +85,25 @@
this.queueOptions = defaultQueueOptions[id] || {};
if (this.queueOptions.queueId) {
this.queueOptions = $.extend({}, (defaultQueueOptions[this.queueOptions.queueId]||{}), this.queueOptions);
+ } else {
+ // TODO: clean duplicated code
+ var element = richfaces.getDomElement(source);
+ var form;
+ if (element) {
+ element = $(element).closest("form");
+ if (element.length>0) {
+ form = element.get(0);
+ }
+ }
+ if (form && form.id && defaultQueueOptions[form.id]) {
+ id = form.id;
+ } else {
+ id = DEFAULT_QUEUE_ID;
+ }
+ if (id) {
+ this.queueOptions = $.extend({}, (defaultQueueOptions[id]||{}), this.queueOptions);
+ }
}
-
}
this.event = event;
14 years, 1 month
JBoss Rich Faces SVN: r17203 - in root/examples/richfaces-showcase/trunk/src/main: webapp/templates and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-05-24 07:23:59 -0400 (Mon, 24 May 2010)
New Revision: 17203
Added:
root/examples/richfaces-showcase/trunk/src/main/webapp/templates/includes/skin-chooser.xhtml
Modified:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/SkinBean.java
root/examples/richfaces-showcase/trunk/src/main/webapp/templates/main.xhtml
Log:
https://jira.jboss.org/browse/RF-8374
bookmarkable skin-chooser added and working.
Modified: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/SkinBean.java
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/SkinBean.java 2010-05-24 11:14:21 UTC (rev 17202)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/SkinBean.java 2010-05-24 11:23:59 UTC (rev 17203)
@@ -4,33 +4,67 @@
package org.richfaces.demo.common;
import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.SessionScoped;
+import javax.faces.context.FacesContext;
-
/**
* @author ishaikovsky
*/
-@ManagedBean(name="skinBean")
+@ManagedBean(name = "skinBean")
@SessionScoped
public class SkinBean implements Serializable {
/**
*
*/
private static final long serialVersionUID = -2399884208294434812L;
-
- @ManagedProperty(value="blueSky")
+ private static final String SKIN_VIEW_PARAMETER = "skin";
+ @ManagedProperty(value = "blueSky")
private String skin;
+ private List<String> skins;
+ @PostConstruct
+ public void initialize() {
+ skins = new ArrayList<String>();
+ skins.add("blueSky");
+ skins.add("classic");
+ skins.add("deepMarine");
+ skins.add("emeraldTown");
+ skins.add("japanCherry");
+ skins.add("ruby");
+ skins.add("wine");
+ }
+
+ // TODO: move to utility class. used in navigator also.
+ private String getViewParameter(String name) {
+ FacesContext fc = FacesContext.getCurrentInstance();
+ String param = (String) fc.getExternalContext().getRequestParameterMap().get(name);
+ if (param != null && param.trim().length() > 0) {
+ return param;
+ } else {
+ return null;
+ }
+ }
+
public String getSkin() {
+ String currentSkin = getViewParameter(SKIN_VIEW_PARAMETER);
+ if (currentSkin != null){
+ skin = currentSkin;
+ }
return skin;
}
-
public void setSkin(String skin) {
this.skin = skin;
}
+ public List<String> getSkins() {
+ return skins;
+ }
+
}
Added: 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 (rev 0)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/templates/includes/skin-chooser.xhtml 2010-05-24 11:23:59 UTC (rev 17203)
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://java.sun.com/jsf/composite/rich">
+
+ <ui:composition>
+ <rich:panel>
+ <a4j:repeat var="skin" value="#{skinBean.skins}">
+ <h:link value="#{skin}" includeViewParams="true">
+ <f:param name="skin" value="#{skin}"/>
+ </h:link>
+ <h:outputText value = " | "/>
+ </a4j:repeat>
+ </rich:panel>
+ </ui:composition>
+
+</html>
\ No newline at end of file
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/templates/main.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/templates/main.xhtml 2010-05-24 11:14:21 UTC (rev 17202)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/templates/main.xhtml 2010-05-24 11:23:59 UTC (rev 17203)
@@ -40,7 +40,7 @@
<legend>#{demoNavigator.currentComponent}</legend>
</fieldset>
</ui:remove>
-
+ <ui:include src="/templates/includes/skin-chooser.xhtml"/>
<ui:insert name="body">
Body content missed
</ui:insert></td>
14 years, 1 month
JBoss Rich Faces SVN: r17202 - root/core/trunk/impl/src/main/resources/META-INF/resources.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2010-05-24 07:14:21 -0400 (Mon, 24 May 2010)
New Revision: 17202
Modified:
root/core/trunk/impl/src/main/resources/META-INF/resources/skinning_classes.ecss
Log:
https://jira.jboss.org/browse/RF-8673
style class renaming
Modified: root/core/trunk/impl/src/main/resources/META-INF/resources/skinning_classes.ecss
===================================================================
--- root/core/trunk/impl/src/main/resources/META-INF/resources/skinning_classes.ecss 2010-05-24 10:12:09 UTC (rev 17201)
+++ root/core/trunk/impl/src/main/resources/META-INF/resources/skinning_classes.ecss 2010-05-24 11:14:21 UTC (rev 17202)
@@ -1,74 +1,82 @@
+/*
+selector names conversion:
+.rich- -> .rfs-
+-button -> -btn
+-text -> -txt
+-container -> -ctn
+*/
+
/* basic skinning styles */
-.rich-container input, .rich-input, .rich-container select, .rich-select,
-.rich-container textarea, .rich-textarea, .rich-container button, .rich-button,
-.rich-container keygen, .rich-keygen,.rich-container isindex, .rich-isindex,
-.rich-container legend, .rich-legend,.rich-container a, .rich-link,
-.rich-container fieldset, .rich-fieldset,.rich-field, .rich-field-edit, .rich-field-error,
-.rich-button, .rich-button-disabled, .rich-button-over, .rich-button-press {
+.rfs-ctn input, .rfs-input, .rfs-ctn select, .rfs-select,
+.rfs-ctn textarea, .rfs-textarea, .rfs-ctn button, .rfs-btn,
+.rfs-ctn keygen, .rfs-keygen,.rfs-ctn isindex, .rfs-isindex,
+.rfs-ctn legend, .rfs-legend,.rfs-ctn a, .rfs-link,
+.rfs-ctn fieldset, .rfs-fieldset,.rfs-field, .rfs-field-edit, .rfs-field-error,
+.rfs-btn, .rfs-btn-disabled, .rfs-btn-over, .rfs-btn-press {
font-size : '#{richSkin.generalSizeFont}';
font-family : '#{richSkin.generalFamilyFont}';
color : '#{richSkin.controlTextColor}';
}
-.rich-container fieldset, .rich-fieldset {
+.rfs-ctn fieldset, .rfs-fieldset {
border-width: 1px;
border-style: solid;
padding: 10px;
}
-.rich-container hr, .rich-hr {
+.rfs-ctn hr, .rfs-hr {
border-width: 1px;
border-style: solid;
}
-.rich-container legend, .rich-legend {
+.rfs-ctn legend, .rfs-legend {
font-weight : bold;
}
-.rich-container form, .rich-form {
+.rfs-ctn form, .rfs-form {
padding : 0px;
margin : 0px;
}
-.rich-container fieldset, .rich-fieldset{
+.rfs-ctn fieldset, .rfs-fieldset{
border-color : '#{richSkin.panelBorderColor}';
}
-.rich-container hr, .rich-hr{
+.rfs-ctn hr, .rfs-hr{
border-color : '#{richSkin.panelBorderColor}';
}
-.rich-container a, .rich-link{
+.rfs-ctn a, .rfs-link{
color: '#{richSkin.generalLinkColor}';
}
-.rich-container a:hover, .rich-link:hover{
+.rfs-ctn a:hover, .rfs-link:hover{
color : '#{richSkin.hoverLinkColor}';
}
-.rich-container a:visited, .rich-link:visited{
+.rfs-ctn a:visited, .rfs-link:visited{
color : '#{richSkin.visitedLinkColor}';
}
-.rich-field, .rich-field-edit, .rich-field-error{
+.rfs-field, .rfs-field-edit, .rfs-field-error{
border-width: 1px;
border-style: inset;
border-color: '#{richSkin.panelBorderColor}';
}
-.rich-field{
+.rfs-field{
background-color : '#{richSkin.controlBackgroundColor}';
background-image : "url(#{resource['org.richfaces.renderkit.html.images.ButtonBackgroundImage']})";
background-repeat : no-repeat;
background-position : 1px 1px;
}
-.rich-field-edit{
+.rfs-field-edit{
background-color : '#{richSkin.editBackgroundColor}';
}
-.rich-field-error{
+.rfs-field-error{
background-color : '#{richSkin.warningBackgroundColor}';
background-image : "url(#{resource['org.richfaces.renderkit.html.images.InputErrorIcon']})";
background-repeat : no-repeat;
@@ -76,7 +84,7 @@
padding-left : 7px;
}
-.rich-button, .rich-button-disabled, .rich-button-over, .rich-button-press{
+.rfs-btn, .rfs-btn-disabled, .rfs-btn-over, .rfs-btn-press{
border-width : 1px;
border-style : solid;
border-color : '#{richSkin.panelBorderColor}';
@@ -88,216 +96,216 @@
background-position : top left;
}
-.rich-button{
+.rfs-btn{
background-image : "url(#{resource['org.richfaces.renderkit.html.images.StandardButtonBgImage']})";
}
-.rich-button-disabled{
+.rfs-btn-disabled{
background-image : "url(#{resource['org.richfaces.renderkit.html.images.StandardButtonBgImage']})";
}
-.rich-button-over{
+.rfs-btn-over{
background-image : "url(#{resource['org.richfaces.renderkit.html.images.StandardButtonBgImage']})";
}
-.rich-button-press{
+.rfs-btn-press{
background-image : "url(#{resource['org.richfaces.renderkit.html.images.StandardButtonPressedBgImage']})";
background-position : bottom left;
}
/*border color styles*/
-.rich-box-border-color-control-select{
+.rfs-box-border-color-control-select{
border-color : '#{richSkin.selectControlColor}';
}
-.rich-box-border-color-subborder{
+.rfs-box-border-color-subborder{
border-color : '#{richSkin.subBorderColor}';
}
-.rich-box-border-color-header{
+.rfs-box-border-color-header{
border-color : '#{richSkin.headerBackgroundColor}';
}
-.rich-box-border-color-general{
+.rfs-box-border-color-general{
border-color : '#{richSkin.generalBackgroundColor}';
}
-.rich-box-border-color-additional{
+.rfs-box-border-color-additional{
border-color : '#{richSkin.additionalBackgroundColor}';
}
-.rich-box-border-color-panel{
+.rfs-box-border-color-panel{
border-color : '#{richSkin.panelBorderColor}';
}
-.rich-box-border-color-tip{
+.rfs-box-border-color-tip{
border-color : '#{richSkin.tipBorderColor}';
}
-.rich-box-border-color-table{
+.rfs-box-border-color-table{
border-color : '#{richSkin.tableBorderColor}';
}
-.rich-box-border-control-select, .rich-box-border-subborder, .rich-box-border-header,
- .rich-box-border-general, .rich-box-border-additional, .rich-box-border-panel, .rich-box-border-tip, .rich-box-border-table{
+.rfs-box-border-control-select, .rfs-box-border-subborder, .rfs-box-border-header,
+ .rfs-box-border-general, .rfs-box-border-additional, .rfs-box-border-panel, .rfs-box-border-tip, .rfs-box-border-table{
border-style : solid;
border-width : 1px;
}
-.rich-box-border-control-select{
+.rfs-box-border-control-select{
border-color : '#{richSkin.selectControlColor}';
}
-.rich-box-border-subborder{
+.rfs-box-border-subborder{
border-color : '#{richSkin.subBorderColor}';
}
-.rich-box-border-header{
+.rfs-box-border-header{
border-color : '#{richSkin.headerBackgroundColor}';
}
-.rich-box-border-general{
+.rfs-box-border-general{
border-color : '#{richSkin.generalBackgroundColor}';
}
-.rich-box-border-additional{
+.rfs-box-border-additional{
border-color : '#{richSkin.additionalBackgroundColor}';
}
-.rich-box-border-panel{
+.rfs-box-border-panel{
border-color : '#{richSkin.panelBorderColor}';
}
-.rich-box-border-tip{
+.rfs-box-border-tip{
border-color : '#{richSkin.tipBorderColor}';
}
-.rich-box-border-table{
+.rfs-box-border-table{
border-color : '#{richSkin.tableBorderColor}';
}
/*background color styles*/
-.rich-box-bgcolor-header{
+.rfs-box-bgcolor-header{
background-color : '#{richSkin.headerBackgroundColor}';
}
-.rich-box-bgcolor-general{
+.rfs-box-bgcolor-general{
background-color : '#{richSkin.generalBackgroundColor}';
}
-.rich-box-bgcolor-additional{
+.rfs-box-bgcolor-additional{
background-color : '#{richSkin.additionalBackgroundColor}';
}
-.rich-box-bgcolor-panel{
+.rfs-box-bgcolor-panel{
background-color : '#{richSkin.panelBorderColor}';
}
-.rich-box-bgcolor-tab{
+.rfs-box-bgcolor-tab{
background-color : '#{richSkin.tabBackgroundColor}';
}
-.rich-box-bgcolor-trim{
+.rfs-box-bgcolor-trim{
background-color : '#{richSkin.trimColor}';
}
-.rich-box-bgcolor-tip{
+.rfs-box-bgcolor-tip{
background-color : '#{richSkin.tipBackgroundColor}';
}
-.rich-box-bgcolor-table{
+.rfs-box-bgcolor-table{
background-color : '#{richSkin.tableBackgroundColor}';
}
-.rich-box-bgcolor-table-footer{
+.rfs-box-bgcolor-table-footer{
background-color : '#{richSkin.tableFooterBackgroundColor}';
}
-.rich-box-bgcolor-table-subfooter{
+.rfs-box-bgcolor-table-subfooter{
background-color : '#{richSkin.tableSubfooterBackgroundColor}';
}
-.rich-box-bgcolor-editor{
+.rfs-box-bgcolor-editor{
background-color : '#{richSkin.editorBackgroundColor}';
}
-.rich-box-bgcolor-edit{
+.rfs-box-bgcolor-edit{
background-color : '#{richSkin.editBackgroundColor}';
}
/*text color styles*/
-.rich-text-color-header{
+.rfs-txt-color-header{
color : '#{richSkin.headerTextColor}';
}
-.rich-text-color-general{
+.rfs-txt-color-general{
color : '#{richSkin.generalTextColor}';
}
-.rich-text-color-tab-disabled{
+.rfs-txt-color-tab-disabled{
color : '#{richSkin.tabDisabledTextColor}';
}
-.rich-text-color-select{
+.rfs-txt-color-select{
color : '#{richSkin.selectControlColor}';
}
-.rich-text-color-link-general{
+.rfs-txt-color-link-general{
color : '#{richSkin.generalLinkColor}';
}
-.rich-text-color-link-hover{
+.rfs-txt-color-link-hover{
color : '#{richSkin.hoverLinkColor}';
}
-.rich-text-color-link-visited{
+.rfs-txt-color-link-visited{
color : '#{richSkin.visitedLinkColor}';
}
/*font size styles*/
-.rich-font-size-general{
+.rfs-font-size-general{
font-size : '#{richSkin.generalSizeFont}';
}
-.rich-font-size-header{
+.rfs-font-size-header{
font-size : '#{richSkin.headerSizeFont}';
}
/*font family styles*/
-.rich-font-family-general{
+.rfs-font-family-general{
font-family : '#{richSkin.generalFamilyFont}';
}
-.rich-font-family-header{
+.rfs-font-family-header{
font-family : '#{richSkin.headerFamilyFont}';
}
/* text styles */
-.rich-text-general{
+.rfs-txt-general{
font-size : '#{richSkin.generalSizeFont}';
font-family : '#{richSkin.generalFamilyFont}';
color : '#{richSkin.generalTextColor}';
}
-.rich-text-header{
+.rfs-txt-header{
font-size : '#{richSkin.generalSizeFont}';
font-family : '#{richSkin.headerFamilyFont}';
color : '#{richSkin.headerTextColor}';
}
-.rich-text-tab-disabled{
+.rfs-txt-tab-disabled{
font-size : '#{richSkin.generalSizeFont}';
font-family : '#{richSkin.generalFamilyFont}';
color : '#{richSkin.tabDisabledTextColor}';
}
-.rich-text-control-select{
+.rfs-txt-control-select{
font-size : '#{richSkin.generalSizeFont}';
font-family : '#{richSkin.headerFamilyFont}';
color: '#{richSkin.selectControlColor}';
@@ -305,71 +313,71 @@
/*gradient styles*/
-.rich-gradient-header-inverse{
+.rfs-gradient-header-inverse{
background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.HeaderInverseGradientImage']})";
background-repeat : repeat-x;
}
-.rich-gradient-header{
+.rfs-gradient-header{
background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.HeaderGradientImage']})";
background-repeat : repeat-x;
}
-.rich-gradient-tab{
+.rfs-gradient-tab{
background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.TabGradientImage']})";
background-repeat : repeat-x;
}
-.rich-gradient-tab-inverse{
+.rfs-gradient-tab-inverse{
background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.TabInverseGradientImage']})";
background-repeat : repeat-x;
}
-.rich-gradient-input{
+.rfs-gradient-input{
background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.InputGradientImage']})";
background-repeat : repeat-x;
}
-.rich-gradient-menu-inverse{
+.rfs-gradient-menu-inverse{
background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.MenuInverseGradientImage']})";
background-repeat : repeat-x;
}
-.rich-gradient-menu{
+.rfs-gradient-menu{
background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.MenuGradientImage']})";
background-repeat : repeat-x;
}
-.rich-gradient-button-inverse{
+.rfs-gradient-btn-inverse{
background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.ButtonInverseGradientImage']})";
background-repeat : repeat-x;
}
-.rich-gradient-button{
+.rfs-gradient-btn{
background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.ButtonGradientImage']})";
background-repeat : repeat-x;
}
/* extended skinning styles */
-.rich-container input, .rich-input,
-.rich-container select, .rich-select,
-.rich-container textarea, .rich-textarea,
-.rich-container button, .rich-button,
-.rich-container keygen, .rich-keygen,
-.rich-container isindex, .rich-isindex {
+.rfs-ctn input, .rfs-input,
+.rfs-ctn select, .rfs-select,
+.rfs-ctn textarea, .rfs-textarea,
+.rfs-ctn button, .rfs-btn,
+.rfs-ctn keygen, .rfs-keygen,
+.rfs-ctn isindex, .rfs-isindex {
border-width:1px;
border-color:'#{richSkin.panelBorderColor}';
color:'#{richSkin.controlTextColor}';
}
-.rich-container button, .rich-button,
-.rich-button-button,
-.rich-button-reset,
-.rich-button-submit,
-.rich-container input[type="reset"], .rich-input-reset,
-.rich-container input[type="submit"], .rich-input-submit,
-.rich-container input[type="button"], .rich-input-button {
+.rfs-ctn button, .rfs-btn,
+.rfs-btn-btn,
+.rfs-btn-reset,
+.rfs-btn-submit,
+.rfs-ctn input[type="reset"], .rfs-input-reset,
+.rfs-ctn input[type="submit"], .rfs-input-submit,
+.rfs-ctn input[type="button"], .rfs-input-btn {
border-width: 1px;
border-color:'#{richSkin.panelBorderColor}';
@@ -383,13 +391,13 @@
color:'#{richSkin.headerTextColor}';
}
-.rich-container button[disabled], .rich-button-disabled,
-.rich-button-button-disabled,
-.rich-button-reset-disabled,
-.rich-button-submit-disabled,
-.rich-container input[type="reset"][disabled], .rich-input-reset-disabled,
-.rich-container input[type="submit"][disabled], .rich-input-submit-disabled,
-.rich-container input[type="button"][disabled], .rich-input-button-disabled {
+.rfs-ctn button[disabled], .rfs-btn-disabled,
+.rfs-btn-btn-disabled,
+.rfs-btn-reset-disabled,
+.rfs-btn-submit-disabled,
+.rfs-ctn input[type="reset"][disabled], .rfs-input-reset-disabled,
+.rfs-ctn input[type="submit"][disabled], .rfs-input-submit-disabled,
+.rfs-ctn input[type="button"][disabled], .rfs-input-btn-disabled {
color:'#{richSkin.tabDisabledTextColor}';
background-color:'#{richSkin.tableFooterBackgroundColor}';
border-color:'#{richSkin.tableFooterBackgroundColor}';
@@ -397,11 +405,11 @@
}
-.rich-container textarea, .rich-textarea,
-.rich-textarea-textarea,
-.rich-container input[type="text"], .rich-input-text,
-.rich-container input[type="password"], .rich-input-password,
-.rich-container select, .rich-select {
+.rfs-ctn textarea, .rfs-textarea,
+.rfs-textarea-textarea,
+.rfs-ctn input[type="text"], .rfs-input-txt,
+.rfs-ctn input[type="password"], .rfs-input-password,
+.rfs-ctn select, .rfs-select {
border-width: 1px;
border-style : inset;
border-color:'#{richSkin.panelBorderColor}';
@@ -416,10 +424,10 @@
color:'#{richSkin.controlTextColor}';
}
-.rich-container textarea[disabled], .rich-textarea-disabled,
-.rich-textarea-textarea-disabled,
-.rich-container input[type="text"][disabled], .rich-input-text-disabled,
-.rich-container input[type="password"][disabled], .rich-input-password-disabled,
-.rich-container select[disabled], .rich-select-disabled {
+.rfs-ctn textarea[disabled], .rfs-textarea-disabled,
+.rfs-textarea-textarea-disabled,
+.rfs-ctn input[type="text"][disabled], .rfs-input-txt-disabled,
+.rfs-ctn input[type="password"][disabled], .rfs-input-password-disabled,
+.rfs-ctn select[disabled], .rfs-select-disabled {
color:'#{richSkin.panelBorderColor}';
}
\ No newline at end of file
14 years, 1 month
JBoss Rich Faces SVN: r17201 - in root/cdk/trunk/plugins: generator/src/main/java/org/richfaces/cdk/apt/processors and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2010-05-24 06:12:09 -0400 (Mon, 24 May 2010)
New Revision: 17201
Modified:
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Event.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/processors/ComponentProcessor.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/processors/JsfSubComponent.java
Log:
fix checkstyle
Modified: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Event.java
===================================================================
--- root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Event.java 2010-05-24 09:59:25 UTC (rev 17200)
+++ root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Event.java 2010-05-24 10:12:09 UTC (rev 17201)
@@ -23,15 +23,13 @@
package org.richfaces.cdk.annotations;
+import javax.faces.event.FacesListener;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
-import javax.faces.event.FacesEvent;
-import javax.faces.event.FacesListener;
-
/**
* <p class="changed_added_4_0">
* This annotation tells CDK to generate event-related classes:
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/processors/ComponentProcessor.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/processors/ComponentProcessor.java 2010-05-24 09:59:25 UTC (rev 17200)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/processors/ComponentProcessor.java 2010-05-24 10:12:09 UTC (rev 17201)
@@ -37,7 +37,6 @@
import javax.lang.model.type.TypeMirror;
import org.richfaces.cdk.CdkException;
-import org.richfaces.cdk.annotations.Event;
import org.richfaces.cdk.annotations.Facet;
import org.richfaces.cdk.annotations.JsfComponent;
import org.richfaces.cdk.annotations.JsfRenderer;
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/processors/JsfSubComponent.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/processors/JsfSubComponent.java 2010-05-24 09:59:25 UTC (rev 17200)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/processors/JsfSubComponent.java 2010-05-24 10:12:09 UTC (rev 17201)
@@ -27,7 +27,6 @@
import javax.faces.event.FacesEvent;
import org.richfaces.cdk.annotations.Description;
-import org.richfaces.cdk.annotations.Event;
import org.richfaces.cdk.annotations.Facet;
import org.richfaces.cdk.annotations.JsfComponent;
import org.richfaces.cdk.annotations.JsfRenderer;
14 years, 1 month
JBoss Rich Faces SVN: r17200 - in root/examples/richfaces-showcase/trunk/src/main: java/org/richfaces/demo/tables/filter and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-05-24 05:59:25 -0400 (Mon, 24 May 2010)
New Revision: 17200
Modified:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/region/RegionBean.java
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/filter/CarsFilteringBean.java
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/region/region.xhtml
Log:
checkstyle corrections
Modified: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/region/RegionBean.java
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/region/RegionBean.java 2010-05-24 09:37:30 UTC (rev 17199)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/region/RegionBean.java 2010-05-24 09:59:25 UTC (rev 17200)
@@ -3,7 +3,6 @@
import java.io.Serializable;
import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ManagedProperty;
import javax.faces.bean.ViewScoped;
import org.richfaces.demo.common.UserBean;
Modified: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/filter/CarsFilteringBean.java
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/filter/CarsFilteringBean.java 2010-05-24 09:37:30 UTC (rev 17199)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/filter/CarsFilteringBean.java 2010-05-24 09:59:25 UTC (rev 17200)
@@ -10,7 +10,7 @@
@ManagedBean
@ViewScoped
-public class CarsFilteringBean implements Serializable{
+public class CarsFilteringBean implements Serializable {
/**
*
*/
@@ -30,10 +30,10 @@
}
};
}
-
- public boolean acceptVendor(InventoryItem item){
- String vendor = getVendorFilter();
- if (vendor ==null || vendor.length()==0 || vendor.equals(item.getVendor())){
+
+ public boolean acceptVendor(InventoryItem item) {
+ String vendor = getVendorFilter();
+ if (vendor == null || vendor.length() == 0 || vendor.equals(item.getVendor())) {
return true;
}
return false;
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/region/region.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/region/region.xhtml 2010-05-24 09:37:30 UTC (rev 17199)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/region/region.xhtml 2010-05-24 09:59:25 UTC (rev 17200)
@@ -7,14 +7,14 @@
xmlns:rich="http://java.sun.com/jsf/composite/rich">
<ui:composition>
- <p>a4j:region component designed for marking zones which should be
+ <p><b>a4j:region</b> component designed for marking zones which should be
processed during Ajax requests without using execute definitions at
Ajax behaviors/components. This allow to decouple the processing definitions from components id's
and use declarative wrapping by this tag instead.</p>
- <p>In RichFaces 3.3 all the view was processed
- if no regions specified as View Root itself was region by default. And in 4.x -
- all the controls has execute="@this" by default according to JSF 2 specifications. But if the controls
- wrapped with region component and has no execute definitions - them uses execute="@region"</p>
+ <p>In <b>RichFaces 3.3</b> all the view was processed
+ if no regions specified as <b>ViewRoot itself was region by default</b>. And in <b>RichFaces 4.x</b> -
+ all the controls has <b>execute="@this" by default</b> according to JSF 2 specifications. But if the <b>controls
+ wrapped with a4j:region</b> component and has no execute definitions - them uses<b> execute="@region"</b></p>
<p>
Look to the simple example bellow. There are two similar user info panels. But the ajax behaviors inside the
first panel uses execute declarations and pointed to panelGrid id. And the second panel inputs just wrapped
@@ -76,6 +76,6 @@
</rich:panel>
</h:panelGrid>
</h:form>
- <a4j:log />
+
</ui:composition>
</html>
\ No newline at end of file
14 years, 1 month
JBoss Rich Faces SVN: r17199 - in root/examples/richfaces-showcase/trunk/src/main: java/org/richfaces/demo/common and 11 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-05-24 05:37:30 -0400 (Mon, 24 May 2010)
New Revision: 17199
Added:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/region/
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/region/RegionBean.java
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/CapitalsBean.java
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/CarsBean.java
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/filter/
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/filter/CarsFilteringBean.java
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableFiltering.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableFilteringAPI.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableSorting.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/region/
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/region/region.xhtml
Removed:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/capitals/CapitalsBean.java
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/CarsBean.java
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/subtables.xhtml
Modified:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/UserBean.java
root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml
root/examples/richfaces-showcase/trunk/src/main/webapp/WEB-INF/web.xml
root/examples/richfaces-showcase/trunk/src/main/webapp/resources/rich/panel.xhtml
Log:
https://jira.jboss.org/browse/RF-8291
https://jira.jboss.org/browse/RF-8298
Modified: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/UserBean.java
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/UserBean.java 2010-05-24 06:41:57 UTC (rev 17198)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/UserBean.java 2010-05-24 09:37:30 UTC (rev 17199)
@@ -1,12 +1,13 @@
package org.richfaces.demo.common;
import javax.faces.bean.ManagedBean;
-import javax.faces.bean.RequestScoped;
+import javax.faces.bean.ViewScoped;
@ManagedBean(name = "userBean")
-@RequestScoped
+@ViewScoped
public class UserBean {
private String name = "";
+ private String email = "";
private String password = "";
private String address;
private Integer age;
@@ -23,6 +24,14 @@
this.recordStatus = "User " + this.name + " stored succesfully";
}
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
public String getRecordStatus() {
return recordStatus;
}
Added: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/region/RegionBean.java
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/region/RegionBean.java (rev 0)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/region/RegionBean.java 2010-05-24 09:37:30 UTC (rev 17199)
@@ -0,0 +1,42 @@
+package org.richfaces.demo.region;
+
+import java.io.Serializable;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ManagedProperty;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.demo.common.UserBean;
+
+@ManagedBean
+@ViewScoped
+public class RegionBean implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -3844974441732156513L;
+ private UserBean user1;
+ private UserBean user2;
+
+ public UserBean getUser1() {
+ return user1;
+ }
+
+ public UserBean getUser2() {
+ return user2;
+ }
+
+ public void setUser1(UserBean user1) {
+ this.user1 = user1;
+ }
+
+ public void setUser2(UserBean user2) {
+ this.user2 = user2;
+ }
+
+ public static long getSerialversionuid() {
+ return serialVersionUID;
+ }
+
+}
Copied: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/CapitalsBean.java (from rev 17197, root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/capitals/CapitalsBean.java)
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/CapitalsBean.java (rev 0)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/CapitalsBean.java 2010-05-24 09:37:30 UTC (rev 17199)
@@ -0,0 +1,31 @@
+package org.richfaces.demo.tables;
+
+import java.util.List;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ManagedProperty;
+import javax.faces.bean.SessionScoped;
+
+import org.richfaces.demo.tables.data.capitals.Capital;
+
+@ManagedBean
+@SessionScoped
+public class CapitalsBean {
+
+ @ManagedProperty(value = "#{capitalsParser.capitalsList}")
+ private List<Capital> capitals;
+
+ public CapitalsBean() {
+ // TODO Auto-generated constructor stub
+ }
+
+ public List<Capital> getCapitals() {
+ return capitals;
+ }
+
+ public void setCapitals(List<Capital> capitals) {
+ this.capitals = capitals;
+ }
+
+
+}
Copied: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/CarsBean.java (from rev 17197, root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/CarsBean.java)
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/CarsBean.java (rev 0)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/CarsBean.java 2010-05-24 09:37:30 UTC (rev 17199)
@@ -0,0 +1,210 @@
+/**
+ *
+ */
+package org.richfaces.demo.tables;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ManagedProperty;
+import javax.faces.bean.ViewScoped;
+import javax.faces.model.SelectItem;
+
+import org.richfaces.demo.common.data.RandomHelper;
+import org.richfaces.demo.tables.data.carstore.InventoryItem;
+import org.richfaces.demo.tables.data.carstore.InventoryVendorItem;
+import org.richfaces.demo.tables.data.carstore.InventoryVendorList;
+import org.richfaces.demo.tables.filter.CarsFilteringBean;
+
+@ManagedBean(name = "carsBean")
+@ViewScoped
+public class CarsBean implements Serializable{
+ /**
+ *
+ */
+ private static final long serialVersionUID = -3832235132261771583L;
+ private static final int DECIMALS = 1;
+ private static final int ROUNDING_MODE = BigDecimal.ROUND_HALF_UP;
+ private List<InventoryItem> allInventoryItems = null;
+ private List<InventoryVendorList> inventoryVendorLists = null;
+ @ManagedProperty("#{carsFilteringBean}")
+ private CarsFilteringBean filteringBean;
+
+ public List<SelectItem> getVendorOptions() {
+ List<SelectItem> result = new ArrayList<SelectItem>();
+ result.add(new SelectItem("",""));
+ for (InventoryVendorList vendorList : getInventoryVendorLists()) {
+ if ((filteringBean.getVendorFilter()==null)||(!filteringBean.getVendorFilter().equalsIgnoreCase(vendorList.getVendor()))){
+ result.add(new SelectItem(vendorList.getVendor()));
+
+ }
+ }
+ return result;
+ }
+
+ public List<String> getAllVendors() {
+ List<String> result = new ArrayList<String>();
+ for (InventoryVendorList vendorList : getInventoryVendorLists()) {
+ result.add(vendorList.getVendor());
+ }
+ return result;
+ }
+
+ public List<InventoryVendorList> getInventoryVendorLists() {
+ synchronized (this) {
+ if (inventoryVendorLists == null) {
+ inventoryVendorLists = new ArrayList<InventoryVendorList>();
+ List<InventoryItem> inventoryItems = getAllInventoryItems();
+
+ Collections.sort(inventoryItems, new Comparator<InventoryItem>() {
+ public int compare(InventoryItem o1, InventoryItem o2) {
+ if (o1.getVendor().equals(o2.getVendor())) {
+ return 0;
+ }
+ return 1;
+ }
+ });
+ Iterator<InventoryItem> iterator = inventoryItems.iterator();
+ InventoryVendorList vendorList = new InventoryVendorList();
+ vendorList.setVendor(inventoryItems.get(0).getVendor());
+ while (iterator.hasNext()) {
+ InventoryItem item = iterator.next();
+ InventoryVendorItem newItem = new InventoryVendorItem();
+ itemToVendorItem(item, newItem);
+ if (!item.getVendor().equals(vendorList.getVendor())) {
+ inventoryVendorLists.add(vendorList);
+ vendorList = new InventoryVendorList();
+ vendorList.setVendor(item.getVendor());
+ }
+ vendorList.getVendorItems().add(newItem);
+ }
+ inventoryVendorLists.add(vendorList);
+ }
+ }
+ return inventoryVendorLists;
+ }
+
+ private void itemToVendorItem(InventoryItem item, InventoryVendorItem newItem) {
+ newItem.setActivity(item.getActivity());
+ newItem.setChangePrice(item.getChangePrice());
+ newItem.setChangeSearches(item.getChangeSearches());
+ newItem.setDaysLive(item.getDaysLive());
+ newItem.setExposure(item.getExposure());
+ newItem.setInquiries(item.getInquiries());
+ newItem.setMileage(item.getMileage());
+ newItem.setMileageMarket(item.getMileageMarket());
+ newItem.setModel(item.getModel());
+ newItem.setPrice(item.getPrice());
+ newItem.setPriceMarket(item.getPriceMarket());
+ newItem.setPrinted(item.getPrinted());
+ newItem.setStock(item.getStock());
+ newItem.setVin(item.getVin());
+ }
+
+ public List<InventoryItem> getAllInventoryItems() {
+ synchronized (this) {
+ if (allInventoryItems == null) {
+ allInventoryItems = new ArrayList<InventoryItem>();
+
+ for (int k = 0; k <= 5; k++) {
+ try {
+ switch (k) {
+ case 0:
+ allInventoryItems.addAll(createCar("Chevrolet", "Corvette", 5));
+ allInventoryItems.addAll(createCar("Chevrolet", "Malibu", 8));
+ allInventoryItems.addAll(createCar("Chevrolet", "Tahoe", 6));
+
+ break;
+
+ case 1:
+ allInventoryItems.addAll(createCar("Ford", "Taurus", 12));
+ allInventoryItems.addAll(createCar("Ford", "Explorer", 11));
+
+ break;
+
+ case 2:
+ allInventoryItems.addAll(createCar("Nissan", "Maxima", 9));
+ allInventoryItems.addAll(createCar("Nissan", "Frontier", 6));
+
+ break;
+
+ case 3:
+ allInventoryItems.addAll(createCar("Toyota", "4-Runner", 7));
+ allInventoryItems.addAll(createCar("Toyota", "Camry", 15));
+ allInventoryItems.addAll(createCar("Toyota", "Avalon", 13));
+
+ break;
+
+ case 4:
+ allInventoryItems.addAll(createCar("GMC", "Sierra", 8));
+ allInventoryItems.addAll(createCar("GMC", "Yukon", 10));
+
+ break;
+
+ case 5:
+ allInventoryItems.addAll(createCar("Infiniti", "G35", 6));
+ allInventoryItems.addAll(createCar("Infiniti", "EX35", 5));
+
+ break;
+
+ default:
+ break;
+ }
+ } catch (Exception e) {
+ System.out.println("!!!!!!loadallInventoryItems Error: " + e.getMessage());
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+ return allInventoryItems;
+ }
+
+ public List<InventoryItem> createCar(String vendor, String model, int count) {
+ ArrayList<InventoryItem> iiList = null;
+
+ try {
+ int arrayCount = count;
+ InventoryItem[] demoInventoryItemArrays = new InventoryItem[arrayCount];
+
+ for (int j = 0; j < demoInventoryItemArrays.length; j++) {
+ InventoryItem ii = new InventoryItem();
+
+ ii.setVendor(vendor);
+ ii.setModel(model);
+ ii.setStock(RandomHelper.randomstring(6, 7));
+ ii.setVin(RandomHelper.randomstring(14, 15));
+ ii.setMileage(new BigDecimal(RandomHelper.rand(5000, 80000)).setScale(DECIMALS, ROUNDING_MODE));
+ ii.setMileageMarket(new BigDecimal(RandomHelper.rand(25000, 45000)).setScale(DECIMALS, ROUNDING_MODE));
+ ii.setPrice(new Integer(RandomHelper.rand(15000, 55000)));
+ ii.setPriceMarket(new BigDecimal(RandomHelper.rand(15000, 55000)).setScale(DECIMALS, ROUNDING_MODE));
+ ii.setDaysLive(RandomHelper.rand(1, 90));
+ ii.setChangeSearches(new BigDecimal(RandomHelper.rand(0, 5)).setScale(DECIMALS, ROUNDING_MODE));
+ ii.setChangePrice(new BigDecimal(RandomHelper.rand(0, 5)).setScale(DECIMALS, ROUNDING_MODE));
+ ii.setExposure(new BigDecimal(RandomHelper.rand(0, 5)).setScale(DECIMALS, ROUNDING_MODE));
+ ii.setActivity(new BigDecimal(RandomHelper.rand(0, 5)).setScale(DECIMALS, ROUNDING_MODE));
+ ii.setPrinted(new BigDecimal(RandomHelper.rand(0, 5)).setScale(DECIMALS, ROUNDING_MODE));
+ ii.setInquiries(new BigDecimal(RandomHelper.rand(0, 5)).setScale(DECIMALS, ROUNDING_MODE));
+ demoInventoryItemArrays[j] = ii;
+ }
+
+ iiList = new ArrayList<InventoryItem>(Arrays.asList(demoInventoryItemArrays));
+ } catch (Exception e) {
+ System.out.println("!!!!!!createCategory Error: " + e.getMessage());
+ e.printStackTrace();
+ }
+
+ return iiList;
+ }
+
+ public void setFilteringBean(CarsFilteringBean filteringBean) {
+ this.filteringBean = filteringBean;
+ }
+}
Deleted: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/capitals/CapitalsBean.java
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/capitals/CapitalsBean.java 2010-05-24 06:41:57 UTC (rev 17198)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/capitals/CapitalsBean.java 2010-05-24 09:37:30 UTC (rev 17199)
@@ -1,29 +0,0 @@
-package org.richfaces.demo.tables.data.capitals;
-
-import java.util.List;
-
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ManagedProperty;
-import javax.faces.bean.SessionScoped;
-
-@ManagedBean
-@SessionScoped
-public class CapitalsBean {
-
- @ManagedProperty(value = "#{capitalsParser.capitalsList}")
- private List<Capital> capitals;
-
- public CapitalsBean() {
- // TODO Auto-generated constructor stub
- }
-
- public List<Capital> getCapitals() {
- return capitals;
- }
-
- public void setCapitals(List<Capital> capitals) {
- this.capitals = capitals;
- }
-
-
-}
Deleted: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/CarsBean.java
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/CarsBean.java 2010-05-24 06:41:57 UTC (rev 17198)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/CarsBean.java 2010-05-24 09:37:30 UTC (rev 17199)
@@ -1,173 +0,0 @@
-/**
- *
- */
-package org.richfaces.demo.tables.data.carstore;
-
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.SessionScoped;
-
-import org.richfaces.demo.common.data.RandomHelper;
-
-@ManagedBean(name = "carsBean")
-@SessionScoped
-public class CarsBean {
- private static final int DECIMALS = 1;
- private static final int ROUNDING_MODE = BigDecimal.ROUND_HALF_UP;
- private List<InventoryItem> allInventoryItems = null;
- private List<InventoryVendorList> inventoryVendorLists = null;
-
- public List<InventoryVendorList> getInventoryVendorLists() {
- synchronized (this) {
- if (inventoryVendorLists == null){
- inventoryVendorLists = new ArrayList<InventoryVendorList>();
- List<InventoryItem> inventoryItems = getAllInventoryItems();
-
- Collections.sort(inventoryItems, new Comparator<InventoryItem>() {
- public int compare(InventoryItem o1, InventoryItem o2) {
- if (o1.getVendor().equals(o2.getVendor())){
- return 0;
- }
- return 1;
- }
- });
- Iterator<InventoryItem> iterator = inventoryItems.iterator();
- InventoryVendorList vendorList = new InventoryVendorList();
- vendorList.setVendor(inventoryItems.get(0).getVendor());
- while (iterator.hasNext()){
- InventoryItem item = iterator.next();
- InventoryVendorItem newItem = new InventoryVendorItem();
- itemToVendorItem(item, newItem);
- if (!item.getVendor().equals(vendorList.getVendor())){
- inventoryVendorLists.add(vendorList);
- vendorList = new InventoryVendorList();
- vendorList.setVendor(item.getVendor());
- }
- vendorList.getVendorItems().add(newItem);
- }
- inventoryVendorLists.add(vendorList);
- }
- }
- return inventoryVendorLists;
- }
-
- private void itemToVendorItem(InventoryItem item, InventoryVendorItem newItem) {
- newItem.setActivity(item.getActivity());
- newItem.setChangePrice(item.getChangePrice());
- newItem.setChangeSearches(item.getChangeSearches());
- newItem.setDaysLive(item.getDaysLive());
- newItem.setExposure(item.getExposure());
- newItem.setInquiries(item.getInquiries());
- newItem.setMileage(item.getMileage());
- newItem.setMileageMarket(item.getMileageMarket());
- newItem.setModel(item.getModel());
- newItem.setPrice(item.getPrice());
- newItem.setPriceMarket(item.getPriceMarket());
- newItem.setPrinted(item.getPrinted());
- newItem.setStock(item.getStock());
- newItem.setVin(item.getVin());
- }
-
- public List<InventoryItem> getAllInventoryItems() {
- synchronized (this) {
- if (allInventoryItems == null) {
- allInventoryItems = new ArrayList<InventoryItem>();
-
- for (int k = 0; k <= 5; k++) {
- try {
- switch (k) {
- case 0:
- allInventoryItems.addAll(createCar("Chevrolet", "Corvette", 5));
- allInventoryItems.addAll(createCar("Chevrolet", "Malibu", 8));
- allInventoryItems.addAll(createCar("Chevrolet", "Tahoe", 6));
-
- break;
-
- case 1:
- allInventoryItems.addAll(createCar("Ford", "Taurus", 12));
- allInventoryItems.addAll(createCar("Ford", "Explorer", 11));
-
- break;
-
- case 2:
- allInventoryItems.addAll(createCar("Nissan", "Maxima", 9));
- allInventoryItems.addAll(createCar("Nissan", "Frontier", 6));
-
- break;
-
- case 3:
- allInventoryItems.addAll(createCar("Toyota", "4-Runner", 7));
- allInventoryItems.addAll(createCar("Toyota", "Camry", 15));
- allInventoryItems.addAll(createCar("Toyota", "Avalon", 13));
-
- break;
-
- case 4:
- allInventoryItems.addAll(createCar("GMC", "Sierra", 8));
- allInventoryItems.addAll(createCar("GMC", "Yukon", 10));
-
- break;
-
- case 5:
- allInventoryItems.addAll(createCar("Infiniti", "G35", 6));
- allInventoryItems.addAll(createCar("Infiniti", "EX35", 5));
-
- break;
-
- default:
- break;
- }
- } catch (Exception e) {
- System.out.println("!!!!!!loadallInventoryItems Error: " + e.getMessage());
- e.printStackTrace();
- }
- }
- }
- }
- return allInventoryItems;
- }
-
- public List<InventoryItem> createCar(String vendor, String model, int count) {
- ArrayList<InventoryItem> iiList = null;
-
- try {
- int arrayCount = count;
- InventoryItem[] demoInventoryItemArrays = new InventoryItem[arrayCount];
-
- for (int j = 0; j < demoInventoryItemArrays.length; j++) {
- InventoryItem ii = new InventoryItem();
-
- ii.setVendor(vendor);
- ii.setModel(model);
- ii.setStock(RandomHelper.randomstring(6, 7));
- ii.setVin(RandomHelper.randomstring(14, 15));
- ii.setMileage(new BigDecimal(RandomHelper.rand(5000, 80000)).setScale(DECIMALS, ROUNDING_MODE));
- ii.setMileageMarket(new BigDecimal(RandomHelper.rand(25000, 45000)).setScale(DECIMALS, ROUNDING_MODE));
- ii.setPrice(new Integer(RandomHelper.rand(15000, 55000)));
- ii.setPriceMarket(new BigDecimal(RandomHelper.rand(15000, 55000)).setScale(DECIMALS, ROUNDING_MODE));
- ii.setDaysLive(RandomHelper.rand(1, 90));
- ii.setChangeSearches(new BigDecimal(RandomHelper.rand(0, 5)).setScale(DECIMALS, ROUNDING_MODE));
- ii.setChangePrice(new BigDecimal(RandomHelper.rand(0, 5)).setScale(DECIMALS, ROUNDING_MODE));
- ii.setExposure(new BigDecimal(RandomHelper.rand(0, 5)).setScale(DECIMALS, ROUNDING_MODE));
- ii.setActivity(new BigDecimal(RandomHelper.rand(0, 5)).setScale(DECIMALS, ROUNDING_MODE));
- ii.setPrinted(new BigDecimal(RandomHelper.rand(0, 5)).setScale(DECIMALS, ROUNDING_MODE));
- ii.setInquiries(new BigDecimal(RandomHelper.rand(0, 5)).setScale(DECIMALS, ROUNDING_MODE));
- demoInventoryItemArrays[j] = ii;
- }
-
- iiList = new ArrayList<InventoryItem>(Arrays.asList(demoInventoryItemArrays));
- } catch (Exception e) {
- System.out.println("!!!!!!createCategory Error: " + e.getMessage());
- e.printStackTrace();
- }
-
- return iiList;
- }
-}
Added: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/filter/CarsFilteringBean.java
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/filter/CarsFilteringBean.java (rev 0)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/filter/CarsFilteringBean.java 2010-05-24 09:37:30 UTC (rev 17199)
@@ -0,0 +1,65 @@
+package org.richfaces.demo.tables.filter;
+
+import java.io.Serializable;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.demo.tables.data.carstore.InventoryItem;
+import org.richfaces.model.Filter;
+
+@ManagedBean
+@ViewScoped
+public class CarsFilteringBean implements Serializable{
+ /**
+ *
+ */
+ private static final long serialVersionUID = -5680001353441022183L;
+ private String vinFilter;
+ private String vendorFilter;
+ private Long mileageFilter;
+
+ public Filter<?> getMileageFilterImpl() {
+ return new Filter<InventoryItem>() {
+ public boolean accept(InventoryItem item) {
+ Long mileage = getMileageFilter();
+ if (mileage == null || mileage.compareTo(item.getMileage().longValue()) >= 0) {
+ return true;
+ }
+ return false;
+ }
+ };
+ }
+
+ public boolean acceptVendor(InventoryItem item){
+ String vendor = getVendorFilter();
+ if (vendor ==null || vendor.length()==0 || vendor.equals(item.getVendor())){
+ return true;
+ }
+ return false;
+ }
+
+ public Long getMileageFilter() {
+ return mileageFilter;
+ }
+
+ public void setMileageFilter(Long mileageFilter) {
+ this.mileageFilter = mileageFilter;
+ }
+
+ public String getVendorFilter() {
+ return vendorFilter;
+ }
+
+ public void setVendorFilter(String vendorFilter) {
+ this.vendorFilter = vendorFilter;
+ }
+
+ public String getVinFilter() {
+ return vinFilter;
+ }
+
+ public void setVinFilter(String vinFilter) {
+ this.vinFilter = vinFilter;
+ }
+}
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-24 06:41:57 UTC (rev 17198)
+++ root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-05-24 09:37:30 UTC (rev 17199)
@@ -1,6 +1,9 @@
<?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
-the same for demo id - it should be equals to name of the folder where samples placed -->
+ <!--
+ 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>
@@ -16,10 +19,10 @@
<sample>
<id>selectsUpdates</id>
<name>Dynamic Selects</name>
- </sample>
+ </sample>
</samples>
</demo>
- <demo new="true">
+ <demo>
<id>commandButton</id>
<name>a4j:commandButton</name>
<samples>
@@ -29,26 +32,26 @@
</sample>
</samples>
</demo>
- <demo new="true">
+ <demo>
<id>commandLink</id>
- <name>a4j:commandLink</name>
+ <name>a4j:commandLink</name>
<samples>
<sample>
- <id>commandLink</id>
+ <id>commandLink</id>
<name>Command Link Simple</name>
</sample>
</samples>
- </demo>
- <demo new="true">
+ </demo>
+ <demo>
<id>jsFunction</id>
- <name>a4j:jsFunction</name>
+ <name>a4j:jsFunction</name>
<samples>
<sample>
<id>jsFunction</id>
<name>jsFunction Simple</name>
</sample>
</samples>
- </demo>
+ </demo>
<demo new="true">
<id>poll</id>
<name>a4j:poll</name>
@@ -58,8 +61,8 @@
<name>Poll Simple</name>
</sample>
</samples>
- </demo>
- <demo new="true">
+ </demo>
+ <demo>
<id>push</id>
<name>a4j:push</name>
<samples>
@@ -68,11 +71,11 @@
<name>push Simple</name>
</sample>
</samples>
- </demo>
+ </demo>
</demos>
</group>
<group>
- <name>Ajax Queue</name>
+ <name>Ajax Queue</name>
<demos>
<demo new="true">
<id>queue</id>
@@ -83,7 +86,7 @@
<name>queue</name>
</sample>
</samples>
- </demo>
+ </demo>
<demo new="true">
<id>attachQueue</id>
<name>a4j:attachQueue</name>
@@ -94,12 +97,12 @@
</sample>
</samples>
</demo>
- </demos>
+ </demos>
</group>
<group>
- <name>Ajax Output/Indication</name>
+ <name>Ajax Output/Containers</name>
<demos>
- <demo new="true">
+ <demo>
<id>outputPanel</id>
<name>a4j:outputPanel</name>
<samples>
@@ -110,10 +113,10 @@
<sample>
<id>compositemessages</id>
<name>Auto update for h:messages component</name>
- </sample>
+ </sample>
</samples>
- </demo>
- <demo new="true">
+ </demo>
+ <demo>
<id>status</id>
<name>a4j:status</name>
<samples>
@@ -128,10 +131,20 @@
<sample>
<id>viewusage</id>
<name>Common status for view</name>
- </sample>
+ </sample>
</samples>
- </demo>
+ </demo>
<demo new="true">
+ <id>region</id>
+ <name>a4j:region</name>
+ <samples>
+ <sample>
+ <id>region</id>
+ <name>Region</name>
+ </sample>
+ </samples>
+ </demo>
+ <demo>
<id>mediaOutput</id>
<name>a4j:mediaOutput</name>
<samples>
@@ -142,10 +155,10 @@
<sample>
<id>imgUsage</id>
<name>mediaOutput for flash output</name>
- </sample>
+ </sample>
</samples>
- </demo>
- <demo new="true">
+ </demo>
+ <demo>
<id>log</id>
<name>a4j:log</name>
<samples>
@@ -154,8 +167,8 @@
<name>Log usage</name>
</sample>
</samples>
- </demo>
- </demos>
+ </demo>
+ </demos>
</group>
<group new="true">
<name>Data Iteration</name>
@@ -171,7 +184,15 @@
<sample>
<id>tableSorting</id>
<name>Data Table Sorting</name>
- </sample>
+ </sample>
+ <sample>
+ <id>tableFiltering</id>
+ <name>Data Table Filtering</name>
+ </sample>
+ <sample>
+ <id>tableFilteringAPI</id>
+ <name>Data Table Filtering API usage</name>
+ </sample>
</samples>
</demo>
<demo>
@@ -183,7 +204,7 @@
<name>ExtendedData Table Basic Usage</name>
</sample>
</samples>
- </demo>
- </demos>
+ </demo>
+ </demos>
</group>
</root>
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/WEB-INF/web.xml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/WEB-INF/web.xml 2010-05-24 06:41:57 UTC (rev 17198)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/WEB-INF/web.xml 2010-05-24 09:37:30 UTC (rev 17199)
@@ -17,14 +17,6 @@
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
- <context-param>
- <param-name>org.richfaces.CONTROL_SKINNING</param-name>
- <param-value>enable</param-value>
- </context-param>
- <context-param>
- <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name>
- <param-value>enable</param-value>
- </context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/resources/rich/panel.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/resources/rich/panel.xhtml 2010-05-24 06:41:57 UTC (rev 17198)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/resources/rich/panel.xhtml 2010-05-24 09:37:30 UTC (rev 17199)
@@ -12,6 +12,7 @@
<body>
<composite:interface>
+ <composite:attribute name="id" required="false"/>
<composite:attribute name="style" required="false"/>
<composite:attribute name="styleClass" required="false"/>
<composite:attribute name="headerClass" required="false"/>
@@ -21,7 +22,7 @@
<composite:implementation>
<h:outputStylesheet name="rich/css/panel.css" />
- <div class="rich-panel #{compositeComponent.attrs.styleClass}"
+ <div class="rich-panel #{compositeComponent.attrs.styleClass}" id="#{cc.attrs.id}"
style="#{cc.attrs.style}"
onclick="#{compositeComponent.attrs.onclick}"
ondblclick="#{compositeComponent.attrs.ondblclick}"
Deleted: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/subtables.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/subtables.xhtml 2010-05-24 06:41:57 UTC (rev 17198)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/subtables.xhtml 2010-05-24 09:37:30 UTC (rev 17199)
@@ -1,41 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:a4j="http://richfaces.org/a4j"
- xmlns:tbl="http://richfaces.org/rich">
-
- <ui:composition>
- <h:form>
- <tbl:dataTable value="#{carsBean.allCars}" var="car" id="table">
- <tbl:column>
- <f:facet name="header">
- <h:outputText value="Make" />
- </f:facet>
- <h:outputText value="#{car.make}"/>
- </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="Actions" />
- </f:facet>
- <a4j:commandLink value="Edit" action="#{carsBean.edit}" render="table"/>
- <h:outputText value=" " />
- <a4j:commandLink value="Remove" action="#{carsBean.remove}" render="table"/>
- </tbl:column>
- </tbl:dataTable>
- </h:form>
- </ui:composition>
-</html>
\ No newline at end of file
Added: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableFiltering.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableFiltering.xhtml (rev 0)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableFiltering.xhtml 2010-05-24 09:37:30 UTC (rev 17199)
@@ -0,0 +1,66 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:tbl="http://richfaces.org/rich"
+ xmlns:fn="http://java.sun.com/jsp/jstl/functions">
+
+<ui:composition>
+ <h:form id="form">
+ <tbl:dataTable value="#{carsBean.allInventoryItems}" var="car"
+ id="table" rows="20">
+ <tbl:column accept="#{carsFiteringBean.acceptVendor}">
+ <f:facet name="header">
+ <h:panelGroup>
+ <h:outputText value="Vendor " />
+ <h:selectOneMenu value="#{carsFilteringBean.vendorFilter}">
+ <f:selectItems value="#{carsBean.vendorOptions}" />
+ <a4j:ajax render="form:table" execute="@this" event="change"/>
+ </h:selectOneMenu>
+ </h:panelGroup>
+ </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 filter="#{carsFilteringBean.mileageFilterImpl}">
+ <f:facet name="header">
+ <h:panelGroup>
+ <h:outputText value="Mileage < " />
+ <h:inputText value="#{carsFilteringBean.mileageFilter}">
+ <f:convertNumber groupingUsed="true"/>
+ <f:validateLongRange maximum="500000"/>
+ <a4j:ajax event="blur" render="form:table" execute="@this" />
+ </h:inputText>
+ </h:panelGroup>
+ </f:facet>
+ <h:outputText value="#{car.mileage}" />
+ </tbl:column>
+ <tbl:column
+ filterExpression="#{fn:containsIgnoreCase(car.vin,carFilteringBean.vinFilter)}">
+ <f:facet name="header">
+ <h:panelGroup>
+ <h:outputText value="VIN " />
+ <h:inputText value="#{carFilteringBean.vinFilter}">
+ <a4j:ajax event="blur" render="form:table" execute="@this" />
+ </h:inputText>
+ </h:panelGroup>
+ </f:facet>
+ <h:outputText value="#{car.vin}" />
+ </tbl:column>
+ </tbl:dataTable>
+ </h:form>
+</ui:composition>
+</html>
\ No newline at end of file
Added: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableFilteringAPI.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableFilteringAPI.xhtml (rev 0)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableFilteringAPI.xhtml 2010-05-24 09:37:30 UTC (rev 17199)
@@ -0,0 +1,80 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:tbl="http://richfaces.org/rich"
+ xmlns:fn="http://java.sun.com/jsp/jstl/functions"
+ xmlns:rich="http://java.sun.com/jsf/composite/rich">
+
+<ui:composition>
+ <h:form id="form">
+ <h:panelGrid columns="2">
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Quick Filter Panel" />
+ </f:facet>
+ <fieldset><legend>Filter By Vendor</legend>
+ <ul>
+ <a4j:repeat value="#{carsBean.allVendors}" var="vendor">
+ <li><h:outputLink
+ value="javascript:document.getElementById('form:table').richfaces.component.filter('vendor', '#{vendor}')">#{vendor}</h:outputLink>
+ </li>
+ </a4j:repeat>
+ </ul>
+ </fieldset>
+ </rich:panel>
+ <tbl:dataTable value="#{carsBean.allInventoryItems}" var="car"
+ id="table" rows="20">
+ <tbl:column id="vendor"
+ filterExpression="#{carsFilteringBean.vendorFilter == '' or carsFilteringBean.vendorFilter == null or carsFilteringBean.vendorFilter == car.vendor}">
+ <f:facet name="header">
+ <h:panelGroup>
+ <h:outputText value="Vendor" />
+ </h:panelGroup>
+ </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:panelGroup>
+ <h:outputText value="Mileage" />
+ </h:panelGroup>
+ </f:facet>
+ <h:outputText value="#{car.mileage}" />
+ </tbl:column>
+ <tbl:column>
+ <f:facet name="header">
+ <h:panelGroup>
+ <h:outputText value="Days Live" />
+ </h:panelGroup>
+ </f:facet>
+ <h:outputText value="#{car.daysLive}" />
+ </tbl:column>
+ <tbl:column>
+ <f:facet name="header">
+ <h:panelGroup>
+ <h:outputText value="VIN " />
+ </h:panelGroup>
+ </f:facet>
+ <h:outputText value="#{car.vin}" />
+ </tbl:column>
+ </tbl:dataTable>
+ </h:panelGrid>
+
+ </h:form>
+</ui:composition>
+</html>
\ No newline at end of file
Copied: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableSorting.xhtml (from rev 17197, root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/subtables.xhtml)
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableSorting.xhtml (rev 0)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableSorting.xhtml 2010-05-24 09:37:30 UTC (rev 17199)
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:tbl="http://richfaces.org/rich">
+
+ <ui:composition>
+ <h:form>
+ <tbl:dataTable value="#{carsBean.allCars}" var="car" id="table">
+ <tbl:column>
+ <f:facet name="header">
+ <h:outputText value="Make" />
+ </f:facet>
+ <h:outputText value="#{car.make}"/>
+ </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="Actions" />
+ </f:facet>
+ <a4j:commandLink value="Edit" action="#{carsBean.edit}" render="table"/>
+ <h:outputText value=" " />
+ <a4j:commandLink value="Remove" action="#{carsBean.remove}" render="table"/>
+ </tbl:column>
+ </tbl:dataTable>
+ </h:form>
+ </ui:composition>
+</html>
\ No newline at end of file
Added: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/region/region.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/region/region.xhtml (rev 0)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/region/region.xhtml 2010-05-24 09:37:30 UTC (rev 17199)
@@ -0,0 +1,81 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://java.sun.com/jsf/composite/rich">
+
+<ui:composition>
+ <p>a4j:region component designed for marking zones which should be
+ processed during Ajax requests without using execute definitions at
+ Ajax behaviors/components. This allow to decouple the processing definitions from components id's
+ and use declarative wrapping by this tag instead.</p>
+ <p>In RichFaces 3.3 all the view was processed
+ if no regions specified as View Root itself was region by default. And in 4.x -
+ all the controls has execute="@this" by default according to JSF 2 specifications. But if the controls
+ wrapped with region component and has no execute definitions - them uses execute="@region"</p>
+ <p>
+ Look to the simple example bellow. There are two similar user info panels. But the ajax behaviors inside the
+ first panel uses execute declarations and pointed to panelGrid id. And the second panel inputs just wrapped
+ to region without any additional execute definitions.
+ </p>
+ <h:form>
+ <h:panelGrid columns="2">
+ <rich:panel id="userInfoPanel1">
+ <f:facet name="header">
+ User Info Panel explicitly execute'd by Id
+ </f:facet>
+ <h:panelGrid columns="2">
+ <h:outputText value="User Name: " />
+ <h:inputText value="#{regionBean.user1.name}">
+ <a4j:ajax render="echopanel1" event="blur"
+ execute="userInfoPanel1" />
+ </h:inputText>
+ <h:outputText value="User email: " />
+ <h:inputText value="#{regionBean.user1.email}">
+ <a4j:ajax render="echopanel1" event="blur"
+ execute="userInfoPanel1" />
+ </h:inputText>
+ </h:panelGrid>
+ </rich:panel>
+ <rich:panel id="echopanel1">
+ <f:facet name="header">
+ Echo Panel
+ </f:facet>
+ <h:outputText value="#{regionBean.user1.name}" />
+ <h:outputText value="#{regionBean.user1.email}" />
+ </rich:panel>
+ </h:panelGrid>
+ </h:form>
+ <h:form>
+ <h:panelGrid columns="2">
+ <rich:panel>
+ <f:facet name="header">
+ User Info Panel with Region
+ </f:facet>
+ <a4j:region>
+ <h:panelGrid columns="2">
+ <h:outputText value="User Name: " />
+ <h:inputText value="#{regionBean.user1.name}">
+ <a4j:ajax render="echopanel2" event="blur" />
+ </h:inputText>
+ <h:outputText value="User email: " />
+ <h:inputText value="#{regionBean.user1.email}">
+ <a4j:ajax render="echopanel2" event="blur" />
+ </h:inputText>
+ </h:panelGrid>
+ </a4j:region>
+ </rich:panel>
+ <rich:panel id="echopanel2">
+ <f:facet name="header">
+ Echo Panel
+ </f:facet>
+ <h:outputText value="#{regionBean.user1.name}" />
+ <h:outputText value="#{regionBean.user1.email}" />
+ </rich:panel>
+ </h:panelGrid>
+ </h:form>
+ <a4j:log />
+</ui:composition>
+</html>
\ No newline at end of file
14 years, 1 month
JBoss Rich Faces SVN: r17198 - in root/docs/trunk/Component_Reference/en-US: extras and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2010-05-24 02:41:57 -0400 (Mon, 24 May 2010)
New Revision: 17198
Added:
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-Tables_and_grids-a4jrepeat_example.xml_sample
Modified:
root/docs/trunk/Component_Reference/en-US/Component_Reference.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Actions.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Tables_and_grids.xml
Log:
a4j:repeat
Modified: root/docs/trunk/Component_Reference/en-US/Component_Reference.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/Component_Reference.xml 2010-05-23 19:51:06 UTC (rev 17197)
+++ root/docs/trunk/Component_Reference/en-US/Component_Reference.xml 2010-05-24 06:41:57 UTC (rev 17198)
@@ -21,7 +21,9 @@
<!--
<xi:include href="chap-Component_Reference-Rich_inputs.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="chap-Component_Reference-Panels_and_containers.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ -->
<xi:include href="chap-Component_Reference-Tables_and_grids.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <!--
<xi:include href="chap-Component_Reference-Trees.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="chap-Component_Reference-Menus_and_toolbars.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
--><xi:include href="chap-Component_Reference-Output_and_messages.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Actions.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Actions.xml 2010-05-23 19:51:06 UTC (rev 17197)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Actions.xml 2010-05-24 06:41:57 UTC (rev 17198)
@@ -477,6 +477,48 @@
</para>
</section>
+ <section id="sect-Component_Reference-Tables_and_grids-a4jrepeat">
+ <title><sgmltag><a4j:repeat></sgmltag></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type: <classname>org.ajax4jsf.Repeat</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-family: <classname>javax.faces.Data</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class: <classname>org.ajax4jsf.component.html.HtmlAjaxRepeat</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ renderer-type: <classname>org.ajax4jsf.components.RepeatRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The <sgmltag><a4j:repeat></sgmltag> component is used to iterate changes through a repeated collection of components. It allows specific rows of items to be updated without sending Ajax requests for the entire collection. The <sgmltag><a4j:repeat></sgmltag> component forms the basis for many of the tabular components detailed in <xref linkend="chap-Component_Reference-Tables_and_grids" />.
+ </para>
+ <para>
+ The contents of the collection are determined using Expression Language (<acronym>EL</acronym>). The data model for the contents is specified with the <varname>value</varname> attribute. The <varname>var</varname> attribute names the object to use when iterating through the collection. This object is then referenced in the relevant child components. After an Ajax request, only the rows specified with the <varname>ajaxKeys</varname> attribute are updated rather than the entire collection. <xref linkend="exam-Component_Reference-Tables_and_grids-a4jrepeat_example" /> shows how to use <sgmltag><a4j:repeat></sgmltag> to maintain a simple table.
+ </para>
+ <example id="exam-Component_Reference-Tables_and_grids-a4jrepeat_example">
+ <title><sgmltag><a4j:repeat></sgmltag> example</title>
+ <programlisting language="XML" role="XML"><xi:include parse="text" href="extras/exam-Component_Reference-Tables_and_grids-a4jrepeat_example.xml_sample" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ <para>
+ Each row of a table contains two cells: one showing the item code, and the other showing the item price. The table is generated by iterating through items in the <code>repeatBeans.items</code> data model.
+ </para>
+ </example>
+ <para>
+ The <sgmltag><a4j:repeat></sgmltag> component uses other attributes common to iteration components, such as the <varname>first</varname> attribute for specifying the first item for iteration, and the <varname>rows</varname> attribute for specifying the number of rows of items to display.
+ </para>
+ </section>
+
<section id="sect-Component_Reference-Actions-a4jsupport">
<title><sgmltag><a4j:support></sgmltag></title>
<itemizedlist>
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Tables_and_grids.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Tables_and_grids.xml 2010-05-23 19:51:06 UTC (rev 17197)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Tables_and_grids.xml 2010-05-24 06:41:57 UTC (rev 17198)
@@ -686,13 +686,6 @@
</para>
</section>
- <section id="sect-Component_Reference-Tables_and_grids-richrepeat">
- <title><sgmltag><rich:repeat></sgmltag></title>
- <para>
- Incomplete
- </para>
- </section>
-
<section id="sect-Component_Reference-Tables_and_grids-richsubTable">
<title><sgmltag><rich:subTable></sgmltag></title>
<para>
Added: root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-Tables_and_grids-a4jrepeat_example.xml_sample
===================================================================
--- root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-Tables_and_grids-a4jrepeat_example.xml_sample (rev 0)
+++ root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-Tables_and_grids-a4jrepeat_example.xml_sample 2010-05-24 06:41:57 UTC (rev 17198)
@@ -0,0 +1,10 @@
+<table>
+ <tbody>
+ <a4j:repeat value="#{repeatBean.items}" var="item" ajaxKeys="#{updateBean.updatedRow}">
+ <tr>
+ <td><h:outputText value="#{item.code}" id="item1" /></td>
+ <td><h:outputText value="#{item.price}" id="item2" /></td>
+ </tr>
+ </a4j:repeat>
+ </tbody>
+</table>
14 years, 1 month
JBoss Rich Faces SVN: r17197 - root/ui/misc/trunk/ui/src/main/java/org/richfaces/function.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-05-23 15:51:06 -0400 (Sun, 23 May 2010)
New Revision: 17197
Modified:
root/ui/misc/trunk/ui/src/main/java/org/richfaces/function/RichFunction.java
Log:
https://jira.jboss.org/browse/RF-7983
Modified: root/ui/misc/trunk/ui/src/main/java/org/richfaces/function/RichFunction.java
===================================================================
--- root/ui/misc/trunk/ui/src/main/java/org/richfaces/function/RichFunction.java 2010-05-23 19:47:46 UTC (rev 17196)
+++ root/ui/misc/trunk/ui/src/main/java/org/richfaces/function/RichFunction.java 2010-05-23 19:51:06 UTC (rev 17197)
@@ -75,6 +75,7 @@
public static String component(String id) {
String element = element(id);
if (element != null) {
+ //TODO nick - what if jQuery.RichFaces doesn't exist?
return "jQuery.RichFaces.$(" + clientId(id) + ")";
}
14 years, 1 month