JBoss Rich Faces SVN: r3446 - in trunk: cdk/generator/src/main/resources/META-INF/templates12/templatecompiler and 26 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-10-18 20:33:03 -0400 (Thu, 18 Oct 2007)
New Revision: 3446
Added:
trunk/cdk/generator/src/main/resources/META-INF/templates12/VM_global_library.vm
trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/
trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/ComponentTemplate.vm
trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/EncodeBegin.vm
trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/EncodeChildren.vm
trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/EncodeEnd.vm
trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/FORElement_1.vm
trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/FORElement_2.vm
trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/HTMLElement.vm
trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/IFElement.vm
trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/ajaxRenderedArea.vm
trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/headerResource.vm
trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/insertCall.vm
trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/insertChildren.vm
trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/insertComponent.vm
trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/insertFacet.vm
trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/insertResource.vm
trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/object.vm
trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/set.vm
trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/tags.bin
trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/velocity.properties
trunk/extensions/portlet/src/main/java/javax/
trunk/extensions/portlet/src/main/java/javax/portlet/
trunk/extensions/portlet/src/main/java/javax/portlet/faces/
trunk/extensions/portlet/src/main/java/javax/portlet/faces/Bridge.java
trunk/extensions/portlet/src/main/java/javax/portlet/faces/BridgeDefaultViewNotSpecifiedException.java
trunk/extensions/portlet/src/main/java/javax/portlet/faces/BridgeException.java
trunk/extensions/portlet/src/main/java/javax/portlet/faces/GenericFacesPortlet.java
trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/DistributionBean.java
trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/LedgerAction.java
trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/MenuAction.java
trunk/samples/seamIntegration/src/main/webapp/include/
trunk/samples/seamIntegration/src/main/webapp/include/button.xhtml
trunk/samples/seamIntegration/src/main/webapp/include/dataTable.xhtml
trunk/samples/seamIntegration/src/main/webapp/ledger/
trunk/samples/seamIntegration/src/main/webapp/ledger/_activeAccountTemplate.xhtml
trunk/samples/seamIntegration/src/main/webapp/ledger/_ledgerTranasctionDistribution.xhtml
trunk/samples/seamIntegration/src/main/webapp/ledger/ledgerDetails.xhtml
trunk/samples/seamIntegration/src/main/webapp/pages/tabPanel.xhtml
trunk/ui/core/src/main/java/META-INF/
trunk/ui/core/src/main/java/META-INF/MANIFEST.MF
Removed:
trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/Log4JConfigurator.java
Modified:
trunk/cdk/generator/src/main/resources/META-INF/templates12/faces-config.vm
trunk/cdk/generator/src/main/resources/META-INF/templates12/taglib.vm
trunk/cdk/generator/src/main/resources/META-INF/templates12/validatorTag.vm
trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/AbstractCDKMojo.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/AjaxFacesPortlet.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortalStateManager.java
trunk/framework/api/pom.xml
trunk/framework/impl/pom.xml
trunk/framework/impl/src/main/java/org/ajax4jsf/application/TreeStrutureNode.java
trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java
trunk/framework/pom.xml
trunk/framework/test/pom.xml
trunk/samples/pom.xml
trunk/samples/seamIntegration/pom.xml
trunk/ui/core/src/test/java/org/ajax4jsf/component/UIAjaxFormTest.java
trunk/ui/dataTable/src/main/java/org/richfaces/component/UISubTable.java
trunk/ui/panel/src/test/java/org/richfaces/component/PanelComponentTest.java
trunk/ui/pom.xml
Log:
Switch build to JSF 1.2 and java 5.
Start convert portlet support extension to JSR-301 compatible bridge
Added: trunk/cdk/generator/src/main/resources/META-INF/templates12/VM_global_library.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/VM_global_library.vm (rev 0)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/VM_global_library.vm 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,12 @@
+#macro( quietnull $a)
+
+#if($a)$a#end
+
+#end
+
+
+
+
+
+
+
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-18 13:31:58 UTC (rev 3445)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/faces-config.vm 2007-10-19 00:33:03 UTC (rev 3446)
@@ -1,8 +1,8 @@
<?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">
+<!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>
+
${facesConfig.includeContent}
#foreach( $validator in ${validators})
Modified: trunk/cdk/generator/src/main/resources/META-INF/templates12/taglib.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/taglib.vm 2007-10-18 13:31:58 UTC (rev 3445)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/taglib.vm 2007-10-19 00:33:03 UTC (rev 3446)
@@ -133,7 +133,11 @@
#foreach( $listener in ${listeners})
#if($listener.tag)
<tag>
+ #if($listener.tag.name)
<name>${listener.tag.name}</name>
+ #else
+ <name>${listener.name}</name>
+ #end
<tag-class>${listener.tag.classname}</tag-class>
<body-content>${listener.tag.bodyContent}</body-content>
#if(${listener.tag.displayname})
@@ -146,6 +150,24 @@
#elseif(${listener.xmlEncodedDescription})
<description>${listener.xmlEncodedDescription}</description>
#end
+
+ <attribute>
+ <name>type</name>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ Attribute defines the fully qualified Java class name for listener
+ </description>
+ </attribute>
+
+ <attribute>
+ <name>binding</name>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ The attribute takes a value-binding expression for a component property of a backing bean
+ </description>
+ </attribute>
+
+
#foreach( $prop in ${listener.properties} )
#if( !${prop.hidden} && !${prop.disabled} )
<attribute>
Added: trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/ComponentTemplate.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/ComponentTemplate.vm (rev 0)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/ComponentTemplate.vm 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,109 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#if($component.packageName)
+package $component.packageName;
+#end
+
+#if($component.imports)
+
+//
+// Imports
+//
+#foreach( $import in $component.imports )
+import $import;
+#end
+//
+//
+//
+
+#else
+import java.util.Iterator;
+import java.util.Collection;
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.ajax4jsf.renderkit.ComponentsVariableResolver;
+import org.ajax4jsf.renderkit.ComponentVariables;
+#end
+
+#if($component.fullBaseclass)
+import $component.fullBaseclass;
+#else
+import org.ajax4jsf.renderkit.RendererBase;
+#end
+
+#if($component.baseclassName)
+#set( $baseclassname = $component.baseclassName )
+#else
+#set( $baseclassname = "RendererBase" )
+#end
+
+
+/**
+ * Renderer for component class ${component.fullClassName}
+ */
+public class $component.className extends $baseclassname {
+
+ public $component.className () {
+ super();
+ }
+
+#if( $component.declarations )
+ //
+ // Declarations
+ //
+#foreach( $declaration in $component.declarations )
+ $declaration
+#end
+ //
+ //
+ //
+#end
+
+
+ private String convertToString(Object obj ) {
+ return ( obj == null ? "" : obj.toString() );
+ }
+ private String convertToString(boolean b ) {
+ return String.valueOf(b);
+ }
+ private String convertToString(int b ) {
+ return b!=Integer.MIN_VALUE?String.valueOf(b):"";
+ }
+ private String convertToString(long b ) {
+ return b!=Long.MIN_VALUE?String.valueOf(b):"";
+ }
+
+ /**
+ * Get base component class, targetted for this renderer. Used for check arguments in decode/encode.
+ * @return
+ */
+ protected Class getComponentClass() {
+#if($component.componentClass)
+ return ${component.componentClass}.class;
+#else
+ return UIComponent.class;
+#end
+ }
Added: trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/EncodeBegin.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/EncodeBegin.vm (rev 0)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/EncodeBegin.vm 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,10 @@
+
+ public void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent component ) throws IOException {
+ ComponentVariables variables = ComponentsVariableResolver.getVariables(this, component);
+ doEncodeBegin(writer, context, (${component.componentClass})component, variables );
+ }
+
+ public void doEncodeBegin(ResponseWriter writer, FacesContext context, ${component.componentClass} component, ComponentVariables variables ) throws IOException {
+ $body
+ }
+
\ No newline at end of file
Added: trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/EncodeChildren.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/EncodeChildren.vm (rev 0)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/EncodeChildren.vm 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,16 @@
+
+ public void doEncodeChildren(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+ ComponentVariables variables = ComponentsVariableResolver.getVariables(this, component);
+ doEncodeChildren(writer, context, (${component.componentClass})component, variables );
+ }
+
+ public void doEncodeChildren(ResponseWriter writer, FacesContext context, ${component.componentClass} component, ComponentVariables variables) throws IOException {
+ ${body}
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.render.Renderer#getRendersChildren()
+ */
+ public boolean getRendersChildren() {
+ return true;
+ }
Added: trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/EncodeEnd.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/EncodeEnd.vm (rev 0)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/EncodeEnd.vm 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,12 @@
+
+ public void doEncodeEnd(ResponseWriter writer, FacesContext context, ${component.componentClass} component, ComponentVariables variables) throws IOException {
+ ${body}
+ }
+
+ public void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+ ComponentVariables variables = ComponentsVariableResolver.getVariables(this, component);
+ doEncodeEnd(writer, context, (${component.componentClass})component, variables );
+
+ ComponentsVariableResolver.removeVariables(this, component);
+ }
+
Added: trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/FORElement_1.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/FORElement_1.vm (rev 0)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/FORElement_1.vm 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,3 @@
+Collection com_$index = (Collection)$items;
+for (Iterator iter = com_$index .iterator(); iter.hasNext();) {
+ variables.setVariable("$item", iter.next());
\ No newline at end of file
Added: trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/FORElement_2.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/FORElement_2.vm (rev 0)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/FORElement_2.vm 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,5 @@
+for (
+ variables.setVariable("$item", $from);
+ Integer.getInteger(variables.getVariable("$item").toString()).intValue() < Integer.getInteger($to).toString()).intValue();
+ variables.addValueToVariable("$item", new Integer(1) )
+ ) {
\ No newline at end of file
Added: trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/HTMLElement.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/HTMLElement.vm (rev 0)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/HTMLElement.vm 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,32 @@
+writer.startElement("$htmlTag", component);
+#if($htmlAttributes)
+#foreach( $key in $htmlAttributes.keySet() )
+ #set ( $attr = $htmlAttributes.get($key) )
+ #if ( $attr.code )
+ $attr.code
+ #else
+ #if ( $attr.value )
+getUtils().writeAttribute(writer, "$attr.name", $attr.value );
+ #end
+ #end
+#end
+#end
+#if($passThruAttributes)
+//
+// pass thru attributes
+//
+#set( $passThruLength = ${passThruAttributes.size()})
+getUtils().encodeAttributesFromArray(context,component,new String[] {
+#foreach( $attribute in $passThruAttributes )
+ "$attribute" #if( $velocityCount < $passThruLength ),
+ #end
+#end
+});
+//
+//
+//
+#end
+#if($htmlText)
+writer.write( convertToString($htmlText) );
+writer.flush();
+#end
\ No newline at end of file
Added: trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/IFElement.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/IFElement.vm (rev 0)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/IFElement.vm 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,2 @@
+if ( Boolean.valueOf( String.valueOf($if) ).booleanValue() ) {
+
Added: trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/ajaxRenderedArea.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/ajaxRenderedArea.vm (rev 0)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/ajaxRenderedArea.vm 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,13 @@
+#if($areas)
+ {
+ //Auto-generated block.
+ //Add to ajax context list of element ids passed as *areas* param
+ String [] _areas = (${areas}).split(",\" ");
+ AjaxContext _ajaxContext = AjaxContext.getCurrentInstance(context);
+ if (_ajaxContext.isAjaxRequest()) {
+ for (int _i = 0; _i < _areas.length; _i++) {
+ _ajaxContext.addRenderedArea(_areas[_i]);
+ }
+ }
+ }
+#end
\ No newline at end of file
Added: trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/headerResource.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/headerResource.vm (rev 0)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/headerResource.vm 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,48 @@
+private final InternetResource[] ${property} = {
+ #set ($count = 0)
+ #foreach($resource in $resourceKeys)
+ #if($count > 0)
+ ,
+ #end
+ #set ($count = $count + 1)
+ ${resource}
+ #end
+};
+
+private InternetResource[] ${property}All = null;
+
+${getterModifier} InternetResource[] ${propertyGetterName}() {
+ synchronized (this) {
+ if (${property}All == null) {
+ InternetResource[] rsrcs = super.${propertyGetterName}();
+ boolean ignoreSuper = rsrcs == null || rsrcs.length == 0;
+ boolean ignoreThis = ${property} == null || ${property}.length == 0;
+
+ if (ignoreSuper) {
+ if (ignoreThis) {
+ ${property}All = new InternetResource[0];
+ } else {
+ ${property}All = ${property};
+ }
+ } else {
+ if (ignoreThis) {
+ ${property}All = rsrcs;
+ } else {
+ java.util.Set rsrcsSet = new java.util.LinkedHashSet();
+
+ for (int i = 0; i < rsrcs.length; i++ ) {
+ rsrcsSet.add(rsrcs[i]);
+ }
+
+ for (int i = 0; i < ${property}.length; i++ ) {
+ rsrcsSet.add(${property}[i]);
+ }
+
+ ${property}All = (InternetResource[]) rsrcsSet.toArray(new InternetResource[rsrcsSet.size()]);
+ }
+ }
+ }
+ }
+
+ return ${property}All;
+}
\ No newline at end of file
Added: trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/insertCall.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/insertCall.vm (rev 0)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/insertCall.vm 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,5 @@
+#if ($variableName)
+variables.setVariable("$variableName", $function);
+#else
+$function;
+#end
\ No newline at end of file
Added: trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/insertChildren.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/insertChildren.vm (rev 0)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/insertChildren.vm 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,12 @@
+#if(${$ELIndex} || ${$ELVar})
+#if(${$ELIndex})
+Integer indexChildren_$indexChildren = (Integer)ComponentUtils.evaluateExpression(facesContext, "$ELIndex");
+if (null != indexChildren_$indexChildren ) {
+ UIComponent component_$indexChildren = (UIComponent)component.getChildren().get(indexChildren_$indexChildren .intValue());
+ renderChild(context, component_$indexChildren );
+}
+#else
+ UIComponent component_$indexChildren = (UIComponent)evaluateExpression( "$ELVar" );
+ renderChild(context, component_$indexChildren );
+#end
+#end
\ No newline at end of file
Added: trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/insertComponent.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/insertComponent.vm (rev 0)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/insertComponent.vm 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1 @@
+renderChild(context, (UIComponent)$value );
Added: trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/insertFacet.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/insertFacet.vm (rev 0)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/insertFacet.vm 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,4 @@
+UIComponent indexChildren_$index = component.getFacet("$FacetName");
+if (null != indexChildren_$index && indexChildren_$index .isRendered()) {
+ renderChild(context, indexChildren_$index);
+}
Added: trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/insertResource.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/insertResource.vm (rev 0)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/insertResource.vm 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1 @@
+variables.setVariable("$variable", getResource( "$resourceURI" ).getUri(context, component) );
Added: trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/object.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/object.vm (rev 0)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/object.vm 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1 @@
+$type $variable = $expression;
\ No newline at end of file
Added: trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/set.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/set.vm (rev 0)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/set.vm 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1 @@
+variables.setVariable("$variable", $expression );
\ No newline at end of file
Added: trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/tags.bin
===================================================================
(Binary files differ)
Property changes on: trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/tags.bin
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/velocity.properties
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/velocity.properties (rev 0)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/velocity.properties 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,3 @@
+resource.loader = classpath,antfile
+classpath.resource.loader.class = org.ajax4jsf.templatecompiler.velocity.ClasspathTemplateLoader
+antfile.resource.loader.class = org.ajax4jsf.templatecompiler.velocity.AntFileResourceLoader
Property changes on: trunk/cdk/generator/src/main/resources/META-INF/templates12/templatecompiler/velocity.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdk/generator/src/main/resources/META-INF/templates12/validatorTag.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/validatorTag.vm 2007-10-18 13:31:58 UTC (rev 3445)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/validatorTag.vm 2007-10-19 00:33:03 UTC (rev 3446)
@@ -18,7 +18,10 @@
public class $tag.simpleClassName extends $tag.superclass {
- // Fields
+ //private String validatorId = "${validator.id}";
+
+
+// Fields
#foreach( $prop in $validator.properties )
#if( !$prop.existintag )
/*
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-18 13:31:58 UTC (rev 3445)
+++ trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/AbstractCDKMojo.java 2007-10-19 00:33:03 UTC (rev 3446)
@@ -156,9 +156,11 @@
library.setPrefix(project.getGroupId());
}
+ getLog().debug("Default prefix for a generated packages: "+library.getPrefix());
if (null == library.getDescription()) {
library.setDescription(project.getDescription());
}
+ getLog().debug("Library description: "+library.getDescription());
if( null == library.getJsfVersion()){
String version = Library.JSF11;
// Check version-specific methods in UIComponent class
@@ -176,6 +178,7 @@
}
library.setJsfVersion(version);
}
+ getLog().debug("Generate files for a JSF "+library.getJsfVersion());
Renderkit[] renderkits = library.getRenderkits();
if (null != renderkits) {
for (int i = 0; i < renderkits.length; i++) {
@@ -204,7 +207,6 @@
}
if (null == taglib.getDisplayName()) {
taglib.setDisplayName(project.getDescription());
-
}
if( null == taglib.getJspVersion()){
// Jsf 1.2 can use JSP 2.1 only, other - 2.0
Added: trunk/extensions/portlet/src/main/java/javax/portlet/faces/Bridge.java
===================================================================
--- trunk/extensions/portlet/src/main/java/javax/portlet/faces/Bridge.java (rev 0)
+++ trunk/extensions/portlet/src/main/java/javax/portlet/faces/Bridge.java 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,65 @@
+package javax.portlet.faces;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+public interface Bridge {
+
+ /**
+ * Name of the init parameter with maximum number of bridge request scopes
+ * maintained by the bridge. See JSR-301 PLT 3.2
+ */
+ public static final String MAX_MANAGED_REQUEST_SCOPE_ATTR = "javax.portlet.faces.MAX_MANAGED_REQUEST_SCOPES";
+ /**
+ * Per-portlet attributes prefix, for additional parameters, as described in
+ * the JSR 301 PLT 3.2
+ */
+ public static final String PORTLET_ATTR_PREFIX = "javax.portlet.faces.";
+ /**
+ * Per-portlet extensions attributes prefix ( this implementation-specific ),
+ * for additional parameters, as described in the JSR 301 PLT 3.2
+ */
+ public static final String EXYENDED_PORTLET_ATTR_PREFIX = "javax.portlet.faces.extension.";
+ public static final String PRESERVE_ACTION_PARAM_ATTR_SUFFIX = ".preserveActionParams";
+ public static final String RENDER_POLICY_PARAM_ATTR_SUFFIX = ".renderPolicy";
+ /**
+ * Request-scope attribute name for the default request viewId . See JSR-301
+ * PLT 3.4
+ */
+ public static final String DEFAULT_VIEW_ID_ATTR = "javax.portlet.faces.defaultViewId";
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.portlet.GenericPortlet#init(javax.portlet.PortletConfig)
+ */
+ public void init(PortletConfig config) throws PortletException;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.portlet.GenericPortlet#destroy()
+ */
+ public void destroy();
+
+ /**
+ * @param request
+ * @param response
+ * @throws PortletException
+ */
+ public void doFacesRequest(ActionRequest request, ActionResponse response)
+ throws PortletException;
+
+ /**
+ * @param request
+ * @param response
+ * @throws PortletException
+ */
+ public void doFacesRequest(RenderRequest request, RenderResponse response)
+ throws PortletException;
+
+}
\ No newline at end of file
Property changes on: trunk/extensions/portlet/src/main/java/javax/portlet/faces/Bridge.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Added: trunk/extensions/portlet/src/main/java/javax/portlet/faces/BridgeDefaultViewNotSpecifiedException.java
===================================================================
--- trunk/extensions/portlet/src/main/java/javax/portlet/faces/BridgeDefaultViewNotSpecifiedException.java (rev 0)
+++ trunk/extensions/portlet/src/main/java/javax/portlet/faces/BridgeDefaultViewNotSpecifiedException.java 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,50 @@
+/**
+ *
+ */
+package javax.portlet.faces;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class BridgeDefaultViewNotSpecifiedException extends BridgeException {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 540438273186022660L;
+
+ /**
+ *
+ */
+ public BridgeDefaultViewNotSpecifiedException() {
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * @param message
+ */
+ public BridgeDefaultViewNotSpecifiedException(String message) {
+ super(message);
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * @param cause
+ */
+ public BridgeDefaultViewNotSpecifiedException(Throwable cause) {
+ super(cause);
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * @param message
+ * @param cause
+ */
+ public BridgeDefaultViewNotSpecifiedException(String message,
+ Throwable cause) {
+ super(message, cause);
+ // TODO Auto-generated constructor stub
+ }
+
+}
Property changes on: trunk/extensions/portlet/src/main/java/javax/portlet/faces/BridgeDefaultViewNotSpecifiedException.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Added: trunk/extensions/portlet/src/main/java/javax/portlet/faces/BridgeException.java
===================================================================
--- trunk/extensions/portlet/src/main/java/javax/portlet/faces/BridgeException.java (rev 0)
+++ trunk/extensions/portlet/src/main/java/javax/portlet/faces/BridgeException.java 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,51 @@
+/**
+ *
+ */
+package javax.portlet.faces;
+
+import javax.faces.FacesException;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class BridgeException extends FacesException {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 6758659847475864393L;
+
+ /**
+ *
+ */
+ public BridgeException() {
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * @param message
+ */
+ public BridgeException(String message) {
+ super(message);
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * @param cause
+ */
+ public BridgeException(Throwable cause) {
+ super(cause);
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * @param message
+ * @param cause
+ */
+ public BridgeException(String message, Throwable cause) {
+ super(message, cause);
+ // TODO Auto-generated constructor stub
+ }
+
+}
Property changes on: trunk/extensions/portlet/src/main/java/javax/portlet/faces/BridgeException.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Added: trunk/extensions/portlet/src/main/java/javax/portlet/faces/GenericFacesPortlet.java
===================================================================
--- trunk/extensions/portlet/src/main/java/javax/portlet/faces/GenericFacesPortlet.java (rev 0)
+++ trunk/extensions/portlet/src/main/java/javax/portlet/faces/GenericFacesPortlet.java 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,100 @@
+/**
+ *
+ */
+package javax.portlet.faces;
+
+import java.io.IOException;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.PortletMode;
+import javax.portlet.PortletRequest;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.WindowState;
+
+/**
+ * JSR 301 generic faces pottlet implementation.
+ * @author asmirnov
+ *
+ */
+public class GenericFacesPortlet extends GenericPortlet {
+
+ private String bridgeClassName = null;
+ private Bridge facesPortletBrige = null;
+
+ public void init(PortletConfig config) throws PortletException {
+ super.init(config);
+ }
+
+ 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);
+ } else {
+ doFacesDispatch(request, response);
+ }
+
+ }
+
+ protected void doEdit(RenderRequest request, RenderResponse response)
+ throws PortletException, IOException {
+ doFacesDispatch(request, response);
+ }
+
+ protected void doHelp(RenderRequest request, RenderResponse response)
+ throws PortletException, IOException {
+ doFacesDispatch(request, response);
+ }
+
+ protected void doView(RenderRequest request, RenderResponse response)
+ throws PortletException, IOException {
+ doFacesDispatch(request, response);
+ }
+
+ public void processAction(ActionRequest request, ActionResponse response)
+ throws PortletException, IOException {
+ super.processAction(request, response);
+ }
+
+
+ void doFacesDispatch(RenderRequest request, RenderResponse response) throws PortletException,IOException {
+ String defaultViewId = getDefaultViewId(request, request.getPortletMode());
+ if(null != defaultViewId && ! request.getWindowState().equals(WindowState.MINIMIZED) ){
+
+ }
+ }
+ /**
+ * JSR 301 API method
+ * @return
+ */
+ public String getBrigeClassName() {
+ if (bridgeClassName == null) {
+
+ }
+ return bridgeClassName;
+ }
+
+ public String getDefaultViewId(PortletRequest request, PortletMode mode) {
+ return null;
+ }
+
+ private void initBrige(){
+ if(null == facesPortletBrige){
+
+ }
+ }
+ public void destroy() {
+ bridgeClassName = null;
+ // If brige was initialized, destroy it.
+ if(null != facesPortletBrige){
+ facesPortletBrige.destroy();
+ facesPortletBrige = null;
+ }
+ super.destroy();
+ }
+}
Property changes on: trunk/extensions/portlet/src/main/java/javax/portlet/faces/GenericFacesPortlet.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-18 13:31:58 UTC (rev 3445)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/AjaxFacesPortlet.java 2007-10-19 00:33:03 UTC (rev 3446)
@@ -26,6 +26,7 @@
import javax.portlet.PortletSession;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
+import javax.portlet.faces.Bridge;
import javax.servlet.ServletResponse;
import org.ajax4jsf.context.AjaxContext;
@@ -40,278 +41,308 @@
* @author asmirnov
*
*/
-public class AjaxFacesPortlet extends GenericPortlet {
- private static final Log log = LogFactory.getLog(AjaxFacesPortlet.class);
+public class AjaxFacesPortlet extends GenericPortlet implements Bridge {
+ private static final Log log = LogFactory.getLog(AjaxFacesPortlet.class);
- /**
- * <p>The key used to store/retrive the PortletConfig object.</p>
- */
- public static final String PORTLET_CONFIG = "javax.portlet.PortletConfig";
+ /**
+ * <p>
+ * The key used to store/retrive the PortletConfig object.
+ * </p>
+ */
+ public static final String PORTLET_CONFIG = "javax.portlet.PortletConfig";
- private Lifecycle lifecycle;
+ private Lifecycle lifecycle;
- private FacesContextFactory facesContextFactory;
-
- private ComponentsLoader componentLoader;
+ private FacesContextFactory facesContextFactory;
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.portlet.GenericPortlet#init(javax.portlet.PortletConfig)
+ */
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.portlet.Brige#init(javax.portlet.PortletConfig)
+ */
+ public void init(PortletConfig config) throws PortletException {
+ super.init(config);
+ try {
+ if (log.isDebugEnabled()) {
+ log.debug("Start portlet initialisation for "
+ + config.getPortletName());
+ }
+ // get faces lifecycle instance. Name of the Lifecycle can be
+ // changed by the init parameter, as described in the JSR 301 PLT
+ // 3.2
+ LifecycleFactory factory = (LifecycleFactory) FactoryFinder
+ .getFactory(FactoryFinder.LIFECYCLE_FACTORY);
+ String lifecycleId = config
+ .getInitParameter(FacesServlet.LIFECYCLE_ID_ATTR);
+ if (null == lifecycleId) {
+ lifecycleId = config.getPortletContext().getInitParameter(
+ FacesServlet.LIFECYCLE_ID_ATTR);
+ if (null == lifecycleId) {
+ lifecycleId = LifecycleFactory.DEFAULT_LIFECYCLE;
- /*
- * (non-Javadoc)
- *
- * @see javax.portlet.GenericPortlet#init(javax.portlet.PortletConfig)
- */
- public void init(PortletConfig config) throws PortletException {
- super.init(config);
- try {
- if (log.isDebugEnabled()) {
- log.debug("Start portlet initialisation for "
- + config.getPortletName());
- }
- // get faces lifecycle instance
- LifecycleFactory factory = (LifecycleFactory) FactoryFinder
- .getFactory(FactoryFinder.LIFECYCLE_FACTORY);
- String lifecycleId = config.getPortletContext().getInitParameter(
- FacesServlet.LIFECYCLE_ID_ATTR);
- if (null == lifecycleId) {
- lifecycleId = LifecycleFactory.DEFAULT_LIFECYCLE;
- }
- if (log.isDebugEnabled()) {
- log.debug("Create instance of a JSF lifecycle " + lifecycleId);
- }
- this.lifecycle = factory.getLifecycle(lifecycleId);
- // get faces context factory instance
- this.facesContextFactory = (FacesContextFactory) FactoryFinder
- .getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
- } catch (FacesException e) {
- throw new PortletException("Initialization error", e);
+ }
+ }
+ if (log.isDebugEnabled()) {
+ log.debug("Create instance of a JSF lifecycle " + lifecycleId);
+ }
+ this.lifecycle = factory.getLifecycle(lifecycleId);
+ // get faces context factory instance
+ this.facesContextFactory = (FacesContextFactory) FactoryFinder
+ .getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
+ } catch (FacesException e) {
+ throw new PortletException("Initialization error", e);
+ }
+ super.init(config);
+ if (log.isDebugEnabled()) {
+ log.debug("Done portlet initialisation for "
+ + config.getPortletName());
+ }
+ // getPortletContext().setAttribute(PORTLET_CONFIG, config);
}
- super.init(config);
- if (log.isDebugEnabled()) {
- log.debug("Done portlet initialisation for "
- + config.getPortletName());
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.portlet.GenericPortlet#destroy()
+ */
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.portlet.Brige#destroy()
+ */
+ public void destroy() {
+ if (log.isDebugEnabled()) {
+ log.debug("Destroy portlet " + getPortletConfig().getPortletName());
+ }
+ this.lifecycle = null;
+ this.facesContextFactory = null;
+ super.destroy();
}
-// getPortletContext().setAttribute(PORTLET_CONFIG, config);
- // TODO - use only one loader instance.
- componentLoader = new ComponentsLoaderImpl();
- }
+ /*
+ * (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#destroy()
- */
- public void destroy() {
- if (log.isDebugEnabled()) {
- log.debug("Destroy portlet " + getPortletConfig().getPortletName());
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.portlet.Brige#doFacesRequest(javax.portlet.ActionRequest, javax.portlet.ActionResponse)
+ */
+ public void doFacesRequest(ActionRequest request, ActionResponse response)
+ throws PortletException {
+ 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);
+ } finally {
+ facesContext.release();
+ }
}
- this.lifecycle = null;
- this.facesContextFactory = null;
- super.destroy();
- }
- /*
- * (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());
+ /*
+ * (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);
}
- 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);
- } finally {
- facesContext.release();
+
+ /* (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";
+ }
+ 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(
+ AbstractExternalContext.ACTION__PARAMETER,
+ response.createActionURL().toString());
+ ajaxContext.getCommonAjaxParameters().put(
+ AbstractExternalContext.PORTLET_MODE_PARAMETER,
+ request.getPortletMode().toString());
+ ajaxContext.getCommonAjaxParameters().put(
+ AbstractExternalContext.NAMESPACE_PARAMETER, namespace);
+ render(facesContext);
+ writer.println("</div>");
+ PortletSession portletSession = request.getPortletSession(true);
+ // Store namespace value in portlet scope session.
+ // ServletContext, in case of ajax requests,
+ // will restore session prefiv by it's value.
+ portletSession.setAttribute(
+ AbstractExternalContext.NAMESPACE_PARAMETER, namespace);
+ if (log.isDebugEnabled()) {
+ log
+ .debug("Finish rendering portlet for namespace "
+ + namespace);
+ }
+ // Disable portlet caching.
+ // TODO - detect ajax components on page, static views can be
+ // cached.
+ response.setProperty(RenderResponse.EXPIRATION_CACHE, "0");
+ } catch (Exception e) {
+ log.error("Error processing execute lifecycle", e);
+ throw new PortletException("Error processing execute lifecycle ", e);
+ } finally {
+ facesContext.release();
+ }
}
- }
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.portlet.GenericPortlet#doEdit(javax.portlet.RenderRequest,
+ * javax.portlet.RenderResponse)
+ */
+ protected void doEdit(RenderRequest arg0, RenderResponse arg1)
+ throws PortletException, IOException {
+ if (log.isDebugEnabled()) {
+ log.debug("Process do edit in portlet "
+ + getPortletConfig().getPortletName());
+ }
+ doFacesRequest(arg0, arg1);
+ }
- /*
- * (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());
- }
- FacesContext facesContext = getFacesContext(request, response);
- try {
- String contenttype = request.getResponseContentType();
- if (contenttype == null) {
- contenttype = "text/html";
- }
- 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(AbstractExternalContext.ACTION__PARAMETER, response.createActionURL().toString());
- ajaxContext.getCommonAjaxParameters().put(AbstractExternalContext.PORTLET_MODE_PARAMETER,request.getPortletMode().toString());
- ajaxContext.getCommonAjaxParameters().put(AbstractExternalContext.NAMESPACE_PARAMETER, namespace);
- render(facesContext);
- writer.println("</div>");
- PortletSession portletSession = request.getPortletSession(true);
- // Store namespace value in portlet scope session.
- // ServletContext, in case of ajax requests,
- // will restore session prefiv by it's value.
- portletSession.setAttribute(
- AbstractExternalContext.NAMESPACE_PARAMETER, namespace);
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.portlet.GenericPortlet#doHelp(javax.portlet.RenderRequest,
+ * javax.portlet.RenderResponse)
+ */
+ protected void doHelp(RenderRequest arg0, RenderResponse arg1)
+ throws PortletException, IOException {
if (log.isDebugEnabled()) {
- log.debug("Finish rendering portlet for namespace "+namespace);
+ log.debug("Process do help in portlet "
+ + getPortletConfig().getPortletName());
}
- // Disable portlet caching.
- // TODO - detect ajax components on page, static views can be cached.
- response.setProperty(RenderResponse.EXPIRATION_CACHE, "0");
- } catch (Exception e) {
- log.error("Error processing execute lifecycle", e);
- throw new PortletException("Error processing execute lifecycle ", e);
- } finally {
- facesContext.release();
+ doFacesRequest(arg0, arg1);
}
- }
+ /**
+ * Get currenf JSF lifecycle instance.
+ *
+ * @return
+ */
+ protected Lifecycle getLifecycle() {
+ return this.lifecycle;
+ }
- /*
- * (non-Javadoc)
- *
- * @see javax.portlet.GenericPortlet#doEdit(javax.portlet.RenderRequest,
- * javax.portlet.RenderResponse)
- */
- protected void doEdit(RenderRequest arg0, RenderResponse arg1)
- throws PortletException, IOException {
- if (log.isDebugEnabled()) {
- log.debug("Process do edit in portlet "
- + getPortletConfig().getPortletName());
+ /**
+ * Create new faces context instance.
+ *
+ * @param request
+ * @param response
+ * @return new instance of faces context.
+ */
+ protected FacesContext getFacesContext(PortletRequest request,
+ PortletResponse response) {
+ FacesContext facesContext = this.facesContextFactory.getFacesContext(
+ getPortletConfig().getPortletContext(), request, response,
+ getLifecycle());
+ // Store portlet config in the Request parameter.
+ facesContext.getExternalContext().getRequestMap().put(PORTLET_CONFIG,
+ getPortletConfig());
+ return facesContext;
}
- }
- /*
- * (non-Javadoc)
- *
- * @see javax.portlet.GenericPortlet#doHelp(javax.portlet.RenderRequest,
- * javax.portlet.RenderResponse)
- */
- protected void doHelp(RenderRequest arg0, RenderResponse arg1)
- throws PortletException, IOException {
- if (log.isDebugEnabled()) {
- log.debug("Process do help in portlet "
- + getPortletConfig().getPortletName());
+ protected void execute(FacesContext context) throws FacesException {
+ getLifecycle().execute(context);
}
- }
- /**
- * Get currenf JSF lifecycle instance.
- *
- * @return
- */
- protected Lifecycle getLifecycle() {
- return this.lifecycle;
- }
+ protected void render(FacesContext context) throws FacesException {
+ getLifecycle().render(context);
+ }
- /**
- * Create new faces context instance.
- *
- * @param request
- * @param response
- * @return new instance of faces context.
- */
- protected FacesContext getFacesContext(PortletRequest request,
- PortletResponse response) {
- FacesContext facesContext = this.facesContextFactory.getFacesContext(getPortletConfig()
- .getPortletContext(), request, response, getLifecycle());
- // Store portlet config in the Request parameter.
- facesContext.getExternalContext().getRequestMap().put(PORTLET_CONFIG, getPortletConfig());
- return facesContext;
- }
-
- protected void execute(FacesContext context) throws FacesException {
- getLifecycle().execute(context);
- }
-
- protected void render(FacesContext context) throws FacesException {
- getLifecycle().render(context);
- }
-
- protected void setViewId(FacesContext context) {
- PortletStateHolder portletStateHolder = PortletStateHolder.getInstance(context);
- String viewId = portletStateHolder.getViewId(context);
- context.getExternalContext().getRequestMap().put(
- AbstractExternalContext.VIEW_ID_PARAMETER, viewId);
- UIViewRoot viewRoot = context.getViewRoot();
- if (null != viewRoot) {
- viewRoot.setViewId(viewId);
+ protected void setViewId(FacesContext context) {
+ PortletStateHolder portletStateHolder = PortletStateHolder
+ .getInstance(context);
+ String viewId = portletStateHolder.getViewId(context);
+ context.getExternalContext().getRequestMap().put(
+ AbstractExternalContext.VIEW_ID_PARAMETER, viewId);
+ UIViewRoot viewRoot = context.getViewRoot();
+ if (null != viewRoot) {
+ viewRoot.setViewId(viewId);
+ }
}
- }
- /**
- * @param facesContext
- * @return
- */
- public static String getPortletNamespace(FacesContext facesContext) {
- ExternalContext externalContext = facesContext.getExternalContext();
- Object response = externalContext.getResponse();
- String namespace = null;
- if (response instanceof RenderResponse) {
- namespace = ((RenderResponse) response).getNamespace();
- } else if (response instanceof ServletResponse) {
- namespace = (String) externalContext.getRequestParameterMap().get(
- AbstractExternalContext.NAMESPACE_PARAMETER);
- } else {
- throw new IllegalStateException("portlet Namespace not availible at this phase");
+ /**
+ * @param facesContext
+ * @return
+ */
+ public static String getPortletNamespace(FacesContext facesContext) {
+ ExternalContext externalContext = facesContext.getExternalContext();
+ Object response = externalContext.getResponse();
+ String namespace = null;
+ if (response instanceof RenderResponse) {
+ namespace = ((RenderResponse) response).getNamespace();
+ } else if (response instanceof ServletResponse) {
+ namespace = (String) externalContext.getRequestParameterMap().get(
+ AbstractExternalContext.NAMESPACE_PARAMETER);
+ } else {
+ throw new IllegalStateException(
+ "portlet Namespace not availible at this phase");
+ }
+ return namespace;
}
- return namespace;
- }
- /**
- * @param facesContext
- * @return
- */
- public static PortletMode getPortletMode(FacesContext facesContext) {
- ExternalContext externalContext = facesContext.getExternalContext();
- Object request = externalContext.getRequest();
- PortletMode mode = null;
- if (request instanceof PortletRequest) {
- mode = ((PortletRequest) request).getPortletMode();
- } else if (null != externalContext.getRequestParameterMap().get(
- AbstractExternalContext.PORTLET_MODE_PARAMETER)) {
- String modeName = (String) externalContext.getRequestParameterMap().get(
- AbstractExternalContext.PORTLET_MODE_PARAMETER);
- if(null != modeName){
- mode = new PortletMode(modeName);
- }
+ /**
+ * @param facesContext
+ * @return
+ */
+ public static PortletMode getPortletMode(FacesContext facesContext) {
+ ExternalContext externalContext = facesContext.getExternalContext();
+ Object request = externalContext.getRequest();
+ PortletMode mode = null;
+ if (request instanceof PortletRequest) {
+ mode = ((PortletRequest) request).getPortletMode();
+ } else if (null != externalContext.getRequestParameterMap().get(
+ AbstractExternalContext.PORTLET_MODE_PARAMETER)) {
+ String modeName = (String) externalContext.getRequestParameterMap()
+ .get(AbstractExternalContext.PORTLET_MODE_PARAMETER);
+ if (null != modeName) {
+ mode = new PortletMode(modeName);
+ }
+ }
+ return mode;
}
- return mode;
- }
- /**
- * @return the componentLoader
- */
- public ComponentsLoader getComponentLoader() {
- // TODO - share loader instance with a StateManager
- return componentLoader;
- }
}
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortalStateManager.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortalStateManager.java 2007-10-18 13:31:58 UTC (rev 3445)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortalStateManager.java 2007-10-19 00:33:03 UTC (rev 3446)
@@ -16,15 +16,11 @@
*/
public class PortalStateManager extends AjaxStateManager {
- private static final String VIEW_STATES_MAP = PortalStateManager.class.getName();
-
- private ComponentsLoader componentLoader;
/**
*
*/
public PortalStateManager(StateManager parentStateManager) {
super(parentStateManager);
- componentLoader = new ComponentsLoaderImpl();
}
@@ -39,7 +35,6 @@
return new SerializedView(viewId,null);
}
- //@Override
protected Object[] restoreStateFromSession(FacesContext context,
String viewId, String renderKitId) {
Object[] state = new Object[2];
Modified: trunk/framework/api/pom.xml
===================================================================
--- trunk/framework/api/pom.xml 2007-10-18 13:31:58 UTC (rev 3445)
+++ trunk/framework/api/pom.xml 2007-10-19 00:33:03 UTC (rev 3446)
@@ -9,67 +9,8 @@
<artifactId>richfaces-api</artifactId>
<name>Java Server Faces AJAX framework API</name>
<version>3.2.0-SNAPSHOT</version>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.2</version>
- <executions>
- <execution>
- <id>attach-javadoc</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
<dependencies>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.sun.facelets</groupId>
- <artifactId>jsf-facelets</artifactId>
- <version>1.1.12</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.0.4</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>jsp-api</artifactId>
- <version>2.1</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <version>1.2_03</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2</version>
@@ -80,7 +21,4 @@
<version>1.7.0</version>
</dependency>
</dependencies>
- <properties>
- <jsfVersion>1.1</jsfVersion>
- </properties>
</project>
\ No newline at end of file
Modified: trunk/framework/impl/pom.xml
===================================================================
--- trunk/framework/impl/pom.xml 2007-10-18 13:31:58 UTC (rev 3445)
+++ trunk/framework/impl/pom.xml 2007-10-19 00:33:03 UTC (rev 3446)
@@ -66,149 +66,10 @@
</execution>
</executions>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.2</version>
- <executions>
- <execution>
- <id>attach-javadoc</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
<profiles>
<profile>
- <id>jsf1_1</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- <property>
- <name>jsfVersion</name>
- <value>1.1</value>
- </property>
- </activation>
- <dependencies>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.4</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jsp-api</artifactId>
- <version>2.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <version>1.1_02</version>
- <exclusions>
- <exclusion>
- <artifactId>jsp-api</artifactId>
- <groupId>javax.servlet.jsp</groupId>
- </exclusion>
- <exclusion>
- <artifactId>jstl</artifactId>
- <groupId>javax.servlet.jsp.jstl</groupId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-impl</artifactId>
- <version>1.1_02</version>
- <scope>runtime</scope>
- <exclusions>
- <exclusion>
- <artifactId>jsp-api</artifactId>
- <groupId>javax.servlet.jsp</groupId>
- </exclusion>
- <exclusion>
- <artifactId>jstl</artifactId>
- <groupId>javax.servlet.jsp.jstl</groupId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
- <version>1.0</version>
- </dependency>
- </dependencies>
- </profile>
- <profile>
- <id>jsf1_2</id>
- <activation>
- <property>
- <name>jsfVersion</name>
- <value>1.2</value>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.0</version>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>
- build-helper-maven-plugin
- </artifactId>
- <executions>
- <execution>
- <id>add-source</id>
- <phase>process-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>src/main/jsf12</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>jsp-api</artifactId>
- <version>2.1</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <version>1.2_03</version>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-impl</artifactId>
- <version>1.2_03</version>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
- </profile>
- <profile>
<id>clover</id>
<build>
<plugins>
@@ -227,68 +88,26 @@
</profiles>
<dependencies>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>opensymphony</groupId>
<artifactId>oscache</artifactId>
<version>2.3</version>
<optional>true</optional>
</dependency>
<dependency>
- <groupId>com.sun.facelets</groupId>
- <artifactId>jsf-facelets</artifactId>
- <version>1.1.11</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>nekohtml</groupId>
<artifactId>nekohtml</artifactId>
<version>0.9.5</version>
<optional>true</optional>
</dependency>
<dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.0.4</version>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.14</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>commons-beanutils</groupId>
- <artifactId>commons-beanutils</artifactId>
- <version>1.7.0</version>
- </dependency>
- <dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
<version>1.8</version>
</dependency>
<dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- <version>3.2</version>
- </dependency>
- <dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-api</artifactId>
<version>3.2.0-SNAPSHOT</version>
</dependency>
</dependencies>
- <properties>
- <jsfVersion>1.1</jsfVersion>
- </properties>
</project>
\ No newline at end of file
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/application/TreeStrutureNode.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/application/TreeStrutureNode.java 2007-10-18 13:31:58 UTC (rev 3445)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/application/TreeStrutureNode.java 2007-10-19 00:33:03 UTC (rev 3446)
@@ -30,9 +30,9 @@
private static final String NULL_ID = "";
- private Map facets = null;
+ private Map<String, TreeStrutureNode> facets = null;
- private List children = null;
+ private List<TreeStrutureNode> children = null;
private String type;
@@ -42,7 +42,7 @@
}
public void apply(FacesContext context, UIComponent component,
- Set uniqueIds) {
+ Set<String> uniqueIds) {
type = component.getClass().getName();
id = component.getId();
String clientId = component.getClientId(context);
@@ -50,10 +50,10 @@
throw new IllegalStateException("duplicate Id for a component "
+ clientId);
}
- Map componentFacets = component.getFacets();
- for (Iterator i = componentFacets.entrySet().iterator(); i
+ Map<String, UIComponent> componentFacets = component.getFacets();
+ for (Iterator<Entry<String,UIComponent>> i = componentFacets.entrySet().iterator(); i
.hasNext();) {
- Entry element = (Entry) i.next();
+ Entry<String,UIComponent> element = i.next();
UIComponent f = (UIComponent) element.getValue();
if (!f.isTransient()) {
TreeStrutureNode facet = new TreeStrutureNode();
@@ -84,9 +84,9 @@
component = loader.createComponent(type);
component.setId(id);
if (null != facets) {
- for (Iterator i = facets.entrySet().iterator(); i.hasNext();) {
- Entry element = (Entry) i.next();
- UIComponent facet = ((TreeStrutureNode) element.getValue())
+ for (Iterator<Entry<String, TreeStrutureNode>> i = facets.entrySet().iterator(); i.hasNext();) {
+ Entry<String, TreeStrutureNode> element = i.next();
+ UIComponent facet = ( element.getValue())
.restore(loader);
component.getFacets().put(element.getKey(), facet);
}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java 2007-10-18 13:31:58 UTC (rev 3445)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java 2007-10-19 00:33:03 UTC (rev 3446)
@@ -135,14 +135,6 @@
.getInitParameter(REWRITEID_PARAMETER))) {
this.setRewriteid(true);
}
-
- String prefix = filterConfig.getServletContext().getRealPath("/");
- String file = filterConfig.getInitParameter("log4j-init-file");
- // if the log4j-init-file is not set, then no point in trying
- if (file != null) {
- Log4JConfigurator log4jconfig = new Log4JConfigurator(prefix);
- log4jconfig.doConfigure(file);
- }
resourceService = new InternetResourceService();
// Caching initialization.
resourceService.init(filterConfig);
Deleted: trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/Log4JConfigurator.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/Log4JConfigurator.java 2007-10-18 13:31:58 UTC (rev 3445)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/Log4JConfigurator.java 2007-10-19 00:33:03 UTC (rev 3446)
@@ -1,75 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.webapp;
-
-import java.util.Properties;
-
-import org.ajax4jsf.Messages;
-import org.apache.log4j.LogManager;
-import org.apache.log4j.helpers.LogLog;
-import org.apache.log4j.helpers.OptionConverter;
-import org.apache.log4j.xml.DOMConfigurator;
-
-/**
- * @author shura (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:18 $
- *
- */
-class Log4JConfigurator {
- private static final String CONTEXT_ROOT_VARIABLE = "context-root";
- private Properties props = new Properties();
- private String prefix;
-
- DOMConfigurator domConfig;
-
- void doConfigure(String file){
- domConfig.doConfigure(prefix + file, LogManager.getLoggerRepository());
- }
-
-
- /**
- * @param prefix
- */
- public Log4JConfigurator(String prefix) {
- this.prefix = prefix;
- props.setProperty(CONTEXT_ROOT_VARIABLE, prefix);
- domConfig = new DOMConfigurator() {
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.log4j.xml.DOMConfigurator#subst(java.lang.String)
- * append context-related properties for variable
- * substitution.
- */
- protected String subst(String value) {
- try {
- return OptionConverter.substVars(value, props);
- } catch (IllegalArgumentException e) {
- LogLog.warn(Messages.getMessage(Messages.VARIABLE_SUBSTITUTION_WARNING), e);
- return value;
- }
- };
-
- };
- }
-}
Modified: trunk/framework/pom.xml
===================================================================
--- trunk/framework/pom.xml 2007-10-18 13:31:58 UTC (rev 3445)
+++ trunk/framework/pom.xml 2007-10-19 00:33:03 UTC (rev 3446)
@@ -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>root</artifactId>
<groupId>org.richfaces</groupId>
@@ -10,45 +12,100 @@
<version>3.2.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Java Server Faces AJAX framework</name>
- <dependencies />
<build>
- <plugins>
- <plugin>
- <artifactId>maven-source-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-source</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <index>true</index>
- <manifest>
- <addDefaultSpecificationEntries>
- true
- </addDefaultSpecificationEntries>
- <addDefaultImplementationEntries>
- true
- </addDefaultImplementationEntries>
- </manifest>
- <manifestEntries>
- <mode>development</mode>
- <Build-Number>
- ${buildNumber}
- </Build-Number>
- </manifestEntries>
- </archive>
- </configuration>
- </plugin>
- </plugins>
+ <plugins>
+ <plugin>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-source</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <index>true</index>
+ <manifest>
+ <addDefaultSpecificationEntries>
+ true
+ </addDefaultSpecificationEntries>
+ <addDefaultImplementationEntries>
+ true
+ </addDefaultImplementationEntries>
+ </manifest>
+ <manifestEntries>
+ <mode>development</mode>
+ <Build-Number>${buildNumber}</Build-Number>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+ <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>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.facelets</groupId>
+ <artifactId>jsf-facelets</artifactId>
+ <version>1.1.14</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <version>1.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.0.4</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <version>1.1.2</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>1.2_05</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
<modules>
<!--
<module>api-parent</module>
Modified: trunk/framework/test/pom.xml
===================================================================
--- trunk/framework/test/pom.xml 2007-10-18 13:31:58 UTC (rev 3445)
+++ trunk/framework/test/pom.xml 2007-10-19 00:33:03 UTC (rev 3446)
@@ -1,77 +1,72 @@
-<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>framework</artifactId>
- <groupId>org.richfaces</groupId>
- <version>3.2.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces.framework</groupId>
- <artifactId>richfaces-test</artifactId>
- <version>3.2.0-SNAPSHOT</version>
- <name>Ajax4Jsf test framework</name>
- <url>https://ajax4jsf.dev.java.net</url>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.shale</groupId>
- <artifactId>shale-test</artifactId>
- <version>1.0.4</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.myfaces</groupId>
- <artifactId>myfaces-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.myfaces</groupId>
- <artifactId>myfaces-impl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>myfaces</groupId>
- <artifactId>myfaces-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>myfaces</groupId>
- <artifactId>myfaces-impl</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.richfaces.framework</groupId>
- <artifactId>richfaces-impl</artifactId>
+<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>framework</artifactId>
+ <groupId>org.richfaces</groupId>
<version>3.2.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>htmlunit</groupId>
- <artifactId>htmlunit</artifactId>
- <version>1.10</version>
- </dependency>
- <dependency>
- <groupId>org.easymock</groupId>
- <artifactId>easymock</artifactId>
- <version>2.2</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.easymock</groupId>
- <artifactId>easymockclassextension</artifactId>
- <version>2.2.1</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.4</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jsp-api</artifactId>
- <version>2.0</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>richfaces-test</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ <name>Ajax4Jsf test framework</name>
+ <url>https://ajax4jsf.dev.java.net</url>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shale</groupId>
+ <artifactId>shale-test</artifactId>
+ <version>1.0.4</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.myfaces</groupId>
+ <artifactId>myfaces-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.myfaces</groupId>
+ <artifactId>myfaces-impl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>myfaces</groupId>
+ <artifactId>myfaces-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>myfaces</groupId>
+ <artifactId>myfaces-impl</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>richfaces-impl</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <version>1.2_05</version>
+ </dependency>
+ <dependency>
+ <groupId>htmlunit</groupId>
+ <artifactId>htmlunit</artifactId>
+ <version>1.10</version>
+ </dependency>
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymock</artifactId>
+ <version>2.2</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymockclassextension</artifactId>
+ <version>2.2.1</version>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
</project>
\ No newline at end of file
Modified: trunk/samples/pom.xml
===================================================================
--- trunk/samples/pom.xml 2007-10-18 13:31:58 UTC (rev 3445)
+++ trunk/samples/pom.xml 2007-10-19 00:33:03 UTC (rev 3446)
@@ -186,12 +186,12 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>1.2_04-p02</version>
+ <version>1.2_05</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>1.2_04-p02</version>
+ <version>1.2_05</version>
<scope>runtime</scope>
</dependency>
</dependencies>
@@ -241,12 +241,12 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>1.2_04-p02</version>
+ <version>1.2_05</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>1.2_04-p02</version>
+ <version>1.2_05</version>
<scope>runtime</scope>
</dependency>
</dependencies>
@@ -286,12 +286,12 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>1.2_04-p02</version>
+ <version>1.2_05</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>1.2_04-p02</version>
+ <version>1.2_05</version>
<scope>runtime</scope>
</dependency>
<dependency>
@@ -340,13 +340,13 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>1.2_04-p02</version>
+ <version>1.2_05</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>1.2_04-p02</version>
+ <version>1.2_05</version>
<scope>provided</scope>
</dependency>
</dependencies>
Modified: trunk/samples/seamIntegration/pom.xml
===================================================================
--- trunk/samples/seamIntegration/pom.xml 2007-10-18 13:31:58 UTC (rev 3445)
+++ trunk/samples/seamIntegration/pom.xml 2007-10-19 00:33:03 UTC (rev 3446)
@@ -59,6 +59,11 @@
</build>
<dependencies>
<dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-ui</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>3.0.0.GA</version>
Added: trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/DistributionBean.java
===================================================================
--- trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/DistributionBean.java (rev 0)
+++ trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/DistributionBean.java 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,46 @@
+/**
+ *
+ */
+package org.ajax4jsf;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class DistributionBean {
+
+ private String utilityCodeDescription;
+
+ private String description;
+
+ /**
+ * @return the utilityCodeDescription
+ */
+ public String getUtilityCodeDescription() {
+ return utilityCodeDescription;
+ }
+
+ /**
+ * @param utilityCodeDescription the utilityCodeDescription to set
+ */
+ public void setUtilityCodeDescription(String utilityCodeDescription) {
+ this.utilityCodeDescription = utilityCodeDescription;
+ }
+
+ /**
+ * @return the description
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * @param description the description to set
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+
+
+}
Property changes on: trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/DistributionBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Added: trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/LedgerAction.java
===================================================================
--- trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/LedgerAction.java (rev 0)
+++ trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/LedgerAction.java 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,62 @@
+/**
+ *
+ */
+package org.ajax4jsf;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Factory;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Out;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.datamodel.DataModel;
+
+/**
+ * @author asmirnov
+ *
+ */
+@Name("ledgerAction") @Scope(ScopeType.SESSION)
+public class LedgerAction {
+
+ private boolean initialized=true;
+
+ @DataModel private List<DistributionBean> distributionDetails;
+
+ @Factory("distributionDetails")
+ public void initCustomerList() {
+ distributionDetails = new ArrayList<DistributionBean>(30) ;
+ for(int i=0;i<30;i++){
+ DistributionBean bean = new DistributionBean();
+ bean.setDescription("Product "+i);
+ bean.setUtilityCodeDescription("c"+i+i);
+ distributionDetails.add(bean);
+ }
+ }
+ /**
+ * @return the initialized
+ */
+ public boolean isInitialized() {
+ return initialized;
+ }
+
+ /**
+ * @param initialized the initialized to set
+ */
+ public void setInitialized(boolean initialized) {
+ this.initialized = initialized;
+ }
+
+ public String initializeLedgerPage() {
+ return null;
+ }
+
+ public String fetchLedgerAging() {
+ return null;
+ }
+
+ public String initializeRepeaterPage() {
+ return null;
+ }
+}
Property changes on: trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/LedgerAction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Added: trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/MenuAction.java
===================================================================
--- trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/MenuAction.java (rev 0)
+++ trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/MenuAction.java 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,35 @@
+/**
+ *
+ */
+package org.ajax4jsf;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+
+/**
+ * @author asmirnov
+ *
+ */
+@Name("menuAction") @Scope(ScopeType.SESSION)
+public class MenuAction {
+
+ private int _selectedTab=0;
+
+ /**
+ * @return the selectedTab
+ */
+ public int getSelectedTab() {
+ return _selectedTab;
+ }
+
+ /**
+ * @param selectedTab the selectedTab to set
+ */
+ public void setSelectedTab(int selectedTab) {
+ _selectedTab = selectedTab;
+ }
+
+
+
+}
Property changes on: trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/MenuAction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Added: trunk/samples/seamIntegration/src/main/webapp/include/button.xhtml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/include/button.xhtml (rev 0)
+++ trunk/samples/seamIntegration/src/main/webapp/include/button.xhtml 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,39 @@
+<div xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a="http://richfaces.org/a4j"
+ xmlns:s="http://jboss.com/products/seam/taglib"><!--<div style="overflow:auto;width:100%;height:450px">-->
+<h:form>
+ <a:outputPanel>
+ <rich:dataTable id="distTable" rows="10" width="100%" var="dist"
+ onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
+ value="#{distributionDetails}">
+ <f:facet name="header">
+
+ <rich:columnGroup>
+ <rich:column>
+ <h:outputText value="Utility" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="Description" />
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+ <rich:column>
+ <h:outputText value="#{dist.utilityCodeDescription}" />
+ </rich:column>
+
+ <rich:column>
+ <h:outputText value="#{dist.description}" />
+ <h:graphicImage url="img/blank.gif" width="0" height="0" border="0"
+ alt="" />
+ </rich:column>
+ </rich:dataTable>
+ <div class="datascroller"><rich:datascroller for="distTable" />
+ </div>
+ </a:outputPanel>
+</h:form> <!--</div>--></div>
Property changes on: trunk/samples/seamIntegration/src/main/webapp/include/button.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/seamIntegration/src/main/webapp/include/dataTable.xhtml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/include/dataTable.xhtml (rev 0)
+++ trunk/samples/seamIntegration/src/main/webapp/include/dataTable.xhtml 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,39 @@
+<div xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a="http://richfaces.org/a4j"
+ xmlns:s="http://jboss.com/products/seam/taglib"><!--<div style="overflow:auto;width:100%;height:450px">-->
+<h:form>
+ <a:outputPanel>
+ <rich:dataTable id="distTable" rows="10" width="100%" var="dist"
+ onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
+ value="#{distributionDetails}">
+ <f:facet name="header">
+
+ <rich:columnGroup>
+ <rich:column>
+ <h:outputText value="Utility" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="Description" />
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+ <rich:column>
+ <h:outputText value="#{dist.utilityCodeDescription}" />
+ </rich:column>
+
+ <rich:column>
+ <h:outputText value="#{dist.description}" />
+ <h:graphicImage url="img/blank.gif" width="0" height="0" border="0"
+ alt="" />
+ </rich:column>
+ </rich:dataTable>
+ <div class="datascroller"><rich:datascroller for="distTable" />
+ </div>
+ </a:outputPanel>
+</h:form> <!--</div>--></div>
Property changes on: trunk/samples/seamIntegration/src/main/webapp/include/dataTable.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/seamIntegration/src/main/webapp/ledger/_activeAccountTemplate.xhtml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/ledger/_activeAccountTemplate.xhtml (rev 0)
+++ trunk/samples/seamIntegration/src/main/webapp/ledger/_activeAccountTemplate.xhtml 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,86 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:ng="http://alliancedata.com/jsf/nextgen"
+ xmlns:a="http://richfaces.org/a4j"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:fn="http://java.sun.com/jsp/jstl/functions"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+<f:view contentType="text/html">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <meta http-equiv="refresh" content="2700;url=/nextgen/logout.seam"/>
+
+ <link href="css/ads.css" rel="stylesheet" type="text/css"/>
+ <link href="css/date.css" rel="stylesheet" type="text/css"/>
+ <link href="css/drop_down.css" type="text/css" rel="stylesheet" />
+ <link href="css/notepad.css" rel="stylesheet" type="text/css"/>
+ <script src="javascript/tooltip.js" type="text/javascript" ></script>
+ <script src="javascript/common.js" type="text/javascript" ></script>
+ <script src="javascript/html-form-input-mask.js" type="text/javascript" ></script>
+
+ <link href="/nextgen/img/ads.ico" rel="icon" />
+
+ <LINK REL="SHORTCUT ICON" HREF="/nextgen/img/ads.ico"/>
+
+
+ <ng:standardTitle/>
+
+ <ui:insert name="headerContent"/>
+
+</head>
+
+<body onload="Xaprb.InputMask.setupElementMasks()" >
+
+<div id="maincontainer" style="width:1280px;">
+ <ui:include src="/_header.xhtml">
+ <c:if test="#{globalPageAction.showGlobalPage}">
+ <ui:param name="enableMenu" value="false"/>
+ </c:if>
+ </ui:include>
+
+ <div id="contentwrapper">
+
+ <div id="contentcolumn">
+ <div class="innertube" style="margin-top:2px">
+
+ <div style="#{(globalPageAction.showGlobalPage)?'display:none':''}">
+ <ui:insert name="content"/>
+ </div>
+
+ <c:if test="#{globalPageAction.showGlobalPage}">
+ <ui:include src="#{globalPageAction.globalPage}"/>
+ </c:if>
+
+ </div>
+ </div>
+ <div id="bottomcontent">
+ <div class="innertube" style="margin-top:2px">
+ <ui:include src="_notepad.xhtml"/>
+ </div>
+ </div>
+
+ </div>
+
+ <div id="leftcolumn" >
+ <div class="innertube">
+
+
+ <ui:include src="/_quickCustomerReference.xhtml">
+ <ui:param name="navigate" value="#{navigate}"/>
+ </ui:include>
+ </div>
+ </div>
+
+</div>
+
+
+</body>
+</f:view>
+
+</html>
Property changes on: trunk/samples/seamIntegration/src/main/webapp/ledger/_activeAccountTemplate.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/seamIntegration/src/main/webapp/ledger/_ledgerTranasctionDistribution.xhtml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/ledger/_ledgerTranasctionDistribution.xhtml (rev 0)
+++ trunk/samples/seamIntegration/src/main/webapp/ledger/_ledgerTranasctionDistribution.xhtml 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,137 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<div xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a="http://richfaces.org/a4j"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+xmlns:ng="http://alliancedata.com/jsf/nextgen">
+
+ <h:panelGroup id="distHeader">
+ <table>
+ <tr>
+ <td>
+ <div class="leftGraylabelM">
+ <h:outputText value="Premises"/>
+ </div>
+ </td>
+ <td align="left">
+ <h:outputText
+ title="Premise Number#{ledgerTransactionHistoryAction.distributionTransaction.premisesNumber}"
+ value="#{ledgerTransactionHistoryAction.distributionTransaction.serviceAddress}"/>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <div class="leftGraylabelM">
+ <h:outputText value="Transaction Date"/>
+ </div>
+ </td>
+ <td align="left">
+ <h:outputText value="#{ledgerTransactionHistoryAction.distributionTransaction.transactionDate}">
+ <f:convertDateTime dateStyle="short"/>
+ </h:outputText>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <div class="leftGraylabelM">
+ <h:outputText value="Ledger Type"/>
+ </div>
+ </td>
+ <td align="left">
+ <h:outputText
+ value="#{ledgerTransactionHistoryAction.distributionTransaction.ledgerCodeDescription}"/>
+ </td>
+ </tr>
+ </table>
+ </h:panelGroup>
+
+ <div class="spacer"></div>
+
+ <!--<div style="overflow:auto;width:100%;height:450px">-->
+ <a:form id="tranAllocationId">
+ <a:commandButton action="#{ledgerTransactionHistoryAction.fetchTransactionDistrubution}" value="Get Allocation" reRender="tranAllocationId"></a:commandButton>
+ <rich:dataTable id="distTable"
+ rows="10"
+ width="100%"
+ var="dist"
+ onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
+ value="#{ledgerTransactionHistoryAction.distributionTransaction.ledgerTransactionDistributionDetails}">
+ <f:facet name="header">
+ <rich:columnGroup>
+ <rich:column>
+ <h:outputText value="Utility"/>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="Description"/>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="Amount"/>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="Unallocated"/>
+ <br/>
+ <h:outputText value="Balance"/>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="Ledger"/>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="Alternate"/>
+ <br/>
+ <h:outputText value="Ledger"/>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="Action"/>
+ <br/>
+ <h:outputText value="Type"/>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="Allocated"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+ <rich:column>
+ <h:outputText value="#{dist.utilityCodeDescription}"/>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{dist.description}"/>
+ <h:graphicImage url="img/blank.gif" width="0" height="0" border="0" alt=""/>
+ </rich:column>
+ <rich:column styleClass="ledgerCurrencyColumn">
+ <h:outputText value="#{dist.amount}">
+ <f:convertNumber pattern="#{patterns.currencyWithCreditNoSymbol}"/>
+ </h:outputText>
+ <rich:spacer width="20" rendered="#{dist.amount >=0}"/>
+ </rich:column>
+ <rich:column styleClass="ledgerCurrencyColumn">
+ <h:outputText value="#{dist.unallocatedBalance}">
+ <f:convertNumber pattern="#{patterns.currencyWithCreditNoSymbol}"/>
+ </h:outputText>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{dist.ledgerSubsystemDescription}"/>
+ <h:graphicImage url="img/blank.gif" width="0" height="0" border="0" alt=""/>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{dist.alternateLedgerSubsystemDescription}"/>
+ <h:graphicImage url="img/blank.gif" width="0" height="0" border="0" alt=""/>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{messages[dist.actionType]}"/>
+ <h:graphicImage url="img/blank.gif" width="0" height="0" border="0" alt=""/>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{dist.allocationMethod}"/>
+ </rich:column>
+ </rich:dataTable>
+ <div class="datascroller">
+ <rich:datascroller for="distTable"/>
+ </div>
+ </a:form>
+ <!--</div>-->
+</div>
Property changes on: trunk/samples/seamIntegration/src/main/webapp/ledger/_ledgerTranasctionDistribution.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/seamIntegration/src/main/webapp/ledger/ledgerDetails.xhtml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/ledger/ledgerDetails.xhtml (rev 0)
+++ trunk/samples/seamIntegration/src/main/webapp/ledger/ledgerDetails.xhtml 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,87 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ng="http://alliancedata.com/jsf/nextgen"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a="http://richfaces.org/a4j"
+ template="_activeAccountTemplate.xhtml">
+ <ui:param name="navigate" value="true"/>
+ <ui:param name="enableMenu" value="#{ledgerTransactionHistoryAction.selectedTransaction.class.name != 'com.alliancedata.ecis.dto.ledger.BillingTransactionDto'}"/>
+
+ <ui:define name="headerContent">
+ <ng:standardTitle/>
+ </ui:define>
+
+ <ui:define name="content">
+ <rich:panel id="tp"
+ styleClass="panel"
+ headerClass="blueHeader"
+ bodyClass="grayPanelBody"
+ style="width:99.5%">
+ <f:facet name="header" >
+ <h:panelGroup>
+ <h:outputText styleClass="panelHeaderText" value="Transaction Detail"/>
+ <h:outputText styleClass="panelHeaderText" value="-"/>
+ <h:outputText styleClass="panelHeaderText" value="Payment History" rendered="#{ledgerTransactionHistoryAction.selectedTransaction.class.name eq 'com.alliancedata.ecis.dto.ledger.PaymentTransactionDto'}"/>
+ <h:outputText styleClass="panelHeaderText" value="Late Charge History" rendered="#{ledgerTransactionHistoryAction.selectedTransaction.class.name eq 'com.alliancedata.ecis.dto.ledger.LateChargeHistoryDto'}"/>
+ <h:outputText styleClass="panelHeaderText" value="Unposted Payment" rendered="#{ledgerTransactionHistoryAction.selectedTransaction.class.name eq 'com.alliancedata.ecis.dto.ledger.UnpostedPaymentDto'}"/>
+ <h:outputText styleClass="panelHeaderText" value="Unposted Adjustment" rendered="#{ledgerTransactionHistoryAction.selectedTransaction.class.name eq 'com.alliancedata.ecis.dto.ledger.MiscellaneousChargeDto'}"/>
+ <h:outputText styleClass="panelHeaderText" value="Deposit History" rendered="#{ledgerTransactionHistoryAction.selectedTransaction.class.name eq 'com.alliancedata.ecis.dto.ledger.DepositDto'}"/>
+ <h:outputText styleClass="panelHeaderText" value="Contract History" rendered="#{ledgerTransactionHistoryAction.selectedTransaction.class.name eq 'com.alliancedata.ecis.dto.ledger.ContractHistoryDto'}"/>
+ <h:outputText styleClass="panelHeaderText" value="Billing History" rendered="#{ledgerTransactionHistoryAction.selectedTransaction.class.name eq 'com.alliancedata.ecis.dto.ledger.BillingTransactionDto'}"/>
+ </h:panelGroup>
+ </f:facet>
+
+
+ <rich:tabPanel width="100%"
+ selectedTab="#{ledgerTransactionHistoryAction.selectedTab}"
+ switchType="client" id="ledger_tab_panel"
+ rendered="#{ledgerAction.initialized}"
+ contentClass="tabContent" activeTabClass="tabActive"
+ disabledTabClass="tabDisabled" inactiveTabClass="tabInactive"
+ tabClass="tab" styleClass="standardTabPanel">
+
+ <rich:spacer style="height:3px" />
+ <rich:tab id="tranHistoryTab" name="tranHistoryTab" label="History"
+ action="#{ledgerTransactionHistoryAction.fetchTransactionHistory}" >
+ <div class="tabContentLayout">
+
+ <ui:include src="ledger/_transactionHistory.xhtml"/>
+ </div>
+ <h:form>
+ <rich:toolBar height="34" styleClass="buttonBar">
+
+ <rich:toolBarGroup styleClass="buttonBar" location="right">
+ <s:button value="Close" view="/ledger.xhtml" styleClass="btn"/>
+ </rich:toolBarGroup>
+ </rich:toolBar>
+ </h:form>
+
+ </rich:tab>
+ <rich:tab name="distributionTab" id="distributionTab" label="Allocation"
+ disabled="#{ledgerTransactionHistoryAction.selectedTransaction.class.name == 'com.alliancedata.ecis.dto.ledger.UnpostedPaymentDto' or ledgerTransactionHistoryAction.selectedTransaction.class.name == 'com.alliancedata.ecis.dto.ledger.MiscellaneousChargeDto'}"
+ action="#{ledgerTransactionHistoryAction.fetchTransactionDistrubution}" >
+ <div class="tabContentLayout">
+ <ui:include src="ledger/_ledgerTranasctionDistribution.xhtml"/>
+ <h:form>
+ <rich:toolBar height="34" styleClass="buttonBar">
+
+ <rich:toolBarGroup styleClass="buttonBar" location="right">
+ <s:button value="Close" view="/ledger.xhtml" styleClass="btn"/>
+ </rich:toolBarGroup>
+ </rich:toolBar>
+ </h:form>
+ </div>
+
+ </rich:tab>
+
+ </rich:tabPanel>
+ </rich:panel>
+ </ui:define>
+
+</ui:composition>
Property changes on: trunk/samples/seamIntegration/src/main/webapp/ledger/ledgerDetails.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/seamIntegration/src/main/webapp/pages/tabPanel.xhtml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/pages/tabPanel.xhtml (rev 0)
+++ trunk/samples/seamIntegration/src/main/webapp/pages/tabPanel.xhtml 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a="http://richfaces.org/a4j"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<title>Rich tab panel</title>
+</head>
+<body>
+<rich:tabPanel width="100%" selectedTab="#{menuAction.selectedTab}"
+ switchType="ajax" id="ledger_tab_panel"
+ rendered="#{ledgerAction.initialized}" contentClass="tabContent"
+ activeTabClass="tabActive" disabledTabClass="tabDisabled"
+ inactiveTabClass="tabInactive" tabClass="tab"
+ styleClass="standardTabPanel">
+ <rich:tab name="ledgerTranTab" label="Ledger Transactions"
+ action="#{ledgerAction.initializeLedgerPage}">
+ <div class="tabContentLayout"><ui:include
+ src="/include/button.xhtml" /></div>
+ <h:form id="lform1">
+ <h:commandButton value="Switch to repeater" action="#{ledgerAction.initializeRepeaterPage}" />
+ </h:form>
+ </rich:tab>
+ <rich:tab id="agingTab" name="agingTab" label="Aging"
+ action="#{ledgerAction.fetchLedgerAging}">
+ <div class="tabContentLayout"><ui:include
+ src="/include/dataTable.xhtml" /></div>
+ <h:form>
+ <h:commandButton value="Switch to repeater" action="#{ledgerAction.initializeRepeaterPage}" />
+ </h:form>
+ </rich:tab>
+</rich:tabPanel>
+</body>
+</html>
\ No newline at end of file
Property changes on: trunk/samples/seamIntegration/src/main/webapp/pages/tabPanel.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/ui/core/src/main/java/META-INF/MANIFEST.MF
===================================================================
--- trunk/ui/core/src/main/java/META-INF/MANIFEST.MF (rev 0)
+++ trunk/ui/core/src/main/java/META-INF/MANIFEST.MF 2007-10-19 00:33:03 UTC (rev 3446)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Property changes on: trunk/ui/core/src/main/java/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/ui/core/src/test/java/org/ajax4jsf/component/UIAjaxFormTest.java
===================================================================
--- trunk/ui/core/src/test/java/org/ajax4jsf/component/UIAjaxFormTest.java 2007-10-18 13:31:58 UTC (rev 3445)
+++ trunk/ui/core/src/test/java/org/ajax4jsf/component/UIAjaxFormTest.java 2007-10-19 00:33:03 UTC (rev 3446)
@@ -59,7 +59,7 @@
public void testProcessDecodes() throws Exception {
facesContext.getExternalContext().getRequestParameterMap().put("form",
- ajaxForm);
+ "form");
ajaxForm.processDecodes(facesContext);
assertEquals(1, childInvoked);
// test
@@ -85,7 +85,7 @@
public void testProcessUpdates() throws Exception {
facesContext.getExternalContext().getRequestParameterMap().put("form",
- ajaxForm);
+ "form");
child.setSubmittedValue(new String("test1"));
ajaxForm.processDecodes(facesContext);
ajaxForm.processValidators(facesContext);
Modified: trunk/ui/dataTable/src/main/java/org/richfaces/component/UISubTable.java
===================================================================
--- trunk/ui/dataTable/src/main/java/org/richfaces/component/UISubTable.java 2007-10-18 13:31:58 UTC (rev 3445)
+++ trunk/ui/dataTable/src/main/java/org/richfaces/component/UISubTable.java 2007-10-19 00:33:03 UTC (rev 3446)
@@ -34,6 +34,7 @@
public static final String COMPONENT_FAMILY = "org.richfaces.SubTable";
+
/* (non-Javadoc)
* @see org.richfaces.component.Column#isBreakBefore()
*/
@@ -54,5 +55,20 @@
public Iterator columns() {
return super.columns();
}
+
+ /**
+ * @return the sortExpression
+ */
+ public String getSortExpression() {
+ // SubTable is not sortable element.
+ return null;
+ }
+
+ /**
+ * @param sortExpression the sortExpression to set
+ */
+ public void setSortExpression(String sortExpression) {
+ // Do nothing - subtable is not sortable element;
+ }
}
Modified: trunk/ui/panel/src/test/java/org/richfaces/component/PanelComponentTest.java
===================================================================
--- trunk/ui/panel/src/test/java/org/richfaces/component/PanelComponentTest.java 2007-10-18 13:31:58 UTC (rev 3445)
+++ trunk/ui/panel/src/test/java/org/richfaces/component/PanelComponentTest.java 2007-10-19 00:33:03 UTC (rev 3446)
@@ -125,7 +125,7 @@
htmlPanel.getFacets().put("header", text);
for (int i = 0; i < attributes.length; i++) {
Object[] attr = attributes[i];
- htmlPanel.getAttributes().put(attr[0], attr[1]);
+ htmlPanel.getAttributes().put((String)attr[0], attr[1]);
}
HtmlPage page = renderView();
assertNotNull(page);
Modified: trunk/ui/pom.xml
===================================================================
--- trunk/ui/pom.xml 2007-10-18 13:31:58 UTC (rev 3445)
+++ trunk/ui/pom.xml 2007-10-19 00:33:03 UTC (rev 3446)
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<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>root</artifactId>
<groupId>org.richfaces</groupId>
@@ -32,6 +34,14 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
@@ -88,47 +98,10 @@
<module>treeModel</module>
<module>message</module>
<module>scrollableDataTable</module>
- <module>insert</module>
- </modules>
+ <module>insert</module>
+ </modules>
<dependencies>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <version>1.1_02</version>
- <exclusions>
- <exclusion>
- <artifactId>jsp-api</artifactId>
- <groupId>javax.servlet.jsp</groupId>
- </exclusion>
- <exclusion>
- <artifactId>jstl</artifactId>
- <groupId>javax.servlet.jsp.jstl</groupId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-impl</artifactId>
- <version>1.1_02</version>
- <scope>runtime</scope>
- <exclusions>
- <exclusion>
- <artifactId>jsp-api</artifactId>
- <groupId>javax.servlet.jsp</groupId>
- </exclusion>
- <exclusion>
- <artifactId>jstl</artifactId>
- <groupId>javax.servlet.jsp.jstl</groupId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
<version>3.2.0-SNAPSHOT</version>
@@ -140,20 +113,9 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>htmlunit</groupId>
- <artifactId>htmlunit</artifactId>
- <version>1.10</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- <version>3.2</version>
- </dependency>
- <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>
@@ -161,82 +123,36 @@
<artifactId>el-api</artifactId>
<version>1.0</version>
<scope>provided</scope>
- <optional>true</optional>
</dependency>
<dependency>
- <groupId>el-impl</groupId>
- <artifactId>el-impl</artifactId>
- <version>1.0</version>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.0.4</version>
<scope>provided</scope>
- <optional>true</optional>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
- <version>2.4</version>
+ <version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>javax.servlet</groupId>
+ <groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
- <version>2.0</version>
+ <version>2.1</version>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <version>1.1.2</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>1.2_05</version>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
- <reporting>
- <plugins>
- <plugin>
- <artifactId>
- maven-project-info-reports-plugin
- </artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <quiet>true</quiet>
- </configuration>
- </plugin>
- <!--
- <plugin>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
- --><!--
- <plugin>
- <artifactId>maven-pmd-plugin</artifactId>
- </plugin>
- -->
- <plugin>
- <artifactId>maven-jxr-plugin</artifactId>
- <configuration>
- <aggregate>true</aggregate>
- </configuration>
- </plugin>
- <!--
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jdepend-maven-plugin</artifactId>
- </plugin>
- -->
- <!--
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>changelog-maven-plugin</artifactId>
- </plugin>
- -->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>findbugs-maven-plugin</artifactId>
- <configuration>
- <xmlOutput>false</xmlOutput>
- <threshold>Normal</threshold>
- <effort>Max</effort>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-report-plugin</artifactId>
- </plugin>
- </plugins>
- </reporting>
- <profiles>
- </profiles>
</project>
\ No newline at end of file
17 years, 2 months
JBoss Rich Faces SVN: r3444 - branches/3.1.x/ui/tabPanel/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-10-18 09:12:15 -0400 (Thu, 18 Oct 2007)
New Revision: 3444
Modified:
branches/3.1.x/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java
branches/3.1.x/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java
Log:
http://jira.jboss.com/jira/browse/RF-1144
Modified: branches/3.1.x/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java
===================================================================
--- branches/3.1.x/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java 2007-10-18 12:52:19 UTC (rev 3443)
+++ branches/3.1.x/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java 2007-10-18 13:12:15 UTC (rev 3444)
@@ -235,11 +235,7 @@
UITabPanel pane = tab.getPane();
String headerSpacing = pane.getHeaderSpacing();
Double decoded = HtmlDimensions.decode(headerSpacing);
- if (decoded.doubleValue() != 0) {
- return "width: " + HtmlUtil.qualifySize(headerSpacing);
- } else {
- return "";
- }
+ return "width: " + HtmlUtil.qualifySize(headerSpacing) + "; ";
}
private static final String ONMOUSEOVER = "RichFaces.overTab(this);";
Modified: branches/3.1.x/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java
===================================================================
--- branches/3.1.x/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java 2007-10-18 12:52:19 UTC (rev 3443)
+++ branches/3.1.x/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java 2007-10-18 13:12:15 UTC (rev 3444)
@@ -388,11 +388,7 @@
public String encodeHeaderSpacing(FacesContext context, UITabPanel pane) throws IOException {
String headerSpacing = pane.getHeaderSpacing();
Double decoded = HtmlDimensions.decode(headerSpacing);
- if (decoded.doubleValue() != 0) {
- return "width: " + HtmlUtil.qualifySize(headerSpacing);
- } else {
- return "";
- }
+ return "width: " + HtmlUtil.qualifySize(headerSpacing) + "; ";
}
}
17 years, 2 months
JBoss Rich Faces SVN: r3443 - branches/3.1.x/ui/tabPanel/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-10-18 08:52:19 -0400 (Thu, 18 Oct 2007)
New Revision: 3443
Modified:
branches/3.1.x/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabRendererBase.java
Log:
RF-1140
Modified: branches/3.1.x/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabRendererBase.java
===================================================================
--- branches/3.1.x/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabRendererBase.java 2007-10-18 12:51:21 UTC (rev 3442)
+++ branches/3.1.x/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabRendererBase.java 2007-10-18 12:52:19 UTC (rev 3443)
@@ -113,7 +113,7 @@
renderChildren(context, component);
} else {
ResponseWriter out = context.getResponseWriter();
- out.writeText(" ", null);
+ out.write(" ");
}
}
}
17 years, 2 months
JBoss Rich Faces SVN: r3442 - branches/3.1.x/samples/tooltip-sample/src/main/java/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2007-10-18 08:51:21 -0400 (Thu, 18 Oct 2007)
New Revision: 3442
Modified:
branches/3.1.x/samples/tooltip-sample/src/main/java/org/richfaces/Bean.java
Log:
RF-1101
Modified: branches/3.1.x/samples/tooltip-sample/src/main/java/org/richfaces/Bean.java
===================================================================
--- branches/3.1.x/samples/tooltip-sample/src/main/java/org/richfaces/Bean.java 2007-10-18 12:51:11 UTC (rev 3441)
+++ branches/3.1.x/samples/tooltip-sample/src/main/java/org/richfaces/Bean.java 2007-10-18 12:51:21 UTC (rev 3442)
@@ -35,9 +35,18 @@
String text1 = "ToolTip content1";
String text2 = "ToolTip content2";
String text3 = "ToolTip content3";
+ boolean check = false;
private int counter;
+ public boolean getCheck() {
+ return check;
+ }
+
+ public void toggleCheck() {
+ check = !check;
+ }
+
public String getText() {
return text;
}
17 years, 2 months
JBoss Rich Faces SVN: r3441 - branches/3.1.x/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2007-10-18 08:51:11 -0400 (Thu, 18 Oct 2007)
New Revision: 3441
Modified:
branches/3.1.x/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
Log:
RF-1101
Modified: branches/3.1.x/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
===================================================================
--- branches/3.1.x/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2007-10-18 12:50:31 UTC (rev 3440)
+++ branches/3.1.x/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2007-10-18 12:51:11 UTC (rev 3441)
@@ -78,12 +78,18 @@
destroy: function()
{
- if (!this.parentAttached) Event.stopObserving(document, "mousemove", this.attachOnLoadEventsListner, true);
- else if (this.followMouse) Event.stopObserving(this.parent, 'mousemove', this.setToolTipPositionListner, false);
+ if (!this.parentAttached)
+ {
+ if (!this.disabled) Event.stopObserving(document, "mousemove", this.attachOnLoadEventsListner, true);
+ }
+ else
+ {
+ if (this.followMouse) Event.stopObserving(this.parent, 'mousemove', this.setToolTipPositionListner, false);
- Event.stopObserving(this.parent, this.event, this.customEventHandlerListner, false);
- Event.stopObserving(this.parent, "mouseout", this.doHideListner, false);
- Event.stopObserving(this.toolTip, 'mouseout', this.leaveToolTipListner, false);
+ Event.stopObserving(this.parent, this.event, this.customEventHandlerListner, false);
+ Event.stopObserving(this.parent, "mouseout", this.doHideListner, false);
+ Event.stopObserving(this.toolTip, 'mouseout', this.leaveToolTipListner, false);
+ }
this.hintParentElement = null;
this.parent = null;
17 years, 2 months
JBoss Rich Faces SVN: r3440 - trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-10-18 08:50:31 -0400 (Thu, 18 Oct 2007)
New Revision: 3440
Modified:
trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java
trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java
Log:
http://jira.jboss.com/jira/browse/RF-1144
Modified: trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java
===================================================================
--- trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java 2007-10-18 12:34:45 UTC (rev 3439)
+++ trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java 2007-10-18 12:50:31 UTC (rev 3440)
@@ -235,11 +235,7 @@
UITabPanel pane = tab.getPane();
String headerSpacing = pane.getHeaderSpacing();
Double decoded = HtmlDimensions.decode(headerSpacing);
- if (decoded.doubleValue() != 0) {
- return "width: " + HtmlUtil.qualifySize(headerSpacing);
- } else {
- return "";
- }
+ return "width: " + HtmlUtil.qualifySize(headerSpacing) + "; ";
}
private static final String ONMOUSEOVER = "RichFaces.overTab(this);";
Modified: trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java
===================================================================
--- trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java 2007-10-18 12:34:45 UTC (rev 3439)
+++ trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java 2007-10-18 12:50:31 UTC (rev 3440)
@@ -390,11 +390,7 @@
public String encodeHeaderSpacing(FacesContext context, UITabPanel pane) throws IOException {
String headerSpacing = pane.getHeaderSpacing();
Double decoded = HtmlDimensions.decode(headerSpacing);
- if (decoded.doubleValue() != 0) {
- return "width: " + HtmlUtil.qualifySize(headerSpacing);
- } else {
- return "";
- }
+ return "width: " + HtmlUtil.qualifySize(headerSpacing) + "; ";
}
}
17 years, 2 months
JBoss Rich Faces SVN: r3439 - in trunk: ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2007-10-18 08:34:45 -0400 (Thu, 18 Oct 2007)
New Revision: 3439
Modified:
trunk/samples/tooltip-sample/src/main/java/org/richfaces/Bean.java
trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
Log:
RF-1101
Modified: trunk/samples/tooltip-sample/src/main/java/org/richfaces/Bean.java
===================================================================
--- trunk/samples/tooltip-sample/src/main/java/org/richfaces/Bean.java 2007-10-18 12:22:17 UTC (rev 3438)
+++ trunk/samples/tooltip-sample/src/main/java/org/richfaces/Bean.java 2007-10-18 12:34:45 UTC (rev 3439)
@@ -35,9 +35,18 @@
String text1 = "ToolTip content1";
String text2 = "ToolTip content2";
String text3 = "ToolTip content3";
+ boolean check = false;
private int counter;
+ public boolean getCheck() {
+ return check;
+ }
+
+ public void toggleCheck() {
+ check = !check;
+ }
+
public String getText() {
return text;
}
Modified: trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
===================================================================
--- trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2007-10-18 12:22:17 UTC (rev 3438)
+++ trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2007-10-18 12:34:45 UTC (rev 3439)
@@ -85,12 +85,18 @@
destroy: function()
{
- if (!this.parentAttached) Event.stopObserving(document, "mousemove", this.attachOnLoadEventsListner, true);
- else if (this.followMouse) Event.stopObserving(this.parent, 'mousemove', this.setToolTipPositionListner, false);
+ if (!this.parentAttached)
+ {
+ if (!this.disabled) Event.stopObserving(document, "mousemove", this.attachOnLoadEventsListner, true);
+ }
+ else
+ {
+ if (this.followMouse) Event.stopObserving(this.parent, 'mousemove', this.setToolTipPositionListner, false);
- Event.stopObserving(this.parent, this.event, this.customEventHandlerListner, false);
- Event.stopObserving(this.parent, "mouseout", this.doHideListner, false);
- Event.stopObserving(this.toolTip, 'mouseout', this.leaveToolTipListner, false);
+ Event.stopObserving(this.parent, this.event, this.customEventHandlerListner, false);
+ Event.stopObserving(this.parent, "mouseout", this.doHideListner, false);
+ Event.stopObserving(this.toolTip, 'mouseout', this.leaveToolTipListner, false);
+ }
this.hintParentElement = null;
this.parent = null;
17 years, 2 months
JBoss Rich Faces SVN: r3438 - trunk/ui/tabPanel/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-10-18 08:22:17 -0400 (Thu, 18 Oct 2007)
New Revision: 3438
Modified:
trunk/ui/tabPanel/src/main/java/org/richfaces/component/UITabPanel.java
Log:
RF-1128, also add right behavior for tabPanel with immediate tabs
Modified: trunk/ui/tabPanel/src/main/java/org/richfaces/component/UITabPanel.java
===================================================================
--- trunk/ui/tabPanel/src/main/java/org/richfaces/component/UITabPanel.java 2007-10-18 08:35:34 UTC (rev 3437)
+++ trunk/ui/tabPanel/src/main/java/org/richfaces/component/UITabPanel.java 2007-10-18 12:22:17 UTC (rev 3438)
@@ -33,14 +33,19 @@
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.Predicate;
import org.apache.commons.collections.iterators.FilterIterator;
+import org.richfaces.event.SwitchablePanelSwitchEvent;
/**
* JSF component class
*/
public abstract class UITabPanel extends UISwitchablePanel {
- public static final String COMPONENT_TYPE = "org.richfaces.TabPanel";
+
+ public static final String COMPONENT_TYPE = "org.richfaces.TabPanel";
- public boolean getRendersChildren() {
+ private transient boolean processedTabImmediate;
+
+
+ public boolean getRendersChildren() {
return true;
}
@@ -62,17 +67,16 @@
public boolean isImmediate() {
if(!super.isImmediate()){
- UITab tab = getTabWithName(getValue());
- if(tab != null){
- if(tab.isImmediate()){
- return true;
- }
+ if(processedTabImmediate){
+ return true;
}
return false;
- }else{
+ }else{
return super.isImmediate();
- }
+ }
+
}
+
public Object convertSwitchValue(UIComponent component, Object object) {
if (object != null) {
@@ -150,18 +154,6 @@
return state;
}
- private UITab getTabWithName(Object tabName){
-
- List children = getChildren();
- for (Iterator iterator = children.iterator(); iterator.hasNext();) {
- UIComponent childComponent = (UIComponent) iterator.next();
- if(childComponent instanceof UITab && ((UITab)childComponent).getName().equals(tabName)){
- return (UITab)childComponent;
- }
- }
- return null;
- }
-
public void restoreState(FacesContext context, Object state) {
Object[] states = (Object[]) state;
super.restoreState(context, states[0]);
@@ -233,10 +225,33 @@
public abstract void setHeaderClass(String value);
+ private UITab processedTab(UIComponent component, Object object){
+ if (object != null) {
+ return getTabWithName(object);
+ }
+ return (UITab)component;
+ }
+ private UITab getTabWithName(Object tabName){
+ List children = getChildren();
+ for (Iterator iterator = children.iterator(); iterator.hasNext();) {
+ UIComponent childComponent = (UIComponent) iterator.next();
+ if(childComponent instanceof UITab && ((UITab)childComponent).getName().equals(tabName)){
+ return (UITab)childComponent;
+ }
+ }
+ return null;
+ }
+
public void queueEvent(FacesEvent event) {
+ if(event instanceof SwitchablePanelSwitchEvent && this.equals(event.getComponent())){
+ SwitchablePanelSwitchEvent switchEvent = (SwitchablePanelSwitchEvent)event;
+ UITab tab = processedTab(switchEvent.getEventSource(),switchEvent.getValue());
+ processedTabImmediate = tab.isImmediate();
+ }
+
if(event instanceof ActionEvent && event.getComponent()instanceof UITab){
if(isImmediate()){
17 years, 2 months
JBoss Rich Faces SVN: r3437 - trunk/ui/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/script.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-10-18 04:35:34 -0400 (Thu, 18 Oct 2007)
New Revision: 3437
Modified:
trunk/ui/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/script/SpinnerScript.js
Log:
http://jira.jboss.com/jira/browse/RF-1114
Modified: trunk/ui/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/script/SpinnerScript.js
===================================================================
--- trunk/ui/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/script/SpinnerScript.js 2007-10-17 23:09:13 UTC (rev 3436)
+++ trunk/ui/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/script/SpinnerScript.js 2007-10-18 08:35:34 UTC (rev 3437)
@@ -89,11 +89,18 @@
},
roundFloat: function(x){
- var str = this.delta+"";
- if (str.indexOf(".")==-1) return x;
- var power = str.length - str.indexOf(".") - 1;
- if (power > str.length)
- return x;
+ var str = this.delta.toString();
+ var power = 0;
+ if (!/\./.test(str)) {
+ if (this.delta >= 1) {
+ return x;
+ }
+ if (/e/.test(str)) {
+ power = str.split("-")[1];
+ }
+ } else {
+ power = str.length - str.indexOf(".") - 1;
+ }
var ret = x.toFixed(power);
return ret;
},
17 years, 2 months