JBoss Rich Faces SVN: r9843 - trunk/ui/fileUpload/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-07-31 08:04:58 -0400 (Thu, 31 Jul 2008)
New Revision: 9843
Modified:
trunk/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx
Log:
RF-4004
Modified: trunk/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx
===================================================================
--- trunk/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx 2008-07-31 11:52:41 UTC (rev 9842)
+++ trunk/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx 2008-07-31 12:04:58 UTC (rev 9843)
@@ -62,6 +62,11 @@
<div class="rich-fileupload-list-decor"
onclick="#{component.attributes['onclick']}"
onmouseover="#{component.attributes['onmouseover']}"
+ ondblclick="#{component.attributes['ondblclick']}"
+ onmouseout="#{component.attributes['onmouseout']}"
+ onmouseup="#{component.attributes['onmouseup']}"
+ onmousedown="#{component.attributes['onmousedown']}"
+ onmousemove="#{component.attributes['onmousemove']}"
style="width: #{listWidth}" id="#{clientId}">
<f:call name="utils.encodeBeginFormIfNessesary" />
16 years, 5 months
JBoss Rich Faces SVN: r9842 - trunk/ui/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2008-07-31 07:52:41 -0400 (Thu, 31 Jul 2008)
New Revision: 9842
Modified:
trunk/ui/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/scripts/datafilterslider.js
Log:
https://jira.jboss.org/jira/browse/RF-4053
Modified: trunk/ui/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/scripts/datafilterslider.js
===================================================================
--- trunk/ui/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/scripts/datafilterslider.js 2008-07-31 11:37:48 UTC (rev 9841)
+++ trunk/ui/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/scripts/datafilterslider.js 2008-07-31 11:52:41 UTC (rev 9842)
@@ -11,6 +11,24 @@
Richfaces.DFSControl = {};
Richfaces.DFSControl.Slider = Class.create();
+if (!window.RichShuttleUtils) {
+ window.RichShuttleUtils = {};
+}
+
+Richfaces.DFSControl.execOnLoad = function(func, condition, timeout) {
+
+ if (condition()) {
+ func();
+ } else {
+ window.setTimeout(
+ function() {
+ Richfaces.DFSControl.execOnLoad(func, condition, timeout);
+ },
+ timeout
+ );
+ }
+};
+
// options:
// axis: 'vertical', or 'horizontal' (default)
//
@@ -79,8 +97,16 @@
// Initialize handles in reverse (make sure first handle is active)
this.handles[0].style.visibility="hidden";
-// http://jira.jboss.com/jira/browse/RF-2830
- Event.observe(window, "load", this.loadEventHandler);
+ Richfaces.DFSControl.execOnLoad(
+ function() {
+ this.initHandles();
+ }.bind(this),
+ function() {
+ return this.handles[0].offsetHeight > 0;
+ }.bind(this),
+ 100);
+
+ //Event.observe(window, "load", this.loadEventHandler);
this.initialized = true;
},
16 years, 5 months
JBoss Rich Faces SVN: r9841 - trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable.
by richfaces-svn-commits@lists.jboss.org
Author: piotr.buda
Date: 2008-07-31 07:37:48 -0400 (Thu, 31 Jul 2008)
New Revision: 9841
Modified:
trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js
Log:
Bad menu image position fix
Modified: trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js
===================================================================
--- trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js 2008-07-31 10:13:13 UTC (rev 9840)
+++ trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js 2008-07-31 11:37:48 UTC (rev 9841)
@@ -191,7 +191,8 @@
sepSpan.setStyle('top:'+headerRowY+'px');
sepSpan.setStyle('left:'+spanLeft+'px');
menuImage.setStyle('top:' + headerRowY + 'px');
- menuImage.setStyle('left:'+(spanLeft-menuImage.offsetWidth)+'px');
+ //menuImage.setStyle('left:'+(spanLeft-menuImage.offsetWidth)+'px');
+ menuImage.setStyle('left:'+(headerNextChild.offsetLeft-menuImage.offsetWidth - 1)+'px');
dropSpanLeft.setStyle('top:'+headerRowY+'px');
var w = headerChild.getWidth();
dropSpanLeft.setStyle('left:'+ (headerChild.offsetLeft) +'px');
@@ -210,6 +211,7 @@
OnSepClick: function(event) {
Event.stop(event);
+ this.dragColumnInfo.mouseDown = false;
},
OnSepMouseDown: function(event) {
16 years, 5 months
JBoss Rich Faces SVN: r9840 - trunk/sandbox/ui/extendedDataTable/src/main/resources/org/richfaces/renderkit/html/css.
by richfaces-svn-commits@lists.jboss.org
Author: pkawiak
Date: 2008-07-31 06:13:13 -0400 (Thu, 31 Jul 2008)
New Revision: 9840
Modified:
trunk/sandbox/ui/extendedDataTable/src/main/resources/org/richfaces/renderkit/html/css/extendedDataTable.xcss
Log:
Bugfix for livedemo
Modified: trunk/sandbox/ui/extendedDataTable/src/main/resources/org/richfaces/renderkit/html/css/extendedDataTable.xcss
===================================================================
--- trunk/sandbox/ui/extendedDataTable/src/main/resources/org/richfaces/renderkit/html/css/extendedDataTable.xcss 2008-07-31 10:01:33 UTC (rev 9839)
+++ trunk/sandbox/ui/extendedDataTable/src/main/resources/org/richfaces/renderkit/html/css/extendedDataTable.xcss 2008-07-31 10:13:13 UTC (rev 9840)
@@ -284,8 +284,6 @@
width: 100%;
}
- .extdt-
-
/**
* Header cells separator
*/
16 years, 5 months
JBoss Rich Faces SVN: r9839 - in trunk/samples/richfaces-demo/src/main: java/org/richfaces/demo/stateApi and 10 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-07-31 06:01:33 -0400 (Thu, 31 Jul 2008)
New Revision: 9839
Added:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/stateApi/
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/stateApi/Bean.java
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/stateApi/Config.java
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/stateApi/LoginAction.java
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/stateApi/RegisterAction.java
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/stateApi/User.java
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/validation/DayStatistics.java
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/validation/PassTime.java
trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/examples/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/examples/example.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/examples/loginResult.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/examples/registerResult.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/examples/simple.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/usage.xhtml
Modified:
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/richfaces/ajaxValidator.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/beanValidator.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/beanValidator/examples/simple.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/usage.xhtml
Log:
validation demos chages
stateApi example draft
Added: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/stateApi/Bean.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/stateApi/Bean.java (rev 0)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/stateApi/Bean.java 2008-07-31 10:01:33 UTC (rev 9839)
@@ -0,0 +1,40 @@
+package org.richfaces.demo.stateApi;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class Bean {
+
+ private String name;
+
+ private String password;
+
+ private String confirmPassword;
+
+ private List<User> users = new ArrayList<User>();
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public String getConfirmPassword() {
+ return confirmPassword;
+ }
+
+ public void setConfirmPassword(String confirmPassword) {
+ this.confirmPassword = confirmPassword;
+ }
+
+}
\ No newline at end of file
Added: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/stateApi/Config.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/stateApi/Config.java (rev 0)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/stateApi/Config.java 2008-07-31 10:01:33 UTC (rev 9839)
@@ -0,0 +1,83 @@
+/**
+ *
+ */
+package org.richfaces.demo.stateApi;
+
+import javax.el.ExpressionFactory;
+import javax.el.MethodExpression;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+
+import org.richfaces.ui.model.States;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class Config {
+
+ /**
+ * @return States
+ */
+ public States getStates() {
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ States states = new States();
+
+ // Registering new User State definition
+ states.setCurrentState("register"); // Name of the new state
+
+ // Text labels, properties and Labels for controls in "register" state
+ states.put("showConfirm", Boolean.TRUE); // confirm field rendering
+ states.put("link", "(To login)"); // Switch State link label
+ states.put("okBtn", "Register"); // Login/Register button label
+ states.put("stateTitle", "Register New User"); // Panel title
+
+ ExpressionFactory expressionFactory = facesContext.getApplication()
+ .getExpressionFactory();
+
+ // Define "registerbean" available under "bean" EL binding on the page
+ ValueExpression beanExpression = expressionFactory
+ .createValueExpression(facesContext.getELContext(),
+ "#{registerbean}", Bean.class);
+ states.put("bean", beanExpression);
+
+ // Define "registeraction" available under "action" EL binding on the
+ // page
+ beanExpression = expressionFactory.createValueExpression(facesContext
+ .getELContext(), "#{registeraction}", RegisterAction.class);
+ states.put("action", beanExpression);
+
+ // Define method expression inside registeraction binding for this state
+ MethodExpression methodExpression = expressionFactory.createMethodExpression(
+ facesContext.getELContext(), "#{registeraction.ok}",
+ String.class, new Class[] {});
+ states.put("ok", methodExpression);
+
+ // Outcome for switching to login state definition
+ states.setNavigation("switch", "login");
+
+ // Login Existent User State analogous definition
+ states.setCurrentState("login");
+ states.put("showConfirm", Boolean.FALSE);
+ states.put("link", "(To register)");
+ states.put("okBtn", "Login");
+ states.put("stateTitle", "Login Existent User");
+
+ beanExpression = expressionFactory.createValueExpression(facesContext
+ .getELContext(), "#{loginbean}", Bean.class);
+ states.put("bean", beanExpression);
+
+ beanExpression = expressionFactory.createValueExpression(facesContext
+ .getELContext(), "#{loginaction}", LoginAction.class);
+ states.put("action", beanExpression);
+
+ methodExpression = expressionFactory.createMethodExpression(
+ facesContext.getELContext(), "#{loginaction.ok}",
+ String.class, new Class[] {});
+ states.put("ok", methodExpression);
+
+ states.setNavigation("switch", "register");
+
+ return states;
+ }
+}
\ No newline at end of file
Added: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/stateApi/LoginAction.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/stateApi/LoginAction.java (rev 0)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/stateApi/LoginAction.java 2008-07-31 10:01:33 UTC (rev 9839)
@@ -0,0 +1,34 @@
+/**
+ *
+ */
+package org.richfaces.demo.stateApi;
+
+import javax.faces.event.ActionEvent;
+
+/**
+ * @author Ilya Shaikovsky
+ *
+ */
+public class LoginAction
+{
+
+ private Bean bean;
+
+ public void listener(ActionEvent event) {
+ //fetching some data on login
+ }
+
+ public String ok() {
+ System.out.println("LoginAction.ok()");
+ return "loggedIn";
+ }
+
+ public Bean getBean() {
+ return bean;
+ }
+
+ public void setBean(Bean bean) {
+ this.bean = bean;
+ }
+
+}
\ No newline at end of file
Added: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/stateApi/RegisterAction.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/stateApi/RegisterAction.java (rev 0)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/stateApi/RegisterAction.java 2008-07-31 10:01:33 UTC (rev 9839)
@@ -0,0 +1,55 @@
+/**
+ *
+ */
+package org.richfaces.demo.stateApi;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ * @author Ilya Shaikovsky
+ *
+ */
+
+public class RegisterAction {
+ private Bean bean;
+
+ public void listener(ActionEvent event) {
+ //Check if the password fields are equals
+ if (bean.getConfirmPassword().equals(bean.getPassword())) {
+ FacesContext.getCurrentInstance().getApplication().getNavigationHandler().handleNavigation(FacesContext.getCurrentInstance(), null, "registered");
+ } else {
+ FacesContext.getCurrentInstance().addMessage(
+ event.getComponent().getClientId(
+ FacesContext.getCurrentInstance()),
+ new FacesMessage(FacesMessage.SEVERITY_ERROR,
+ "Different passwords entered",
+ "Different passwords entered"));
+ }
+ }
+
+ public String ok() {
+ if (FacesContext.getCurrentInstance().getMaximumSeverity()==null){
+ return "registered";
+ }else{
+ return null;
+ }
+ }
+
+ /**
+ * @return the bean
+ */
+ public Bean getBean() {
+ return bean;
+ }
+
+ /**
+ * @param bean
+ * the bean to set
+ */
+ public void setBean(Bean bean) {
+ this.bean = bean;
+ }
+
+}
\ No newline at end of file
Added: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/stateApi/User.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/stateApi/User.java (rev 0)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/stateApi/User.java 2008-07-31 10:01:33 UTC (rev 9839)
@@ -0,0 +1,20 @@
+package org.richfaces.demo.stateApi;
+
+public class User {
+
+ private String name;
+ private String password;
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public String getPassword() {
+ return password;
+ }
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+}
Added: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/validation/DayStatistics.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/validation/DayStatistics.java (rev 0)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/validation/DayStatistics.java 2008-07-31 10:01:33 UTC (rev 9839)
@@ -0,0 +1,47 @@
+/**
+ *
+ */
+package org.richfaces.demo.validation;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.hibernate.validator.Max;
+import org.hibernate.validator.Min;
+import org.hibernate.validator.NotNull;
+
+/**
+ * @author Ilya Shaikovsky
+ *
+ */
+public class DayStatistics {
+
+ public DayStatistics() {
+ dayPasstimes.add(new PassTime("Sport",0));
+ dayPasstimes.add(new PassTime("Entertainment",0));
+ dayPasstimes.add(new PassTime("Sleeping",0));
+ dayPasstimes.add(new PassTime("Games",0));
+ }
+
+ private List<PassTime> dayPasstimes = new ArrayList<PassTime>();
+
+ public List<PassTime> getDayPasstimes() {
+ return dayPasstimes;
+ }
+
+ public void setDayPasstimes(List<PassTime> dayPasstimes) {
+ this.dayPasstimes = dayPasstimes;
+ }
+
+ @NotNull
+ @Min(value=1,message="Please feel at list one entry")
+ @Max(value=24, message="Only 24h in a day!")
+ public Integer getTotalTime() {
+ Integer result = new Integer(0);
+ for (PassTime passtime : dayPasstimes) {
+ result+=passtime.getTime();
+ }
+ return result;
+ }
+
+}
Added: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/validation/PassTime.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/validation/PassTime.java (rev 0)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/validation/PassTime.java 2008-07-31 10:01:33 UTC (rev 9839)
@@ -0,0 +1,36 @@
+package org.richfaces.demo.validation;
+
+import org.hibernate.validator.Length;
+import org.hibernate.validator.Max;
+import org.hibernate.validator.Min;
+import org.hibernate.validator.NotEmpty;
+import org.hibernate.validator.NotNull;
+
+public class PassTime {
+
+ public PassTime(String title, Integer time) {
+ setTitle(title);
+ setTime(time);
+ }
+
+ @NotEmpty
+ @Length(max=12, min=3)
+ private String title;
+ @NotNull
+ @Min(0)
+ @Max(12)
+ private Integer time;
+ public String getTitle() {
+ return title;
+ }
+ public void setTitle(String title) {
+ this.title = title;
+ }
+ public Integer getTime() {
+ return time;
+ }
+ public void setTime(Integer time) {
+ this.time = time;
+ }
+
+}
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-07-31 09:52:04 UTC (rev 9838)
+++ trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2008-07-31 10:01:33 UTC (rev 9839)
@@ -87,3 +87,4 @@
ajaxValidator=richValidators, \t Ajax Validator, \t\t/images/ico_ajaxValidator.gif, \t\t/images/cn_ajaxValidator.gif, ArchitectureOverview.html\#ajaxValidator, jbossrichfaces/freezone/docs/tlddoc/rich/ajaxValidator.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIhotkey.html, \t\t\t\t\t/richfaces/ajaxValidator.jsf
beanValidator=richValidators, \t Bean Validator, \t\t/images/ico_beanValidator.gif, \t\t/images/cn_beanValidator.gif, ArchitectureOverview.html\#beanValidator, jbossrichfaces/freezone/docs/tlddoc/rich/beanValidator.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIhotkey.html, \t\t\t\t\t/richfaces/beanValidator.jsf
graphValidator=richValidators, \t Graph Validator, \t\t/images/ico_graphValidator.gif, \t\t/images/cn_graphValidator.gif, ArchitectureOverview.html\#graphValidator, jbossrichfaces/freezone/docs/tlddoc/rich/graphValidator.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIhotkey.html, \t\t\t\t\t/richfaces/graphValidator.jsf
+stateAPI=richMisc, \t State Manager API, \t\t/images/ico_stateAPI.gif, \t\t/images/cn_stateAPI.gif, ArchitectureOverview.html\#stateAPI, jbossrichfaces/freezone/docs/tlddoc/rich/graphValidator.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIhotkey.html, \t\t\t\t\t/richfaces/stateAPI.jsf
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-07-31 09:52:04 UTC (rev 9838)
+++ trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-07-31 10:01:33 UTC (rev 9839)
@@ -7,6 +7,51 @@
<converter-class>org.richfaces.demo.listShuttle.Converter</converter-class>
</converter>
<managed-bean>
+ <managed-bean-name>loginbean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.stateApi.Bean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>registerbean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.stateApi.Bean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>loginaction</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.stateApi.LoginAction</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>bean</property-name>
+ <property-class>org.richfaces.demo.stateApi.Bean</property-class>
+ <value>#{loginbean}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>registeraction</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.stateApi.RegisterAction</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>bean</property-name>
+ <property-class>org.richfaces.demo.stateApi.Bean</property-class>
+ <value>#{registerbean}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>state</managed-bean-name>
+ <managed-bean-class>org.richfaces.ui.model.States</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>states</property-name>
+ <property-class>org.richfaces.ui.model.States</property-class>
+ <value>#{config.states}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>config</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.stateApi.Config</managed-bean-class>
+ <managed-bean-scope>none</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
<managed-bean-name>skinBean</managed-bean-name>
<managed-bean-class>org.richfaces.demo.common.SkinBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
@@ -333,6 +378,21 @@
<managed-bean-class>org.richfaces.demo.validation.ValidationBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
+ <managed-bean>
+ <managed-bean-name>dayStatistics</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.validation.DayStatistics</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>registerAction</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.stateApi.RegisterAction</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>loginAction</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.stateApi.LoginAction</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
<navigation-rule>
<from-view-id>/richfaces/include/examples/wstep1.xhtml</from-view-id>
<navigation-case>
@@ -366,6 +426,42 @@
<redirect/>
</navigation-case>
</navigation-rule>
+ <navigation-rule>
+ <from-view-id>/richfaces/stateAPI/examples/simple.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>loggedIn</from-outcome>
+ <to-view-id>/richfaces/stateAPI/examples/loginResult.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>registered</from-outcome>
+ <to-view-id>/richfaces/stateAPI/examples/registerResult.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/richfaces/stateAPI/examples/loginResult.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>logout</from-outcome>
+ <to-view-id>/richfaces/stateAPI/examples/simple.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/richfaces/stateAPI/examples/registerResult.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>logout</from-outcome>
+ <to-view-id>/richfaces/stateAPI/examples/simple.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <application>
+ <navigation-handler>org.richfaces.ui.application.StateNavigationHandler</navigation-handler>
+ <el-resolver>org.richfaces.el.StateELResolver</el-resolver>
+ <locale-config>
+ <default-locale>en</default-locale>
+ <supported-locale>en</supported-locale>
+ </locale-config>
+ </application>
+ <factory>
+ <application-factory>org.richfaces.ui.application.StateApplicationFactory</application-factory>
+ </factory>
<lifecycle>
<phase-listener>org.richfaces.treemodeladaptor.PostbackPhaseListener</phase-listener>
</lifecycle>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxValidator.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxValidator.xhtml 2008-07-31 09:52:04 UTC (rev 9838)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxValidator.xhtml 2008-07-31 10:01:33 UTC (rev 9839)
@@ -7,6 +7,11 @@
<ui:composition template="/templates/main.xhtml">
<ui:define name="title">RichFaces - Open Source Rich JSF Components - Ajax Validator</ui:define>
<ui:define name="body">
+ <style>
+ .rich-message-label{
+ color:red;
+ }
+ </style>
<ui:include src="/templates/include/tab-panel.xhtml" />
</ui:define>
</ui:composition>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/beanValidator/examples/simple.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/beanValidator/examples/simple.xhtml 2008-07-31 09:52:04 UTC (rev 9838)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/beanValidator/examples/simple.xhtml 2008-07-31 10:01:33 UTC (rev 9839)
@@ -1,12 +1,27 @@
-<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">
-
-<p>
-Bean Validator Example
-</p>
-
+<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:panel>
+ <f:facet name="header">
+ <h:outputText value="User Info:" />
+ </f:facet>
+ <h:panelGrid columns="3">
+ <h:outputText value="Name:" />
+ <h:inputText value="#{validationBean.name}" id="name"/>
+ <rich:message for="name" />
+ <h:outputText value="Email:" />
+ <h:inputText value="#{validationBean.email}" id="email"/>
+ <rich:message for="email" />
+ <h:outputText value="Age:" />
+ <h:inputText value="#{validationBean.age}" id="age"/>
+ <rich:message for="age" />
+ </h:panelGrid>
+ <a4j:commandButton value="Submit"/>
+ </rich:panel>
+ </h:form>
</ui:composition>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/beanValidator.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/beanValidator.xhtml 2008-07-31 09:52:04 UTC (rev 9838)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/beanValidator.xhtml 2008-07-31 10:01:33 UTC (rev 9839)
@@ -7,6 +7,11 @@
<ui:composition template="/templates/main.xhtml">
<ui:define name="title">RichFaces - Open Source Rich JSF Components - Bean Validator</ui:define>
<ui:define name="body">
+ <style>
+ .rich-message-label{
+ color:red;
+ }
+ </style>
<ui:include src="/templates/include/tab-panel.xhtml" />
</ui:define>
</ui:composition>
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml 2008-07-31 10:01:33 UTC (rev 9839)
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<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:graphValidator value="#{dayStatistics}">
+ <rich:dataTable value="#{dayStatistics.dayPasstimes}" var="pt" id="table">
+ <rich:column>
+ <h:inputText value="#{pt.title}" >
+ <a4j:support reRender="out" event="onkeyup"/>
+ </h:inputText>
+ </rich:column>
+ <rich:column>
+ <rich:inputNumberSpinner minValue="0" maxValue="24"
+ value="#{pt.time}" id="time">
+ <rich:ajaxValidator event="onblur" />
+ </rich:inputNumberSpinner>
+ <rich:message for="time" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{pt.title}" id="out"/>
+ </rich:column>
+ </rich:dataTable>
+ </rich:graphValidator>
+ <h:commandButton value="Store my details" />
+ </h:form>
+</ui:composition>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/usage.xhtml 2008-07-31 09:52:04 UTC (rev 9838)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/usage.xhtml 2008-07-31 10:01:33 UTC (rev 9839)
@@ -21,6 +21,19 @@
</ui:include>
</div>
</fieldset>
+ <p>
+ Description
+ </p>
+
+ <fieldset class="demo_fieldset">
+ <legend class="demo_legend">Title</legend>
+ <div class="sample-container" >
+ <ui:include src="/richfaces/graphValidator/examples/additionalValidation.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath" value="/richfaces/graphValidator/examples/additionalValidation.xhtml"/>
+ </ui:include>
+ </div>
+ </fieldset>
</ui:define>
</ui:composition>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator.xhtml 2008-07-31 09:52:04 UTC (rev 9838)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator.xhtml 2008-07-31 10:01:33 UTC (rev 9839)
@@ -7,6 +7,11 @@
<ui:composition template="/templates/main.xhtml">
<ui:define name="title">RichFaces - Open Source Rich JSF Components - Graph Validator</ui:define>
<ui:define name="body">
+ <style>
+ .rich-message-label{
+ color:red;
+ }
+ </style>
<ui:include src="/templates/include/tab-panel.xhtml" />
</ui:define>
</ui:composition>
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/examples/example.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/examples/example.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/examples/example.xhtml 2008-07-31 10:01:33 UTC (rev 9839)
@@ -0,0 +1,16 @@
+<!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: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">
+
+ <ui:composition>
+ <h:panelGroup id="wizard">
+ <h:form>
+ <a4j:include viewId="/richfaces/stateAPI/examples/simple.xhtml"/>
+ </h:form>
+ </h:panelGroup>
+ </ui:composition>
+
+</html>
\ No newline at end of file
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/examples/loginResult.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/examples/loginResult.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/examples/loginResult.xhtml 2008-07-31 10:01:33 UTC (rev 9839)
@@ -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:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a4j="http://richfaces.org/a4j">
+
+ <ui:composition>
+ <rich:panel>
+ <f:facet name="header">
+ Welcome!
+ </f:facet>
+ <h:outputText value="Successfully logged in as #{state.bean.name}"/>
+ <br/>
+ <a4j:commandLink value="logout" action="logout"/>
+ </rich:panel>
+ </ui:composition>
+
+</html>
\ No newline at end of file
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/examples/registerResult.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/examples/registerResult.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/examples/registerResult.xhtml 2008-07-31 10:01:33 UTC (rev 9839)
@@ -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:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a4j="http://richfaces.org/a4j">
+
+ <ui:composition>
+ <rich:panel>
+ <f:facet name="header">
+ Welcome!
+ </f:facet>
+ <h:outputText value="Successfully registered as #{state.bean.name}"/>
+ <br/>
+ <a4j:commandLink value="logout" action="logout"/>
+ </rich:panel>
+ </ui:composition>
+
+</html>
\ No newline at end of file
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/examples/simple.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/examples/simple.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/examples/simple.xhtml 2008-07-31 10:01:33 UTC (rev 9839)
@@ -0,0 +1,40 @@
+<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">
+
+ <rich:panel id="panel">
+ <f:facet name="header">
+ <h:panelGroup>
+ <h:outputText value="#{state.stateTitle}"/>
+ <a4j:commandLink action="switch" value="#{state.link}" immediate="true" reRender="panel"/>
+ </h:panelGroup>
+ </f:facet>
+
+ <rich:message for="action"/>
+
+ <h:panelGrid columns="3">
+ <h:outputText value="username" />
+ <h:inputText value="#{state.bean.name}" id="name" required="true">
+ <f:validateLength minimum="3" maximum="12"/>
+ </h:inputText>
+ <rich:message for="name" showSummary="false"/>
+ <h:outputText value="password" />
+
+ <h:inputSecret value="#{state.bean.password}" id="password" required="true">
+ <f:validateLength minimum="5" maximum="12"/>
+ </h:inputSecret>
+ <rich:message for="password"/>
+ <h:outputText value="confirm" rendered="#{state.showConfirm}" />
+
+ <h:inputSecret value="#{state.bean.confirmPassword}"
+ rendered="#{state.showConfirm}" id="confirm" required="true">
+ <f:validateLength minimum="5" maximum="12"/>
+ </h:inputSecret>
+ <rich:message for="confirm"/>
+ </h:panelGrid>
+ <a4j:commandButton actionListener="#{state.action.listener}" action="#{state.ok}" value="#{state.okBtn}" id="action"/>
+ </rich:panel>
+</ui:composition>
\ No newline at end of file
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/usage.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/usage.xhtml 2008-07-31 10:01:33 UTC (rev 9839)
@@ -0,0 +1,29 @@
+<!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: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">
+ <ui:composition template="/templates/component-sample.xhtml">
+ <ui:define name="sample">
+ <style>
+ .rich-message-label{
+ color:red;
+ }
+ </style>
+ <p>
+ Description
+ </p>
+ <fieldset class="demo_fieldset">
+ <legend class="demo_legend">Title</legend>
+ <div class="sample-container" >
+ <ui:include src="/richfaces/stateAPI/examples/example.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath" value="/richfaces/stateAPI/examples/example.xhtml"/>
+ </ui:include>
+ </div>
+ </fieldset>
+ </ui:define>
+ </ui:composition>
+</html>
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI.xhtml 2008-07-31 10:01:33 UTC (rev 9839)
@@ -0,0 +1,13 @@
+<!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:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:rich="http://richfaces.org/rich">
+<ui:composition template="/templates/main.xhtml">
+ <ui:define name="title">RichFaces - Open Source Rich JSF Components - State Manager</ui:define>
+ <ui:define name="body">
+ <ui:include src="/templates/include/tab-panel.xhtml"/>
+ </ui:define>
+</ui:composition>
+</html>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/usage.xhtml 2008-07-31 09:52:04 UTC (rev 9838)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/usage.xhtml 2008-07-31 10:01:33 UTC (rev 9839)
@@ -30,6 +30,19 @@
</ui:include>
</div>
</fieldset>
+ <p>
+ Description
+ </p>
+ <fieldset class="demo_fieldset">
+ <legend class="demo_legend">Mail Editor sample</legend>
+ <div class="sample-container">
+ <ui:include src="/richfaces/suggestionBox/examples/mailWizard.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath" value="/richfaces/suggestionBox/examples/mailWizard.xhtml"/>
+ </ui:include>
+ </div>
+ </fieldset>
+
</ui:define>
16 years, 5 months
JBoss Rich Faces SVN: r9838 - in trunk/sandbox/ui/extendedDataTable/src/main: javascript and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pkawiak
Date: 2008-07-31 05:52:04 -0400 (Thu, 31 Jul 2008)
New Revision: 9838
Modified:
trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js
trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js
trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js
trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUILib.js
trunk/sandbox/ui/extendedDataTable/src/main/resources/org/richfaces/renderkit/html/css/extendedDataTable.xcss
Log:
Bugfix for livedemo
Modified: trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
===================================================================
--- trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2008-07-31 09:37:22 UTC (rev 9837)
+++ trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2008-07-31 09:52:04 UTC (rev 9838)
@@ -192,7 +192,7 @@
/* encoding additional empty column used in resizing columns */
writer.startElement("th", table);
encodeStyleClass(writer, null,
- "extdt-subheadercell rich-extdt-subheadercell", null,
+ "extdt-empty-cell rich-extdt-subheadercell", null,
null);
writer.endElement("th");
writer.endElement("tr");
@@ -223,7 +223,7 @@
headerClass, facetName, element);
writer.startElement(HTML.th_ELEM, table);
encodeStyleClass(writer, null,
- "extdt-subheadercell rich-extdt-subheadercell", null, null);
+ "extdt-empty-cell rich-extdt-subheadercell", null, null);
writer.endElement(HTML.th_ELEM);
writer.endElement(HTML.TR_ELEMENT);
}
@@ -519,7 +519,7 @@
writer.startElement(HTML.td_ELEM, table);
writer.writeAttribute(HTML.class_ATTRIBUTE,
- "extdt-cell extdt-group-cell", null);
+ "extdt-group-cell", null);
writer.writeAttribute("colspan", numberOfColumns, null);
writer.startElement(HTML.SPAN_ELEM, table);
writer.startElement(HTML.IMG_ELEMENT, table);
@@ -658,10 +658,7 @@
// encode additional empty row for resizing
writer.startElement(HTML.td_ELEM, table);
String columnClass = holder.getColumnClass(currentColumn);
- encodeStyleClass(writer, null, getCellSkinClass(), null, columnClass);
- writer.startElement(HTML.DIV_ELEM, table);
- writer.writeAttribute("class", "extdt-cell-div", null);
- writer.endElement(HTML.DIV_ELEM);
+ encodeStyleClass(writer, null, "extdt-empty-cell rich-extdt-cell", null, columnClass);
writer.endElement(HTML.td_ELEM);
// Close row if then is open.
if (!first && !(column instanceof Row)) {
Modified: trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js
===================================================================
--- trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js 2008-07-31 09:37:22 UTC (rev 9837)
+++ trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js 2008-07-31 09:52:04 UTC (rev 9838)
@@ -98,13 +98,10 @@
},
setColumnWidth: function(columnIndex, newWidth) {
- ClientUILib.log(ClientUILogger.INFO, "columnIndex: " + columnIndex);
if (columnIndex >= this.getColumnsNumber) {
return false;
}else{
- ClientUILib.log(ClientUILogger.INFO, "newWidth inside method: " + newWidth);
this.getColumns()[columnIndex].width = newWidth;
- ClientUILib.log(ClientUILogger.INFO, "newWidth after: " + this.getColumnWidth(columnIndex));
}
},
@@ -286,7 +283,6 @@
return sd.offsetWidth - sd.clientWidth;
},
validateColumnsWidth: function(columns,excessWidth) {
- ClientUILib.log(ClientUILogger.INFO, "validatingColumnsWidth: "+excessWidth);
var i=1;
var endIndex = columns.length-1;
while ((i < endIndex) && (excessWidth > 0)) {
@@ -346,17 +342,12 @@
var columnsNumber = this.getColumnsNumber();
var visibleHeaderWidth = this.header.getVisibleWidth();
- ClientUILib.log(ClientUILogger.INFO, "visibleHeaderWidth: "+visibleHeaderWidth);
- ClientUILib.log(ClientUILogger.INFO, "mainDivWidth: " + this.mainDiv.getWidth());
var scrollbarWidth = scrollingDiv.getElement().offsetWidth - scrollingDiv.getElement().clientWidth;
var maxAllowedWidth = this.mainDiv.getWidth() - scrollbarWidth;
var excessWidth = this.header.getVisibleWidth() - maxAllowedWidth - 1;
- ClientUILib.log(ClientUILogger.ALERT, "1");
if (excessWidth > 0) {
- ClientUILib.log(ClientUILogger.INFO, "excessWidth: " + excessWidth);
this.validateColumnsWidth(cols,excessWidth);
};
- ClientUILib.log(ClientUILogger.ALERT, "2");
if (ClientUILib.isOpera) {
var _stl = headerChildren[0].getStyles().borderRightWidth;
_stl = parseInt(_stl.replace(/"px"/,""))*2;
@@ -378,7 +369,6 @@
}
var newHeight = mainDivHeight - header.getHeight() - footerHeight - 2;
newHeight -= this.header.getCaptionHeight();
- ClientUILib.log(ClientUILogger.INFO, "footerHeight: " + footerHeight);
scrollingDiv.setStyle('height:'+ newHeight +'px;');
var l = headerChildren.length;
for (var i=0; i < l-1; i++) {
Modified: trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js
===================================================================
--- trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js 2008-07-31 09:37:22 UTC (rev 9837)
+++ trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js 2008-07-31 09:52:04 UTC (rev 9838)
@@ -117,7 +117,6 @@
if (!newWidth) {
newWidth = null;
}
- ClientUILib.log(ClientUILogger.INFO, "newWidth inside method: " + newWidth);
this.getColumns()[columnIndex].width = newWidth;
}
},
@@ -211,7 +210,6 @@
OnSepClick: function(event) {
Event.stop(event);
- this.dragColumnInfo.mouseDown = false;
},
OnSepMouseDown: function(event) {
@@ -227,9 +225,8 @@
this.maxDelta = this.getColumnWidth(this.getColumnsNumber()-1);
this.maxDelta -= this.extDt.getScrollbarWidth();
if (ClientUILib.isOpera) {
- this.maxDelta -= 1;
+ this.maxDelt -= 1;
};
- ClientUILib.log(ClientUILogger.INFO, "this.maxDelta: " + this.maxDelta);
this.minDelta = this.minColumnWidth - this.getColumnWidth(srcElement.columnIndex);
Event.observe(document, 'mousemove', this.eventSepMouseMove, true);
Event.observe(document, 'mouseup', this.eventSepMouseUp, true);
@@ -282,14 +279,11 @@
// sep span width
delta -= 6;
}
- ClientUILib.log(ClientUILogger.INFO, "delta: " + delta);
var columnIndex = this.dragColumnInfo.srcElement.columnIndex;
var newWidth = this.getColumnWidth(columnIndex) + delta;
this.extDt.setColumnWidth(columnIndex, newWidth);
this.setColumnWidth(columnIndex,newWidth);
- ClientUILib.log(ClientUILogger.ALERT, "newWidth: " + newWidth);
- ClientUILib.log(ClientUILogger.INFO, "newWidth 1: " + this.extDt.getColumnWidth(1));
this.extDt.updateLayout();
if (this.extDt.onColumnResize){
//set properly value to this.columnWidths
@@ -318,7 +312,6 @@
if (delta > this.maxDelta) {
delta = this.maxDelta;
}
- ClientUILib.log(ClientUILogger.INFO, "maxDelta: " + this.maxDelta);
var x = this.dragColumnInfo.originalX + delta;
var finalX = x - this.minColumnWidth - 6 //6 stands for sep span width;
this.columnSplitter.moveToX(finalX);
Modified: trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js
===================================================================
--- trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js 2008-07-31 09:37:22 UTC (rev 9837)
+++ trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js 2008-07-31 09:52:04 UTC (rev 9838)
@@ -579,7 +579,6 @@
var j = selection[0];
for(j;j <= selection[1];j++) {
this.removeRowFromSelection(j);
- //ClientUILib.log(ClientUILogger.INFO, "Removing: " + j);
}
}
var i = range[0];
Modified: trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUILib.js
===================================================================
--- trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUILib.js 2008-07-31 09:37:22 UTC (rev 9837)
+++ trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUILib.js 2008-07-31 09:52:04 UTC (rev 9838)
@@ -299,7 +299,7 @@
}
};
-ClientUILib.load(true); //KAW debugging ON
+ClientUILib.load(false); //KAW debugging OFF
// declare predefined packages
var ClientUI = {
Modified: trunk/sandbox/ui/extendedDataTable/src/main/resources/org/richfaces/renderkit/html/css/extendedDataTable.xcss
===================================================================
--- trunk/sandbox/ui/extendedDataTable/src/main/resources/org/richfaces/renderkit/html/css/extendedDataTable.xcss 2008-07-31 09:37:22 UTC (rev 9837)
+++ trunk/sandbox/ui/extendedDataTable/src/main/resources/org/richfaces/renderkit/html/css/extendedDataTable.xcss 2008-07-31 09:52:04 UTC (rev 9838)
@@ -14,6 +14,8 @@
list-style: none;
}
+ .extdt-empty-cell{
+ }
/**
* Body cell declaration
* dr-sdt-bc - reqired
@@ -75,6 +77,9 @@
.extdt-fakeierow {
}
+
+ .extdt-thead {
+ }
.extdt-menu-div-on {
height: 23px;
@@ -111,10 +116,10 @@
.extdt-group-cell {
height: 15px;
+ padding: 4px;
background-color: #eeeeee;
border-bottom: 1px #c0c0c0 solid;
border-top: 1px #c0c0c0 solid;
- padding: 0px;
}
.extdt-group-image-expanded {
@@ -242,6 +247,7 @@
}
.extdt-caption{
+ padding: 4px;
}
.dt-sdt-hdrop-bottom-left{
@@ -274,10 +280,12 @@
.extdt-outerdiv{
position:relative;
- padding: 1px;
+ padding: 0px;
width: 100%;
}
+ .extdt-
+
/**
* Header cells separator
*/
@@ -311,6 +319,19 @@
</u:style>
</u:selector>
+<u:selector name=".extdt-empty-cell" >
+ <u:style name="border-bottom" value="solid"> <!--tableBorderColor-->
+ <f:verbatim skin="tableBorderWidth" />
+ <f:verbatim skin="tableBorderColor" />
+ </u:style>
+</u:selector>
+
+<u:selector name=".extdt-fakeierow" >
+ <u:style name="background-color">
+ <f:verbatim skin="additionalBackgroundColor"/>
+ </u:style>
+</u:selector>
+
<u:selector name=".dr-sdt-hsplit" >
<u:style name="background-image">
<f:resource f:key="/org/richfaces/renderkit/html/images/s.gif"/>
@@ -490,13 +511,6 @@
</u:style>
</u:selector>
-<u:selector name=".extdt-thead" >
- <u:style name="border-bottom" value="solid"> <!--tableBorderColor-->
- <f:verbatim skin="tableBorderWidth" />
- <f:verbatim skin="tableBorderColor" />
- </u:style>
-</u:selector>
-
<u:selector name=".extdt-subheadercell" >
<u:style name="border-right" value="solid"> <!--tableBorderColor-->
<f:verbatim skin="tableBorderWidth" />
@@ -532,6 +546,7 @@
.extdt-header-sort-img {
vertical-align: middle;
}
+
</f:verbatim>
<u:selector name=".extdt-footer" >
16 years, 5 months
JBoss Rich Faces SVN: r9837 - trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable.
by richfaces-svn-commits@lists.jboss.org
Author: piotr.buda
Date: 2008-07-31 05:37:22 -0400 (Thu, 31 Jul 2008)
New Revision: 9837
Modified:
trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js
Log:
Separator click fix
Modified: trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js
===================================================================
--- trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js 2008-07-31 08:21:17 UTC (rev 9836)
+++ trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js 2008-07-31 09:37:22 UTC (rev 9837)
@@ -211,6 +211,7 @@
OnSepClick: function(event) {
Event.stop(event);
+ this.dragColumnInfo.mouseDown = false;
},
OnSepMouseDown: function(event) {
@@ -226,7 +227,7 @@
this.maxDelta = this.getColumnWidth(this.getColumnsNumber()-1);
this.maxDelta -= this.extDt.getScrollbarWidth();
if (ClientUILib.isOpera) {
- this.maxDelt -= 1;
+ this.maxDelta -= 1;
};
ClientUILib.log(ClientUILogger.INFO, "this.maxDelta: " + this.maxDelta);
this.minDelta = this.minColumnWidth - this.getColumnWidth(srcElement.columnIndex);
16 years, 5 months
JBoss Rich Faces SVN: r9836 - trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-07-31 04:21:17 -0400 (Thu, 31 Jul 2008)
New Revision: 9836
Modified:
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
Log:
https://jira.jboss.org/jira/browse/RF-4062
Modified: trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
===================================================================
--- trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-07-31 08:12:37 UTC (rev 9835)
+++ trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-07-31 08:21:17 UTC (rev 9836)
@@ -27,6 +27,7 @@
this.comboList.listParent.observe("mousedown", function(e){this.listMousedownHandler(e);}.bindAsEventListener(this));
this.comboList.listParent.observe("mousemove", function(e){this.listMouseMoveHandler(e)}.bindAsEventListener(this));
this.comboList.listParent.observe("click", function(e){this.listClickHandler(e);}.bindAsEventListener(this));
+ this.comboList.listParent.observe("mouseup", function(e){this.listMouseUpHandler(e);}.bindAsEventListener(this));
},
setInputWidth : function($super, textSize) {
@@ -138,6 +139,15 @@
}
},
+ listMouseUpHandler : function(e) {
+ if (window.getSelection) {
+ if (window.getSelection().getRangeAt(0).toString() != '') {
+ this.tempValueKeeper.focus();
+ this.comboList.isList = false;
+ }
+ }
+ },
+
tmpValueKeyDownHandler : function(event) {
switch (event.keyCode) {
case Event.KEY_RETURN :
16 years, 5 months
JBoss Rich Faces SVN: r9835 - trunk/sandbox/ui/extendedDataTable/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: piotr.buda
Date: 2008-07-31 04:12:37 -0400 (Thu, 31 Jul 2008)
New Revision: 9835
Modified:
trunk/sandbox/ui/extendedDataTable/src/main/config/component/ExtendedDataTable.xml
Log:
Default height fix
Modified: trunk/sandbox/ui/extendedDataTable/src/main/config/component/ExtendedDataTable.xml
===================================================================
--- trunk/sandbox/ui/extendedDataTable/src/main/config/component/ExtendedDataTable.xml 2008-07-31 01:08:18 UTC (rev 9834)
+++ trunk/sandbox/ui/extendedDataTable/src/main/config/component/ExtendedDataTable.xml 2008-07-31 08:12:37 UTC (rev 9835)
@@ -84,12 +84,6 @@
<defaultvalue>"0"</defaultvalue>
</property>
<property>
- <name>height</name>
- <classname>java.lang.String</classname>
- <description>This attributes specifies the height of the component</description>
- <defaultvalue>"500"</defaultvalue>
- </property>
- <property>
<name>cellpadding</name>
<classname>java.lang.String</classname>
<description>This attribute specifies the amount of space between the border of the cell and its contents</description>
16 years, 5 months
JBoss Rich Faces SVN: r9834 - in trunk/framework/impl/src/main/java/org/ajax4jsf: resource/cached and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-07-30 21:08:18 -0400 (Wed, 30 Jul 2008)
New Revision: 9834
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/cached/CachedResourceBuilder.java
trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java
Log:
https://jira.jboss.org/jira/browse/RF-4063
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java 2008-07-31 01:08:11 UTC (rev 9833)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java 2008-07-31 01:08:18 UTC (rev 9834)
@@ -308,9 +308,12 @@
.getMessage(Messages.QUERY_STRING_BUILDING_ERROR), e);
}
}
+
+ boolean isGlobal = !resource.isSessionAware();
+
String resourceURL = getWebXml(context).getFacesResourceURL(context,
- uri.toString());// context.getApplication().getViewHandler().getResourceURL(context,uri.toString());
- if (resource.isSessionAware()) {
+ uri.toString(), isGlobal);// context.getApplication().getViewHandler().getResourceURL(context,uri.toString());
+ if (!isGlobal) {
resourceURL = context.getExternalContext().encodeResourceURL(
resourceURL);
}
@@ -416,8 +419,8 @@
// return getWebXml(context).getFacesResourceKey(request);
// }
- public String getFacesResourceURL(FacesContext context, String Url) {
- return getWebXml(context).getFacesResourceURL(context, Url);
+ public String getFacesResourceURL(FacesContext context, String Url, boolean isGlobal) {
+ return getWebXml(context).getFacesResourceURL(context, Url, isGlobal);
}
/**
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/cached/CachedResourceBuilder.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/resource/cached/CachedResourceBuilder.java 2008-07-31 01:08:11 UTC (rev 9833)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/resource/cached/CachedResourceBuilder.java 2008-07-31 01:08:18 UTC (rev 9834)
@@ -131,8 +131,11 @@
// Refresh LRU
cache.get(key);
}
- String resourceURL = getFacesResourceURL(facesContext, key);
- if (resource.isSessionAware()) {
+
+ boolean isGlobal = !resource.isSessionAware();
+
+ String resourceURL = getFacesResourceURL(facesContext, key, isGlobal);
+ if (!isGlobal) {
resourceURL = facesContext.getExternalContext().encodeResourceURL(
resourceURL);
}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java 2008-07-31 01:08:11 UTC (rev 9833)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java 2008-07-31 01:08:18 UTC (rev 9834)
@@ -68,25 +68,37 @@
static final String WEB_XML = "/WEB-INF/web.xml";
- public static final String RESOURCE_URI_PREFIX_START = "a4j";
+ public static final String RESOURCE_URI_PREFIX = "a4j";
- public static final String RESOURCE_URI_PREFIX;
+ public static final String GLOBAL_RESOURCE_URI_PREFIX = "a4j/g";
+
+ public static final String SESSION_RESOURCE_URI_PREFIX = "a4j/s";
+ public static final String RESOURCE_URI_PREFIX_VERSIONED;
+
+ public static final String GLOBAL_RESOURCE_URI_PREFIX_VERSIONED;
+
+ public static final String SESSION_RESOURCE_URI_PREFIX_VERSIONED;
+
static {
VersionBean versionBean = new VersionBean();
Version version = versionBean.getVersion();
+ String suffix = "/" + version.getMajor() + "_" + version.getMinor() + "_"
+ + version.getRevision();
+
//that's to prevent static compile-time linkage to constant values
- RESOURCE_URI_PREFIX = RESOURCE_URI_PREFIX_START + "/" +
- + version.getMajor() + "_" + version.getMinor() + "_"
- + version.getRevision();
+ RESOURCE_URI_PREFIX_VERSIONED = RESOURCE_URI_PREFIX + suffix;
+ GLOBAL_RESOURCE_URI_PREFIX_VERSIONED = GLOBAL_RESOURCE_URI_PREFIX + suffix;
+ SESSION_RESOURCE_URI_PREFIX_VERSIONED = SESSION_RESOURCE_URI_PREFIX + suffix;
}
- static final String RESOURCE_URI_PREFIX_WITH_SLASH = "/"
- + RESOURCE_URI_PREFIX;
-
public static final String RESOURCE_URI_PREFIX_PARAM = "org.ajax4jsf.RESOURCE_URI_PREFIX";
+ public static final String GLOBAL_RESOURCE_URI_PREFIX_PARAM = "org.ajax4jsf.GLOBAL_RESOURCE_URI_PREFIX";
+
+ public static final String SESSION_RESOURCE_URI_PREFIX_PARAM = "org.ajax4jsf.SESSION_RESOURCE_URI_PREFIX";
+
/**
* Prefix for Resourse-Ajax filter, in common must be same as for
* {@link javax.faces.webapp.FacesServlet}
@@ -114,8 +126,12 @@
/**
* Prefix for resources handled by Chameleon framework.
*/
- private String _resourcePrefix = RESOURCE_URI_PREFIX_WITH_SLASH;
+ private String _resourcePrefix = RESOURCE_URI_PREFIX;
+ private String _globalResourcePrefix;
+
+ private String _sessionResourcePrefix;
+
public static WebXml getInstance() {
return getInstance(FacesContext.getCurrentInstance());
}
@@ -279,9 +295,9 @@
* @param Url
* @return
*/
- public String getFacesResourceURL(FacesContext context, String Url) {
+ public String getFacesResourceURL(FacesContext context, String Url, boolean isGlobal) {
StringBuffer buf = new StringBuffer();
- buf.append(getResourcePrefix()).append(Url);
+ buf.append(isGlobal ? getGlobalResourcePrefix() : getSessionResourcePrefix()).append(Url);
// Insert suffix mapping
if (isPrefixMapping()) {
buf.insert(0, getFacesFilterPrefix());
@@ -299,6 +315,65 @@
}
+ @Deprecated
+ public String getFacesResourceURL(FacesContext context, String Url) {
+ return getFacesResourceURL(context, Url, false);
+ }
+
+ public String getFacesResourceKey(String resourcePath) {
+ // Remove JSESSIONID - for expired sessions it will merged to path.
+ int jsesionidStart;
+ if ((jsesionidStart = resourcePath.lastIndexOf(";jsessionid")) >= 0) {
+ resourcePath = resourcePath.substring(0, jsesionidStart);
+ }
+ String resourcePrefix = getResourcePrefix();
+ if (isPrefixMapping()) {
+ String facesFilterPrefix = getFacesFilterPrefix();
+
+ if (resourcePath.startsWith(facesFilterPrefix)) {
+ String sessionResourcePrefix = getSessionResourcePrefix();
+ if (resourcePath.startsWith(sessionResourcePrefix, facesFilterPrefix.length())) {
+ return resourcePath.substring(facesFilterPrefix.length()
+ + sessionResourcePrefix.length());
+ } else {
+ String globalResourcePrefix = getGlobalResourcePrefix();
+ if (!sessionResourcePrefix.equals(globalResourcePrefix) &&
+ resourcePath.startsWith(globalResourcePrefix, facesFilterPrefix.length())) {
+
+ return resourcePath.substring(facesFilterPrefix.length()
+ + globalResourcePrefix.length());
+ } else if (!globalResourcePrefix.equals(resourcePrefix) &&
+ resourcePath.startsWith(resourcePrefix, facesFilterPrefix.length())) {
+
+ return resourcePath.substring(facesFilterPrefix.length()
+ + resourcePrefix.length());
+ }
+ }
+ }
+ } else {
+ String sessionResourcePrefix = getSessionResourcePrefix();
+ if (resourcePath.startsWith(sessionResourcePrefix)) {
+ return resourcePath.substring(sessionResourcePrefix.length(),
+ resourcePath.length() - getFacesFilterSuffix().length());
+ } else {
+ String globalResourcePrefix = getGlobalResourcePrefix();
+ if (!sessionResourcePrefix.equals(globalResourcePrefix) &&
+ resourcePath.startsWith(globalResourcePrefix)) {
+
+ return resourcePath.substring(globalResourcePrefix.length(),
+ resourcePath.length() - getFacesFilterSuffix().length());
+ } else if (!globalResourcePrefix.equals(resourcePrefix) &&
+ resourcePath.startsWith(resourcePrefix)) {
+
+ return resourcePath.substring(resourcePrefix.length(),
+ resourcePath.length() - getFacesFilterSuffix().length());
+ }
+ }
+ }
+
+ return null;
+ }
+
/**
* Detect request to resource and extract key from request
*
@@ -309,22 +384,8 @@
public String getFacesResourceKey(HttpServletRequest request) {
String resourcePath = request.getRequestURI().substring(
request.getContextPath().length());// isPrefixMapping()?request.getPathInfo():request.getServletPath();
- // Remove JSESSIONID - for expired sessions it will merged to path.
- int jsesionidStart;
- if ((jsesionidStart = resourcePath.lastIndexOf(";jsessionid")) >= 0) {
- resourcePath = resourcePath.substring(0, jsesionidStart);
- }
- if (isPrefixMapping()) {
- if (resourcePath.startsWith(getFacesFilterPrefix()
- + getResourcePrefix())) {
- return resourcePath.substring(getFacesFilterPrefix().length()
- + getResourcePrefix().length());
- }
- } else if (resourcePath.startsWith(getResourcePrefix())) {
- return resourcePath.substring(getResourcePrefix().length(),
- resourcePath.length() - getFacesFilterSuffix().length());
- }
- return null;
+
+ return getFacesResourceKey(resourcePath);
}
/**
@@ -380,19 +441,57 @@
/**
* @return Returns the resourcePrefix.
*/
+ @Deprecated
public String getResourcePrefix() {
return _resourcePrefix;
}
/**
+ * @since 3.2.2
+ * @return
+ */
+ public String getGlobalResourcePrefix() {
+ return _globalResourcePrefix;
+ }
+
+ /**
+ * @since 3.2.2
+ * @return
+ */
+ public String getSessionResourcePrefix() {
+ return _sessionResourcePrefix;
+ }
+
+ /**
* @param resourcePrefix
* The resourcePrefix to set.
*/
+ @Deprecated
void setResourcePrefix(String resourcePrefix) {
_resourcePrefix = resourcePrefix;
}
/**
+ * @since 3.2.2
+ * @param resourcePrefix
+ * The resourcePrefix to set.
+ */
+ void setGlobalResourcePrefix(String resourcePrefix) {
+ _globalResourcePrefix = resourcePrefix;
+ }
+
+ /**
+ * @since 3.2.2
+ * @param resourcePrefix
+ * The resourcePrefix to set.
+ *
+ */
+
+ void setSessionResourcePrefix(String resourcePrefix) {
+ _sessionResourcePrefix = resourcePrefix;
+ }
+
+ /**
* @return Returns the filterName.
*/
public String getFilterName() {
@@ -444,21 +543,56 @@
Messages.NO_PREFIX_OR_SUFFIX_IN_FILTER_MAPPING_ERROR,
filterName));
}
+
+ String globalResourcePrefix = (String) context
+ .getInitParameter(GLOBAL_RESOURCE_URI_PREFIX_PARAM);
+
+ String sessionResourcePrefix = (String) context
+ .getInitParameter(SESSION_RESOURCE_URI_PREFIX_PARAM);
+
String resourcePrefix = (String) context
- .getInitParameter(RESOURCE_URI_PREFIX_PARAM);
- if (null == resourcePrefix) {
- resourcePrefix = RESOURCE_URI_PREFIX;
+ .getInitParameter(RESOURCE_URI_PREFIX_PARAM);
+
+ if (null != resourcePrefix) {
+ if (globalResourcePrefix == null) {
+ //TODO overriden
+ globalResourcePrefix = resourcePrefix;
+ }
+
+ if (sessionResourcePrefix == null) {
+ //TODO overriden
+ sessionResourcePrefix = resourcePrefix;
+ }
+ } else {
+ resourcePrefix = RESOURCE_URI_PREFIX_VERSIONED;
}
+
+ if (globalResourcePrefix == null) {
+ //TODO overriden
+ globalResourcePrefix = GLOBAL_RESOURCE_URI_PREFIX_VERSIONED;
+ }
+
+ if (sessionResourcePrefix == null) {
+ //TODO overriden
+ sessionResourcePrefix = SESSION_RESOURCE_URI_PREFIX_VERSIONED;
+ }
+
if (null != _facesFilterPrefix) {
_prefixMapping = true;
if (_facesFilterPrefix.endsWith("/")) {
+ setGlobalResourcePrefix(globalResourcePrefix);
+ setSessionResourcePrefix(sessionResourcePrefix);
setResourcePrefix(resourcePrefix);
} else {
+ setGlobalResourcePrefix("/" + globalResourcePrefix);
+ setSessionResourcePrefix("/" + sessionResourcePrefix);
setResourcePrefix("/" + resourcePrefix);
}
} else if (null != _facesFilterSuffix) {
_prefixMapping = false;
setResourcePrefix("/" + resourcePrefix);
+ setGlobalResourcePrefix("/" + globalResourcePrefix);
+ setSessionResourcePrefix("/" + sessionResourcePrefix);
}
}
16 years, 5 months