svn commit: r418848 [2/2] - in /struts/shale/trunk/shale-core/src/main/java/org/apache/shale: application/ component/ dialog/ dialog/config/ dialog/impl/ faces/ taglib/ util/ validator/ view/ view/fac
Modified: struts/shale/trunk/shale-core/src/main/java/org/apache/shale/validator/CommonsValidator.java URL: http://svn.apache.org/viewvc/struts/shale/trunk/shale-core/src/main/java/org/apache/shale/validator/CommonsValidator.java?rev=418848&r1=418847&r2=418848&view=diff == --- struts/shale/trunk/shale-core/src/main/java/org/apache/shale/validator/CommonsValidator.java (original) +++ struts/shale/trunk/shale-core/src/main/java/org/apache/shale/validator/CommonsValidator.java Mon Jul 3 13:58:36 2006 @@ -1,12 +1,12 @@ /* * Copyright 2004-2006 The Apache Software Foundation. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -59,24 +59,24 @@ *a Commons Validator to perform validation, either *client-side or server-side. * - * - * The current implementation is dependent on version 1.3 of commons validator. - * Some new conventions have been adopted for registering a validation rule in - * the validator's XML configuration file. In the action framework, validation - * was suited for declaring rules associated with a form. This worked well since - * generally a single action had the responsibility of handling all the posted - * form data at once. - * - * However, JSF takes a component based approach. Each component has the - * responsibility of managing its posted data and rendering its state. In the - * component based world, it is easier to associated configuration values at + * + * The current implementation is dependent on version 1.3 of commons validator. + * Some new conventions have been adopted for registering a validation rule in + * the validator's XML configuration file. In the action framework, validation + * was suited for declaring rules associated with a form. This worked well since + * generally a single action had the responsibility of handling all the posted + * form data at once. + * + * However, JSF takes a component based approach. Each component has the + * responsibility of managing its posted data and rendering its state. In the + * component based world, it is easier to associated configuration values at * that level versus what works best for struts action. - * - * In an effort to reuse as much of commons validator and provide a method of - * registering new rules, a new convention was adopted for declaring validation + * + * In an effort to reuse as much of commons validator and provide a method of + * registering new rules, a new convention was adopted for declaring validation * rules. - * - * + * + * * ** * - * - * The rules declaration is the same but an added form is required to capture extra - * configuration information. The form is associated with the validation rule using a - * naming convention. The prefix of the form name is "org.apache.shale.validator." + * + * The rules declaration is the same but an added form is required to capture extra + * configuration information. The form is associated with the validation rule using a + * naming convention. The prefix of the form name is "org.apache.shale.validator." * where "" is the validation rule name. - * + * * ** *
svn commit: r418860 - in /struts/shale/trunk/shale-clay/src: main/java/org/apache/shale/clay/ main/java/org/apache/shale/clay/parser/ main/java/org/apache/shale/clay/parser/builder/chain/ main/java/or
Author: gvanmatre Date: Mon Jul 3 14:53:02 2006 New Revision: 418860 URL: http://svn.apache.org/viewvc?rev=418860&view=rev Log: This commit contains a couple related fixes for SHALE-209 and SHALE-208 . I found that the clay parser was not handling cdata sections when used by a custom tag validator. Added: struts/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/taglib/ClayTagValidator.java (with props) Removed: struts/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/Bundle.properties Modified: struts/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/Node.java struts/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/Parser.java struts/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/chain/DefaultBuilderRule.java struts/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/taglib/SymbolTag.java struts/shale/trunk/shale-clay/src/main/resources/META-INF/shale-clay.tld struts/shale/trunk/shale-clay/src/main/resources/org/apache/shale/clay/Bundle.properties struts/shale/trunk/shale-clay/src/test/java/org/apache/shale/clay/parser/ParserTestCase.java Modified: struts/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/Node.java URL: http://svn.apache.org/viewvc/struts/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/Node.java?rev=418860&r1=418859&r2=418860&view=diff == --- struts/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/Node.java (original) +++ struts/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/Node.java Mon Jul 3 14:53:02 2006 @@ -49,6 +49,12 @@ */ private boolean isEnd = false; + +/** + * This flag indicates the node is a CDATA node. + */ +private boolean isCdata = false; + /** * This boolean flag has a true value if the * node has a starting and ending node. Not all nodes will be @@ -238,6 +244,7 @@ buff.append("name=").append(name).append(" isStart=").append(isStart) .append(" isEnd=").append(isEnd).append(" isWellFormed=") .append(isWellFormed).append(" isComment=").append(isComment) +.append(" isCdata=").append(isCdata) .append("\n").append(token).append("\n").append(attributes); return buff.toString(); } @@ -260,8 +267,27 @@ public void setComment(boolean isComment) { this.isComment = isComment; } + - +/** + * Returns true if the node is + * a CDATA; otherwise; the default is false. + * . + */ +public boolean isCdata() { +return isCdata; +} + + +/** + * Sets a boolean value that identifies this node as + * being a CDATA. This could be a starting, ending or + * within the body. + */ +public void setCdata(boolean isCdata) { +this.isCdata = isCdata; +} + /** * Finds matching nodes by name searching thru all the children. */ Modified: struts/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/Parser.java URL: http://svn.apache.org/viewvc/struts/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/Parser.java?rev=418860&r1=418859&r2=418860&view=diff == --- struts/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/Parser.java (original) +++ struts/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/Parser.java Mon Jul 3 14:53:02 2006 @@ -258,7 +258,11 @@ //play forward on comments making all nodes child nodes until a //ending comment is hit -if (node.isComment() && node.isStart()) { +if ((node.isComment() || node.isCdata()) && node.isStart()) { + +// capture the type of block since you can have comments in a cdata block +boolean isCommentBlock = node.isComment(); +boolean isCdataBlock = node.isCdata(); //not self contained comment if (!node.isEnd()) { @@ -266,25 +270,29 @@ trash: while (i.hasNext()) { token = (Token) i.next(); Node bodyNode = buildNode(token); -if (bodyNode.isComment() && bodyNode.isEnd()) { +//if a ending node and the block matches +if (((bodyNode.isComment() && isCommentBlock) + || (bodyNode.isCdata() && isCdataBlock)) && bodyNode.isEnd()) { node.addChild(bodyNode); node.setEnd(true); node.setWellFormed(true); break trash; } else { -
svn commit: r418878 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/DispatcherUtils.java
Author: mrdon Date: Mon Jul 3 16:52:57 2006 New Revision: 418878 URL: http://svn.apache.org/viewvc?rev=418878&view=rev Log: Changing dispatcher to load both struts.xml and xwork.xml configuration files WW-1370 Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/DispatcherUtils.java Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/DispatcherUtils.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/DispatcherUtils.java?rev=418878&r1=418877&r2=418878&view=diff == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/DispatcherUtils.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/DispatcherUtils.java Mon Jul 3 16:52:57 2006 @@ -32,6 +32,7 @@ import com.opensymphony.xwork.*; import com.opensymphony.xwork.config.ConfigurationException; import com.opensymphony.xwork.config.ConfigurationManager; +import com.opensymphony.xwork.config.providers.XmlConfigurationProvider; import com.opensymphony.xwork.util.*; import com.opensymphony.xwork.util.location.Location; import com.opensymphony.xwork.util.location.LocationUtils; @@ -213,6 +214,8 @@ } configurationManager = new ConfigurationManager(); +configurationManager.addConfigurationProvider(new XmlConfigurationProvider("xwork.xml", false)); +configurationManager.addConfigurationProvider(new XmlConfigurationProvider("struts.xml", false)); synchronized(DispatcherUtils.class) { if (dispatcherListeners.size() > 0) {
svn commit: r418898 - /struts/shale/trunk/build/
Author: wsmoak Date: Mon Jul 3 19:24:27 2006 New Revision: 418898 URL: http://svn.apache.org/viewvc?rev=418898&view=rev Log: Remove old Maven 1 build files and Maven 2 poms. SHALE-179 Removed: struts/shale/trunk/build/
svn commit: r418899 - in /struts/shale/trunk: docs/ src/site/resources/docs/
Author: wsmoak Date: Mon Jul 3 19:29:32 2006 New Revision: 418899 URL: http://svn.apache.org/viewvc?rev=418899&view=rev Log: Moved release notes under src/site/resources for inclusion in the website. SHALE-179 Added: struts/shale/trunk/src/site/resources/docs/ - copied from r418898, struts/shale/trunk/docs/ Removed: struts/shale/trunk/docs/
svn commit: r418905 - in /struts/shale/trunk: maven/build/ maven/build/shale-checks.xml pom.xml
Author: wsmoak Date: Mon Jul 3 20:24:28 2006 New Revision: 418905 URL: http://svn.apache.org/viewvc?rev=418905&view=rev Log: Copy the Struts Checkstyle config file as shale_checks.xml, and re-configure the plugin. SHALE-207 Added: struts/shale/trunk/maven/build/ struts/shale/trunk/maven/build/shale-checks.xml - copied unchanged from r418904, struts/maven/trunk/build/src/main/resources/org/apache/struts/build/struts_checks.xml Modified: struts/shale/trunk/pom.xml Modified: struts/shale/trunk/pom.xml URL: http://svn.apache.org/viewvc/struts/shale/trunk/pom.xml?rev=418905&r1=418904&r2=418905&view=diff == --- struts/shale/trunk/pom.xml (original) +++ struts/shale/trunk/pom.xml Mon Jul 3 20:24:28 2006 @@ -204,14 +204,6 @@ - - -org.apache.struts -struts-build -1.0.1 - - - install @@ -241,7 +233,7 @@ maven-checkstyle-plugin - org/apache/struts/build/struts_checks.xml + http://svn.apache.org/repos/asf/struts/shale/trunk/maven/build/shale_checks.xml
svn commit: r418906 - in /struts/shale/trunk/maven/build: shale-checks.xml shale_checks.xml
Author: wsmoak Date: Mon Jul 3 20:28:08 2006 New Revision: 418906 URL: http://svn.apache.org/viewvc?rev=418906&view=rev Log: Corrected filename. Added: struts/shale/trunk/maven/build/shale_checks.xml - copied unchanged from r418905, struts/shale/trunk/maven/build/shale-checks.xml Removed: struts/shale/trunk/maven/build/shale-checks.xml
svn commit: r418909 - /struts/struts1/trunk/pom.xml
Author: wsmoak Date: Mon Jul 3 20:50:06 2006 New Revision: 418909 URL: http://svn.apache.org/viewvc?rev=418909&view=rev Log: Configure Checkstyle with a URL instead of using the struts-build.jar extension. STR-2853 Modified: struts/struts1/trunk/pom.xml Modified: struts/struts1/trunk/pom.xml URL: http://svn.apache.org/viewvc/struts/struts1/trunk/pom.xml?rev=418909&r1=418908&r2=418909&view=diff == --- struts/struts1/trunk/pom.xml (original) +++ struts/struts1/trunk/pom.xml Mon Jul 3 20:50:06 2006 @@ -132,14 +132,6 @@ - - -org.apache.struts -struts-build -1.0.1 - - - install @@ -159,7 +151,7 @@ maven-checkstyle-plugin - org/apache/struts/build/struts_checks.xml + http://svn.apache.org/repos/asf/struts/maven/trunk/build/src/main/resources/org/apache/struts/build/struts_checks.xml
svn commit: r418916 - /struts/shale/trunk/maven/build/shale_checks.xml
Author: craigmcc Date: Mon Jul 3 22:32:53 2006 New Revision: 418916 URL: http://svn.apache.org/viewvc?rev=418916&view=rev Log: Personalize the Checkstyle script a bit (Struts->Shale). No substantive changes yet, although I am accumulating a list of stuff to talk about as I go through the first passes of Checkstyle cleanups. Modified: struts/shale/trunk/maven/build/shale_checks.xml Modified: struts/shale/trunk/maven/build/shale_checks.xml URL: http://svn.apache.org/viewvc/struts/shale/trunk/maven/build/shale_checks.xml?rev=418916&r1=418915&r2=418916&view=diff == --- struts/shale/trunk/maven/build/shale_checks.xml (original) +++ struts/shale/trunk/maven/build/shale_checks.xml Mon Jul 3 22:32:53 2006 @@ -1,7 +1,7 @@ - + - + @@ -164,12 +164,12 @@ - + - + @@ -196,12 +196,12 @@ - + - + @@ -212,7 +212,7 @@ - + @@ -224,7 +224,7 @@ - +
svn commit: r418925 - in /struts/shale/trunk/maven/build: LICENSE.CheckStyle shale_checks.xml
Author: wsmoak Date: Mon Jul 3 23:23:30 2006 New Revision: 418925 URL: http://svn.apache.org/viewvc?rev=418925&view=rev Log: Copy the Struts LICENCE.CheckStyle config file for reference, and remove the 'Id' keyword. CheckStyle won't read a headerFile from a URL, so add the expression directly to the shale_checks.xml file. The expression is formed from the LICENSE.CheckStyle file by replacing newlines with '\n'. The double quotes around "LICENSE" and "AS IS" caused problems, so I used '.'. SHALE-207 Added: struts/shale/trunk/maven/build/LICENSE.CheckStyle - copied, changed from r418922, struts/maven/trunk/build/src/main/resources/org/apache/struts/build/LICENSE.CheckStyle Modified: struts/shale/trunk/maven/build/shale_checks.xml Copied: struts/shale/trunk/maven/build/LICENSE.CheckStyle (from r418922, struts/maven/trunk/build/src/main/resources/org/apache/struts/build/LICENSE.CheckStyle) URL: http://svn.apache.org/viewvc/struts/shale/trunk/maven/build/LICENSE.CheckStyle?p2=struts/shale/trunk/maven/build/LICENSE.CheckStyle&p1=struts/maven/trunk/build/src/main/resources/org/apache/struts/build/LICENSE.CheckStyle&r1=418922&r2=418925&rev=418925&view=diff == --- struts/maven/trunk/build/src/main/resources/org/apache/struts/build/LICENSE.CheckStyle (original) +++ struts/shale/trunk/maven/build/LICENSE.CheckStyle Mon Jul 3 23:23:30 2006 @@ -1,6 +1,4 @@ /\*\s* - \*\s*\$Id.*\$ - \*\s* \*\s*Copyright \d{4}(-\d{4}|,\d{4})* The Apache Software Foundation\. \*\s* \*\s*Licensed under the Apache License, Version 2\.0 \(the "License"\); Modified: struts/shale/trunk/maven/build/shale_checks.xml URL: http://svn.apache.org/viewvc/struts/shale/trunk/maven/build/shale_checks.xml?rev=418925&r1=418924&r2=418925&view=diff == --- struts/shale/trunk/maven/build/shale_checks.xml (original) +++ struts/shale/trunk/maven/build/shale_checks.xml Mon Jul 3 23:23:30 2006 @@ -134,10 +134,10 @@ - - + +http://www\.apache\.org/licenses/LICENSE\-2\.0\n \*\s*\n \*\s*Unless required by applicable law or agreed to in writing, software\n \*\s*distributed under the License is distributed on an .AS IS. BASIS,\n \*\s*WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.\n \*\s*See the License for the specific language governing permissions and\n \*\s*limitations under the License\.\n \*/\s*"/> +
svn commit: r418929 [2/2] - in /struts/shale/trunk/shale-core/src/main/java/org/apache/shale: application/ component/ dialog/ dialog/config/ faces/ renderer/ taglib/ util/ validator/ view/ view/faces/
Modified: struts/shale/trunk/shale-core/src/main/java/org/apache/shale/view/AbstractSessionBean.java URL: http://svn.apache.org/viewvc/struts/shale/trunk/shale-core/src/main/java/org/apache/shale/view/AbstractSessionBean.java?rev=418929&r1=418928&r2=418929&view=diff == --- struts/shale/trunk/shale-core/src/main/java/org/apache/shale/view/AbstractSessionBean.java (original) +++ struts/shale/trunk/shale-core/src/main/java/org/apache/shale/view/AbstractSessionBean.java Mon Jul 3 23:57:45 2006 @@ -1,12 +1,12 @@ /* * Copyright 2006 The Apache Software Foundation. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -42,7 +42,7 @@ */ public abstract class AbstractSessionBean extends AbstractFacesBean implements Serializable { - + // - Constructor @@ -50,9 +50,9 @@ /** * Create a new session scope bean. */ -public AbstractSessionBean() { +public AbstractSessionBean() { } - + // --- Lifecycle Methods @@ -95,7 +95,7 @@ /** * This method is called when the session containing it was * reactivated. - * + * * You may customize this method to reacquire references to session * data or resources that could not be serialized with the * session itself. Modified: struts/shale/trunk/shale-core/src/main/java/org/apache/shale/view/AbstractViewController.java URL: http://svn.apache.org/viewvc/struts/shale/trunk/shale-core/src/main/java/org/apache/shale/view/AbstractViewController.java?rev=418929&r1=418928&r2=418929&view=diff == --- struts/shale/trunk/shale-core/src/main/java/org/apache/shale/view/AbstractViewController.java (original) +++ struts/shale/trunk/shale-core/src/main/java/org/apache/shale/view/AbstractViewController.java Mon Jul 3 23:57:45 2006 @@ -1,12 +1,12 @@ /* * Copyright 2004-2005 The Apache Software Foundation. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -27,27 +27,27 @@ public class AbstractViewController extends AbstractFacesBean implements ViewController { - + // -- Properties private boolean postBack = false; - - -// Specified by ViewController + + +/** [EMAIL PROTECTED] */ public boolean isPostBack() { - + return this.postBack; } - - -// Specified by ViewController + + +/** [EMAIL PROTECTED] */ public void setPostBack(boolean postBack) { this.postBack = postBack; - + } Modified: struts/shale/trunk/shale-core/src/main/java/org/apache/shale/view/faces/LifecycleListener.java URL: http://svn.apache.org/viewvc/struts/shale/trunk/shale-core/src/main/java/org/apache/shale/view/faces/LifecycleListener.java?rev=418929&r1=418928&r2=418929&view=diff == --- struts/shale/trunk/shale-core/src/main/java/org/apache/shale/view/faces/LifecycleListener.java (original) +++ struts/shale/trunk/shale-core/src/main/java/org/apache/shale/view/faces/LifecycleListener.java Mon Jul 3 23:57:45 2006 @@ -16,7 +16,6 @@ package org.apache.shale.view.faces; -import java.util.Map; import org.apache.shale.view.AbstractApplicationBean; import org.apache.shale.view.AbstractRequestBean; import org.apache.shale.view.AbstractSessionBean; @@ -24,7 +23,6 @@ import java.util.Enumeration; import java.util.Iterator; import java.util.List; -import javax.faces.context.FacesContext; import javax.servlet.ServletContextAttributeEvent; import javax.servlet.ServletContextAttributeListener; import javax.servlet.ServletContextEvent; @@ -38,7 +36,6 @@ import javax.servlet.http.HttpSessionBindingEvent; import javax.servlet.http.HttpSessionEvent; import javax.servlet.http.HttpSessionListener; -import org.apache.shale.view.Constants; import org