You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by ws...@apache.org on 2006/07/12 07:35:27 UTC
svn commit: r421133 - in
/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces: ./
application/ component/ renderer/ taglib/ util/
Author: wsmoak
Date: Tue Jul 11 22:35:24 2006
New Revision: 421133
URL: http://svn.apache.org/viewvc?rev=421133&view=rev
Log:
STR-2900 Fix Checkstyle errors in struts-faces. Excluded MessagesMapTestCase due to incorrect line endings.
Submitted by: Frank Zammetti
Modified:
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/Constants.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/application/ActionListenerImpl.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/application/FacesRequestProcessor.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/application/FacesTilesRequestProcessor.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/application/PropertyResolverImpl.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/application/ViewHandlerImpl.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/BaseComponent.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/CommandLinkComponent.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/ErrorsComponent.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/FormComponent.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/HtmlComponent.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/MessageComponent.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/StylesheetComponent.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/WriteComponent.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/AbstractRenderer.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/BaseRenderer.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/CommandLinkRenderer.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/ErrorsRenderer.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/FormRenderer.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/HtmlRenderer.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/MessageRenderer.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/StylesheetRenderer.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/WriteRenderer.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/AbstractFacesTag.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/BaseTag.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/CommandLinkTag.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/ErrorsTag.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/FormTag.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/HtmlTag.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/JavascriptValidatorTag.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/LoadMessagesTag.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/MessageTag.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/StylesheetTag.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/WriteTag.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/util/MessagesMap.java
struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/util/StrutsContext.java
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/Constants.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/Constants.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/Constants.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/Constants.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 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.
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/application/ActionListenerImpl.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/application/ActionListenerImpl.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/application/ActionListenerImpl.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/application/ActionListenerImpl.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 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.
@@ -195,11 +195,11 @@
*/
protected RequestProcessor getRequestProcessor(ModuleConfig config,
ServletContext context) {
-
+
String key = Globals.REQUEST_PROCESSOR_KEY + config.getPrefix();
RequestProcessor processor =
(RequestProcessor) context.getAttribute(key);
-
+
if (processor == null) {
try {
if (log.isDebugEnabled()) {
@@ -228,6 +228,6 @@
return (processor);
}
-
+
}
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/application/FacesRequestProcessor.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/application/FacesRequestProcessor.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/application/FacesRequestProcessor.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/application/FacesRequestProcessor.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 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.
@@ -213,7 +213,7 @@
result);
}
return (result);
-
+
}
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/application/FacesTilesRequestProcessor.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/application/FacesTilesRequestProcessor.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/application/FacesTilesRequestProcessor.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/application/FacesTilesRequestProcessor.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 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.
@@ -227,7 +227,7 @@
result);
}
return (result);
-
+
}
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/application/PropertyResolverImpl.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/application/PropertyResolverImpl.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/application/PropertyResolverImpl.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/application/PropertyResolverImpl.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 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.
@@ -186,7 +186,7 @@
* access to the base object
* @exception NullPointerException if <code>base</code>
* is <code>null</code>
- * @exception PropertyNotFoundException if some other exception occurs
+ * @exception PropertyNotFoundException if some other exception occurs
*/
public Object getValue(Object base, int index)
throws PropertyNotFoundException {
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/application/ViewHandlerImpl.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/application/ViewHandlerImpl.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/application/ViewHandlerImpl.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/application/ViewHandlerImpl.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 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.
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/BaseComponent.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/BaseComponent.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/BaseComponent.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/BaseComponent.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002-2004 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.
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/CommandLinkComponent.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/CommandLinkComponent.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/CommandLinkComponent.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/CommandLinkComponent.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002-2004 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.
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/ErrorsComponent.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/ErrorsComponent.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/ErrorsComponent.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/ErrorsComponent.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002-2004 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.
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/FormComponent.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/FormComponent.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/FormComponent.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/FormComponent.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002-2004 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.
@@ -385,14 +385,14 @@
Object values[] = (Object[]) state;
super.restoreState(context, values[0]);
action = (String) values[1];
- enctype = (String) values[2];
- focus = (String) values[3];
- focusIndex = (String) values[4];
- onreset = (String) values[5];
- onsubmit = (String) values[6];
- style = (String) values[7];
- styleClass = (String) values[8];
- target = (String) values[9];
+ enctype = (String) values[2];
+ focus = (String) values[3];
+ focusIndex = (String) values[4];
+ onreset = (String) values[5];
+ onsubmit = (String) values[6];
+ style = (String) values[7];
+ styleClass = (String) values[8];
+ target = (String) values[9];
}
@@ -407,14 +407,14 @@
Object values[] = new Object[10];
values[0] = super.saveState(context);
values[1] = action;
- values[2] = enctype;
- values[3] = focus;
- values[4] = focusIndex;
- values[5] = onreset;
- values[6] = onsubmit;
- values[7] = style;
- values[8] = styleClass;
- values[9] = target;
+ values[2] = enctype;
+ values[3] = focus;
+ values[4] = focusIndex;
+ values[5] = onreset;
+ values[6] = onsubmit;
+ values[7] = style;
+ values[8] = styleClass;
+ values[9] = target;
return (values);
}
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/HtmlComponent.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/HtmlComponent.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/HtmlComponent.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/HtmlComponent.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002-2004 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.
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/MessageComponent.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/MessageComponent.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/MessageComponent.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/MessageComponent.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002-2004 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.
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/StylesheetComponent.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/StylesheetComponent.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/StylesheetComponent.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/StylesheetComponent.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002-2004 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.
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/WriteComponent.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/WriteComponent.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/WriteComponent.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/component/WriteComponent.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002-2004 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.
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/AbstractRenderer.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/AbstractRenderer.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/AbstractRenderer.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/AbstractRenderer.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 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.
@@ -51,7 +51,7 @@
private static final Log log =
- LogFactory.getLog(AbstractRenderer.class);
+ LogFactory.getLog(AbstractRenderer.class);
// -------------------------------------------------------- Renderer Methods
@@ -88,7 +88,7 @@
if (component instanceof EditableValueHolder) {
setSubmittedValue(context, component);
}
-
+
}
@@ -116,11 +116,11 @@
throw new NullPointerException();
}
- if (log.isTraceEnabled()) {
- log.trace("encodeBegin(id=" + component.getId() +
- ", family=" + component.getFamily() +
- ", rendererType=" + component.getRendererType() + ")");
- }
+ if (log.isTraceEnabled()) {
+ log.trace("encodeBegin(id=" + component.getId() +
+ ", family=" + component.getFamily() +
+ ", rendererType=" + component.getRendererType() + ")");
+ }
// Render the element and attributes for this component
ResponseWriter writer = context.getResponseWriter();
@@ -153,23 +153,23 @@
throw new NullPointerException();
}
- if (log.isTraceEnabled()) {
- log.trace("encodeChildren(id=" + component.getId() +
- ", family=" + component.getFamily() +
- ", rendererType=" + component.getRendererType() + ")");
- }
- Iterator kids = component.getChildren().iterator();
- while (kids.hasNext()) {
- UIComponent kid = (UIComponent) kids.next();
- kid.encodeBegin(context);
- if (kid.getRendersChildren()) {
- kid.encodeChildren(context);
- }
- kid.encodeEnd(context);
- }
- if (log.isTraceEnabled()) {
- log.trace("encodeChildren(id=" + component.getId() + ") end");
- }
+ if (log.isTraceEnabled()) {
+ log.trace("encodeChildren(id=" + component.getId() +
+ ", family=" + component.getFamily() +
+ ", rendererType=" + component.getRendererType() + ")");
+ }
+ Iterator kids = component.getChildren().iterator();
+ while (kids.hasNext()) {
+ UIComponent kid = (UIComponent) kids.next();
+ kid.encodeBegin(context);
+ if (kid.getRendersChildren()) {
+ kid.encodeChildren(context);
+ }
+ kid.encodeEnd(context);
+ }
+ if (log.isTraceEnabled()) {
+ log.trace("encodeChildren(id=" + component.getId() + ") end");
+ }
}
@@ -197,11 +197,11 @@
throw new NullPointerException();
}
- if (log.isTraceEnabled()) {
- log.trace("encodeEnd(id=" + component.getId() +
- ", family=" + component.getFamily() +
- ", rendererType=" + component.getRendererType() + ")");
- }
+ if (log.isTraceEnabled()) {
+ log.trace("encodeEnd(id=" + component.getId() +
+ ", family=" + component.getFamily() +
+ ", rendererType=" + component.getRendererType() + ")");
+ }
// Render the element closing for this component
ResponseWriter writer = context.getResponseWriter();
@@ -231,33 +231,33 @@
}
// Render this component and its children recursively
- if (log.isTraceEnabled()) {
- log.trace("encodeRecursive(id=" + component.getId() +
- ", family=" + component.getFamily() +
- ", rendererType=" + component.getRendererType() +
- ") encodeBegin");
- }
+ if (log.isTraceEnabled()) {
+ log.trace("encodeRecursive(id=" + component.getId() +
+ ", family=" + component.getFamily() +
+ ", rendererType=" + component.getRendererType() +
+ ") encodeBegin");
+ }
component.encodeBegin(context);
if (component.getRendersChildren()) {
- if (log.isTraceEnabled()) {
- log.trace("encodeRecursive(id=" + component.getId() +
- ") delegating");
- }
+ if (log.isTraceEnabled()) {
+ log.trace("encodeRecursive(id=" + component.getId() +
+ ") delegating");
+ }
component.encodeChildren(context);
} else {
- if (log.isTraceEnabled()) {
- log.trace("encodeRecursive(id=" + component.getId() +
- ") recursing");
- }
+ if (log.isTraceEnabled()) {
+ log.trace("encodeRecursive(id=" + component.getId() +
+ ") recursing");
+ }
Iterator kids = component.getChildren().iterator();
while (kids.hasNext()) {
UIComponent kid = (UIComponent) kids.next();
encodeRecursive(context, kid);
}
}
- if (log.isTraceEnabled()) {
- log.trace("encodeRecursive(id=" + component.getId() + ") encodeEnd");
- }
+ if (log.isTraceEnabled()) {
+ log.trace("encodeRecursive(id=" + component.getId() + ") encodeEnd");
+ }
component.encodeEnd(context);
}
@@ -543,7 +543,7 @@
input.setValid(false);
addConverterMessage(context, component, e.getMessage());
}
-
+
}
*/
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/BaseRenderer.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/BaseRenderer.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/BaseRenderer.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/BaseRenderer.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 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.
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/CommandLinkRenderer.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/CommandLinkRenderer.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/CommandLinkRenderer.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/CommandLinkRenderer.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002-2004 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.
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/ErrorsRenderer.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/ErrorsRenderer.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/ErrorsRenderer.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/ErrorsRenderer.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 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.
@@ -90,9 +90,9 @@
// Look up availability of our predefined resource keys
MessageResources resources = resources(context, component);
- if (Beans.isDesignTime() && (resources == null)) {
- resources = dummy;
- }
+ if (Beans.isDesignTime() && (resources == null)) {
+ resources = dummy;
+ }
Locale locale = context.getViewRoot().getLocale();
boolean headerPresent = resources.isPresent(locale, "errors.header");
boolean footerPresent = resources.isPresent(locale, "errors.footer");
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/FormRenderer.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/FormRenderer.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/FormRenderer.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/FormRenderer.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002-2004 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.
@@ -72,7 +72,7 @@
throw new NullPointerException();
}
String clientId = component.getClientId(context);
- Map map = context.getExternalContext().getRequestParameterMap();
+ Map map = context.getExternalContext().getRequestParameterMap();
if (log.isDebugEnabled()) {
log.debug("decode(" + clientId + ") --> " +
map.containsKey(clientId));
@@ -202,12 +202,12 @@
ResponseWriter writer = context.getResponseWriter();
// Render the hidden variable our decode() method uses to detect submits
- writer.startElement("input", component);
- writer.writeAttribute("type", "hidden", null);
- writer.writeAttribute("name", component.getClientId(context), null);
- writer.writeAttribute("value", component.getClientId(context), null);
- writer.endElement("input");
- writer.write("\n");
+ writer.startElement("input", component);
+ writer.writeAttribute("type", "hidden", null);
+ writer.writeAttribute("name", component.getClientId(context), null);
+ writer.writeAttribute("value", component.getClientId(context), null);
+ writer.endElement("input");
+ writer.write("\n");
// Write our state information (if necessary)
context.getApplication().getViewHandler().writeState(context);
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/HtmlRenderer.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/HtmlRenderer.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/HtmlRenderer.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/HtmlRenderer.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002-2004 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.
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/MessageRenderer.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/MessageRenderer.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/MessageRenderer.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/MessageRenderer.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 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.
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/StylesheetRenderer.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/StylesheetRenderer.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/StylesheetRenderer.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/StylesheetRenderer.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 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.
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/WriteRenderer.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/WriteRenderer.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/WriteRenderer.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/renderer/WriteRenderer.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 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.
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/AbstractFacesTag.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/AbstractFacesTag.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/AbstractFacesTag.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/AbstractFacesTag.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 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.
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/BaseTag.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/BaseTag.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/BaseTag.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/BaseTag.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002-2004 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.
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/CommandLinkTag.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/CommandLinkTag.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/CommandLinkTag.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/CommandLinkTag.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002-2004 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.
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/ErrorsTag.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/ErrorsTag.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/ErrorsTag.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/ErrorsTag.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002-2004 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.
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/FormTag.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/FormTag.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/FormTag.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/FormTag.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002-2004 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.
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/HtmlTag.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/HtmlTag.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/HtmlTag.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/HtmlTag.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002-2004 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.
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/JavascriptValidatorTag.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/JavascriptValidatorTag.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/JavascriptValidatorTag.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/JavascriptValidatorTag.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 1999-2004 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.
@@ -95,33 +95,37 @@
protected int page = 0;
/**
- * This will be used as is for the JavaScript validation method name if it has a value. This is
- * the method name of the main JavaScript method that the form calls to perform validations.
+ * This will be used as is for the JavaScript validation method name if it
+ * has a value. This is the method name of the main JavaScript method that
+ * the form calls to perform validations.
*/
protected String methodName = null;
/**
- * The static JavaScript methods will only be printed if this is set to "true".
+ * The static JavaScript methods will only be printed if this is set to
+ * "true".
*/
protected String staticJavascript = "true";
/**
- * The dynamic JavaScript objects will only be generated if this is set to "true".
+ * The dynamic JavaScript objects will only be generated if this is set to
+ * "true".
*/
protected String dynamicJavascript = "true";
/**
- * The src attribute for html script element (used to include an external script
- * resource). The src attribute is only recognized
+ * The src attribute for html script element (used to include an external
+ * script resource). The src attribute is only recognized
* when the formName attribute is specified.
*/
protected String src = null;
/**
- * The JavaScript methods will enclosed with html comments if this is set to "true".
+ * The JavaScript methods will enclosed with html comments if this is set to
+ * "true".
*/
protected String htmlComment = "true";
-
+
/**
* Hide JavaScript methods in a CDATA section for XHTML when "true".
*/
@@ -130,7 +134,7 @@
private String htmlBeginComment = "\n<!-- Begin \n";
private String htmlEndComment = "//End --> \n";
-
+
/**
* Gets the key (form name) that will be used
* to retrieve a set of validation rules to be
@@ -270,9 +274,11 @@
public int doStartTag() throws JspException {
StringBuffer results = new StringBuffer();
- HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
+ HttpServletRequest request =
+ (HttpServletRequest)pageContext.getRequest();
ServletContext servletContext = pageContext.getServletContext();
- ModuleConfig config = ModuleUtils.getInstance().getModuleConfig(request, servletContext);
+ ModuleConfig config =
+ ModuleUtils.getInstance().getModuleConfig(request, servletContext);
ValidatorResources resources =
(ValidatorResources) pageContext.getAttribute(
@@ -296,7 +302,8 @@
for (Iterator i = form.getFields().iterator(); i.hasNext();) {
Field field = (Field) i.next();
- for (Iterator x = field.getDependencyList().iterator(); x.hasNext();) {
+ for (Iterator x = field.getDependencyList().iterator();
+ x.hasNext();) {
Object o = x.next();
if (o != null && !lActionMethods.contains(o)) {
@@ -317,8 +324,8 @@
"Depends string \""
+ depends
+ "\" was not found in validator-rules.xml.");
- }
-
+ }
+
String javascript = va.getJavascript();
if (javascript != null && javascript.length() > 0) {
lActions.add(va);
@@ -332,19 +339,26 @@
ValidatorAction va1 = (ValidatorAction) o1;
ValidatorAction va2 = (ValidatorAction) o2;
- if ((va1.getDepends() == null || va1.getDepends().length() == 0)
- && (va2.getDepends() == null || va2.getDepends().length() == 0)) {
+ if ((va1.getDepends() == null
+ || va1.getDepends().length() == 0)
+ && (va2.getDepends() == null
+ || va2.getDepends().length() == 0)) {
return 0;
} else if (
- (va1.getDepends() != null && va1.getDepends().length() > 0)
- && (va2.getDepends() == null || va2.getDepends().length() == 0)) {
+ (va1.getDepends() != null
+ && va1.getDepends().length() > 0)
+ && (va2.getDepends() == null
+ || va2.getDepends().length() == 0)) {
return 1;
} else if (
- (va1.getDepends() == null || va1.getDepends().length() == 0)
- && (va2.getDepends() != null && va2.getDepends().length() > 0)) {
+ (va1.getDepends() == null
+ || va1.getDepends().length() == 0)
+ && (va2.getDepends() != null
+ && va2.getDepends().length() > 0)) {
return -1;
} else {
- return va1.getDependencyList().size() - va2.getDependencyList().size();
+ return va1.getDependencyList().size() -
+ va2.getDependencyList().size();
}
}
});
@@ -367,7 +381,8 @@
String jscriptVar = null;
String functionName = null;
- if (va.getJsFunctionName() != null && va.getJsFunctionName().length() > 0) {
+ if (va.getJsFunctionName() != null
+ && va.getJsFunctionName().length() > 0) {
functionName = va.getJsFunctionName();
} else {
functionName = va.getName();
@@ -375,26 +390,29 @@
if (isStruts11()) {
results.append(" function " +
- functionName + " () { \n");
+ functionName + " () { \n");
} else {
results.append(" function " +
- formName + "_" + functionName + " () { \n");
+ formName + "_" + functionName +
+ " () { \n");
}
- for (Iterator x = form.getFields().iterator(); x.hasNext();) {
+ for (Iterator x = form.getFields().iterator();
+ x.hasNext();) {
Field field = (Field) x.next();
- // Skip indexed fields for now until there is a good way to handle
- // error messages (and the length of the list (could retrieve from scope?))
+ // Skip indexed fields for now until there is a good
+ // way to handle error messages (and the length of the
+ // list (could retrieve from scope?))
if (field.isIndexed()
|| field.getPage() != page
|| !field.isDependency(va.getName())) {
-
+
continue;
}
-
+
String message =
Resources.getMessage(messages, locale, va, field);
-
+
message = (message != null) ? message : "";
jscriptVar = this.getNextVar(jscriptVar);
@@ -421,7 +439,8 @@
String varValue = var.getValue();
String jsType = var.getJsType();
- // skip requiredif variables field, fieldIndexed, fieldTest, fieldValue
+ // skip requiredif variables field, fieldIndexed,
+ // fieldTest, fieldValue
if (varName.startsWith("field")) {
continue;
}
@@ -436,7 +455,8 @@
"\\",
"\\\\")
+ "; ");
- } else if (Var.JSTYPE_REGEXP.equalsIgnoreCase(jsType)) {
+ } else if (Var.JSTYPE_REGEXP.equalsIgnoreCase(
+ jsType)) {
results.append(
"this."
+ varName
@@ -446,7 +466,8 @@
"\\",
"\\\\")
+ "/; ");
- } else if (Var.JSTYPE_STRING.equalsIgnoreCase(jsType)) {
+ } else if (Var.JSTYPE_STRING.equalsIgnoreCase(
+ jsType)) {
results.append(
"this."
+ varName
@@ -456,7 +477,8 @@
"\\",
"\\\\")
+ "'; ");
- // So everyone using the latest format doesn't need to change their xml files immediately.
+ // So everyone using the latest format doesn't
+ // need to change their xml files immediately.
} else if ("mask".equalsIgnoreCase(varName)) {
results.append(
"this."
@@ -491,7 +513,7 @@
}
}
}
-
+
if ("true".equalsIgnoreCase(staticJavascript)) {
results.append(getJavascriptStaticMethods(resources));
}
@@ -499,7 +521,7 @@
if (form != null
&& ("true".equalsIgnoreCase(dynamicJavascript)
|| "true".equalsIgnoreCase(staticJavascript))) {
-
+
results.append(getJavascriptEnd());
}
@@ -542,11 +564,11 @@
+ formName.substring(1, formName.length());
sb.append(this.getStartElement());
-
+
if (this.isXhtml() && "true".equalsIgnoreCase(this.cdata)) {
sb.append("<![CDATA[\r\n");
}
-
+
if (!this.isXhtml() && "true".equals(htmlComment)) {
sb.append(htmlBeginComment);
}
@@ -556,12 +578,14 @@
sb.append(
" function validate"
+ name
- + "(form) { \n");
+ + "(form) { "
+ + " \n");
} else {
sb.append(
" function "
+ methodName
- + "(form) { \n");
+ + "(form) { "
+ + " \n");
}
sb.append(" if (bCancel) \n");
sb.append(" return true; \n");
@@ -608,11 +632,11 @@
if (!this.isXhtml() && "true".equals(htmlComment)){
sb.append(htmlEndComment);
}
-
+
if (this.isXhtml() && "true".equalsIgnoreCase(this.cdata)) {
sb.append("]]>\r\n");
}
-
+
sb.append("</script>\n\n");
return sb.toString();
@@ -641,7 +665,8 @@
} else if (i == input.length()) {
return input.substring(0, pos) + c;
} else {
- return input.substring(0, pos) + c + input.substring(pos, input.length() - 1);
+ return input.substring(0, pos) + c + input.substring(pos,
+ input.length() - 1);
}
} else {
input = replaceChar(input, pos, 'a');
@@ -662,15 +687,18 @@
} else if (pos == input.length()) {
return input.substring(0, pos) + c;
} else {
- return input.substring(0, pos) + c + input.substring(pos, input.length() - 1);
+ return input.substring(0, pos) + c + input.substring(pos,
+ input.length() - 1);
}
}
/**
- * Constructs the beginning <script> element depending on xhtml status.
+ * Constructs the beginning <script> element depending on
+ * xhtml status.
*/
private String getStartElement() {
- StringBuffer start = new StringBuffer("<script type=\"text/javascript\"");
+ StringBuffer start =
+ new StringBuffer("<script type=\"text/javascript\"");
// there is no language attribute in xhtml
if (!this.isXhtml()) {
@@ -684,7 +712,7 @@
start.append("> \n");
return start.toString();
}
-
+
/**
* Returns true if this is an xhtml page.
*/
@@ -742,7 +770,8 @@
UIComponent parentComponent =
((UIComponentTag) parent).getComponentInstance();
if (parentComponent instanceof FormComponent) {
- if (formName.equals(parentComponent.getAttributes().get("beanName"))) {
+ if (formName.equals(
+ parentComponent.getAttributes().get("beanName"))) {
formClientId = parentComponent.getClientId
(FacesContext.getCurrentInstance());
return (formClientId);
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/LoadMessagesTag.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/LoadMessagesTag.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/LoadMessagesTag.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/LoadMessagesTag.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 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.
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/MessageTag.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/MessageTag.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/MessageTag.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/MessageTag.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002-2004 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.
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/StylesheetTag.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/StylesheetTag.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/StylesheetTag.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/StylesheetTag.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002-2004 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.
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/WriteTag.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/WriteTag.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/WriteTag.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/taglib/WriteTag.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002-2004 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.
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/util/MessagesMap.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/util/MessagesMap.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/util/MessagesMap.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/util/MessagesMap.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 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.
Modified: struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/util/StrutsContext.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/util/StrutsContext.java?rev=421133&r1=421132&r2=421133&view=diff
==============================================================================
--- struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/util/StrutsContext.java (original)
+++ struts/struts1/trunk/faces/src/main/java/org/apache/struts/faces/util/StrutsContext.java Tue Jul 11 22:35:24 2006
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 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.
@@ -203,4 +203,3 @@
}
-