JBoss Rich Faces SVN: r9853 - trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/nekko.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-07-31 12:42:30 -0400 (Thu, 31 Jul 2008)
New Revision: 9853
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/nekko/NekkoXMLFilter.java
Log:
https://jira.jboss.org/jira/browse/RF-3605
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/nekko/NekkoXMLFilter.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/nekko/NekkoXMLFilter.java 2008-07-31 14:34:33 UTC (rev 9852)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/nekko/NekkoXMLFilter.java 2008-07-31 16:42:30 UTC (rev 9853)
@@ -39,7 +39,7 @@
protected HtmlParser getParser(String mimetype, boolean isAjax, String viewId) {
HtmlParser parser = null;
if( isAjax ){
- parser = getXmlParser();
+ parser = getXmlParser(mimetype);
} else if (mimetype.startsWith(TEXT_HTML) || mimetype.startsWith(APPLICATION_XHTML_XML)) {
parser = new FastHtmlParser();
} else {
@@ -74,7 +74,7 @@
* @return
* @throws ServletException
*/
- protected HtmlParser getXmlParser() {
+ protected HtmlParser getXmlParser(String mime) {
// TODO make pool of parsers-transformers.
NekkoParser parser ;
try {
@@ -90,6 +90,7 @@
// parser.setMoveElements(isForcexml());
parser.init();
}
+ parser.setMime(mime);
// TODO - set header scripts/styles filter.
return parser;
}
16 years, 5 months
JBoss Rich Faces SVN: r9852 - trunk/ui/dataTable/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-07-31 10:34:33 -0400 (Thu, 31 Jul 2008)
New Revision: 9852
Modified:
trunk/ui/dataTable/src/main/config/component/dataList.xml
Log:
RF-3141
RF-3143
Modified: trunk/ui/dataTable/src/main/config/component/dataList.xml
===================================================================
--- trunk/ui/dataTable/src/main/config/component/dataList.xml 2008-07-31 14:20:24 UTC (rev 9851)
+++ trunk/ui/dataTable/src/main/config/component/dataList.xml 2008-07-31 14:34:33 UTC (rev 9852)
@@ -181,6 +181,16 @@
<classname>java.lang.String</classname>
</property>
+ <property hidden="true">
+ <name>footerClass</name>
+ <classname>java.lang.String</classname>
+ </property>
+
+ <property hidden="true">
+ <name>headerClass</name>
+ <classname>java.lang.String</classname>
+ </property>
+
<!--
<property>
<name>param</name>
16 years, 5 months
JBoss Rich Faces SVN: r9851 - trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/css.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-07-31 10:20:24 -0400 (Thu, 31 Jul 2008)
New Revision: 9851
Modified:
trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/css/menucomponents.xcss
Log:
https://jira.jboss.org/jira/browse/RF-4049
Modified: trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/css/menucomponents.xcss
===================================================================
--- trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/css/menucomponents.xcss 2008-07-31 13:49:37 UTC (rev 9850)
+++ trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/css/menucomponents.xcss 2008-07-31 14:20:24 UTC (rev 9851)
@@ -9,6 +9,7 @@
font-size : 0px;
border-top: 1px solid;
margin : 2px 0px 2px 24px;
+ cursor: default;
}
.dr-menu-item {
padding : 1px 35px 1px 1px;
16 years, 5 months
JBoss Rich Faces SVN: r9850 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-07-31 09:49:37 -0400 (Thu, 31 Jul 2008)
New Revision: 9850
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/usage.xhtml
Log:
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/usage.xhtml 2008-07-31 13:46:05 UTC (rev 9849)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/usage.xhtml 2008-07-31 13:49:37 UTC (rev 9850)
@@ -110,8 +110,8 @@
activated and in other case - it will call standard navigation handling
</p>
<p>
- There is is more detailed explanation how configure and use Rich Faces states
- mechanism in JSF application in details tab.
+ There is step by step instructions how configure Rich Faces states
+ manager for existing JSF application in details tab.
</p>
</ui:define>
</ui:composition>
16 years, 5 months
JBoss Rich Faces SVN: r9849 - in trunk/samples/richfaces-demo/src/main/webapp/richfaces: beanValidator/examples and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-07-31 09:46:05 -0400 (Thu, 31 Jul 2008)
New Revision: 9849
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/examples/details.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/app.xml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/appfact.xml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/bean.java
trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/beans.xml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/cfg.xml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/config.java
trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/loginaction.java
trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/registeraction.java
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/beanValidator/examples/simple.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/usage.xhtml
Log:
stateAPI sample
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 13:40:14 UTC (rev 9848)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/beanValidator/examples/simple.xhtml 2008-07-31 13:46:05 UTC (rev 9849)
@@ -12,13 +12,19 @@
</f:facet>
<h:panelGrid columns="3">
<h:outputText value="Name:" />
- <h:inputText value="#{validationBean.name}" id="name"/>
+ <h:inputText value="#{validationBean.name}" id="name">
+ <rich:ajaxValidator/>
+ </h:inputText>
<rich:message for="name" />
<h:outputText value="Email:" />
- <h:inputText value="#{validationBean.email}" id="email"/>
+ <h:inputText value="#{validationBean.email}" id="email">
+ <rich:beanValidator/>
+ </h:inputText>
<rich:message for="email" />
<h:outputText value="Age:" />
- <h:inputText value="#{validationBean.age}" id="age"/>
+ <h:inputText value="#{validationBean.age}" id="age">
+ <rich:beanValidator/>
+ </h:inputText>
<rich:message for="age" />
</h:panelGrid>
<a4j:commandButton value="Submit"/>
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/examples/details.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/examples/details.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/examples/details.xhtml 2008-07-31 13:46:05 UTC (rev 9849)
@@ -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: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>
+ <p>
+ In order to use Rich Faces State Manager API you should perform next steps:
+ </p>
+ <ul>
+ <li>
+ Register state manager El resolver and navigation handler in faces config:
+ <p>
+ <rich:insert src="/richfaces/stateAPI/snippets/app.xml" highlight="xml"/>
+ </p>
+ </li>
+ <li>
+ Register additional application-factory in faces-config:
+ <p>
+ <rich:insert src="/richfaces/stateAPI/snippets/appfact.xml" highlight="xml"/>
+ </p>
+ </li>
+ <li>
+ Register two managed beans. One should define and store states itself.
+ And the other should define bean with type <i>org.richfaces.ui.model.States</i>
+ and have managed property <i>states</i> bound to the bean which defines states.
+ (Will be changed to xml declarations in future releases)
+ <p>
+ <rich:insert src="/richfaces/stateAPI/snippets/beans.xml" highlight="xml"/>
+ </p>
+ </li>
+ <li>
+ Define states in Config class. (full code example on the <i>Usage</i> tab)
+ </li>
+ <li>
+ Use <b>state</b> bindings on the pages.
+ </li>
+ </ul>
+ </ui:composition>
+</html>
\ No newline at end of file
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/app.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/app.xml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/app.xml 2008-07-31 13:46:05 UTC (rev 9849)
@@ -0,0 +1,4 @@
+ <application>
+ <navigation-handler>org.richfaces.ui.application.StateNavigationHandler</navigation-handler>
+ <el-resolver>org.richfaces.el.StateELResolver</el-resolver>
+ </application>
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/appfact.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/appfact.xml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/appfact.xml 2008-07-31 13:46:05 UTC (rev 9849)
@@ -0,0 +1,3 @@
+ <factory>
+ <application-factory>org.richfaces.ui.application.StateApplicationFactory</application-factory>
+ </factory>
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/bean.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/bean.java (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/bean.java 2008-07-31 13:46:05 UTC (rev 9849)
@@ -0,0 +1,38 @@
+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;
+
+ 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/webapp/richfaces/stateAPI/snippets/beans.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/beans.xml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/beans.xml 2008-07-31 13:46:05 UTC (rev 9849)
@@ -0,0 +1,15 @@
+ <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>
\ No newline at end of file
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/cfg.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/cfg.xml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/cfg.xml 2008-07-31 13:46:05 UTC (rev 9849)
@@ -0,0 +1,30 @@
+ <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>
\ No newline at end of file
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/config.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/config.java (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/config.java 2008-07-31 13:46:05 UTC (rev 9849)
@@ -0,0 +1,73 @@
+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;
+
+public class Config {
+
+ 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/webapp/richfaces/stateAPI/snippets/loginaction.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/loginaction.java (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/loginaction.java 2008-07-31 13:46:05 UTC (rev 9849)
@@ -0,0 +1,25 @@
+package org.richfaces.demo.stateApi;
+
+import javax.faces.event.ActionEvent;
+
+public class LoginAction
+{
+
+ private Bean bean;
+
+ public void listener(ActionEvent event) {
+ //fetching some data on login
+ }
+
+ public String 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/webapp/richfaces/stateAPI/snippets/registeraction.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/registeraction.java (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/snippets/registeraction.java 2008-07-31 13:46:05 UTC (rev 9849)
@@ -0,0 +1,40 @@
+package org.richfaces.demo.stateApi;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+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;
+ }
+ }
+
+ public Bean getBean() {
+ return bean;
+ }
+
+ public void setBean(Bean bean) {
+ this.bean = bean;
+ }
+
+}
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/usage.xhtml 2008-07-31 13:40:14 UTC (rev 9848)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI/usage.xhtml 2008-07-31 13:46:05 UTC (rev 9849)
@@ -13,17 +13,106 @@
}
</style>
<p>
- Description
+ Rich Faces State API allows easily define some set of states for the pages and any
+ properties sets for this states.
</p>
+ <p>
+ Imagine one state as a set of named value bindings method bindings and some
+ additional properties to be used after the state activated. So you could define
+ inputs values, controls labels and actions, rendering conditions and etc
+ using the same state variables which will have different values for every state.
+ </p>
+ <p>
+ Next small example panel
+ has two states: <b>login</b> and <b>register</b>. Lets list the changes between
+ login and register.
+ </p>
+ <ul>
+ <li>
+ Confirmation field for password should appears in register state.
+ </li>
+ <li>
+ Method bindings should differs for the action button in every state.
+ </li>
+ <li>
+ Value bindings for the fields could be different between states.
+ </li>
+ <li>
+ Some labels should be changed between states
+ </li>
+ </ul>
+ <p>
+ Also there should be a link which will switch states from login to register
+ </p>
+ <p>
+ Now try the example itself before further explanations.
+ </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="openlabel" value="Template Page" />
<ui:param name="sourcepath" value="/richfaces/stateAPI/examples/example.xhtml"/>
</ui:include>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="openlabel" value="Initial wizard page(Page with EL bindings to state)" />
+ <ui:param name="sourcepath" value="/richfaces/stateAPI/examples/simple.xhtml"/>
+ </ui:include>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="openlabel" value="Logged in page" />
+ <ui:param name="sourcepath" value="/richfaces/stateAPI/examples/loginResult.xhtml"/>
+ </ui:include>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="openlabel" value="Registered page" />
+ <ui:param name="sourcepath" value="/richfaces/stateAPI/examples/registerResult.xhtml"/>
+ </ui:include>
+
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcetype" value="java" />
+ <ui:param name="openlabel" value="Config Bean(States definition)" />
+ <ui:param name="sourcepath" value="/richfaces/stateAPI/snippets/config.java"/>
+ </ui:include>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcetype" value="java" />
+ <ui:param name="openlabel" value="Bean(Stores login/register info)" />
+ <ui:param name="sourcepath" value="/richfaces/stateAPI/snippets/bean.java"/>
+ </ui:include>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcetype" value="java" />
+ <ui:param name="openlabel" value="Loginaction.java" />
+ <ui:param name="sourcepath" value="/richfaces/stateAPI/snippets/loginaction.java"/>
+ </ui:include>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcetype" value="java" />
+ <ui:param name="openlabel" value="Registeraction.java" />
+ <ui:param name="sourcepath" value="/richfaces/stateAPI/snippets/registeraction.java"/>
+ </ui:include>
+
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcetype" value="xml" />
+ <ui:param name="openlabel" value="faces-config beans definitions" />
+ <ui:param name="sourcepath" value="/richfaces/stateAPI/examples/cfg.xhtml"/>
+ </ui:include>
</div>
</fieldset>
+ <p>
+ Actually states is a map where the entry key is name of the state and value
+ is state map. Concrete state map has entries with some names as keys and
+ any objects as values. So any value or method bindings or just simple state
+ constants could be saved in State map.
+ </p>
+ <p>
+ Rich Faces state API implements states change as standard JSF navigation.
+ Action component should just return outcome and our extension for JSF
+ navigation handler will check if this outcome registered as state change
+ outcome. If such state change outcome found - corresponding state will be
+ activated and in other case - it will call standard navigation handling
+ </p>
+ <p>
+ There is is more detailed explanation how configure and use Rich Faces states
+ mechanism in JSF application in details tab.
+ </p>
</ui:define>
</ui:composition>
</html>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI.xhtml 2008-07-31 13:40:14 UTC (rev 9848)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/stateAPI.xhtml 2008-07-31 13:46:05 UTC (rev 9849)
@@ -7,7 +7,20 @@
<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"/>
+ <rich:tabPanel switchType="server" styleClass="top_tab" contentClass="content_tab" headerClass="header_tabs_class" inactiveTabClass="inactive_tab" activeTabClass="active_tab"
+ selectedTab="#{componentNavigator.currentComponent.activeTab}">
+ <rich:tab label="Usage" name="usage">
+ <ui:include src="/richfaces/stateAPI/usage.xhtml"/>
+ </rich:tab>
+ <rich:tab label="Usage Details" name="details">
+ <ui:include src="/richfaces/stateAPI/examples/details.xhtml"/>
+ </rich:tab>
+ <rich:tab name="info" label="Tag Information">
+ <rich:insert
+ src="/WEB-INF/#{componentNavigator.currentComponent.tagInfoLocation}"
+ errorContent="/templates/include/tagInfoNotes.xhtml" />
+ </rich:tab>
+ </rich:tabPanel>
</ui:define>
</ui:composition>
</html>
16 years, 5 months
JBoss Rich Faces SVN: r9848 - trunk/ui/core/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2008-07-31 09:40:14 -0400 (Thu, 31 Jul 2008)
New Revision: 9848
Modified:
trunk/ui/core/src/main/config/component/include.xml
Log:
https://jira.jboss.org/jira/browse/RF-3813
attribute default value is changed in description
Modified: trunk/ui/core/src/main/config/component/include.xml
===================================================================
--- trunk/ui/core/src/main/config/component/include.xml 2008-07-31 13:25:25 UTC (rev 9847)
+++ trunk/ui/core/src/main/config/component/include.xml 2008-07-31 13:40:14 UTC (rev 9848)
@@ -70,7 +70,7 @@
(or not) included in AJAX response created by parent
AJAX Container, even if it is not forced by reRender
list of ajax action. Ignored if component marked to output by some Ajax action component.
- Default value is "false".</description>
+ Default value is "true".</description>
</property>
<property>
<name>keepTransient</name>
16 years, 5 months
JBoss Rich Faces SVN: r9847 - trunk/ui/calendar/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2008-07-31 09:25:25 -0400 (Thu, 31 Jul 2008)
New Revision: 9847
Modified:
trunk/ui/calendar/src/main/config/component/calendar.xml
Log:
RF-696 - added description for "todayControlMode" attribute.
Modified: trunk/ui/calendar/src/main/config/component/calendar.xml
===================================================================
--- trunk/ui/calendar/src/main/config/component/calendar.xml 2008-07-31 13:24:38 UTC (rev 9846)
+++ trunk/ui/calendar/src/main/config/component/calendar.xml 2008-07-31 13:25:25 UTC (rev 9847)
@@ -553,7 +553,7 @@
<name>todayControlMode</name>
<classname>java.lang.String</classname>
<description>
- Possible values are "scroll", "select", "hidden". Default value is "select".
+ This attribute defines the mode for "today" control. Possible values are "scroll", "select", "hidden". Default value is "select".
</description>
<defaultvalue>"select"</defaultvalue>
</property>
16 years, 5 months
JBoss Rich Faces SVN: r9846 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2008-07-31 09:24:38 -0400 (Thu, 31 Jul 2008)
New Revision: 9846
Modified:
trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
Log:
RF-4036 - described this attribute with its possible values.
Modified: trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2008-07-31 13:24:00 UTC (rev 9845)
+++ trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2008-07-31 13:24:38 UTC (rev 9846)
@@ -104,6 +104,21 @@
<para>The <emphasis><property>"value"</property></emphasis> attribute stores selected date currently.</para>
<para>With help of the <emphasis><property>"currentDate"</property></emphasis> attribute
you can define month and year which will be displayed currently.</para>
+ <para>
+ The <emphasis><property>"todayControlMode"</property></emphasis> attribute defines the mode for "today" control.
+ Possible values are:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>"hidden" - in this mode "Today" button will not be displayed</para>
+ </listitem>
+ <listitem>
+ <para>"select" - (default) in this state "Today" button activation will scroll the calendar to the current date and it become selected date</para>
+ </listitem>
+ <listitem>
+ <para>"scroll" - in this mode "Today" activation will simply scroll the calendar to current month without changing selected day.</para>
+ </listitem>
+ </itemizedlist>
<para>The <emphasis role="bold">
<property><rich:calendar></property>
</emphasis> component can render pages of days in two modes. A mode could be
@@ -503,31 +518,31 @@
<row>
<entry role="tbi">isDateEnabled(date)</entry>
- <entry role="tbi">Checks if given date is selectable <para>(to be implemented)</para></entry>
+ <entry role="tbi">Checks if given date is selectable (to be implemented)</entry>
</row>
<row>
<entry role="tbi">enableDate(date)</entry>
- <entry role="tbi">Enables date cell control on the calendar <para>(to be implemented)</para></entry>
+ <entry role="tbi">Enables date cell control on the calendar (to be implemented)</entry>
</row>
<row>
<entry role="tbi">disableDate(date)</entry>
- <entry role="tbi">Disables date cell control on the calendar <para>(to be implemented)</para></entry>
+ <entry role="tbi">Disables date cell control on the calendar (to be implemented)</entry>
</row>
<row>
<entry role="tbi">enableDates(date[])</entry>
- <entry role="tbi">Enables dates cell controls set on the calendar <para>(to be implemented)</para></entry>
+ <entry role="tbi">Enables dates cell controls set on the calendar (to be implemented)</entry>
</row>
<row>
<entry role="tbi">disableDates(date[])</entry>
- <entry role="tbi">Disables dates cell controls set on the calendar <para>(to be implemented)</para></entry>
+ <entry role="tbi">Disables dates cell controls set on the calendar (to be implemented)</entry>
</row>
<row>
16 years, 5 months
JBoss Rich Faces SVN: r9845 - in trunk/docs/userguide/en/src/main: resources/css and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2008-07-31 09:24:00 -0400 (Thu, 31 Jul 2008)
New Revision: 9845
Modified:
trunk/docs/userguide/en/src/main/docbook/included/comboBox.xml
trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.xml
trunk/docs/userguide/en/src/main/docbook/included/inplaceSelect.xml
trunk/docs/userguide/en/src/main/docbook/included/listShuttle.xml
trunk/docs/userguide/en/src/main/docbook/included/orderingList.xml
trunk/docs/userguide/en/src/main/resources/css/html.css
Log:
RF-3875 - "table rows are shifted see this in IE 6 (to be implemented) enableDate(date) Enables date cell control on the calendar" - done;
"bold font in all single version userguide" - done;
"title for images are too large, the smaller font should be used" - done.
Modified: trunk/docs/userguide/en/src/main/docbook/included/comboBox.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/comboBox.xml 2008-07-31 13:00:53 UTC (rev 9844)
+++ trunk/docs/userguide/en/src/main/docbook/included/comboBox.xml 2008-07-31 13:24:00 UTC (rev 9845)
@@ -288,11 +288,11 @@
</row>
<row>
<entry role="tbi">enable()</entry>
- <entry role="tbi">Enables the control for input <para>(to be implemented)</para></entry>
+ <entry role="tbi">Enables the control for input (to be implemented)</entry>
</row>
<row>
<entry role="tbi">disable()</entry>
- <entry role="tbi">Disables the control for input <para>(to be implemented)</para></entry>
+ <entry role="tbi">Disables the control for input (to be implemented)</entry>
</row>
</tbody>
</tgroup>
Modified: trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.xml 2008-07-31 13:00:53 UTC (rev 9844)
+++ trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.xml 2008-07-31 13:24:00 UTC (rev 9845)
@@ -442,7 +442,7 @@
</row>
<row>
<entry role="tbi">setValue(newValue) </entry>
- <entry role="tbi">Sets the current value <para>(to be implemented)</para></entry>
+ <entry role="tbi">Sets the current value (to be implemented)</entry>
</row>
</tbody>
</tgroup>
Modified: trunk/docs/userguide/en/src/main/docbook/included/inplaceSelect.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/inplaceSelect.xml 2008-07-31 13:00:53 UTC (rev 9844)
+++ trunk/docs/userguide/en/src/main/docbook/included/inplaceSelect.xml 2008-07-31 13:24:00 UTC (rev 9845)
@@ -463,7 +463,7 @@
<row>
<entry role="tbi">setValue(newValue)</entry>
- <entry role="tbi">Sets the current value <para>(to be implemented)</para></entry>
+ <entry role="tbi">Sets the current value (to be implemented)</entry>
</row>
</tbody>
Modified: trunk/docs/userguide/en/src/main/docbook/included/listShuttle.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/listShuttle.xml 2008-07-31 13:00:53 UTC (rev 9844)
+++ trunk/docs/userguide/en/src/main/docbook/included/listShuttle.xml 2008-07-31 13:24:00 UTC (rev 9845)
@@ -407,44 +407,44 @@
<!--Controls common API -->
<row>
<entry role="tbi">hide()</entry>
- <entry role="tbi">Hides ordering control <para>(to be implemented)</para></entry>
+ <entry role="tbi">Hides ordering control (to be implemented)</entry>
</row>
<row>
<entry role="tbi">show()</entry>
- <entry role="tbi">Shows ordering control <para>(to be implemented)</para></entry>
+ <entry role="tbi">Shows ordering control (to be implemented)</entry>
</row>
<row>
<entry role="tbi">isShown()</entry>
- <entry role="tbi">Checks if current control is shown <para>(to be implemented)</para></entry>
+ <entry role="tbi">Checks if current control is shown (to be implemented)</entry>
</row>
<row>
<entry role="tbi">enable()</entry>
- <entry role="tbi">Enables ordering control <para>(to be implemented)</para></entry>
+ <entry role="tbi">Enables ordering control (to be implemented)</entry>
</row>
<row>
<entry role="tbi">disable()</entry>
- <entry role="tbi">Disables ordering control <para>(to be implemented)</para></entry>
+ <entry role="tbi">Disables ordering control (to be implemented)</entry>
</row>
<row>
<entry role="tbi">isEnabled()</entry>
- <entry role="tbi">Checks if current control is enabled <para>(to be implemented)</para></entry>
+ <entry role="tbi">Checks if current control is enabled (to be implemented)</entry>
</row>
<!--List managing API -->
<row>
<entry role="tbi">Up()</entry>
- <entry role="tbi">Moves up selected item in the list <para>(to be implemented)</para></entry>
+ <entry role="tbi">Moves up selected item in the list (to be implemented)</entry>
</row>
<row>
<entry role="tbi">Down()</entry>
- <entry role="tbi">Moves down selected item in the list <para>(to be implemented)</para></entry>
+ <entry role="tbi">Moves down selected item in the list (to be implemented)</entry>
</row>
<row>
<entry role="tbi">Top()</entry>
- <entry role="tbi">Moves top selected item in the list <para>(to be implemented)</para></entry>
+ <entry role="tbi">Moves top selected item in the list (to be implemented)</entry>
</row>
<row>
<entry role="tbi">Bottom()</entry>
- <entry role="tbi">Moves bottom selected item in the list <para>(to be implemented)</para></entry>
+ <entry role="tbi">Moves bottom selected item in the list (to be implemented)</entry>
</row>
<row>
<entry>copy()</entry>
@@ -464,11 +464,11 @@
</row>
<row>
<entry role="tbi">getSelection()</entry>
- <entry role="tbi">Returns currently selected item <para>(to be implemented)</para></entry>
+ <entry role="tbi">Returns currently selected item (to be implemented)</entry>
</row>
<row>
<entry role="tbi">getItems()</entry>
- <entry role="tbi">Returns the collection of all items <para>(to be implemented)</para></entry>
+ <entry role="tbi">Returns the collection of all items (to be implemented)</entry>
</row>
</tbody>
</tgroup>
Modified: trunk/docs/userguide/en/src/main/docbook/included/orderingList.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/orderingList.xml 2008-07-31 13:00:53 UTC (rev 9844)
+++ trunk/docs/userguide/en/src/main/docbook/included/orderingList.xml 2008-07-31 13:24:00 UTC (rev 9845)
@@ -396,27 +396,27 @@
<!--Controls common API -->
<row>
<entry role="tbi">hide()</entry>
- <entry role="tbi">Hides ordering control <para>(to be implemented)</para></entry>
+ <entry role="tbi">Hides ordering control (to be implemented)</entry>
</row>
<row>
<entry role="tbi">show()</entry>
- <entry role="tbi">Shows ordering control <para>(to be implemented)</para></entry>
+ <entry role="tbi">Shows ordering control (to be implemented)</entry>
</row>
<row>
<entry role="tbi">isShown()</entry>
- <entry role="tbi">Checks if current control is shown <para>(to be implemented)</para></entry>
+ <entry role="tbi">Checks if current control is shown (to be implemented)</entry>
</row>
<row>
<entry role="tbi">enable()</entry>
- <entry role="tbi">Enables ordering control <para>(to be implemented)</para></entry>
+ <entry role="tbi">Enables ordering control (to be implemented)</entry>
</row>
<row>
<entry role="tbi">disable()</entry>
- <entry role="tbi">Disables ordering control <para>(to be implemented)</para></entry>
+ <entry role="tbi">Disables ordering control (to be implemented)</entry>
</row>
<row>
<entry role="tbi">isEnabled()</entry>
- <entry role="tbi">Checks if current control is enabled <para>(to be implemented)</para></entry>
+ <entry role="tbi">Checks if current control is enabled (to be implemented)</entry>
</row>
<!--List managing API -->
<row>
Modified: trunk/docs/userguide/en/src/main/resources/css/html.css
===================================================================
--- trunk/docs/userguide/en/src/main/resources/css/html.css 2008-07-31 13:00:53 UTC (rev 9844)
+++ trunk/docs/userguide/en/src/main/resources/css/html.css 2008-07-31 13:24:00 UTC (rev 9845)
@@ -28,7 +28,7 @@
width:1000px;
margin:0 auto;
text-align:justify;
-
+ font-weight: 100;
}
div.abstract {
@@ -55,7 +55,10 @@
/* Center all images and Figure/Table titles */
div.mediaobject img {margin:left;}
-p.title {text-align:left;}
+p.title {
+ text-align:left;
+ font-size: 11px;
+}
.css_normal {
line-height:0px;
16 years, 5 months
JBoss Rich Faces SVN: r9844 - in trunk/framework/impl/src/main/java/org/ajax4jsf: renderkit and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-07-31 09:00:53 -0400 (Thu, 31 Jul 2008)
New Revision: 9844
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxViewRoot.java
trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java
Log:
https://jira.jboss.org/jira/browse/RF-4012
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxViewRoot.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxViewRoot.java 2008-07-31 12:04:58 UTC (rev 9843)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxViewRoot.java 2008-07-31 13:00:53 UTC (rev 9844)
@@ -70,6 +70,8 @@
public class AjaxViewRoot extends UIViewRoot implements AjaxContainer {
public static final String ROOT_ID = "_viewRoot";
+
+ public static final String JS_NULL = "null";
private Lifecycle lifecycle;
@@ -216,8 +218,10 @@
AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
String submittedRegionClientId = ajaxContext
.getSubmittedRegionClientId();
- if (ajaxContext.isAjaxRequest() && submittedRegionClientId != null
- && !submittedRegionClientId.equals(getClientId(context))) {
+ // !submittedRegionClientId.equals(JS_NULL) - fix for myfaces 1.2.4
+ if (ajaxContext.isAjaxRequest() && submittedRegionClientId != null &&
+ !submittedRegionClientId.equals(JS_NULL)
+ && !submittedRegionClientId.equals(getClientId(context))) {
invokeOnComponent(context, submittedRegionClientId, callback);
} else {
// For a root region, call invokeRoot method, then process all
@@ -535,7 +539,7 @@
String submittedRegionClientId = ajaxContext
.getSubmittedRegionClientId();
boolean invoked = false;
- if (submittedRegionClientId != null && !submittedRegionClientId.equals(getClientId(context))) {
+ if (submittedRegionClientId != null && !submittedRegionClientId.equals(JS_NULL) && !submittedRegionClientId.equals(getClientId(context))) {
invoked = invokeOnComponent(context, submittedRegionClientId, new ContextCallbackWrapper(_ajaxInvoker));
}
// if container not found, use Root for encode.
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java 2008-07-31 12:04:58 UTC (rev 9843)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java 2008-07-31 13:00:53 UTC (rev 9844)
@@ -377,7 +377,16 @@
JSFunction ajaxFunction = new JSFunction(functionName);
UIComponent nestingContainer = (UIComponent) findAjaxContainer(
facesContext, uiComponent);
- ajaxFunction.addParameter(nestingContainer.getClientId(facesContext));
+
+
+ String clientId = nestingContainer.getClientId(facesContext);
+ if (clientId != null) {
+ ajaxFunction.addParameter(clientId);
+ } else {
+ // fix for myfaces 1.2.4
+ ajaxFunction.addParameter(JSReference.NULL);
+ }
+
// build form name or ActionUrl for script
UIComponent nestingForm = getNestingForm(uiComponent);
if (null == nestingForm) {
16 years, 5 months