JBoss Rich Faces SVN: r3456 - trunk/ui/tree/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-10-21 11:00:40 -0400 (Sun, 21 Oct 2007)
New Revision: 3456
Modified:
trunk/ui/tree/src/main/config/component/tree.xml
Log:
Legacy ".class" removed from UI config files
Modified: trunk/ui/tree/src/main/config/component/tree.xml
===================================================================
--- trunk/ui/tree/src/main/config/component/tree.xml 2007-10-21 15:00:21 UTC (rev 3455)
+++ trunk/ui/tree/src/main/config/component/tree.xml 2007-10-21 15:00:40 UTC (rev 3456)
@@ -237,7 +237,7 @@
java.lang.Boolean.FALSE, a particular treeNode is collapsed;
null, a particular treeNode saves the current state
</description>
- <methodargs>org.richfaces.component.UITree.class</methodargs>
+ <methodargs>org.richfaces.component.UITree</methodargs>
</property>
<property>
<name>adviseNodeSelected</name>
@@ -249,7 +249,7 @@
java.lang.Boolean.FALSE, a particular treeNode is unselected;
null, a particular treeNode saves the current state
</description>
- <methodargs>org.richfaces.component.UITree.class</methodargs>
+ <methodargs>org.richfaces.component.UITree</methodargs>
</property>
</component>
17 years, 2 months
JBoss Rich Faces SVN: r3455 - trunk/ui/suggestionbox/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-10-21 11:00:21 -0400 (Sun, 21 Oct 2007)
New Revision: 3455
Modified:
trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml
Log:
Legacy ".class" removed from UI config files
Modified: trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml
===================================================================
--- trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml 2007-10-20 00:34:09 UTC (rev 3454)
+++ trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml 2007-10-21 15:00:21 UTC (rev 3455)
@@ -68,7 +68,7 @@
<name>suggestionAction</name>
<classname>javax.faces.el.MethodBinding</classname>
<methodargs>
- java.lang.Object.class
+ java.lang.Object
</methodargs>
<description>
<![CDATA[Method calls an expression to get a collection of suggestion data on request. It must have one parameter with a type of Object with content of input component and must return any type allowed for <h:datatable> ]]>
17 years, 2 months
JBoss Rich Faces SVN: r3454 - in trunk: cdk/maven-cdk-plugin/src/main/resources/templates12 and 13 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-10-19 20:34:09 -0400 (Fri, 19 Oct 2007)
New Revision: 3454
Added:
trunk/extensions/portlet/src/main/java/javax/portlet/faces/component/
trunk/extensions/portlet/src/main/java/javax/portlet/faces/component/PortletNamingContainer.java
trunk/extensions/portlet/src/main/java/javax/portlet/faces/el/
trunk/extensions/portlet/src/main/java/javax/portlet/faces/el/PortletELResolver.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/component/UIPortletViewRoot.java
trunk/samples/ajaxPortlet/src/main/webapp/jsf/edit.jspx
trunk/samples/ajaxPortlet/src/main/webapp/jsf/help.jspx
trunk/samples/ajaxPortlet/src/main/webapp/jsf/help2.jspx
trunk/samples/ajaxPortlet/src/main/webapp/jsf/xxx.jspx
Modified:
trunk/cdk/generator/src/main/resources/META-INF/templates12/faces-config.vm
trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/faces-config.vm
trunk/extensions/portlet/pom.xml
trunk/extensions/portlet/src/main/java/javax/portlet/faces/Bridge.java
trunk/extensions/portlet/src/main/java/javax/portlet/faces/GenericFacesPortlet.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/AjaxFacesPortlet.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletStateHolder.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletViewHandler.java
trunk/framework/impl/src/main/resources/META-INF/faces-config.xml
trunk/framework/pom.xml
trunk/samples/ajaxPortlet/pom.xml
trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/faces-config.xml
trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet.xml
trunk/samples/pom.xml
Log:
Continue to implement JSR-301 bridge.
Modified: trunk/cdk/generator/src/main/resources/META-INF/templates12/faces-config.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/faces-config.vm 2007-10-19 13:31:55 UTC (rev 3453)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/faces-config.vm 2007-10-20 00:34:09 UTC (rev 3454)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
- "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
-<faces-config>
-
+<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
+ version="1.2">
${facesConfig.includeContent}
#foreach( $validator in ${validators})
Modified: trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/faces-config.vm
===================================================================
--- trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/faces-config.vm 2007-10-19 13:31:55 UTC (rev 3453)
+++ trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/faces-config.vm 2007-10-20 00:34:09 UTC (rev 3454)
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
- "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
-<faces-config>
+<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
+ version="1.2">
${content}
#foreach( $kit in ${renderkits})
Modified: trunk/extensions/portlet/pom.xml
===================================================================
--- trunk/extensions/portlet/pom.xml 2007-10-19 13:31:55 UTC (rev 3453)
+++ trunk/extensions/portlet/pom.xml 2007-10-20 00:34:09 UTC (rev 3454)
@@ -1,4 +1,6 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>extensions</artifactId>
<groupId>org.richfaces</groupId>
@@ -10,6 +12,18 @@
<version>3.2.0-SNAPSHOT</version>
<name>ajax4jsf portlet brige</name>
<url>http://labs.jboss.com/wiki/Ajax4jsf/a4j-portlet</url>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
<dependencies>
<dependency>
<groupId>junit</groupId>
@@ -26,13 +40,13 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>1.2_04</version>
+ <version>1.2_05</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>1.2_04</version>
+ <version>1.2_05</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -50,7 +64,7 @@
<dependency>
<groupId>com.sun.facelets</groupId>
<artifactId>jsf-facelets</artifactId>
- <version>1.1.12</version>
+ <version>1.1.14</version>
<optional>true</optional>
</dependency>
<dependency>
Modified: trunk/extensions/portlet/src/main/java/javax/portlet/faces/Bridge.java
===================================================================
--- trunk/extensions/portlet/src/main/java/javax/portlet/faces/Bridge.java 2007-10-19 13:31:55 UTC (rev 3453)
+++ trunk/extensions/portlet/src/main/java/javax/portlet/faces/Bridge.java 2007-10-20 00:34:09 UTC (rev 3454)
@@ -9,6 +9,79 @@
public interface Bridge {
+ // Base Bridge attribute/context parameter prefix
+ public static final String BRIDGE_PACKAGE_PREFIX = "javax.portlet.faces.";
+
+ // Following are the names of context init parameters that control
+ // Bridge behavior. These are specified in the web.xml
+
+ public static final String MAX_MANAGED_REQUEST_SCOPES =
+ BRIDGE_PACKAGE_PREFIX + "MAX_MANAGED_REQUEST_SCOPES";
+
+ public static final String LIFECYCLE_ID =
+ "javax.faces.LIFECYCLE_ID";;
+
+ // Attribute signifying whether this render is a postback or not.
+ public static final String IS_POSTBACK_ATTRIBUTE =
+ BRIDGE_PACKAGE_PREFIX + "isPostback";
+
+ // Special session attribute name to hold the application_scope in the
+ // portlet_scope of the session so these are accessible as well.
+ public static final String APPLICATION_SCOPE_MAP = "javax.portlet.faces.ApplicationScopeMap";
+
+
+ // Following are the names of context attributes that a portlet can set prior
+ // to calling the bridge's init() method to control Bridge behavior.
+
+ // These attributes are scoped to a specific portlet in the context
+ // hence to acquire one must include the portlet name within attribute name:
+ // BRIDGE_PACKAGE_PREFIX + context.getPortletName() + attributeName
+
+ // if "true" indicates the bridge will preserve all the action params in its
+ // request scope and restore them as parameters in the subsequent renders
+ public static final String PRESERVE_ACTION_PARAMS = "preserveActionParams";
+
+ // allows a portlet to control render delgation. A value of "ALWAYS_DELEGATE" indicates
+ // the bridge doesn't render itself, it merely delegates. A value of "NEVER_DELEGATE"
+ // indicates the bridge never delegates, rather it always overrides and renders.
+ // A value of "DEFAULT" indicates the bridge will delegate first and only render
+ // if the delegatee throws an exception/throwable.
+ public static final String RENDER_POLICY = "renderPolicy";
+
+
+ // Parameter that can be added to an ActionURL to signify it is a direct link
+ // and hence shouldn't be encoded by encodeActionURL as an actionURL
+ public static final String DIRECT_LINK = BRIDGE_PACKAGE_PREFIX + "DirectLink";
+
+ // Session attribute pushed by bridge into session scope to give one access
+ // to Application scope
+ public static final String SESSION_APPLICATION_SCOPE_MAP = BRIDGE_PACKAGE_PREFIX
+ + "ApplicationScopeMap";
+
+ // Request attribute pushed by bridge in renderView to indicate it can
+ // handle a filter putting the AFTER_VIEW_CONTENT in a buffer on the request.
+ // Allows rendering order to be preserved in jsps
+ public static final String RENDER_CONTENT_AFTER_VIEW = BRIDGE_PACKAGE_PREFIX
+ + "RenderContentAfterView";
+
+ // Request attribute set by servlet filter in request/responseWrapper to
+ // place the AFTER_VIEW_CONTENT in a buffer on the request.
+ // Allows filter to transfer such content back to the bridge/renderView so
+ // if can output in correct order. Should only be done if
+ // RENDER_CONTENT_AFTER_VIEW request attribute is true.
+ public static final String AFTER_VIEW_CONTENT = BRIDGE_PACKAGE_PREFIX
+ + "AfterViewContent";
+
+
+ // Following are names of request attributes a portlet must set before
+ // calling the Bridge to process a request
+ public static final String DEFAULT_VIEWID = BRIDGE_PACKAGE_PREFIX + "defaultViewId";
+
+ // Following are the names of request attributes the Bridge must set before
+ // acquiring its first FacesContext/FacesContextFactory in each request
+ public static final String PORTLET_LIFECYCLE_PHASE = BRIDGE_PACKAGE_PREFIX + "phase";
+
+ public static final String PORTLET_ISNAMESPACED_PROPERTY = "X-JAVAX-PORTLET-IS-NAMESPACED";
/**
* Name of the init parameter with maximum number of bridge request scopes
* maintained by the bridge. See JSR-301 PLT 3.2
@@ -32,6 +105,18 @@
*/
public static final String DEFAULT_VIEW_ID_ATTR = "javax.portlet.faces.defaultViewId";
+
+ public static enum PortletPhase{
+ ActionPhase,
+ RenderPhase
+ }
+
+ public static enum BridgeRenderPolicy {
+ DEFAULT,
+ ALWAYS_DELEGATE,
+ NEVER_DELEGATE
+ }
+
/*
* (non-Javadoc)
*
@@ -52,7 +137,7 @@
* @throws PortletException
*/
public void doFacesRequest(ActionRequest request, ActionResponse response)
- throws PortletException;
+ throws BridgeException;
/**
* @param request
@@ -60,6 +145,6 @@
* @throws PortletException
*/
public void doFacesRequest(RenderRequest request, RenderResponse response)
- throws PortletException;
+ throws BridgeException;
}
\ No newline at end of file
Modified: trunk/extensions/portlet/src/main/java/javax/portlet/faces/GenericFacesPortlet.java
===================================================================
--- trunk/extensions/portlet/src/main/java/javax/portlet/faces/GenericFacesPortlet.java 2007-10-19 13:31:55 UTC (rev 3453)
+++ trunk/extensions/portlet/src/main/java/javax/portlet/faces/GenericFacesPortlet.java 2007-10-20 00:34:09 UTC (rev 3454)
@@ -3,7 +3,11 @@
*/
package javax.portlet.faces;
+import java.io.BufferedReader;
import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
@@ -16,29 +20,52 @@
import javax.portlet.RenderResponse;
import javax.portlet.WindowState;
+import org.ajax4jsf.portlet.AjaxFacesPortlet;
+
/**
* JSR 301 generic faces pottlet implementation.
+ *
* @author asmirnov
- *
+ *
*/
public class GenericFacesPortlet extends GenericPortlet {
+
+ private static final String BRIDGE_SERVICE_CLASSPATH = "META-INF/services/javax.portlet.faces.Bridge";
+ public static final String BRIDGE_CLASS = "javax.portlet.faces.BridgeClassName";
- private String bridgeClassName = null;
- private Bridge facesPortletBrige = null;
-
+ private static final String DEFAULT_BRIDGE_CLASS = AjaxFacesPortlet.class
+ .getName();
+ private volatile String bridgeClassName = null;
+ private volatile Bridge facesPortletBrige = null;
+
public void init(PortletConfig config) throws PortletException {
super.init(config);
+ bridgeClassName = this.getPortletContext().getInitParameter(
+ BRIDGE_CLASS);
+ String renderPolicy =
+ this.getPortletConfig().getInitParameter(Bridge.BRIDGE_PACKAGE_PREFIX + Bridge.RENDER_POLICY);
+ if (renderPolicy != null)
+ this.getPortletContext().setAttribute(Bridge.BRIDGE_PACKAGE_PREFIX +
+ this.getPortletName() + "." + Bridge.RENDER_POLICY,
+ Bridge.BridgeRenderPolicy.valueOf(renderPolicy));
+ String preserveActionParams =
+ this.getPortletConfig().getInitParameter(Bridge.BRIDGE_PACKAGE_PREFIX + Bridge.PRESERVE_ACTION_PARAMS);
+ if (preserveActionParams != null)
+ this.getPortletContext().setAttribute(Bridge.BRIDGE_PACKAGE_PREFIX +
+ this.getPortletName() + "." + Bridge.PRESERVE_ACTION_PARAMS,
+ Boolean.valueOf(preserveActionParams));
}
protected void doDispatch(RenderRequest request, RenderResponse response)
throws PortletException, IOException {
PortletMode mode = request.getPortletMode();
- if( mode == PortletMode.VIEW || mode == PortletMode.EDIT || mode == PortletMode.HELP ){
- super.doDispatch(request, response);
+ if (mode == PortletMode.VIEW || mode == PortletMode.EDIT
+ || mode == PortletMode.HELP) {
+ super.doDispatch(request, response);
} else {
doFacesDispatch(request, response);
}
-
+
}
protected void doEdit(RenderRequest request, RenderResponse response)
@@ -58,43 +85,128 @@
public void processAction(ActionRequest request, ActionResponse response)
throws PortletException, IOException {
- super.processAction(request, response);
+ String defaultViewId = getDefaultViewId(request, request
+ .getPortletMode());
+ Bridge brige = getFacesPortletBrige();
+ request.setAttribute(Bridge.DEFAULT_VIEWID, defaultViewId);
+ try {
+ brige.doFacesRequest(request, response);
+
+ } catch (BridgeException e) {
+ throw new PortletException("Error process faces request", e);
+ }
}
-
- void doFacesDispatch(RenderRequest request, RenderResponse response) throws PortletException,IOException {
- String defaultViewId = getDefaultViewId(request, request.getPortletMode());
- if(null != defaultViewId && ! request.getWindowState().equals(WindowState.MINIMIZED) ){
-
+ void doFacesDispatch(RenderRequest request, RenderResponse response)
+ throws PortletException, IOException {
+ String defaultViewId = getDefaultViewId(request, request
+ .getPortletMode());
+ if (null != defaultViewId
+ && !request.getWindowState().equals(WindowState.MINIMIZED)) {
+ Bridge brige = getFacesPortletBrige();
+ request.setAttribute(Bridge.DEFAULT_VIEWID, defaultViewId);
+ try {
+ brige.doFacesRequest(request, response);
+
+ } catch (BridgeException e) {
+ throw new PortletException("Error process faces request", e);
+ }
}
}
+
/**
* JSR 301 API method
+ *
* @return
*/
public String getBrigeClassName() {
if (bridgeClassName == null) {
-
+ ClassLoader loader = getClassLoader();
+ InputStream stream = loader
+ .getResourceAsStream(BRIDGE_SERVICE_CLASSPATH);
+ if (null != stream) {
+ try {
+ BufferedReader reader = null;
+ try {
+ reader = new BufferedReader(new InputStreamReader(
+ stream, "UTF-8"));
+ } catch (UnsupportedEncodingException e) {
+ reader = new BufferedReader(new InputStreamReader(
+ stream));
+ }
+ bridgeClassName = reader.readLine();
+ if (null != bridgeClassName) {
+ bridgeClassName.trim();
+ }
+ } catch (IOException e) {
+ // Ignore
+ } catch (SecurityException e) {
+ // Ignore
+ } finally {
+ if (null != stream) {
+ try {
+ stream.close();
+ } catch (IOException e) {
+ // Ignore
+ }
+ }
+ }
+ }
}
+ if (null == bridgeClassName) {
+ bridgeClassName = DEFAULT_BRIDGE_CLASS;
+ }
return bridgeClassName;
}
-
+
+ private ClassLoader getClassLoader() {
+ ClassLoader classLoader = Thread.currentThread()
+ .getContextClassLoader();
+ if (null == classLoader) {
+ classLoader = this.getClass().getClassLoader();
+ }
+ return classLoader;
+ }
+
public String getDefaultViewId(PortletRequest request, PortletMode mode) {
- return null;
+ return this.getPortletConfig().getInitParameter(
+ Bridge.DEFAULT_VIEWID + "." + mode.toString());
}
-
- private void initBrige(){
- if(null == facesPortletBrige){
-
- }
- }
+
public void destroy() {
bridgeClassName = null;
// If brige was initialized, destroy it.
- if(null != facesPortletBrige){
+ if (null != facesPortletBrige) {
facesPortletBrige.destroy();
facesPortletBrige = null;
}
super.destroy();
}
+
+ /**
+ * @return the facesPortletBrige
+ * @throws PortletException
+ */
+ @SuppressWarnings("unchecked")
+ protected Bridge getFacesPortletBrige() throws PortletException {
+ if (null == facesPortletBrige) {
+ String brigeClassName = getBrigeClassName();
+ try {
+ Class bridgeClass = getClassLoader().loadClass(brigeClassName);
+ facesPortletBrige = (Bridge) bridgeClass.newInstance();
+ facesPortletBrige.init(getPortletConfig());
+ } catch (ClassNotFoundException e) {
+ throw new PortletException(
+ "Class for a JSF Portlet Bridge not found", e);
+ } catch (InstantiationException e) {
+ throw new PortletException(
+ "Error on create instance of a JSF Portlet Bridge", e);
+ } catch (IllegalAccessException e) {
+ throw new PortletException(
+ "IllegalAccess on create instance of a JSF Portlet Bridge",
+ e);
+ }
+ }
+ return facesPortletBrige;
+ }
}
Added: trunk/extensions/portlet/src/main/java/javax/portlet/faces/component/PortletNamingContainer.java
===================================================================
--- trunk/extensions/portlet/src/main/java/javax/portlet/faces/component/PortletNamingContainer.java (rev 0)
+++ trunk/extensions/portlet/src/main/java/javax/portlet/faces/component/PortletNamingContainer.java 2007-10-20 00:34:09 UTC (rev 3454)
@@ -0,0 +1,14 @@
+/**
+ *
+ */
+package javax.portlet.faces.component;
+
+import javax.faces.component.NamingContainer;
+
+/**
+ * @author asmirnov
+ *
+ */
+public interface PortletNamingContainer extends NamingContainer {
+
+}
Property changes on: trunk/extensions/portlet/src/main/java/javax/portlet/faces/component/PortletNamingContainer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Added: trunk/extensions/portlet/src/main/java/javax/portlet/faces/el/PortletELResolver.java
===================================================================
--- trunk/extensions/portlet/src/main/java/javax/portlet/faces/el/PortletELResolver.java (rev 0)
+++ trunk/extensions/portlet/src/main/java/javax/portlet/faces/el/PortletELResolver.java 2007-10-20 00:34:09 UTC (rev 3454)
@@ -0,0 +1,198 @@
+/* Copyright (c) 2007, Oracle. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+
+package javax.portlet.faces.el;
+
+import java.beans.FeatureDescriptor;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.el.ELContext;
+import javax.el.ELException;
+import javax.el.ELResolver;
+import javax.el.PropertyNotFoundException;
+import javax.el.PropertyNotWritableException;
+
+import javax.faces.context.FacesContext;
+import javax.faces.context.ExternalContext;
+
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletRequest;
+
+import javax.portlet.faces.Bridge;
+
+
+public class PortletELResolver extends ELResolver {
+
+ // Important preserve index (order) between array and constants
+ public static final String[] IMPLICIT_OBJECTS = new String[] {
+ "portletConfig", "sessionApplicationScope", "sessionPortletScope", "portletPreferenceValue", "portletPreferenceValues" };
+
+ public static final int PORTLET_CONFIG = 0;
+ public static final int SESSION_APPLICATION_SCOPE = 1;
+ public static final int SESSION_PORTLET_SCOPE = 2;
+ public static final int PORTLET_PREFERENCE_VALUE = 3;
+ public static final int PORTLET_PREFERENCE_VALUES = 4;
+
+ public PortletELResolver() {
+ }
+
+ public Object getValue(ELContext context, Object base, Object property)
+ throws ELException {
+ // variable resolution is a special case of property resolution
+ // where the base is null.
+ if (base != null) {
+ return null;
+ }
+ if (property == null) {
+ throw new PropertyNotFoundException("Null property");
+ }
+
+ FacesContext facesContext =
+ (FacesContext) context.getContext(FacesContext.class);
+ ExternalContext extCtx = facesContext.getExternalContext();
+
+ // only process if running in a portlet request
+ if (!(extCtx.getRequest() instanceof PortletRequest)) {
+ return null;
+ }
+
+ int index = Arrays.binarySearch(IMPLICIT_OBJECTS, property);
+ if (index < 0) {
+ return null;
+ } else {
+ switch (index) {
+ case PORTLET_CONFIG:
+ context.setPropertyResolved(true);
+ return context.getContext(PortletConfig.class);
+ case SESSION_APPLICATION_SCOPE:
+ context.setPropertyResolved(true);
+ return extCtx.getSessionMap().get(Bridge.APPLICATION_SCOPE_MAP);
+ case SESSION_PORTLET_SCOPE:
+ context.setPropertyResolved(true);
+ return extCtx.getSessionMap();
+ case PORTLET_PREFERENCE_VALUE:
+ context.setPropertyResolved(true);
+ return getPreferencesValueMap(extCtx);
+ case PORTLET_PREFERENCE_VALUES:
+ context.setPropertyResolved(true);
+ return ((PortletRequest)extCtx.getRequest()).getPreferences().getMap();
+ default:
+ return null;
+ }
+ }
+ }
+
+ public void setValue(ELContext context, Object base, Object property,
+ Object val) throws ELException {
+ if (base != null) {
+ return;
+ }
+ if (property == null) {
+ throw new PropertyNotFoundException("Null property");
+ }
+
+ int index = Arrays.binarySearch(IMPLICIT_OBJECTS, property);
+ if (index >= 0) {
+ throw new PropertyNotWritableException((String)property);
+ }
+ }
+
+ public boolean isReadOnly(ELContext context, Object base, Object property)
+ throws ELException{
+ if (base != null) {
+ return false;
+ }
+ if (property == null) {
+ throw new PropertyNotFoundException("Null property");
+ }
+
+ int index = Arrays.binarySearch(IMPLICIT_OBJECTS, property);
+ if (index >= 0) {
+ context.setPropertyResolved(true);
+ return true;
+ }
+ return false;
+ }
+
+ public Class<?> getType(ELContext context, Object base, Object property)
+ throws ELException {
+ if (base != null) {
+ return null;
+ }
+ if (property == null) {
+ throw new PropertyNotFoundException("Null property");
+ }
+
+ int index = Arrays.binarySearch(IMPLICIT_OBJECTS, property);
+ if (index >= 0) {
+ context.setPropertyResolved(true);
+ }
+ return null;
+ }
+
+ public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
+ if (base != null) {
+ return null;
+ }
+ ArrayList<FeatureDescriptor> list = new ArrayList<FeatureDescriptor>(14);
+ list.add(getFeatureDescriptor("portletConfig", "portletConfig",
+ "portletConfig",false, false, true, Object.class, Boolean.TRUE));
+ list.add(getFeatureDescriptor("sessionApplicationScope", "sessionApplicationScope",
+ "sessionApplicationScope",false, false, true, Map.class, Boolean.TRUE));
+ list.add(getFeatureDescriptor("sessionPortletScope", "sessionPortletScope",
+ "sessionPortletScope",false, false, true, Map.class, Boolean.TRUE));
+ list.add(getFeatureDescriptor("portletPreferenceValue", "portletPreferenceValue",
+ "portletPreferenceValue",false, false, true, Map.class, Boolean.TRUE));
+ list.add(getFeatureDescriptor("portletPreferenceValues", "portletPreferenceValues",
+ "portletPreferenceValues",false, false, true, Map.class, Boolean.TRUE));
+ return list.iterator();
+
+ }
+
+ public Class<?> getCommonPropertyType(ELContext context, Object base) {
+ if (base != null) {
+ return null;
+ }
+ return String.class;
+ }
+
+ private FeatureDescriptor getFeatureDescriptor(String name, String
+ displayName, String desc, boolean expert, boolean hidden,
+ boolean preferred, Object type, Boolean designTime) {
+
+ FeatureDescriptor fd = new FeatureDescriptor();
+ fd.setName(name);
+ fd.setDisplayName(displayName);
+ fd.setShortDescription(desc);
+ fd.setExpert(expert);
+ fd.setHidden(hidden);
+ fd.setPreferred(preferred);
+ fd.setValue(ELResolver.TYPE, type);
+ fd.setValue(ELResolver.RESOLVABLE_AT_DESIGN_TIME, designTime);
+ return fd;
+ }
+
+ private Map getPreferencesValueMap(ExternalContext extCtx) {
+ PortletRequest portletRequest = (PortletRequest) extCtx.getRequest();
+ Enumeration e = portletRequest.getPreferences().getNames();
+ Map m = null;
+
+ while (e.hasMoreElements()) {
+ if (m == null)
+ m = new HashMap();
+ String name = (String) e.nextElement();
+ String value = portletRequest.getPreferences().getValue(name, null);
+ if (value != null)
+ m.put(name, value);
+ }
+ return m;
+ }
+
+}
Property changes on: trunk/extensions/portlet/src/main/java/javax/portlet/faces/el/PortletELResolver.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/AjaxFacesPortlet.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/AjaxFacesPortlet.java 2007-10-19 13:31:55 UTC (rev 3453)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/AjaxFacesPortlet.java 2007-10-20 00:34:09 UTC (rev 3454)
@@ -27,6 +27,8 @@
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import javax.portlet.faces.Bridge;
+import javax.portlet.faces.BridgeException;
+import javax.portlet.faces.Bridge.PortletPhase;
import javax.servlet.ServletResponse;
import org.ajax4jsf.context.AjaxContext;
@@ -60,7 +62,9 @@
*
* @see javax.portlet.GenericPortlet#init(javax.portlet.PortletConfig)
*/
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.ajax4jsf.portlet.Brige#init(javax.portlet.PortletConfig)
*/
public void init(PortletConfig config) throws PortletException {
@@ -95,7 +99,6 @@
} catch (FacesException e) {
throw new PortletException("Initialization error", e);
}
- super.init(config);
if (log.isDebugEnabled()) {
log.debug("Done portlet initialisation for "
+ config.getPortletName());
@@ -108,7 +111,9 @@
*
* @see javax.portlet.GenericPortlet#destroy()
*/
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.ajax4jsf.portlet.Brige#destroy()
*/
public void destroy() {
@@ -123,75 +128,56 @@
/*
* (non-Javadoc)
*
- * @see javax.portlet.GenericPortlet#processAction(javax.portlet.ActionRequest,
+ * @see org.ajax4jsf.portlet.Brige#doFacesRequest(javax.portlet.ActionRequest,
* javax.portlet.ActionResponse)
*/
- public void processAction(ActionRequest request, ActionResponse response)
- throws PortletException, IOException {
- if (log.isDebugEnabled()) {
- log.debug("Process action in portlet "
- + getPortletConfig().getPortletName() + " for mode "
- + request.getPortletMode());
- }
- doFacesRequest(request, response);
- }
-
- /* (non-Javadoc)
- * @see org.ajax4jsf.portlet.Brige#doFacesRequest(javax.portlet.ActionRequest, javax.portlet.ActionResponse)
- */
public void doFacesRequest(ActionRequest request, ActionResponse response)
- throws PortletException {
+ throws BridgeException {
+ initRequest(request,response,Bridge.PortletPhase.ActionPhase);
FacesContext facesContext = getFacesContext(request, response);
try {
- // setViewId(facesContext);
execute(facesContext);
// saveView(facesContext);
} catch (Exception e) {
log.error("Error processing execute lifecycle", e);
- throw new PortletException("Error processing execute lifecycle ", e);
+ throw new BridgeException("Error processing execute lifecycle ", e);
} finally {
facesContext.release();
}
}
+
+
/*
* (non-Javadoc)
*
- * @see javax.portlet.GenericPortlet#doView(javax.portlet.RenderRequest,
+ * @see org.ajax4jsf.portlet.Brige#doFacesRequest(javax.portlet.RenderRequest,
* javax.portlet.RenderResponse)
*/
- protected void doView(RenderRequest request, RenderResponse response)
- throws PortletException, IOException {
- if (log.isDebugEnabled()) {
- log.debug("Process do view in portlet "
- + getPortletConfig().getPortletName());
- }
- doFacesRequest(request, response);
- }
+ public void doFacesRequest(RenderRequest request, RenderResponse response)
+ throws BridgeException {
+ initRequest(request,response,Bridge.PortletPhase.RenderPhase);
- /* (non-Javadoc)
- * @see org.ajax4jsf.portlet.Brige#doFacesRequest(javax.portlet.RenderRequest, javax.portlet.RenderResponse)
- */
- public void doFacesRequest(RenderRequest request, RenderResponse response)
- throws PortletException {
FacesContext facesContext = getFacesContext(request, response);
try {
- String contenttype = request.getResponseContentType();
- if (contenttype == null) {
- contenttype = "text/html";
+ if (null == response.getContentType()) {
+ String contenttype = request.getResponseContentType();
+ if (contenttype == null) {
+ contenttype = "text/html";
+ }
+ String encoding = response.getCharacterEncoding();
+ if (encoding == null) {
+ encoding = "UTF-8";
+ }
+ response.setContentType(contenttype);
+
}
- String encoding = response.getCharacterEncoding();
- if (encoding == null) {
- encoding = "UTF-8";
- }
- response.setContentType(contenttype);
PrintWriter writer = response.getWriter();
String namespace = response.getNamespace();
// Write anchor for update portlet pages by ajax.
// TODO - configure html element and style/class.
writer.println("<div id='" + namespace + "'>");
// writer.flush();
- // restoreView(facesContext);
AjaxContext ajaxContext = AjaxContext
.getCurrentInstance(facesContext);
ajaxContext.getCommonAjaxParameters().put(
@@ -221,15 +207,57 @@
response.setProperty(RenderResponse.EXPIRATION_CACHE, "0");
} catch (Exception e) {
log.error("Error processing execute lifecycle", e);
- throw new PortletException("Error processing execute lifecycle ", e);
+ throw new BridgeException("Error processing execute lifecycle ", e);
} finally {
facesContext.release();
}
}
+ /**
+ * @param request
+ * @param response
+ * @param actionPhase
+ * @throws BridgeException
+ */
+ protected void initRequest(PortletRequest request, PortletResponse response,
+ PortletPhase actionPhase) throws BridgeException {
+
+ }
+
/*
* (non-Javadoc)
*
+ * @see javax.portlet.GenericPortlet#processAction(javax.portlet.ActionRequest,
+ * javax.portlet.ActionResponse)
+ */
+ public void processAction(ActionRequest request, ActionResponse response)
+ throws PortletException, IOException {
+ if (log.isDebugEnabled()) {
+ log.debug("Process action in portlet "
+ + getPortletConfig().getPortletName() + " for mode "
+ + request.getPortletMode());
+ }
+ doFacesRequest(request, response);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.portlet.GenericPortlet#doView(javax.portlet.RenderRequest,
+ * javax.portlet.RenderResponse)
+ */
+ protected void doView(RenderRequest request, RenderResponse response)
+ throws PortletException, IOException {
+ if (log.isDebugEnabled()) {
+ log.debug("Process do view in portlet "
+ + getPortletConfig().getPortletName());
+ }
+ doFacesRequest(request, response);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
* @see javax.portlet.GenericPortlet#doEdit(javax.portlet.RenderRequest,
* javax.portlet.RenderResponse)
*/
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletStateHolder.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletStateHolder.java 2007-10-19 13:31:55 UTC (rev 3453)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletStateHolder.java 2007-10-20 00:34:09 UTC (rev 3454)
@@ -13,6 +13,8 @@
import javax.portlet.PortletConfig;
import javax.portlet.PortletMode;
import javax.portlet.PortletRequest;
+import javax.portlet.faces.Bridge;
+import javax.portlet.faces.BridgeDefaultViewNotSpecifiedException;
import org.ajax4jsf.portlet.AjaxFacesPortlet;
import org.ajax4jsf.portlet.context.AbstractExternalContext;
@@ -99,21 +101,10 @@
// If none of above happen, try to get default viewId for a current
// mode.
if (null == viewId) {
- PortletConfig config = (PortletConfig) context.getExternalContext()
- .getRequestMap().get(AjaxFacesPortlet.PORTLET_CONFIG);
- if (null != config) {
- PortletMode portletMode = AjaxFacesPortlet
- .getPortletMode(context);
- if (null == portletMode) {
- portletMode = lastMode;
- }
- viewId = config.getInitParameter(DEFAULT
- + portletMode.toString().toLowerCase());
- }
-
+ viewId = (String) context.getExternalContext().getRequestMap().get(Bridge.DEFAULT_VIEWID);
}
if (null == viewId) {
- throw new FacesException("could'n determine portlet view id");
+ throw new BridgeDefaultViewNotSpecifiedException("could'n determine portlet view id");
}
return viewId;
}
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletViewHandler.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletViewHandler.java 2007-10-19 13:31:55 UTC (rev 3453)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletViewHandler.java 2007-10-20 00:34:09 UTC (rev 3454)
@@ -15,6 +15,7 @@
import org.ajax4jsf.application.AjaxViewHandler;
import org.ajax4jsf.context.AjaxContext;
+import org.ajax4jsf.portlet.component.UIPortletViewRoot;
import org.ajax4jsf.portlet.context.AbstractExternalContext;
/**
@@ -37,7 +38,7 @@
public UIViewRoot createView(FacesContext facesContext, String viewId) {
AjaxContext ajaxContext = AjaxContext.getCurrentInstance(facesContext);
boolean ajaxRequest = ajaxContext.isAjaxRequest(facesContext);
- UIViewRoot root = super.createView(facesContext, viewId);
+ UIViewRoot root = new UIPortletViewRoot(super.createView(facesContext, viewId));
if(ajaxRequest && null != ajaxContext.getViewIdHolder()){
// Store new viewId for a portlet.
}
Added: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/component/UIPortletViewRoot.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/component/UIPortletViewRoot.java (rev 0)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/component/UIPortletViewRoot.java 2007-10-20 00:34:09 UTC (rev 3454)
@@ -0,0 +1,43 @@
+/**
+ *
+ */
+package org.ajax4jsf.portlet.component;
+
+import java.io.Serializable;
+
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.portlet.faces.component.PortletNamingContainer;
+
+import org.ajax4jsf.component.AjaxViewRoot;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class UIPortletViewRoot extends AjaxViewRoot implements
+ PortletNamingContainer, Serializable {
+
+ /**
+ *
+ */
+ public UIPortletViewRoot(UIViewRoot viewRootToReplace) {
+ super();
+ setViewId(viewRootToReplace.getViewId());
+ setLocale(viewRootToReplace.getLocale());
+ setRenderKitId(viewRootToReplace.getRenderKitId());
+ }
+
+ @Override
+ public String getContainerClientId(FacesContext context) {
+ String containerClientId = super.getContainerClientId(context);
+ ExternalContext externalContext = context.getExternalContext();
+ if(null == containerClientId){
+ containerClientId = externalContext.encodeNamespace("");
+ } else {
+ containerClientId = externalContext.encodeNamespace(SEPARATOR_CHAR+containerClientId);
+ }
+ return containerClientId;
+ }
+}
Property changes on: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/component/UIPortletViewRoot.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Modified: trunk/framework/impl/src/main/resources/META-INF/faces-config.xml
===================================================================
--- trunk/framework/impl/src/main/resources/META-INF/faces-config.xml 2007-10-19 13:31:55 UTC (rev 3453)
+++ trunk/framework/impl/src/main/resources/META-INF/faces-config.xml 2007-10-20 00:34:09 UTC (rev 3454)
@@ -1,10 +1,8 @@
<?xml version="1.0"?>
-<!DOCTYPE faces-config PUBLIC
- "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
- "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
-
-
-<faces-config>
+<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
+ version="1.2">
<factory>
<render-kit-factory>org.ajax4jsf.renderkit.ChameleonRenderKitFactory</render-kit-factory>
<lifecycle-factory>org.ajax4jsf.application.DebugLifecycleFactory</lifecycle-factory>
Modified: trunk/framework/pom.xml
===================================================================
--- trunk/framework/pom.xml 2007-10-19 13:31:55 UTC (rev 3453)
+++ trunk/framework/pom.xml 2007-10-20 00:34:09 UTC (rev 3454)
@@ -94,9 +94,9 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>javax.servlet</groupId>
+ <groupId>jstl</groupId>
<artifactId>jstl</artifactId>
- <version>1.1.2</version>
+ <version>1.2</version>
<scope>provided</scope>
</dependency>
<dependency>
Modified: trunk/samples/ajaxPortlet/pom.xml
===================================================================
--- trunk/samples/ajaxPortlet/pom.xml 2007-10-19 13:31:55 UTC (rev 3453)
+++ trunk/samples/ajaxPortlet/pom.xml 2007-10-20 00:34:09 UTC (rev 3454)
@@ -47,13 +47,13 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>1.2_04</version>
+ <version>1.2_05</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>1.2_04</version>
+ <version>1.2_05</version>
<scope>provided</scope>
</dependency>
</dependencies>
Modified: trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/faces-config.xml 2007-10-19 13:31:55 UTC (rev 3453)
+++ trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/faces-config.xml 2007-10-20 00:34:09 UTC (rev 3454)
@@ -7,6 +7,21 @@
<managed-bean-class>portal.Bean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
+ <managed-bean>
+ <managed-bean-name>helpbean</managed-bean-name>
+ <managed-bean-class>portal.Bean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>editbean</managed-bean-name>
+ <managed-bean-class>portal.Bean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>requestbean</managed-bean-name>
+ <managed-bean-class>portal.Bean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
<navigation-rule>
<from-view-id>/jsf/start.xhtml</from-view-id>
<navigation-case>
@@ -21,6 +36,36 @@
<to-view-id>/jsf/start.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
+ <!-- Help pages navigation -->
+ <navigation-rule>
+ <from-view-id>/jsf/help.jspx</from-view-id>
+ <navigation-case>
+ <from-outcome>help2</from-outcome>
+ <to-view-id>/jsf/help2.jspx</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/help2.jspx</from-view-id>
+ <navigation-case>
+ <from-outcome>start</from-outcome>
+ <to-view-id>/jsf/help.jspx</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <!-- Edit mode navigation -->
+ <navigation-rule>
+ <from-view-id>/jsf/edit.jspx</from-view-id>
+ <navigation-case>
+ <from-outcome>edit2</from-outcome>
+ <to-view-id>/jsf/edit2.jspx</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/edit2.jspx</from-view-id>
+ <navigation-case>
+ <from-outcome>start</from-outcome>
+ <to-view-id>/jsf/edit.jspx</to-view-id>
+ </navigation-case>
+ </navigation-rule>
<application>
<view-handler>
org.ajax4jsf.portlet.application.PortletViewHandler
Modified: trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet.xml
===================================================================
--- trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet.xml 2007-10-19 13:31:55 UTC (rev 3453)
+++ trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet.xml 2007-10-20 00:34:09 UTC (rev 3454)
@@ -3,21 +3,25 @@
xmlns="http://java.sun.com/xml/ns/portlet">
<portlet>
<portlet-name>ajaxPortlet</portlet-name>
- <portlet-class>org.ajax4jsf.portlet.AjaxFacesPortlet</portlet-class>
- <init-param>
- <name>default-view</name>
- <value>/jsf/start.xhtml</value>
- </init-param>
- <!--
- <init-param>
- <name>default-edit</name>
- <value>/jsf/start-edit.xhtml</value>
- </init-param>
- <init-param>
- <name>default-help</name>
- <value>/jsf/start-help.xhtml</value>
- </init-param>
- -->
+ <portlet-class>
+ javax.portlet.faces.GenericFacesPortlet
+ </portlet-class>
+
+ <init-param>
+ <name>javax.portlet.faces.defaultViewId.view</name>
+ <value>/jsf/start.xhtml</value>
+ </init-param>
+
+ <init-param>
+ <name>javax.portlet.faces.defaultViewId.edit</name>
+ <value>/jsf/edit.jspx</value>
+ </init-param>
+
+ <init-param>
+ <name>javax.portlet.faces.defaultViewId.help</name>
+ <value>/jsf/help.jspx</value>
+ </init-param>
+
<expiration-cache>-0</expiration-cache>
<portlet-info>
<title>Ajax Portlet</title>
@@ -25,10 +29,8 @@
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
- <!--
<portlet-mode>EDIT</portlet-mode>
<portlet-mode>HELP</portlet-mode>
- -->
</supports>
</portlet>
</portlet-app>
Added: trunk/samples/ajaxPortlet/src/main/webapp/jsf/edit.jspx
===================================================================
--- trunk/samples/ajaxPortlet/src/main/webapp/jsf/edit.jspx (rev 0)
+++ trunk/samples/ajaxPortlet/src/main/webapp/jsf/edit.jspx 2007-10-20 00:34:09 UTC (rev 3454)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
+<f:view
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ >
+
+ <h:form id="portlet_form">
+ <h2>EDIT mode portlet</h2>
+ <h:panelGrid columns="2">
+ <h:inputText value="#{bean.text}" id="repeaterText">
+ <f:validateLength maximum="5" />
+ </h:inputText>
+ <h:outputText id="text" value="#{bean.text}"/>
+ <h:message for="repeaterText"/>
+ <h:commandLink value="Increment counter" action="#{bean.click}" />
+ <h:outputText id="counter" value="#{bean.counter}"/>
+ <h:outputText value="Portlet namespace:"/>
+ <h:outputText value="#{bean.namespace}"/>
+ <h:commandButton action="repeater" value="Switch to repeater page" />
+ </h:panelGrid>
+ </h:form>
+
+</f:view>
+</jsp:root>
\ No newline at end of file
Property changes on: trunk/samples/ajaxPortlet/src/main/webapp/jsf/edit.jspx
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/ajaxPortlet/src/main/webapp/jsf/help.jspx
===================================================================
--- trunk/samples/ajaxPortlet/src/main/webapp/jsf/help.jspx (rev 0)
+++ trunk/samples/ajaxPortlet/src/main/webapp/jsf/help.jspx 2007-10-20 00:34:09 UTC (rev 3454)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
+ <f:view xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:p="http://java.sun.com/jsf/portlet/components">
+ <p:portletPage>
+ <h:form id="portlet_form">
+ <h2>HELP mode portlet</h2>
+ <h:panelGrid columns="2">
+ <h:inputText value="#{helpbean.text}" id="repeaterText">
+ <f:validateLength maximum="5" />
+ </h:inputText>
+ <h:outputText id="text" value="#{helpbean.text}" />
+
+ <h:commandLink value="Increment counter" action="#{helpbean.click}" />
+ <h:outputText id="counter" value="#{helpbean.counter}" />
+
+ <h:outputText value="Portlet namespace:" />
+ <h:outputText value="#{helpbean.namespace}" />
+ <h:commandButton action="help2"
+ value="Switch to second HELP page" />
+ </h:panelGrid>
+ <h:message for="repeaterText" />
+ </h:form>
+ </p:portletPage>
+ </f:view>
+</jsp:root>
\ No newline at end of file
Property changes on: trunk/samples/ajaxPortlet/src/main/webapp/jsf/help.jspx
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/ajaxPortlet/src/main/webapp/jsf/help2.jspx
===================================================================
--- trunk/samples/ajaxPortlet/src/main/webapp/jsf/help2.jspx (rev 0)
+++ trunk/samples/ajaxPortlet/src/main/webapp/jsf/help2.jspx 2007-10-20 00:34:09 UTC (rev 3454)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
+ <f:view xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:p="http://java.sun.com/jsf/portlet/components">
+ <p:portletPage>
+ <h:form id="portlet_form">
+ <h2>HELP mode portlet - page 2</h2>
+ <h:panelGrid columns="2">
+ <h:inputText value="#{helpbean.text}" id="repeaterText">
+ <f:validateLength maximum="5" />
+ </h:inputText>
+ <h:outputText id="text" value="#{helpbean.text}" />
+
+
+ <h:outputText value="Portlet can have help page:" />
+ <h:outputText value="This is continue portlet help" />
+ <h:commandButton action="start"
+ value="Switch to first HELP page" />
+ </h:panelGrid>
+ <h:message for="repeaterText" />
+ </h:form>
+ </p:portletPage>
+ </f:view>
+</jsp:root>
\ No newline at end of file
Property changes on: trunk/samples/ajaxPortlet/src/main/webapp/jsf/help2.jspx
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/ajaxPortlet/src/main/webapp/jsf/xxx.jspx
===================================================================
--- trunk/samples/ajaxPortlet/src/main/webapp/jsf/xxx.jspx (rev 0)
+++ trunk/samples/ajaxPortlet/src/main/webapp/jsf/xxx.jspx 2007-10-20 00:34:09 UTC (rev 3454)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
+ <jsp:directive.page language="java"
+ contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" />
+ <jsp:text>
+ <![CDATA[ <?xml version="1.0" encoding="UTF-8" ?> ]]>
+ </jsp:text>
+ <jsp:text>
+ <![CDATA[ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> ]]>
+ </jsp:text>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<title>Insert title here</title>
+</head>
+<body>
+
+</body>
+</html>
+</jsp:root>
\ No newline at end of file
Property changes on: trunk/samples/ajaxPortlet/src/main/webapp/jsf/xxx.jspx
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/samples/pom.xml
===================================================================
--- trunk/samples/pom.xml 2007-10-19 13:31:55 UTC (rev 3453)
+++ trunk/samples/pom.xml 2007-10-20 00:34:09 UTC (rev 3454)
@@ -80,7 +80,7 @@
<dependency>
<groupId>com.sun.facelets</groupId>
<artifactId>jsf-facelets</artifactId>
- <version>1.1.12</version>
+ <version>1.1.14</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
@@ -93,6 +93,12 @@
<artifactId>nekohtml</artifactId>
<version>0.9.5</version>
<scope>runtime</scope>
+ <exclusions>
+ <exclusion>
+ <artifactId>xerces</artifactId>
+ <groupId>xerces</groupId>
+ </exclusion>
+ </exclusions>
</dependency>
</dependencies>
<profiles>
17 years, 2 months
JBoss Rich Faces SVN: r3453 - trunk/ui/simpleTogglePanel/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: akushunin
Date: 2007-10-19 09:31:55 -0400 (Fri, 19 Oct 2007)
New Revision: 3453
Modified:
trunk/ui/simpleTogglePanel/src/main/templates/simpleTogglePanel.jspx
Log:
RF-1120
Modified: trunk/ui/simpleTogglePanel/src/main/templates/simpleTogglePanel.jspx
===================================================================
--- trunk/ui/simpleTogglePanel/src/main/templates/simpleTogglePanel.jspx 2007-10-19 13:07:17 UTC (rev 3452)
+++ trunk/ui/simpleTogglePanel/src/main/templates/simpleTogglePanel.jspx 2007-10-19 13:31:55 UTC (rev 3453)
@@ -88,7 +88,7 @@
<div id="#{clientId}_body"
style="display : #{this:getdivdisplay(context, component)};
- overflow: auto; height: #{component.attributes['height']}; width: 100%;">
+ height: #{component.attributes['height']}; width: 100%;">
<table cellpadding="0" style="width: 100%" >
<tr>
<td class="dr-stglpnl-b rich-stglpanel-body #{component.attributes['bodyClass']}">
17 years, 2 months
JBoss Rich Faces SVN: r3452 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: ochikvina
Date: 2007-10-19 09:07:17 -0400 (Fri, 19 Oct 2007)
New Revision: 3452
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
Log:
http://jira.jboss.com/jira/browse/RF-389 - adding info to FAQ 9.34.
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2007-10-19 13:05:41 UTC (rev 3451)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2007-10-19 13:07:17 UTC (rev 3452)
@@ -547,8 +547,33 @@
<section>
<?dbhtml filename="HowtoloadtheScriptaculouslibrary.html"?>
<title>How to load the Scriptaculous library?</title>
- <para>To load the Scriptaculous library shipped with RichFaces use <emphasis
+ <para>To load the whole Scriptaculous library shipped with RichFaces use <emphasis
role="bold"><a4j:loadScript></emphasis> tag.</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<a4j:loadScript src="resource://scriptaculous.js" />
+...
+]]></programlisting>
+ <para>
+ Thus, this command allows loading an integrated version of the library that includes all existing scriptaculous files except unittest.js.
+ </para>
+ <para>
+ If you don't want to load the whole library, but only the particular file, for example, effect.js, use the following line:
+ </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<a4j:loadScript src="resource://scriptaculous/effect.js" />
+...
+]]></programlisting>
+ <para>
+ Remember, it does not make sense to load the particular file if you already load the whole version.
+ </para>
+
<para>For more information see <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=119044"
>RichFaces Users Forum</ulink>.</para>
17 years, 2 months
JBoss Rich Faces SVN: r3451 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: ochikvina
Date: 2007-10-19 09:05:41 -0400 (Fri, 19 Oct 2007)
New Revision: 3451
Modified:
trunk/docs/userguide/en/src/main/docbook/included/effect.xml
Log:
http://jira.jboss.com/jira/browse/RF-1050 - adding info to Details of Usage
Modified: trunk/docs/userguide/en/src/main/docbook/included/effect.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/effect.xml 2007-10-19 12:14:01 UTC (rev 3450)
+++ trunk/docs/userguide/en/src/main/docbook/included/effect.xml 2007-10-19 13:05:41 UTC (rev 3451)
@@ -175,7 +175,25 @@
</emphasis> attribute.</listitem>
</itemizedlist>
</para>
-
+
+ <para>
+ You can use a set of effects directly without defining the <emphasis role="bold">
+ <property><rich:effect></property>
+ </emphasis> component on a page if it's convenient for you. For that, load the scriptaculous library to the page with the following code:
+ </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<a4j:loadScript src="resource://scriptaculous/effect.js" />
+...
+]]></programlisting>
+ <para>
+ If you do use the <emphasis role="bold">
+ <property><rich:effect></property>
+ </emphasis>component, there is no need to include this library because it’s already here.
+ </para>
+
</section>
<section>
<title>Relevant Resources Links</title>
17 years, 2 months
JBoss Rich Faces SVN: r3450 - branches/3.1.x/ui/tree/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2007-10-19 08:14:01 -0400 (Fri, 19 Oct 2007)
New Revision: 3450
Modified:
branches/3.1.x/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
Log:
http://jira.jboss.com/jira/browse/RF-1134
Modified: branches/3.1.x/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
===================================================================
--- branches/3.1.x/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2007-10-19 11:55:16 UTC (rev 3449)
+++ branches/3.1.x/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2007-10-19 12:14:01 UTC (rev 3450)
@@ -439,8 +439,6 @@
Iterator ajaxKeysItr = sortedKeys.iterator();
TreeRowKey lastKey = null;
boolean nullRoot = false;
-
- System.err.println("TreeRendererBase.encodeAjaxChildren()" + sortedKeys);
while (!nullRoot && ajaxKeysItr.hasNext()) {
TreeRowKey key = (TreeRowKey) ajaxKeysItr.next();
17 years, 2 months
JBoss Rich Faces SVN: r3449 - in trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html: script and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-10-19 07:55:16 -0400 (Fri, 19 Oct 2007)
New Revision: 3449
Modified:
trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/css/slider.xcss
trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js
Log:
http://jira.jboss.com/jira/browse/RF-1136
Modified: trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/css/slider.xcss
===================================================================
--- trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/css/slider.xcss 2007-10-19 11:18:13 UTC (rev 3448)
+++ trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/css/slider.xcss 2007-10-19 11:55:16 UTC (rev 3449)
@@ -13,7 +13,6 @@
position : absolute;
white-space : nowrap;
padding : 0px 2px 0px 2px;
- top: -17px;
border : 1px solid;
}
Modified: trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js
===================================================================
--- trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js 2007-10-19 11:18:13 UTC (rev 3448)
+++ trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js 2007-10-19 11:55:16 UTC (rev 3449)
@@ -236,7 +236,8 @@
if(!this.disabled){
this.handle.className = this.classes.arrowSelected + this.classes.base + this.classes.handleSelected;
if (this.options.currValue){
- this.tip.style.display = "block";
+ Element.show(this.tip);
+ Element.setStyle(this.tip, {top: '-' + (this.tip.offsetHeight+2) + 'px'});
}
Richfaces.createEvent("mousedown", this.mainTable, null, null).fire();
this.active = true;
17 years, 2 months
JBoss Rich Faces SVN: r3448 - in trunk/test-applications/jsp/src/main: java/calendar and 21 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2007-10-19 07:18:13 -0400 (Fri, 19 Oct 2007)
New Revision: 3448
Added:
trunk/test-applications/jsp/src/main/java/jQuery/
trunk/test-applications/jsp/src/main/java/jQuery/JQuery.java
trunk/test-applications/jsp/src/main/java/util/
trunk/test-applications/jsp/src/main/java/util/componentInfo/
trunk/test-applications/jsp/src/main/java/util/componentInfo/ComponentInfo.java
trunk/test-applications/jsp/src/main/java/util/phaseTracker/
trunk/test-applications/jsp/src/main/java/util/phaseTracker/PhaseTracker.java
trunk/test-applications/jsp/src/main/java/util/skins/
trunk/test-applications/jsp/src/main/java/util/skins/Skins.java
trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-RichBean.xml
trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-ScrollableDataTable.xml
trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-jQuery.xml
trunk/test-applications/jsp/src/main/webapp/jQuery/
trunk/test-applications/jsp/src/main/webapp/jQuery/jQuery.jsp
Modified:
trunk/test-applications/jsp/src/main/java/calendar/CalendarDataModelImpl.java
trunk/test-applications/jsp/src/main/java/dataScroller/Data.java
trunk/test-applications/jsp/src/main/java/dataTable/Data.java
trunk/test-applications/jsp/src/main/java/inputNumberSlider/InputNumberSlider.java
trunk/test-applications/jsp/src/main/java/inputNumberSpinner/InputNumberSpinner.java
trunk/test-applications/jsp/src/main/java/modalPanel/ModalPanel.java
trunk/test-applications/jsp/src/main/java/sTP/SimpleTogglePanel.java
trunk/test-applications/jsp/src/main/java/sb/Sb.java
trunk/test-applications/jsp/src/main/java/spacer/Spacer.java
trunk/test-applications/jsp/src/main/java/tabPanel/TabPanel.java
trunk/test-applications/jsp/src/main/java/togglePanel/TogglePanel.java
trunk/test-applications/jsp/src/main/java/toolBar/ToolBar.java
trunk/test-applications/jsp/src/main/java/tree/Bean.java
trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp
trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-Skin.xml
trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config.xml
trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml
Log:
Update
Modified: trunk/test-applications/jsp/src/main/java/calendar/CalendarDataModelImpl.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/calendar/CalendarDataModelImpl.java 2007-10-19 00:54:42 UTC (rev 3447)
+++ trunk/test-applications/jsp/src/main/java/calendar/CalendarDataModelImpl.java 2007-10-19 11:18:13 UTC (rev 3448)
@@ -86,7 +86,6 @@
*/
public Object getToolTip(Date date) {
- // TODO Auto-generated method stub
return null;
}
Modified: trunk/test-applications/jsp/src/main/java/dataScroller/Data.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/dataScroller/Data.java 2007-10-19 00:54:42 UTC (rev 3447)
+++ trunk/test-applications/jsp/src/main/java/dataScroller/Data.java 2007-10-19 11:18:13 UTC (rev 3448)
@@ -6,11 +6,18 @@
public String data0;
public int data1;
+ public String data2;
+ public String data3;
- public Data(String str,int a) {
- this.data0 =str+"_"+a;
- this.data1 = new Random().nextInt(10+a);
+ public Data(String data0, int data1) {
+ this.data0 = data0;
+ this.data1 = data1;
+ }
+ public Data(String data0, int data1, String data2, String data3) {
+ this(data0, data1);
+ this.data2 = data2;
+ this.data3 = data3;
}
public String getData0() {
@@ -25,6 +32,22 @@
return data1;
}
+ public String getData2() {
+ return data2;
+ }
+
+ public void setData2(String data2) {
+ this.data2 = data2;
+ }
+
+ public String getData3() {
+ return data3;
+ }
+
+ public void setData3(String data3) {
+ this.data3 = data3;
+ }
+
public void setData1(int data1) {
this.data1 = data1;
}
Modified: trunk/test-applications/jsp/src/main/java/dataTable/Data.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/dataTable/Data.java 2007-10-19 00:54:42 UTC (rev 3447)
+++ trunk/test-applications/jsp/src/main/java/dataTable/Data.java 2007-10-19 11:18:13 UTC (rev 3448)
@@ -19,7 +19,6 @@
*
*/
public Data() {
- // TODO Auto-generated constructor stub
}
/**
Modified: trunk/test-applications/jsp/src/main/java/inputNumberSlider/InputNumberSlider.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/inputNumberSlider/InputNumberSlider.java 2007-10-19 00:54:42 UTC (rev 3447)
+++ trunk/test-applications/jsp/src/main/java/inputNumberSlider/InputNumberSlider.java 2007-10-19 11:18:13 UTC (rev 3448)
@@ -22,7 +22,6 @@
private boolean showBoundaryValues;
public InputNumberSlider() {
- // TODO Auto-generated constructor stub
inputSize = 5;
maxlength = 3;
Modified: trunk/test-applications/jsp/src/main/java/inputNumberSpinner/InputNumberSpinner.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/inputNumberSpinner/InputNumberSpinner.java 2007-10-19 00:54:42 UTC (rev 3447)
+++ trunk/test-applications/jsp/src/main/java/inputNumberSpinner/InputNumberSpinner.java 2007-10-19 11:18:13 UTC (rev 3448)
@@ -18,7 +18,6 @@
private boolean rendered;
public InputNumberSpinner() {
- // TODO Auto-generated constructor stub
// size= "200";
inputSize = 2;
cycled = false;
Added: trunk/test-applications/jsp/src/main/java/jQuery/JQuery.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/jQuery/JQuery.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/jQuery/JQuery.java 2007-10-19 11:18:13 UTC (rev 3448)
@@ -0,0 +1,5 @@
+package jQuery;
+
+public class JQuery {
+
+}
Modified: trunk/test-applications/jsp/src/main/java/modalPanel/ModalPanel.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/modalPanel/ModalPanel.java 2007-10-19 00:54:42 UTC (rev 3447)
+++ trunk/test-applications/jsp/src/main/java/modalPanel/ModalPanel.java 2007-10-19 11:18:13 UTC (rev 3448)
@@ -20,8 +20,6 @@
moveable=true;
resizeable=true;
-
- // TODO Auto-generated constructor stub
}
public int getHeight() {
Modified: trunk/test-applications/jsp/src/main/java/sTP/SimpleTogglePanel.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/sTP/SimpleTogglePanel.java 2007-10-19 00:54:42 UTC (rev 3447)
+++ trunk/test-applications/jsp/src/main/java/sTP/SimpleTogglePanel.java 2007-10-19 11:18:13 UTC (rev 3448)
@@ -10,7 +10,6 @@
private boolean rendered;
public SimpleTogglePanel() {
- // TODO Auto-generated constructor stub
width = "75%";
height = "100%";
switchType = "server";
Modified: trunk/test-applications/jsp/src/main/java/sb/Sb.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/sb/Sb.java 2007-10-19 00:54:42 UTC (rev 3447)
+++ trunk/test-applications/jsp/src/main/java/sb/Sb.java 2007-10-19 11:18:13 UTC (rev 3448)
@@ -50,7 +50,7 @@
frequency = "0";
rules = "none";
setCities(getAllData());
- // TODO Auto-generated constructor stub
+
}
public List autocomplete(Object event) {
Modified: trunk/test-applications/jsp/src/main/java/spacer/Spacer.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/spacer/Spacer.java 2007-10-19 00:54:42 UTC (rev 3447)
+++ trunk/test-applications/jsp/src/main/java/spacer/Spacer.java 2007-10-19 11:18:13 UTC (rev 3448)
@@ -13,7 +13,6 @@
private boolean rendered;
public Spacer() {
- // TODO Auto-generated constructor stub
height = "50px";
width = "300px";
Modified: trunk/test-applications/jsp/src/main/java/tabPanel/TabPanel.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/tabPanel/TabPanel.java 2007-10-19 00:54:42 UTC (rev 3447)
+++ trunk/test-applications/jsp/src/main/java/tabPanel/TabPanel.java 2007-10-19 11:18:13 UTC (rev 3448)
@@ -23,8 +23,6 @@
private boolean disabledTab;
public TabPanel() {
- // TODO Auto-generated constructor stub
-
width="75%";
height="200px";
title="title goes here...";
Modified: trunk/test-applications/jsp/src/main/java/togglePanel/TogglePanel.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/togglePanel/TogglePanel.java 2007-10-19 00:54:42 UTC (rev 3447)
+++ trunk/test-applications/jsp/src/main/java/togglePanel/TogglePanel.java 2007-10-19 11:18:13 UTC (rev 3448)
@@ -9,7 +9,6 @@
public TogglePanel() {
- // TODO Auto-generated constructor stub
initialState="asus";
switchType="server";
stateOrder="asus,benq,toshiba";
Modified: trunk/test-applications/jsp/src/main/java/toolBar/ToolBar.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/toolBar/ToolBar.java 2007-10-19 00:54:42 UTC (rev 3447)
+++ trunk/test-applications/jsp/src/main/java/toolBar/ToolBar.java 2007-10-19 11:18:13 UTC (rev 3448)
@@ -22,7 +22,6 @@
location="left";
contentStyle=null;
separatorStyle=null;
- // TODO Auto-generated constructor stub
}
Modified: trunk/test-applications/jsp/src/main/java/tree/Bean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/tree/Bean.java 2007-10-19 00:54:42 UTC (rev 3447)
+++ trunk/test-applications/jsp/src/main/java/tree/Bean.java 2007-10-19 11:18:13 UTC (rev 3448)
@@ -222,7 +222,6 @@
try {
tree.queueNodeExpand(new ListRowKey(expandPath));
} catch (IOException e) {
- // TODO Auto-generated catch block
e.printStackTrace();
}
}
@@ -255,7 +254,6 @@
try {
this.tree.queueExpandAll();
} catch (IOException e) {
- // TODO Auto-generated catch block
e.printStackTrace();
}
return null;
Added: trunk/test-applications/jsp/src/main/java/util/componentInfo/ComponentInfo.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/util/componentInfo/ComponentInfo.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/util/componentInfo/ComponentInfo.java 2007-10-19 11:18:13 UTC (rev 3448)
@@ -0,0 +1,32 @@
+package util.componentInfo;
+
+public class ComponentInfo {
+ private String attribute;
+ private String property;
+
+ public ComponentInfo() {
+
+ }
+
+ public ComponentInfo(String attribute, String property) {
+ this.attribute = attribute;
+ this.property = property;
+ System.out.println();
+ }
+
+ public String getAttribute() {
+ return attribute;
+ }
+
+ public void setAttribute(String attribute) {
+ this.attribute = attribute;
+ }
+
+ public String getProperty() {
+ return property;
+ }
+
+ public void setProperty(String property) {
+ this.property = property;
+ }
+}
Added: trunk/test-applications/jsp/src/main/java/util/phaseTracker/PhaseTracker.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/util/phaseTracker/PhaseTracker.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/util/phaseTracker/PhaseTracker.java 2007-10-19 11:18:13 UTC (rev 3448)
@@ -0,0 +1,37 @@
+/**
+ *
+ */
+package util.phaseTracker;
+
+import javax.faces.event.PhaseEvent;
+import javax.faces.event.PhaseId;
+import javax.faces.event.PhaseListener;
+
+/**
+ * @author AYanul
+ *
+ */
+public class PhaseTracker implements PhaseListener {
+
+ /* (non-Javadoc)
+ * @see javax.faces.event.PhaseListener#afterPhase(javax.faces.event.PhaseEvent)
+ */
+ public void afterPhase(PhaseEvent arg0) {
+ System.out.println("PhaseTracker.afterPhase()" + arg0.getPhaseId());
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.event.PhaseListener#beforePhase(javax.faces.event.PhaseEvent)
+ */
+ public void beforePhase(PhaseEvent arg0) {
+ System.out.println("PhaseTracker.beforePhase()" + arg0.getPhaseId());
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.event.PhaseListener#getPhaseId()
+ */
+ public PhaseId getPhaseId() {
+ return PhaseId.ANY_PHASE;
+ }
+
+}
Added: trunk/test-applications/jsp/src/main/java/util/skins/Skins.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/util/skins/Skins.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/util/skins/Skins.java 2007-10-19 11:18:13 UTC (rev 3448)
@@ -0,0 +1,71 @@
+package util.skins;
+
+import java.util.Map;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UISelectItem;
+import javax.faces.component.UISelectOne;
+import javax.faces.component.html.HtmlSelectOneRadio;
+import javax.faces.context.FacesContext;
+
+/**
+ * @author Nick Belaevski - nbelaevski(a)exadel.com created 09.02.2007
+ *
+ */
+public class Skins {
+
+ private String[] skinsArray = new String[] { "blueSky", "classic",
+ "deepMarine", "DEFAULT", "emeraldTown", "japanCherry", "ruby",
+ "wine", "plain" };
+
+ private String defaultSkin = "blueSky";
+
+ private String skin = defaultSkin;
+
+ private UISelectOne createComponent() {
+ UISelectOne selectOne = new HtmlSelectOneRadio();
+ selectOne.setValue(skin);
+
+ for (int i = 0; i < skinsArray.length; i++) {
+ String skinName = skinsArray[i];
+
+ UISelectItem item = new UISelectItem();
+ item.setItemLabel(skinName);
+ item.setItemValue(skinName);
+ item.setId("skinSelectionFor_" + skinName);
+
+ selectOne.getChildren().add(item);
+ }
+
+ return selectOne;
+ }
+
+ public String getSkin() {
+ return skin;
+ }
+
+ public UIComponent getComponent() {
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ Map requestMap = facesContext.getExternalContext().getRequestMap();
+ Object object = requestMap.get("SkinBean");
+ if (object != null) {
+ return (UISelectOne) object;
+ }
+
+ UISelectOne selectOne = createComponent();
+ requestMap.put("SkinBean", selectOne);
+ return selectOne;
+ }
+
+ public void setComponent(UIComponent component) {
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ Map requestMap = facesContext.getExternalContext().getRequestMap();
+ requestMap.put("SkinBean", component);
+ }
+
+ public String change() {
+ UISelectOne selectOne = (UISelectOne) getComponent();
+ skin = (String) selectOne.getValue();
+ return null;
+ }
+}
Modified: trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp 2007-10-19 00:54:42 UTC (rev 3447)
+++ trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp 2007-10-19 11:18:13 UTC (rev 3448)
@@ -82,62 +82,7 @@
</h:panelGrid>
</h:panelGrid>
</rich:calendar>
- <rich:calendar id="calendarAjaxID" dataModel="#{calendarDataModel}"
- locale="#{calendarBean.locale}" popup="#{calendarBean.popup}"
- datePattern="#{calendarBean.pattern}"
- weekDayLabels="#{calendarBean.weekDayLabels}"
- weekDayLabelsShort="#{calendarBean.weekDayLabelsShort}"
- monthLabels="#{calendarBean.monthLabels}"
- monthLabelsShort="#{calendarBean.monthLabelsShort}"
- value="#{calendarBean.selectedDate}"
- currentDate="#{calendarBean.currentDate}"
- jointPoint="#{calendarBean.jointPoint}"
- direction="#{calendarBean.direction}"
- enableManualInput="#{calendarBean.enableManualInput}"
- showInput="#{calendarBean.showInput}" buttonLabel="#{calendarBean.label}"
- boundaryDatesMode="#{calendarBean.boundary}"
- currentDateChangeListener="#{calendarBean.dcl}"
- valueChangeListener="#{calendarBean.ddd}" reRender="counter"
- inputClass="ic" buttonClass="bc"
- ajaxSingle="#{calendarBean.ajaxSingle}"
- buttonIcon="#{calendarBean.icon}"
- buttonIconDisabled="#{icon.iconFileManagerReject}"
- disabled="#{calendarBean.disabled}"
- bypassUpdates="#{calendarBean.bypassUpdates}"
- height="#{calendarBean.height}"
- width="#{calendarBean.width}"
- zindex="#{calendarBean.zindex}"
- toolTipMode="#{calendarBean.toolTipMode}"
- rendered="#{calendarBean.rendered}"
- focus="popupModeID"
- mode="ajax"
- required="#{calendarBean.required}"
- requiredMessage="Required Message">
- <f:facet name="weekDay">
- <f:verbatim><span style="padding: 2px; font-size: 4" >{weekDayLabel + weekDayLabelShort}</span></f:verbatim>
- </f:facet>
-
- <f:facet name="optionalHeader">
- <h:outputText value="optionalHeader Facet" />
- </f:facet>
-
- <f:facet name="optionalFooter">
- <h:outputText value="optionalFooter Facet" />
- </f:facet>
-
- <f:validator validatorId="org.richfaces.CalendarValidator" />
-
- <h:panelGrid columns="2">
- <f:verbatim>
- <span style="padding: 2px;">{day}</span>
- </f:verbatim>
- <h:panelGrid>
- <h:outputText styleClass="smallText" value="{data.enLabel}" />
- <h:outputText styleClass="smallText" value="{data.frLabel}" />
- <h:outputText styleClass="smallText" value="{data.deLabel}" />
- </h:panelGrid>
- </h:panelGrid>
- </rich:calendar>
+
</h:panelGrid>
Added: trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-RichBean.xml
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-RichBean.xml (rev 0)
+++ trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-RichBean.xml 2007-10-19 11:18:13 UTC (rev 3448)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
+<faces-config>
+ <managed-bean>
+ <managed-bean-name>richBean</managed-bean-name>
+ <managed-bean-class>rich.RichBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+</faces-config>
Added: trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-ScrollableDataTable.xml
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-ScrollableDataTable.xml (rev 0)
+++ trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-ScrollableDataTable.xml 2007-10-19 11:18:13 UTC (rev 3448)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
+<faces-config>
+ <managed-bean>
+ <managed-bean-name>scrollableDT</managed-bean-name>
+ <managed-bean-class>scrollableDataTable.ScrollableDataTable</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+</faces-config>
Modified: trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-Skin.xml
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-Skin.xml 2007-10-19 00:54:42 UTC (rev 3447)
+++ trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-Skin.xml 2007-10-19 11:18:13 UTC (rev 3448)
@@ -2,9 +2,9 @@
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
"http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
<faces-config>
- <managed-bean>
- <managed-bean-name>skinBean</managed-bean-name>
- <managed-bean-class>skins.Skins</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- </managed-bean>
+ <managed-bean>
+ <managed-bean-name>skinBean</managed-bean-name>
+ <managed-bean-class>util.skins.Skins</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
</faces-config>
Added: trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-jQuery.xml
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-jQuery.xml (rev 0)
+++ trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-jQuery.xml 2007-10-19 11:18:13 UTC (rev 3448)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
+<faces-config>
+ <managed-bean>
+ <managed-bean-name>jQuery</managed-bean-name>
+ <managed-bean-class>jQuery.JQuery</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+</faces-config>
Modified: trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config.xml 2007-10-19 00:54:42 UTC (rev 3447)
+++ trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config.xml 2007-10-19 11:18:13 UTC (rev 3448)
@@ -150,4 +150,7 @@
<to-view-id>/Panel/Panel.jsp</to-view-id>
</navigation-case>
</navigation-rule>
+ <lifecycle>
+ <phase-listener id="phaseTracker">util.phaseTracker.PhaseTracker</phase-listener>
+ </lifecycle>
</faces-config>
Modified: trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml 2007-10-19 00:54:42 UTC (rev 3447)
+++ trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml 2007-10-19 11:18:13 UTC (rev 3448)
@@ -12,8 +12,23 @@
</context-param>
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
- <param-value>/WEB-INF/faces-config-Panel.xml,/WEB-INF/faces-config-PanelBar.xml,/WEB-INF/faces-config-TabPanel.xml,/WEB-INF/faces-config-TogglePanel.xml,/WEB-INF/faces-config-Paint2D.xml,/WEB-INF/faces-config-InputNumberSlider.xml,/WEB-INF/faces-config-InputNumberSpinner.xml,/WEB-INF/faces-config-DDMenu.xml,/WEB-INF/faces-config-Tree.xml,/WEB-INF/faces-config-PanelMenu.xml,/WEB-INF/faces-config-Icon.xml,/WEB-INF/faces-config-tooltip.xml,/WEB-INF/faces-config-Skin.xml,/WEB-INF/faces-config-Calendar.xml,/WEB-INF/faces-config-Gmap.xml,/WEB-INF/faces-config-Separator.xml,/WEB-INF/faces-config-Spacer.xml,/WEB-INF/faces-config-SimpleTogglePanel.xml,/WEB-INF/faces-config-ToolBar.xml,/WEB-INF/faces-config-ModalPanel.xml,/WEB-INF/faces-config-SuggestionBox.xml,/WEB-INF/faces-config-DragAndDrop.xml,/WEB-INF/faces-config-DataScroller.xml,/WEB-INF/faces-config-DataTable.xml,/WEB-INF/faces-config-DataFilterSlider.xml,/WEB-INF/faces-config-VirtualEarth.xml,/WEB-INF/faces-config-Message!
.xml,/WEB-INF/faces-config-Effect.xml,/WEB-INF/faces-config-Insert.xml,/WEB-INF/faces-config-RichTest.xml</param-value>
+ <param-value>/WEB-INF/faces-config-DataTable.xml,/WEB-INF/faces-config-SimpleTogglePanel.xml,
+ /WEB-INF/faces-config-Panel.xml,/WEB-INF/faces-config-PanelBar.xml,/WEB-INF/faces-config-TabPanel.xml,
+ /WEB-INF/faces-config-TogglePanel.xml,/WEB-INF/faces-config-Paint2D.xml,/WEB-INF/faces-config-InputNumberSlider.xml,
+ /WEB-INF/faces-config-InputNumberSpinner.xml,/WEB-INF/faces-config-DDMenu.xml,/WEB-INF/faces-config-Tree.xml,
+ /WEB-INF/faces-config-PanelMenu.xml,/WEB-INF/faces-config-Icon.xml,/WEB-INF/faces-config-ModalPanel.xml,
+ /WEB-INF/faces-config-tooltip.xml,/WEB-INF/faces-config-Skin.xml,/WEB-INF/faces-config-Calendar.xml,
+ /WEB-INF/faces-config-Gmap.xml,/WEB-INF/faces-config-DataFilterSlider.xml,/WEB-INF/faces-config-Separator.xml,
+ /WEB-INF/faces-config-Spacer.xml,/WEB-INF/faces-config-ToolBar.xml,/WEB-INF/faces-config-DataScroller.xml,
+ /WEB-INF/faces-config-DragAndDrop.xml,/WEB-INF/faces-config-SuggestionBox.xml,/WEB-INF/faces-config-Message.xml,
+ /WEB-INF/faces-config-VirtualEarth.xml,/WEB-INF/faces-config-Effect.xml,/WEB-INF/faces-config-Insert.xml,
+ /WEB-INF/faces-config-RichBean.xml,/WEB-INF/faces-config-ScrollableDataTable.xml,
+ /WEB-INF/faces-config-jQuery.xml</param-value>
</context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+ </context-param>
<filter>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
Added: trunk/test-applications/jsp/src/main/webapp/jQuery/jQuery.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/jQuery/jQuery.jsp (rev 0)
+++ trunk/test-applications/jsp/src/main/webapp/jQuery/jQuery.jsp 2007-10-19 11:18:13 UTC (rev 3448)
@@ -0,0 +1,97 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
+<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
+
+<f:subview id="jQuerySubviewID">
+ <h:form id="form">
+<style>
+.divSize_1 {
+ width: 150px;
+ height: 90px;
+ margin: 10px;
+ border: 2px solid #DAA520;
+}
+
+.divColor_1 {
+
+ background-color: #1E90FF;
+}
+
+.divTextSize_1 {
+ font-size: xx-large;
+}
+.divSize_2 {
+ width: 90px;
+ height: 150px;
+ margin: 10px;
+ border: 2px solid #FF0000;
+}
+
+.divColor_2 {
+ background-color: #7FFF00;
+}
+
+.oddTable{
+ background-color: #FFE4C4;
+}
+.activeTable{
+ background-color: #AFEEEE;
+}
+.fontColor {
+ font-style: italic;
+ color: #228B22;
+}
+</style>
+
+ <h:messages />
+ <h:panelGrid id="panelGridID" columns="2" border="1">
+ <h:outputText value="add text: [li],work!, e.g. A. one [li],work!" />
+ <h:panelGroup>
+ <f:verbatim>
+ <ol type="A" title="li">
+ <li>one </li>
+ <li>two </li>
+ <li>three</li>
+ </ol>
+ </f:verbatim>
+ </h:panelGroup>
+
+ <h:outputText value="green text: add text3 " />
+ <f:verbatim> <p><span>Text1 </span>text2</p> </f:verbatim>
+
+ <h:panelGroup>
+ <f:verbatim>
+ Rectangle: size: "150 x 90"; bgcolor: "dodgerblue";
+ <br />
+ Table: bgcolor: "bisque"
+ </f:verbatim>
+ </h:panelGroup>
+ <f:verbatim><div id="div_1_ID">xx-large <br /> text </div></f:verbatim>
+
+ <h:panelGroup>
+ <f:verbatim>
+ Rectangle: size: "90 x 150"; border-color: "red"
+ <br />
+ effect(mouseover)
+ </f:verbatim>
+ </h:panelGroup>
+ <f:verbatim><div id="div_2_ID"> normal text</div></f:verbatim>
+ </h:panelGrid>
+
+
+ <rich:jQuery selector="li" timing="onload" query="find('ol').end().append('[li],work!')" />
+
+
+ <rich:jQuery selector="tr:nth-child(odd)" timing="onload" query="addClass('oddTable')" />
+ <rich:jQuery selector="#panelGridID tr" query="mouseover(function(){jQuery(this).addClass('activeTable')})"/>
+ <rich:jQuery selector="#panelGridID tr" query="mouseout(function(){jQuery(this).removeClass('activeTable')})"/>
+
+ <rich:jQuery selector="p" timing="onload" query="find('span').html('text1').end().append('<p class='fontColor'>add text3<p>')"/>
+ <rich:jQuery selector="#div_1_ID" timing="onload" query="addClass('divSize_1')" />
+ <rich:jQuery selector=".divSize_1" timing="onload" query="addClass('divColor_1')" />
+ <rich:jQuery selector="#panelGridID #div_1_ID" timing="onload" query="addClass('divTextSize_1')" />
+ <rich:jQuery selector="#form\\:panelGridID #div_2_ID" timing="onload" query="addClass('divSize_2')" />
+
+ </h:form>
+</f:subview>
17 years, 2 months
JBoss Rich Faces SVN: r3447 - in trunk/cdk/maven-cdk-plugin/src/main: resources/templates12 and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-10-18 20:54:42 -0400 (Thu, 18 Oct 2007)
New Revision: 3447
Added:
trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/faces-config.vm
trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/resources-config.vm
trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/taglib.vm
trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/tld.vm
Removed:
trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/faces-config.vm
trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/resources-config.vm
trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/taglib.vm
trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/tld.vm
Modified:
trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/AbstractCDKMojo.java
trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/AssemblyLibraryMojo.java
trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/Library.java
trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/Taglib.java
Log:
Fix taglibs assembly for JSF 2.0
Modified: trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/AbstractCDKMojo.java
===================================================================
--- trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/AbstractCDKMojo.java 2007-10-19 00:33:03 UTC (rev 3446)
+++ trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/AbstractCDKMojo.java 2007-10-19 00:54:42 UTC (rev 3447)
@@ -198,10 +198,7 @@
library.setRenderkits(renderkits);
}
Taglib taglib = library.getTaglib();
- if (null != taglib) {
- getLog().debug("Taglib uri is " + taglib.getUri());
- getLog().debug("Taglib shortname is " + taglib.getShortName());
- } else {
+ if (null == taglib) {
taglib = new Taglib();
library.setTaglib(taglib);
}
@@ -235,6 +232,8 @@
if(null == taglib.getTaglib()){
taglib.setTaglib(taglib.getShortName());
}
+ getLog().debug("Taglib uri is " + taglib.getUri());
+ getLog().debug("Taglib shortname is " + taglib.getShortName());
if (null != library.getTaglibs() && library.getTaglibs().length > 0) {
for (int i = 0; i < library.getTaglibs().length; i++) {
Taglib t = library.getTaglibs()[i];
@@ -308,6 +307,8 @@
if(null == taglib.getTaglib()){
taglib.setTaglib(taglib.getShortName());
}
+ getLog().debug("Taglib uri is " + taglib.getUri());
+ getLog().debug("Taglib shortname is " + taglib.getShortName());
}
Modified: trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/AssemblyLibraryMojo.java
===================================================================
--- trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/AssemblyLibraryMojo.java 2007-10-19 00:33:03 UTC (rev 3446)
+++ trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/AssemblyLibraryMojo.java 2007-10-19 00:54:42 UTC (rev 3447)
@@ -256,6 +256,7 @@
*/
private void generateTaglib(List models, Taglib taglib)
throws MojoExecutionException {
+ getLog().debug("Assembly taglib for uri " + taglib.getUri()+" with short name "+taglib.getShortName());
VelocityContext taglibContext = new VelocityContext();
taglibContext.put("taglib", taglib);
// Build includes/excludes Xpath condition
@@ -263,6 +264,7 @@
createTagCondition(taglib, nameTag);
File tld = new File(outputDirectory, "META-INF/"
+ taglib.getTaglib() + ".tld");
+ getLog().debug("Write JSP taglib "+tld.getPath());
mergeXML(models, includeTld, TLD_TEMPLATE, "/taglib/tag"
+ createTagCondition(taglib, "name") + " | /taglib/listener",
null, new VelocityContext(taglibContext), tld);
@@ -272,6 +274,7 @@
+ createTagCondition(taglib, "tag-name")
+ " | /facelet-taglib/function", null, new VelocityContext(
taglibContext), faceletsTaglib);
+ getLog().debug("Write Facelets taglib "+faceletsTaglib.getPath());
}
/**
Modified: trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/Library.java
===================================================================
--- trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/Library.java 2007-10-19 00:33:03 UTC (rev 3446)
+++ trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/Library.java 2007-10-19 00:54:42 UTC (rev 3447)
@@ -144,4 +144,8 @@
this.taglibs = taglibs;
}
+ @Override
+ public String toString() {
+ return "JSF library "+getPrefix()+", desc: "+getDescription()+(null!=getTaglibs()?", libs: "+getTaglibs():"");
+ }
}
Modified: trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/Taglib.java
===================================================================
--- trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/Taglib.java 2007-10-19 00:33:03 UTC (rev 3446)
+++ trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/Taglib.java 2007-10-19 00:54:42 UTC (rev 3447)
@@ -220,4 +220,8 @@
_excludeTags = excludeTags;
}
+ @Override
+ public String toString() {
+ return "Lib: "+getShortName()+", URL: "+getUri();
+ }
}
Deleted: trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/faces-config.vm
===================================================================
--- trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/faces-config.vm 2007-10-19 00:33:03 UTC (rev 3446)
+++ trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/faces-config.vm 2007-10-19 00:54:42 UTC (rev 3447)
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
- version="1.2">
-
-${content}
-#foreach( $kit in ${renderkits})
- <render-kit>
- #if(${kit.name})
- <render-kit-id>${kit.name}</render-kit-id>
- #if(${kit.classname})
- <render-kit-class>${kit.classname}</render-kit-class>
- #end
- #end
- ${kit.facesConfig}
- </render-kit>
-#end
-
-
-</faces-config>
Added: trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/faces-config.vm
===================================================================
--- trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/faces-config.vm (rev 0)
+++ trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/faces-config.vm 2007-10-19 00:54:42 UTC (rev 3447)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+<faces-config>
+${content}
+
+#foreach( $kit in ${renderkits})
+ <render-kit>
+ #if(${kit.name})
+ <render-kit-id>${kit.name}</render-kit-id>
+ #if(${kit.classname})
+ <render-kit-class>${kit.classname}</render-kit-class>
+ #end
+ #end
+ ${kit.facesConfig}
+ </render-kit>
+#end
+
+
+</faces-config>
Deleted: trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/resources-config.vm
===================================================================
--- trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/resources-config.vm 2007-10-19 00:33:03 UTC (rev 3446)
+++ trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/resources-config.vm 2007-10-19 00:54:42 UTC (rev 3447)
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resource-config>
-${content}
-</resource-config>
Added: trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/resources-config.vm
===================================================================
--- trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/resources-config.vm (rev 0)
+++ trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/resources-config.vm 2007-10-19 00:54:42 UTC (rev 3447)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<resource-config>
+${content}
+</resource-config>
Deleted: trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/taglib.vm
===================================================================
--- trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/taglib.vm 2007-10-19 00:33:03 UTC (rev 3446)
+++ trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/taglib.vm 2007-10-19 00:54:42 UTC (rev 3447)
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE facelet-taglib PUBLIC
- "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
- "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
-<facelet-taglib xmlns="http://java.sun.com/JSF/Facelet">
-<namespace>${library.taglib.uri}</namespace>
-
-${content}
-</facelet-taglib>
\ No newline at end of file
Added: trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/taglib.vm
===================================================================
--- trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/taglib.vm (rev 0)
+++ trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/taglib.vm 2007-10-19 00:54:42 UTC (rev 3447)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE facelet-taglib PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
+ "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
+<facelet-taglib xmlns="http://java.sun.com/JSF/Facelet">
+<namespace>${taglib.uri}</namespace>
+
+${content}
+</facelet-taglib>
\ No newline at end of file
Deleted: trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/tld.vm
===================================================================
--- trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/tld.vm 2007-10-19 00:33:03 UTC (rev 3446)
+++ trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/tld.vm 2007-10-19 00:54:42 UTC (rev 3447)
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<taglib xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
- xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="${library.taglib.jspVersion}">
-
-<tlib-version>${library.taglib.tlibVersion}</tlib-version>
-#if(${library.taglib.shortName})
- <short-name>${library.taglib.shortName}</short-name>
-#end
- <uri>${library.taglib.uri}</uri>
-#if(${library.taglib.displayName})
- <display-name>${library.taglib.displayName}</display-name>
-#end
-#if(${library.description})
- <description>${library.description}</description>
-#end
-#if(${library.taglib.validatorClass})
- <validator>
- <validator-class>${library.taglib.validatorClass}</validator-class>
- </validator>
-#end
-
-${content}
-</taglib>
\ No newline at end of file
Added: trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/tld.vm
===================================================================
--- trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/tld.vm (rev 0)
+++ trunk/cdk/maven-cdk-plugin/src/main/resources/templates12/tld.vm 2007-10-19 00:54:42 UTC (rev 3447)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
+ "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib>
+ <tlib-version>${taglib.tlibVersion}</tlib-version>
+ <jsp-version>${taglib.jspVersion}</jsp-version>
+#if(${taglib.shortName})
+ <short-name>${taglib.shortName}</short-name>
+#end
+ <uri>${taglib.uri}</uri>
+#if(${taglib.displayName})
+ <display-name>${taglib.displayName}</display-name>
+#end
+#if(${library.description})
+ <description>${library.description}</description>
+#end
+#if(${taglib.validatorClass})
+ <validator>
+ <validator-class>${taglib.validatorClass}</validator-class>
+ </validator>
+#end
+
+${content}
+</taglib>
\ No newline at end of file
17 years, 2 months