Author: Alex.Kolonitsky
Date: 2010-09-12 05:15:34 -0400 (Sun, 12 Sep 2010)
New Revision: 19159
Added:
trunk/core/impl/richfaces-suppressions.xml
Removed:
trunk/core/impl/checkstyle-suppressions.xml
Modified:
trunk/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/el/node/AstNotTreeNode.java
trunk/cdk/parent/pom.xml
trunk/core/api/pom.xml
trunk/core/impl/pom.xml
trunk/core/impl/src/test/java/org/richfaces/resource/CachedResourceImplTest.java
trunk/core/parent/pom.xml
trunk/core/pom.xml
trunk/examples/parent/pom.xml
trunk/parent/pom.xml
trunk/ui/common/api/pom.xml
trunk/ui/common/ui/pom.xml
trunk/ui/core/api/pom.xml
trunk/ui/core/ui/pom.xml
trunk/ui/core/ui/src/main/java/org/richfaces/view/facelets/html/BehaviorsTagHandlerDelegateFactoryImpl.java
trunk/ui/input/api/pom.xml
trunk/ui/input/ui/pom.xml
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteDivLayoutStrategy.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteListLayoutStrategy.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteRendererBase.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteTableLayoutStrategy.java
trunk/ui/input/ui/src/main/java/org/richfaces/view/facelets/AutocompleteHandler.java
trunk/ui/iteration/api/pom.xml
trunk/ui/iteration/ui/pom.xml
trunk/ui/misc/ui/pom.xml
trunk/ui/output/api/pom.xml
trunk/ui/output/ui/pom.xml
trunk/ui/output/ui/src/main/java/org/richfaces/component/behavior/ToggleControl.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelBaseRenderer.java
trunk/ui/parent/pom.xml
Log:
RFPL-721 Try Maven 3 for project build and resolve possible problems
RFPL-677 Create global checkstyle suppressions
RFPL-595 moving to new checkstyle version
RF-9077 Checkstyle suppressions should only contain suppressions for the enclosed module
Modified:
trunk/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/el/node/AstNotTreeNode.java
===================================================================
---
trunk/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/el/node/AstNotTreeNode.java 2010-09-11
09:42:13 UTC (rev 19158)
+++
trunk/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/el/node/AstNotTreeNode.java 2010-09-12
09:15:34 UTC (rev 19159)
@@ -19,11 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
-
package org.richfaces.cdk.templatecompiler.el.node;
-
import org.jboss.el.parser.Node;
import org.richfaces.cdk.templatecompiler.el.ELNodeConstants;
import org.richfaces.cdk.templatecompiler.el.ELVisitor;
@@ -33,7 +30,6 @@
* This class extend AbstractTreeNode and wrap AstNot node.
*
* @author amarkhel
- *
*/
public class AstNotTreeNode extends AbstractTreeNode {
public AstNotTreeNode(Node node) {
@@ -44,11 +40,11 @@
public void visit(StringBuilder sb, ELVisitor visitor) throws ParsingException {
sb.append(ELNodeConstants.LEFT_BRACKET);
sb.append(ELNodeConstants.EXCLAMATION_MARK);
- String childOutput = coerceToBoolean(getChildOutput(0, visitor), visitor);
+ String childOutput = coerceToBoolean(getChildOutput(0, visitor), visitor);
sb.append(childOutput);
sb.append(ELNodeConstants.RIGHT_BRACKET);
-
+
//variable type has been already set by getChildOuput()
}
-
+
}
Modified: trunk/cdk/parent/pom.xml
===================================================================
--- trunk/cdk/parent/pom.xml 2010-09-11 09:42:13 UTC (rev 19158)
+++ trunk/cdk/parent/pom.xml 2010-09-12 09:15:34 UTC (rev 19159)
@@ -350,10 +350,7 @@
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.5</version>
<configuration>
- <configLocation>richfaces-checkstyle/richfaces-checkstyle.xml
- </configLocation>
- <suppressionsLocation>checkstyle-suppressions.xml
- </suppressionsLocation>
+ <configLocation>richfaces-checkstyle/richfaces-checkstyle.xml</configLocation>
</configuration>
</plugin>
</plugins>
Modified: trunk/core/api/pom.xml
===================================================================
--- trunk/core/api/pom.xml 2010-09-11 09:42:13 UTC (rev 19158)
+++ trunk/core/api/pom.xml 2010-09-12 09:15:34 UTC (rev 19159)
@@ -70,7 +70,15 @@
<scope>test</scope>
</dependency>
</dependencies>
-
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
<scm>
<
connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/trunk/core...
<
developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/trun...
Deleted: trunk/core/impl/checkstyle-suppressions.xml
===================================================================
--- trunk/core/impl/checkstyle-suppressions.xml 2010-09-11 09:42:13 UTC (rev 19158)
+++ trunk/core/impl/checkstyle-suppressions.xml 2010-09-12 09:15:34 UTC (rev 19159)
@@ -1,36 +0,0 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE suppressions PUBLIC
- "-//Puppy Crawl//DTD Suppressions 1.0//EN"
- "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
-
-<!-- NOTE: Because of issues with maven checkstyle plugin each suppression
- file must have all suppressions defined.
-
- See RF-9077 for details. -->
-<suppressions>
- <suppress checks="DoubleCheckedLocking"
files="MultipartRequestRegistry.java" />
- <suppress checks="FallThrough" files="JSMin.java" />
- <suppress checks="IllegalCatch" files="UISwitchablePanel.java"
/>
- <suppress checks="ModifiedControlVariable"
files="MultipartRequest.java" />
- <suppress checks="IllegalCatch" files="StagingServer.java"
/>
- <suppress checks="IllegalCatch"
files="PartialViewContextImpl.java" />
- <suppress checks="FallThrough" files="StagingServer.java"
/>
- <suppress checks="ModifiedControlVariable" files="Cookie.java"
/>
- <suppress checks="IllegalCatch" files="CacheManager.java"
/>
- <suppress checks="MissingSwitchDefault"
files="JSONTokener.java" />
- <suppress checks="IllegalCatch" files="AjaxViewRoot.java"
/>
- <suppress checks="FallThrough" files="XMLTokener.java" />
- <suppress checks="IllegalCatch"
files="ResourceHandlerImpl.java" />
- <suppress checks="IllegalThrows"
files="AbstractThreadedTest.java" />
- <suppress checks="ModifiedControlVariable"
files="URLCodec.java" />
-
- <!-- TODO it is hot fix for building process, this files belong to the test-base
module,
- and must be removed from here -->
- <suppress checks="IllegalCatch"
files="AbstractThreadedTest.java" />
- <suppress checks="IllegalCatch" files="StagingServer.java"
/>
-
- <!-- TODO it is hot fix for building process, this files belong to the
ui/output/trunk/panela/ui module,
- and must be removed from here -->
- <suppress checks="IllegalCatch"
files="AbstractTogglePanel.java" />
-</suppressions>
Modified: trunk/core/impl/pom.xml
===================================================================
--- trunk/core/impl/pom.xml 2010-09-11 09:42:13 UTC (rev 19158)
+++ trunk/core/impl/pom.xml 2010-09-12 09:15:34 UTC (rev 19159)
@@ -116,7 +116,7 @@
<!-- Checkstyle only required here because suppressions needed -->
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
-
<suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
+
<suppressionsLocation>${project.basedir}/richfaces-suppressions.xml</suppressionsLocation>
</configuration>
</plugin>
Copied: trunk/core/impl/richfaces-suppressions.xml (from rev 19152,
trunk/core/impl/checkstyle-suppressions.xml)
===================================================================
--- trunk/core/impl/richfaces-suppressions.xml (rev 0)
+++ trunk/core/impl/richfaces-suppressions.xml 2010-09-12 09:15:34 UTC (rev 19159)
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE suppressions PUBLIC
+ "-//Puppy Crawl//DTD Suppressions 1.0//EN"
+ "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
+
+<suppressions>
+ <suppress checks="DoubleCheckedLocking"
files="MultipartRequestRegistry.java" />
+ <suppress checks="FallThrough" files="JSMin.java" />
+ <suppress checks="IllegalCatch" files="UISwitchablePanel.java"
/>
+ <suppress checks="ModifiedControlVariable"
files="MultipartRequest.java" />
+ <suppress checks="IllegalCatch" files="StagingServer.java"
/>
+ <suppress checks="IllegalCatch"
files="PartialViewContextImpl.java" />
+ <suppress checks="FallThrough" files="StagingServer.java"
/>
+ <suppress checks="IllegalCatch" files="CacheManager.java"
/>
+ <suppress checks="IllegalCatch"
files="ResourceHandlerImpl.java" />
+ <suppress checks="IllegalThrows"
files="AbstractThreadedTest.java" />
+ <suppress checks="ModifiedControlVariable"
files="URLCodec.java" />
+</suppressions>
Modified:
trunk/core/impl/src/test/java/org/richfaces/resource/CachedResourceImplTest.java
===================================================================
---
trunk/core/impl/src/test/java/org/richfaces/resource/CachedResourceImplTest.java 2010-09-11
09:42:13 UTC (rev 19158)
+++
trunk/core/impl/src/test/java/org/richfaces/resource/CachedResourceImplTest.java 2010-09-12
09:15:34 UTC (rev 19159)
@@ -84,7 +84,8 @@
}
private CachedResourceImpl createCachedResource(Map<String, String> headers,
InputStream stream)
- throws IOException {
+ throws IOException {
+
MockHeadersResourceImpl mockResource = new MockHeadersResourceImpl(headers,
stream);
CachedResourceImpl cachedResource = new MockCachedResourceImpl();
Modified: trunk/core/parent/pom.xml
===================================================================
--- trunk/core/parent/pom.xml 2010-09-11 09:42:13 UTC (rev 19158)
+++ trunk/core/parent/pom.xml 2010-09-12 09:15:34 UTC (rev 19159)
@@ -45,14 +45,6 @@
</dependencies>
</dependencyManagement>
- <build>
- <plugins>
- <!-- Trigger checkstyle checking for this module -->
- <plugin>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
<scm>
<
connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/trunk/core...
<
developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/trun...
Modified: trunk/core/pom.xml
===================================================================
--- trunk/core/pom.xml 2010-09-11 09:42:13 UTC (rev 19158)
+++ trunk/core/pom.xml 2010-09-12 09:15:34 UTC (rev 19159)
@@ -24,7 +24,7 @@
<groupId>org.richfaces</groupId>
<artifactId>richfaces-parent</artifactId>
<version>10</version>
-<relativePath>../build/parent/pom.xml</relativePath>
+ <relativePath>../build/parent/pom.xml</relativePath>
</parent>
<groupId>org.richfaces.core</groupId>
Modified: trunk/examples/parent/pom.xml
===================================================================
--- trunk/examples/parent/pom.xml 2010-09-11 09:42:13 UTC (rev 19158)
+++ trunk/examples/parent/pom.xml 2010-09-12 09:15:34 UTC (rev 19159)
@@ -100,10 +100,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
- <version>2.3</version>
+ <version>2.5</version>
<configuration>
-
<configLocation>richfaces-checkstyle/richfaces-checkstyle.xml
- </configLocation>
+
<configLocation>richfaces-checkstyle/richfaces-checkstyle.xml</configLocation>
+
<logViolationsToConsole>true</logViolationsToConsole>
+ <violationSeverity>error</violationSeverity>
</configuration>
<executions>
<execution>
Modified: trunk/parent/pom.xml
===================================================================
--- trunk/parent/pom.xml 2010-09-11 09:42:13 UTC (rev 19158)
+++ trunk/parent/pom.xml 2010-09-12 09:15:34 UTC (rev 19159)
@@ -163,10 +163,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
- <version>2.3</version>
+ <version>2.5</version>
<configuration>
-
<configLocation>richfaces-checkstyle/richfaces-checkstyle.xml
- </configLocation>
+
<configLocation>richfaces-checkstyle/richfaces-checkstyle.xml</configLocation>
+
<logViolationsToConsole>true</logViolationsToConsole>
+ <violationSeverity>error</violationSeverity>
</configuration>
<executions>
<execution>
Modified: trunk/ui/common/api/pom.xml
===================================================================
--- trunk/ui/common/api/pom.xml 2010-09-11 09:42:13 UTC (rev 19158)
+++ trunk/ui/common/api/pom.xml 2010-09-12 09:15:34 UTC (rev 19159)
@@ -33,4 +33,13 @@
<artifactId>richfaces-ui-common-api</artifactId>
<name>Richfaces UI Components: Common API</name>
<packaging>jar</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
\ No newline at end of file
Modified: trunk/ui/common/ui/pom.xml
===================================================================
--- trunk/ui/common/ui/pom.xml 2010-09-11 09:42:13 UTC (rev 19158)
+++ trunk/ui/common/ui/pom.xml 2010-09-12 09:15:34 UTC (rev 19159)
@@ -55,7 +55,7 @@
<!-- Checkstyle only required here because suppressions needed -->
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
-
<suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
+
<suppressionsLocation>${project.basedir}/richfaces-suppressions.xml</suppressionsLocation>
</configuration>
</plugin>
</plugins>
Modified: trunk/ui/core/api/pom.xml
===================================================================
--- trunk/ui/core/api/pom.xml 2010-09-11 09:42:13 UTC (rev 19158)
+++ trunk/ui/core/api/pom.xml 2010-09-12 09:15:34 UTC (rev 19159)
@@ -30,6 +30,14 @@
<name>Richfaces UI Components: Core API</name>
<packaging>jar</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
<dependencies>
<!-- runtime -->
<dependency>
Modified: trunk/ui/core/ui/pom.xml
===================================================================
--- trunk/ui/core/ui/pom.xml 2010-09-11 09:42:13 UTC (rev 19158)
+++ trunk/ui/core/ui/pom.xml 2010-09-12 09:15:34 UTC (rev 19159)
@@ -54,9 +54,12 @@
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
</plugin>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
</plugins>
</build>
-
+
<scm>
<
connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/trunk/ui/c...
</connection>
Modified:
trunk/ui/core/ui/src/main/java/org/richfaces/view/facelets/html/BehaviorsTagHandlerDelegateFactoryImpl.java
===================================================================
---
trunk/ui/core/ui/src/main/java/org/richfaces/view/facelets/html/BehaviorsTagHandlerDelegateFactoryImpl.java 2010-09-11
09:42:13 UTC (rev 19158)
+++
trunk/ui/core/ui/src/main/java/org/richfaces/view/facelets/html/BehaviorsTagHandlerDelegateFactoryImpl.java 2010-09-12
09:15:34 UTC (rev 19159)
@@ -59,8 +59,8 @@
if (isMyFaces) {
//TODO - RF M3 workaround for
https://jira.jboss.org/browse/RF-9025 /
https://issues.apache.org/jira/browse/MYFACES-2888
- LOGGER.warn("MyFaces implementation of JavaServer Faces detected.
" +
- "Wrapping of components using RichFaces behaviors (a4j:ajax etc.)
won't work!");
+ LOGGER.warn("MyFaces implementation of JavaServer Faces detected.
"
+ + "Wrapping of components using RichFaces behaviors (a4j:ajax
etc.) won't work!");
}
} else {
LOGGER.warn("Cannot detect Mojarra vs MyFaces implementation of
JavaServer Faces");
Modified: trunk/ui/input/api/pom.xml
===================================================================
--- trunk/ui/input/api/pom.xml 2010-09-11 09:42:13 UTC (rev 19158)
+++ trunk/ui/input/api/pom.xml 2010-09-12 09:15:34 UTC (rev 19159)
@@ -34,6 +34,14 @@
<name>Richfaces UI Components: Input API</name>
<packaging>jar</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
<dependencies>
<!-- runtime -->
<dependency>
Modified: trunk/ui/input/ui/pom.xml
===================================================================
--- trunk/ui/input/ui/pom.xml 2010-09-11 09:42:13 UTC (rev 19158)
+++ trunk/ui/input/ui/pom.xml 2010-09-12 09:15:34 UTC (rev 19159)
@@ -40,6 +40,9 @@
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
</plugin>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
</plugins>
</build>
Modified:
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteDivLayoutStrategy.java
===================================================================
---
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteDivLayoutStrategy.java 2010-09-11
09:42:13 UTC (rev 19158)
+++
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteDivLayoutStrategy.java 2010-09-12
09:15:34 UTC (rev 19159)
@@ -52,7 +52,7 @@
}
public void encodeItemBegin(FacesContext facesContext, UIComponent component) throws
IOException {
- ResponseWriter writer = facesContext.getResponseWriter();
+ ResponseWriter writer = facesContext.getResponseWriter();
writer.startElement(HtmlConstants.DIV_ELEM, component);
}
Modified:
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteListLayoutStrategy.java
===================================================================
---
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteListLayoutStrategy.java 2010-09-11
09:42:13 UTC (rev 19158)
+++
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteListLayoutStrategy.java 2010-09-12
09:15:34 UTC (rev 19159)
@@ -31,7 +31,7 @@
}
public void encodeItemBegin(FacesContext facesContext, UIComponent component) throws
IOException {
- ResponseWriter writer = facesContext.getResponseWriter();
+ ResponseWriter writer = facesContext.getResponseWriter();
writer.startElement(HtmlConstants.LI_ELEMENT, component);
}
Modified:
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteRendererBase.java
===================================================================
---
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteRendererBase.java 2010-09-11
09:42:13 UTC (rev 19158)
+++
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteRendererBase.java 2010-09-12
09:15:34 UTC (rev 19159)
@@ -59,11 +59,10 @@
/**
* @author Nick Belaevski
- *
*/
-@ResourceDependencies({
+@ResourceDependencies({
@ResourceDependency(library = "org.richfaces", name =
"ajax.reslib"),
- @ResourceDependency(library = "org.richfaces", name =
"base-component.reslib"),
+ @ResourceDependency(library = "org.richfaces", name =
"base-component.reslib"),
@ResourceDependency(name = "jquery.position.js"), @ResourceDependency(name
= "richfaces-event.js"),
@ResourceDependency(name = "richfaces-selection.js"),
@ResourceDependency(library = "org.richfaces", name =
"AutocompleteBase.js"),
@@ -75,17 +74,17 @@
public JSFunctionDefinition getClientFilterFunction(UIComponent component) {
AbstractAutocomplete autocomplete = (AbstractAutocomplete) component;
- String clientFilter =
(String)autocomplete.getAttributes().get("clientFilter");
+ String clientFilter = (String)
autocomplete.getAttributes().get("clientFilter");
if (clientFilter != null && clientFilter.length() != 0) {
JSFunctionDefinition clientFilterFunction = new
JSFunctionDefinition("subString");
clientFilterFunction.addParameter("value");
clientFilterFunction.addToBody(clientFilter);
return clientFilterFunction;
}
-
+
return null;
}
-
+
public String getScriptOptions(UIComponent component) {
Map<String, Object> attributes = component.getAttributes();
Map<String, Object> options = new HashMap<String, Object>();
@@ -104,9 +103,9 @@
utils.addToScriptHash(options, "onbeforedomupdate",
attributes.get("onbeforedomupdate"));
utils.addToScriptHash(options, "onchange",
attributes.get("onchange"));
utils.addToScriptHash(options, "filterFunction",
getClientFilterFunction(component));
- String mode = (String)attributes.get("mode");
+ String mode = (String) attributes.get("mode");
if (mode != null) {
- if (mode.equals("ajax")){
+ if (mode.equals("ajax")) {
utils.addToScriptHash(options, "isCachedAjax", false,
"true");
} else if (mode.equals("client") ||
mode.equals("lazyClient")) {
utils.addToScriptHash(options, "ajaxMode", false,
"true");
@@ -121,6 +120,7 @@
}
// TODO nick - handle parameter
+
@SuppressWarnings("unchecked")
private DataModel<Object> getItems(FacesContext facesContext,
AbstractAutocomplete component) {
Object itemsObject = null;
@@ -132,16 +132,16 @@
try {
// String value = getInputValue(facesContext, component);
- itemsObject = autocompleteMethod.invoke(facesContext.getELContext(), new
Object[] { facesContext,
- component, value });
+ itemsObject = autocompleteMethod.invoke(facesContext.getELContext(), new
Object[]{facesContext,
+ component, value});
} catch (ELException e) {
try {
autocompleteMethod = facesContext
.getApplication()
.getExpressionFactory()
.createMethodExpression(facesContext.getELContext(),
autocompleteMethod.getExpressionString(),
- Void.class, new Class[] { String.class });
- itemsObject = autocompleteMethod.invoke(facesContext.getELContext(),
new Object[] { value });
+ Void.class, new Class[]{String.class});
+ itemsObject = autocompleteMethod.invoke(facesContext.getELContext(),
new Object[]{value});
} catch (ELException ee) {
ee.printStackTrace();
}
@@ -214,10 +214,10 @@
// TODO use converter
if (comboBox.getItemConverter() != null) {
fetchValues.add(comboBox.getItemConverter().getAsString(facesContext,
component, nextItem));
- } else{
+ } else {
fetchValues.add(nextItem);
- }
-
+ }
+
}
}
@@ -233,7 +233,7 @@
protected void encodeItemsContainer(FacesContext facesContext, UIComponent component)
throws IOException {
AutocompleteEncodeStrategy strategy = getStrategy(component);
Object mode = component.getAttributes().get("mode");
- if (mode!= null && mode.equals("client")) {
+ if (mode != null && mode.equals("client")) {
List<Object> fetchValues = new ArrayList<Object>();
this.encodeItems(facesContext, component, fetchValues);
} else {
@@ -244,10 +244,11 @@
}
}
- public void encodeItem(FacesContext facesContext, AbstractAutocomplete comboBox,
Object item, AutocompleteEncodeStrategy strategy) throws IOException {
+ public void encodeItem(FacesContext facesContext, AbstractAutocomplete comboBox,
Object item,
+ AutocompleteEncodeStrategy strategy) throws IOException {
strategy.encodeItemBegin(facesContext, comboBox);
ResponseWriter writer = facesContext.getResponseWriter();
-
+
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-au-option
rf-au-font rf-au-input", null);
if (comboBox.getChildCount() > 0) {
@@ -269,7 +270,7 @@
}
strategy.encodeItemEnd(facesContext, comboBox);
}
-
+
private AutocompleteEncodeStrategy getStrategy(UIComponent component) {
AbstractAutocomplete comboBox = (AbstractAutocomplete) component;
if (comboBox.getLayout() != null) {
@@ -288,21 +289,21 @@
@Override
protected void doDecode(FacesContext context, UIComponent component) {
- AbstractAutocomplete autocomplete = (AbstractAutocomplete)component;
- if (InputUtils.isDisabled(autocomplete)) {
+ AbstractAutocomplete autocomplete = (AbstractAutocomplete) component;
+ if (InputUtils.isDisabled(autocomplete)) {
return;
}
Map<String, String> requestParameters =
context.getExternalContext().getRequestParameterMap();
Object value = requestParameters.get(component.getClientId(context) +
"Value");
if (value != null) {
- if(autocomplete.getConverter() != null){
+ if (autocomplete.getConverter() != null) {
value = autocomplete.getConverter().getAsObject(context, component,
value.toString());
}
autocomplete.setSubmittedValue(value);
}
super.doDecode(context, component);
-
+
if (requestParameters.get(component.getClientId(context) + ".ajax") !=
null) {
PartialViewContext pvc = context.getPartialViewContext();
pvc.getRenderIds().add(
Modified:
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteTableLayoutStrategy.java
===================================================================
---
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteTableLayoutStrategy.java 2010-09-11
09:42:13 UTC (rev 19158)
+++
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteTableLayoutStrategy.java 2010-09-12
09:15:34 UTC (rev 19159)
@@ -34,7 +34,7 @@
}
public void encodeItemBegin(FacesContext facesContext, UIComponent component) throws
IOException {
- ResponseWriter writer = facesContext.getResponseWriter();
+ ResponseWriter writer = facesContext.getResponseWriter();
writer.startElement(HtmlConstants.TR_ELEMENT, component);
writer.startElement(HtmlConstants.TD_ELEM, component);
}
Modified:
trunk/ui/input/ui/src/main/java/org/richfaces/view/facelets/AutocompleteHandler.java
===================================================================
---
trunk/ui/input/ui/src/main/java/org/richfaces/view/facelets/AutocompleteHandler.java 2010-09-11
09:42:13 UTC (rev 19158)
+++
trunk/ui/input/ui/src/main/java/org/richfaces/view/facelets/AutocompleteHandler.java 2010-09-12
09:15:34 UTC (rev 19159)
@@ -38,7 +38,6 @@
/**
* @author Nick Belaevski
- *
*/
//TODO nick - this should be generated by CDK
public class AutocompleteHandler extends ComponentHandler {
@@ -47,11 +46,11 @@
@Override
public Metadata applyRule(String name, TagAttribute attribute,
- MetadataTarget meta) {
+ MetadataTarget meta) {
if (meta.isTargetInstanceOf(AbstractAutocomplete.class)) {
if ("autocompleteMethod".equals(name)) {
return new MethodMetadata(attribute, FacesContext.class,
- UIComponent.class, String.class) {
+ UIComponent.class, String.class) {
public void applyMetadata(FaceletContext ctx, Object instance) {
((AbstractAutocomplete)
instance).setAutocompleteMethod(getMethodExpression(ctx));
}
@@ -62,8 +61,8 @@
return new ConverterMetadata(attribute) {
public void applyMetadata(FaceletContext ctx, Object instance) {
((AbstractAutocomplete)
instance).setConverter(this.getConverter(ctx,
- (AbstractAutocomplete) instance,
- this.getAttr().getValueExpression(ctx,
Converter.class)));
+ (AbstractAutocomplete) instance,
+ this.getAttr().getValueExpression(ctx,
Converter.class)));
}
};
}
@@ -72,8 +71,8 @@
return new ConverterMetadata(attribute) {
public void applyMetadata(FaceletContext ctx, Object instance) {
((AbstractAutocomplete)
instance).setItemConverter(this.getConverter(ctx,
- (AbstractAutocomplete) instance,
- this.getAttr().getValueExpression(ctx,
Converter.class)));
+ (AbstractAutocomplete) instance,
+ this.getAttr().getValueExpression(ctx,
Converter.class)));
}
};
}
@@ -85,7 +84,7 @@
};
public AutocompleteHandler(ComponentConfig config) {
- super(config);
+ super(config);
}
@Override
@@ -108,7 +107,7 @@
}
public Converter getConverter(FaceletContext ctx,
- AbstractAutocomplete component, ValueExpression converter) {
+ AbstractAutocomplete component, ValueExpression
converter) {
ValueExpression ve = null;
Converter c = null;
if (converter != null) {
@@ -116,7 +115,7 @@
try {
c = (Converter) ve.getValue(ctx);
} catch (Exception e) {
- // ok
+ // ok
}
}
@@ -124,8 +123,8 @@
c = this.createConverter(ctx, component);
}
if (c == null) {
- // throw new TagException(this.getTag(), "No Converter was
- // created");
+ // throw new TagException(this.getTag(), "No Converter was
+ // created");
}
return c;
}
@@ -135,9 +134,9 @@
}
private Converter createConverter(FaceletContext ctx,
- AbstractAutocomplete component) {
+ AbstractAutocomplete component) {
return ctx.getFacesContext().getApplication().createConverter(
- getConverterId(ctx));
+ getConverterId(ctx));
}
}
Modified: trunk/ui/iteration/api/pom.xml
===================================================================
--- trunk/ui/iteration/api/pom.xml 2010-09-11 09:42:13 UTC (rev 19158)
+++ trunk/ui/iteration/api/pom.xml 2010-09-12 09:15:34 UTC (rev 19159)
@@ -34,6 +34,14 @@
<name>Richfaces UI Components: Iteration API</name>
<packaging>jar</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
<dependencies>
<dependency>
<groupId>org.richfaces.ui.core</groupId>
Modified: trunk/ui/iteration/ui/pom.xml
===================================================================
--- trunk/ui/iteration/ui/pom.xml 2010-09-11 09:42:13 UTC (rev 19158)
+++ trunk/ui/iteration/ui/pom.xml 2010-09-12 09:15:34 UTC (rev 19159)
@@ -53,9 +53,12 @@
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
</plugin>
- </plugins>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ </plugins>
</build>
-
+
<scm>
<
connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/trunk/ui/i...
<
developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/trun...
Modified: trunk/ui/misc/ui/pom.xml
===================================================================
--- trunk/ui/misc/ui/pom.xml 2010-09-11 09:42:13 UTC (rev 19158)
+++ trunk/ui/misc/ui/pom.xml 2010-09-12 09:15:34 UTC (rev 19159)
@@ -40,6 +40,9 @@
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
</plugin>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
</plugins>
</build>
Modified: trunk/ui/output/api/pom.xml
===================================================================
--- trunk/ui/output/api/pom.xml 2010-09-11 09:42:13 UTC (rev 19158)
+++ trunk/ui/output/api/pom.xml 2010-09-12 09:15:34 UTC (rev 19159)
@@ -34,6 +34,14 @@
<name>Richfaces UI Components: Output API</name>
<packaging>jar</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
<dependencies>
<!-- runtime -->
<dependency>
Modified: trunk/ui/output/ui/pom.xml
===================================================================
--- trunk/ui/output/ui/pom.xml 2010-09-11 09:42:13 UTC (rev 19158)
+++ trunk/ui/output/ui/pom.xml 2010-09-12 09:15:34 UTC (rev 19159)
@@ -38,11 +38,10 @@
<build>
<plugins>
<plugin>
- <!-- Checkstyle only required here because suppressions needed -->
- <artifactId>maven-checkstyle-plugin</artifactId>
- <configuration>
-
<suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
- </configuration>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+
<suppressionsLocation>${project.basedir}/richfaces-suppressions.xml</suppressionsLocation>
+ </configuration>
</plugin>
<plugin>
<groupId>org.richfaces.cdk</groupId>
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/behavior/ToggleControl.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/component/behavior/ToggleControl.java 2010-09-11
09:42:13 UTC (rev 19158)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/component/behavior/ToggleControl.java 2010-09-12
09:15:34 UTC (rev 19159)
@@ -125,4 +125,4 @@
// setTargetPanel((String) value);
// }
}
-}
\ No newline at end of file
+}
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelBaseRenderer.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelBaseRenderer.java 2010-09-11
09:42:13 UTC (rev 19158)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelBaseRenderer.java 2010-09-12
09:15:34 UTC (rev 19159)
@@ -21,15 +21,14 @@
package org.richfaces.renderkit.html;
-import java.io.IOException;
+import org.richfaces.component.UIPanel;
+import org.richfaces.renderkit.RendererBase;
import javax.faces.application.ResourceDependency;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
+import java.io.IOException;
-import org.richfaces.component.UIPanel;
-import org.richfaces.renderkit.RendererBase;
-
/**
* @author amarkhel
* @since Jun 14, 2010
@@ -39,12 +38,12 @@
public PanelBaseRenderer() {
}
-
+
public void renderHeaderFacet(FacesContext context, UIComponent component) throws
IOException {
- UIComponent headerFacet = component.getFacet("header");
- headerFacet.encodeAll(context);
+ UIComponent headerFacet = component.getFacet("header");
+ headerFacet.encodeAll(context);
}
-
+
@Override
protected Class<? extends UIComponent> getComponentClass() {
return UIPanel.class;
Modified: trunk/ui/parent/pom.xml
===================================================================
--- trunk/ui/parent/pom.xml 2010-09-11 09:42:13 UTC (rev 19158)
+++ trunk/ui/parent/pom.xml 2010-09-12 09:15:34 UTC (rev 19159)
@@ -71,9 +71,6 @@
<plugins>
<!-- Trigger checkstyle checking for this module -->
<plugin>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.0-beta-1</version>