JBoss Rich Faces SVN: r18803 - in modules/tests/metamer/trunk/ftest-source/src/main: java/org/richfaces/tests/metamer/ftest and 9 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-08-19 07:55:16 -0400 (Thu, 19 Aug 2010)
New Revision: 18803
Added:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jStatus/
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jStatus/StatusAttributes.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jStatus/StatusFacets.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jStatus/TestSimple.java
modules/tests/metamer/trunk/ftest-source/src/main/resources/
modules/tests/metamer/trunk/ftest-source/src/main/resources/org/
modules/tests/metamer/trunk/ftest-source/src/main/resources/org/richfaces/
modules/tests/metamer/trunk/ftest-source/src/main/resources/org/richfaces/tests/
modules/tests/metamer/trunk/ftest-source/src/main/resources/org/richfaces/tests/metamer/
modules/tests/metamer/trunk/ftest-source/src/main/resources/org/richfaces/tests/metamer/ftest/
modules/tests/metamer/trunk/ftest-source/src/main/resources/org/richfaces/tests/metamer/ftest/a4jStatus/
modules/tests/metamer/trunk/ftest-source/src/main/resources/org/richfaces/tests/metamer/ftest/a4jStatus/status-halt.js
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richJQuery/RichJQueryAttributes.java
Log:
a4j:status - simple - basic tests (RFPL-735)
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java 2010-08-19 11:53:51 UTC (rev 18802)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java 2010-08-19 11:55:16 UTC (rev 18803)
@@ -21,8 +21,11 @@
*******************************************************************************/
package org.richfaces.tests.metamer.ftest;
+import org.apache.commons.lang.Validate;
+import org.jboss.test.selenium.dom.Event;
import org.jboss.test.selenium.framework.AjaxSelenium;
import org.jboss.test.selenium.framework.AjaxSeleniumProxy;
+import org.jboss.test.selenium.locator.AttributeLocator;
import org.jboss.test.selenium.locator.ElementLocator;
import org.jboss.test.selenium.locator.JQueryLocator;
@@ -34,12 +37,52 @@
* @version $Revision$
*/
public class AbstractComponentAttributes {
+
+ private Type type;
+
+ public static class Type {
+ public static Type SERVER = new Type();
+ public static Type AJAX = new Type();
+ }
+
+ public AbstractComponentAttributes() {
+ this(Type.SERVER);
+ }
+
+ public AbstractComponentAttributes(Type type) {
+ Validate.notNull(type);
+ this.type = type;
+ }
+
AjaxSelenium selenium = AjaxSeleniumProxy.getInstance();
JQueryLocator propertyLocator = pjq("input[id$={0}Input]");
- protected void setProperty(String propertyName, String value) {
+ protected void setProperty(String propertyName, Object value) {
final ElementLocator<?> locator = propertyLocator.format(propertyName);
- guardHttp(selenium).type(locator, value);
+ final AttributeLocator<?> typeLocator = locator.getAttribute(new org.jboss.test.selenium.locator.Attribute(
+ "type"));
+
+ String inputType = selenium.getAttribute(typeLocator);
+
+ String valueAsString = value.toString();
+ // INPUT TEXT
+ if ("text".equals(inputType)) {
+ if (type == Type.SERVER) {
+ guardHttp(selenium).type(locator, valueAsString);
+ } else if (type == Type.AJAX) {
+ selenium.type(locator, valueAsString);
+ }
+ // INPUT CHECKBOX
+ } else if ("checkbox".equals(inputType)) {
+ boolean checked = Boolean.valueOf(valueAsString);
+
+ if (type == Type.SERVER) {
+ guardHttp(selenium).check(locator, checked);
+ } else if (type == Type.AJAX) {
+ selenium.check(locator, checked);
+ selenium.fireEvent(locator, Event.CHANGE);
+ }
+ }
}
}
Copied: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jStatus/StatusAttributes.java (from rev 18802, modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richJQuery/RichJQueryAttributes.java)
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jStatus/StatusAttributes.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jStatus/StatusAttributes.java 2010-08-19 11:55:16 UTC (rev 18803)
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.ftest.a4jStatus;
+
+import org.jboss.test.selenium.encapsulated.JavaScript;
+import org.richfaces.tests.metamer.ftest.AbstractComponentAttributes;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+public class StatusAttributes extends AbstractComponentAttributes {
+ public void setOnError(JavaScript javaScript) {
+ setProperty("onerror", javaScript.toString());
+ }
+
+ public void setOnStart(JavaScript javaScript) {
+ setProperty("onstart", javaScript.toString());
+ }
+
+ public void setOnStop(JavaScript javaScript) {
+ setProperty("onstop", javaScript.toString());
+ }
+
+ public void setOnSuccess(JavaScript javaScript) {
+ setProperty("onsuccess", javaScript.toString());
+ }
+
+ public void setRendered(boolean rendered) {
+ setProperty("rendered", Boolean.toString(rendered));
+ }
+}
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jStatus/StatusFacets.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jStatus/StatusFacets.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jStatus/StatusFacets.java 2010-08-19 11:55:16 UTC (rev 18803)
@@ -0,0 +1,18 @@
+package org.richfaces.tests.metamer.ftest.a4jStatus;
+
+import org.richfaces.tests.metamer.ftest.AbstractComponentAttributes;
+
+public class StatusFacets extends AbstractComponentAttributes {
+
+ public void setStartText(String startText) {
+ setProperty("facetStartText", startText);
+ }
+
+ public void setStopText(String stopText) {
+ setProperty("facetStopText", stopText);
+ }
+
+ public void setErrorText(String errorText) {
+ setProperty("facetErrorText", errorText);
+ }
+}
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jStatus/TestSimple.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jStatus/TestSimple.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jStatus/TestSimple.java 2010-08-19 11:55:16 UTC (rev 18803)
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.ftest.a4jStatus;
+
+import java.net.URL;
+
+import org.jboss.test.selenium.encapsulated.JavaScript;
+import org.jboss.test.selenium.locator.ElementLocator;
+import org.jboss.test.selenium.locator.JQueryLocator;
+import org.jboss.test.selenium.waiting.retrievers.TextRetriever;
+import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import static org.jboss.test.selenium.utils.URLUtils.*;
+import static org.jboss.test.selenium.encapsulated.JavaScript.js;
+import static org.testng.Assert.*;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+public class TestSimple extends AbstractMetamerTest {
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/a4jStatus/simple.xhtml");
+ }
+
+ StatusAttributes attributes = new StatusAttributes();
+
+ JQueryLocator button1 = pjq("input[id$=button1]");
+ JQueryLocator button2 = pjq("input[id$=button2]");
+ JQueryLocator buttonError = pjq("input[id$=button3]");
+ JQueryLocator status = pjq("span[id$=status]");
+
+ TextRetriever retrieveStatus = retrieveText.locator(status);
+
+ JavaScript extension = JavaScript.fromResource(getClass().getPackage().getName().replaceAll("\\.", "/")
+ + "/status-halt.js");
+
+ @BeforeMethod
+ public void installExtensions() {
+ selenium.getPageExtensions().install();
+ selenium.runScript(extension);
+ }
+
+ @Test
+ public void testRequestButton1() {
+ testRequestButton(button1, "START", "STOP");
+ }
+
+ @Test
+ public void testRequestButton2() {
+ testRequestButton(button2, "START", "STOP");
+ }
+
+ @Test
+ public void testRequestButtonError() {
+ testRequestButton(buttonError, "START", "ERROR");
+ }
+
+ @Test
+ public void testInterleaving() {
+ testRequestButton1();
+ testRequestButtonError();
+ testRequestButton2();
+ testRequestButtonError();
+ testRequestButton1();
+ }
+
+ private void testRequestButton(ElementLocator<?> button, String startText, String stopText) {
+ selenium.click(button);
+ waitForHalt();
+ assertEquals(retrieveStatus.retrieve(), startText);
+ unhalt();
+ waitAjax.waitForChange(startText, retrieveStatus);
+ assertEquals(retrieveStatus.retrieve(), stopText);
+ }
+
+ private void waitForHalt() {
+ selenium.waitForCondition(js("selenium.browserbot.getCurrentWindow().Metamer.halt == true"));
+ }
+
+ private void unhalt() {
+ selenium.getEval(js("selenium.browserbot.getCurrentWindow().Metamer.halt = false"));
+ }
+}
\ No newline at end of file
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richJQuery/RichJQueryAttributes.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richJQuery/RichJQueryAttributes.java 2010-08-19 11:53:51 UTC (rev 18802)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richJQuery/RichJQueryAttributes.java 2010-08-19 11:55:16 UTC (rev 18803)
@@ -41,7 +41,7 @@
setProperty("query", query);
}
- public void setRendered(String rendered) {
+ public void setRendered(boolean rendered) {
setProperty("rendered", rendered);
}
Added: modules/tests/metamer/trunk/ftest-source/src/main/resources/org/richfaces/tests/metamer/ftest/a4jStatus/status-halt.js
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/resources/org/richfaces/tests/metamer/ftest/a4jStatus/status-halt.js (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/resources/org/richfaces/tests/metamer/ftest/a4jStatus/status-halt.js 2010-08-19 11:55:16 UTC (rev 18803)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+var Metamer = {
+ halt : false,
+ callback : null,
+ object : null,
+ content : null,
+ wait : function() {
+ if (Metamer.halt) {
+ setTimeout("Metamer.wait()", 100);
+ } else {
+ Metamer.halt = false;
+ Metamer.callback();
+ }
+ }
+};
+
+Metamer.XHRWrapperInjection = {
+ send : RichFacesSelenium.XHRWrapper.prototype.send
+};
+
+RichFacesSelenium.XHRWrapper.prototype.send = function(content) {
+ Metamer.halt = true;
+ Metamer.object = this;
+ Metamer.content = content;
+ Metamer.callback = function() {
+ Metamer.XHRWrapperInjection.send.call(Metamer.object, Metamer.content);
+ };
+ Metamer.wait();
+};
\ No newline at end of file
15 years, 9 months
JBoss Rich Faces SVN: r18802 - in modules/tests/metamer/trunk/application/src/main: webapp/components/a4jStatus and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-08-19 07:53:51 -0400 (Thu, 19 Aug 2010)
New Revision: 18802
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JStatusBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jStatus/simple.xhtml
Log:
a4j:status - added IDs for facets output + hide attributes converter, localValue, value (RFPL-735)
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JStatusBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JStatusBean.java 2010-08-19 11:53:09 UTC (rev 18801)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JStatusBean.java 2010-08-19 11:53:51 UTC (rev 18802)
@@ -62,6 +62,11 @@
attributes = Attributes.getUIComponentAttributes(UIStatus.class, getClass());
attributes.setAttribute("rendered", true);
+
+ // hidden attributes
+ attributes.remove("converter");
+ attributes.remove("localValue");
+ attributes.remove("value");
}
public Attributes getAttributes() {
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jStatus/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jStatus/simple.xhtml 2010-08-19 11:53:09 UTC (rev 18801)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jStatus/simple.xhtml 2010-08-19 11:53:51 UTC (rev 18802)
@@ -41,13 +41,13 @@
<legend>Facets Settings</legend>
<h:panelGrid id="facetsSettings" columns="2">
<h:outputText value="Facet Start: " />
- <h:inputText value="#{a4jStatusBean.facetStartValue}" />
+ <h:inputText id="facetStartTextInput" value="#{a4jStatusBean.facetStartValue}" />
<h:outputText value="Facet Stop: " />
- <h:inputText value="#{a4jStatusBean.facetStopValue}" />
+ <h:inputText id="facetStopTextInput" value="#{a4jStatusBean.facetStopValue}" />
<h:outputText value="Facet Error: " />
- <h:inputText value="#{a4jStatusBean.facetErrorValue}" />
+ <h:inputText id="facetErrorTextInput" value="#{a4jStatusBean.facetErrorValue}" />
<a4j:commandButton id="apply" value="Apply instantly" render="status,facetGrid" execute="facetGrid" />
</h:panelGrid>
15 years, 9 months
JBoss Rich Faces SVN: r18801 - in modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest: richJQuery and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-08-19 07:53:09 -0400 (Thu, 19 Aug 2010)
New Revision: 18801
Added:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richJQuery/
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richJQuery/RichJQueryAttributes.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richJQuery/TestTiming.java
Log:
stub for testing rich:jQuery (RFPL-668)
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java 2010-08-19 11:53:09 UTC (rev 18801)
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.ftest;
+
+import org.jboss.test.selenium.framework.AjaxSelenium;
+import org.jboss.test.selenium.framework.AjaxSeleniumProxy;
+import org.jboss.test.selenium.locator.ElementLocator;
+import org.jboss.test.selenium.locator.JQueryLocator;
+
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardHttp;
+import static org.richfaces.tests.metamer.ftest.AbstractMetamerTest.pjq;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+public class AbstractComponentAttributes {
+ AjaxSelenium selenium = AjaxSeleniumProxy.getInstance();
+
+ JQueryLocator propertyLocator = pjq("input[id$={0}Input]");
+
+ protected void setProperty(String propertyName, String value) {
+ final ElementLocator<?> locator = propertyLocator.format(propertyName);
+ guardHttp(selenium).type(locator, value);
+ }
+}
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richJQuery/RichJQueryAttributes.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richJQuery/RichJQueryAttributes.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richJQuery/RichJQueryAttributes.java 2010-08-19 11:53:09 UTC (rev 18801)
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.ftest.richJQuery;
+
+import org.richfaces.component.JQueryTiming;
+import org.richfaces.tests.metamer.ftest.AbstractComponentAttributes;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+public class RichJQueryAttributes extends AbstractComponentAttributes {
+ public void setAttachType(String attachType) {
+ setProperty("attachType", attachType);
+ }
+
+ public void setEvent(String event) {
+ setProperty("event", event);
+ }
+
+ public void setQuery(String query) {
+ setProperty("query", query);
+ }
+
+ public void setRendered(String rendered) {
+ setProperty("rendered", rendered);
+ }
+
+ public void setSelector(String selector) {
+ setProperty("selector", selector);
+ }
+
+ public void setTiming(JQueryTiming timing) {
+ setProperty("timing", timing.toString());
+ }
+}
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richJQuery/TestTiming.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richJQuery/TestTiming.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richJQuery/TestTiming.java 2010-08-19 11:53:09 UTC (rev 18801)
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.ftest.richJQuery;
+
+import java.net.URL;
+
+import org.jboss.test.selenium.locator.JQueryLocator;
+import org.richfaces.component.JQueryTiming;
+import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
+import org.testng.annotations.Test;
+
+import static org.jboss.test.selenium.utils.URLUtils.*;
+import static org.jboss.test.selenium.locator.LocatorFactory.*;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+public class TestTiming extends AbstractMetamerTest {
+
+ JQueryLocator button = jq("#jQueryTestButton");
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/richJQuery/simple.xhtml");
+ }
+
+ RichJQueryAttributes attributes = new RichJQueryAttributes();
+
+ @Test
+ public void testImmediate() {
+ attributes.setTiming(JQueryTiming.immediate);
+ }
+}
\ No newline at end of file
15 years, 9 months
JBoss Rich Faces SVN: r18800 - trunk/ui/input/ui/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-08-19 07:49:41 -0400 (Thu, 19 Aug 2010)
New Revision: 18800
Modified:
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InputNumberSliderRendererBase.java
Log:
Removed unnecessary null check in inputNumberSlider
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InputNumberSliderRendererBase.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InputNumberSliderRendererBase.java 2010-08-19 11:49:08 UTC (rev 18799)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InputNumberSliderRendererBase.java 2010-08-19 11:49:41 UTC (rev 18800)
@@ -33,10 +33,6 @@
protected boolean isInputPosition(UIComponent component, String name) {
InputNumberSliderInputPosition type = (InputNumberSliderInputPosition) component.getAttributes().get("inputPosition");
- if (type == null) {
- type = InputNumberSliderInputPosition.DEFAULT;
- }
-
return type == InputNumberSliderInputPosition.valueOf(name);
}
15 years, 9 months
JBoss Rich Faces SVN: r18799 - in trunk/ui/core/ui/src/main/java/org/richfaces: renderkit and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-08-19 07:49:08 -0400 (Thu, 19 Aug 2010)
New Revision: 18799
Modified:
trunk/ui/core/ui/src/main/java/org/richfaces/component/AbstractAjaxLog.java
trunk/ui/core/ui/src/main/java/org/richfaces/renderkit/LogRendererBase.java
Log:
logMode attribute default value set via CDK
Modified: trunk/ui/core/ui/src/main/java/org/richfaces/component/AbstractAjaxLog.java
===================================================================
--- trunk/ui/core/ui/src/main/java/org/richfaces/component/AbstractAjaxLog.java 2010-08-19 11:28:57 UTC (rev 18798)
+++ trunk/ui/core/ui/src/main/java/org/richfaces/component/AbstractAjaxLog.java 2010-08-19 11:49:08 UTC (rev 18799)
@@ -63,6 +63,7 @@
@Attribute(defaultValue = "")
public abstract String getStyleClass();
+ @Attribute(defaultValue = "LogMode.DEFAULT")
public abstract LogMode getMode();
// public abstract String getHotkey();
Modified: trunk/ui/core/ui/src/main/java/org/richfaces/renderkit/LogRendererBase.java
===================================================================
--- trunk/ui/core/ui/src/main/java/org/richfaces/renderkit/LogRendererBase.java 2010-08-19 11:28:57 UTC (rev 18798)
+++ trunk/ui/core/ui/src/main/java/org/richfaces/renderkit/LogRendererBase.java 2010-08-19 11:49:08 UTC (rev 18799)
@@ -32,10 +32,6 @@
protected boolean isInline(Object attributeValue) {
LogMode mode = (LogMode) attributeValue;
- if (mode == null) {
- mode = LogMode.DEFAULT;
- }
-
return mode == LogMode.inline;
}
15 years, 9 months
JBoss Rich Faces SVN: r18798 - trunk/examples/richfaces-showcase/src/main/webapp/richfaces/autocomplete/samples.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-08-19 07:28:57 -0400 (Thu, 19 Aug 2010)
New Revision: 18798
Modified:
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/autocomplete/samples/cachedAjax-sample.xhtml
Log:
syntax error in attribute name corrected.
Modified: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/autocomplete/samples/cachedAjax-sample.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/autocomplete/samples/cachedAjax-sample.xhtml 2010-08-19 10:42:19 UTC (rev 18797)
+++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/autocomplete/samples/cachedAjax-sample.xhtml 2010-08-19 11:28:57 UTC (rev 18798)
@@ -13,7 +13,7 @@
<p>Autocomplete without direct suggestions to input(<b>autoFill="false"</b>). Also in the sample comma and space are input <b>tokens</b>, so separate
autocompletion requests will be fired for different parts in input</p>
<h:form>
- <rich:autocomplete mode="cachedAjax" tokens=", " autoFill="false"
+ <rich:autocomplete mode="cachedAjax" tokens=", " autofill="false"
autocompleteMethod="#{autocompleteBean.autocomplete}" />
</h:form>
<p>In that sample <b>selectFirst</b> set to false so pressing enter will not choose the value from list
15 years, 9 months
JBoss Rich Faces SVN: r18797 - trunk/ui/core/ui/src/main/java/org/ajax4jsf/component/behavior.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-08-19 06:42:19 -0400 (Thu, 19 Aug 2010)
New Revision: 18797
Modified:
trunk/ui/core/ui/src/main/java/org/ajax4jsf/component/behavior/MethodExpressionAjaxBehaviorListener.java
Log:
https://jira.jboss.org/browse/RF-9095
Modified: trunk/ui/core/ui/src/main/java/org/ajax4jsf/component/behavior/MethodExpressionAjaxBehaviorListener.java
===================================================================
--- trunk/ui/core/ui/src/main/java/org/ajax4jsf/component/behavior/MethodExpressionAjaxBehaviorListener.java 2010-08-19 09:18:01 UTC (rev 18796)
+++ trunk/ui/core/ui/src/main/java/org/ajax4jsf/component/behavior/MethodExpressionAjaxBehaviorListener.java 2010-08-19 10:42:19 UTC (rev 18797)
@@ -23,7 +23,6 @@
package org.ajax4jsf.component.behavior;
import javax.el.ELContext;
-import javax.el.ELException;
import javax.el.MethodExpression;
import javax.el.MethodNotFoundException;
import javax.faces.component.StateHolder;
@@ -67,36 +66,14 @@
public void processAjaxBehavior(AjaxBehaviorEvent event) throws AbortProcessingException {
- Throwable cause = null;
- Throwable thrown = null;
-
- if (event == null) {
- throw new NullPointerException();
- }
-
FacesContext context = FacesContext.getCurrentInstance();
ELContext elContext = context.getELContext();
+
try {
methodExpressionZeroArg.invoke(elContext, new Object[] {});
} catch (MethodNotFoundException mnfe) {
- if (null != methodExpressionOneArg) {
-
- try {
- methodExpressionOneArg.invoke(elContext, new Object[] { event});
- } catch (ELException ee) {
- cause = ee.getCause();
- thrown = ee;
- }
- }
- } catch (ELException ee) {
- cause = ee.getCause();
- thrown = ee;
- }
-
- if (null != thrown) {
- throw cause == null ? new AbortProcessingException(thrown.getMessage(), thrown)
- : new AbortProcessingException(thrown.getMessage(), cause);
- }
+ methodExpressionOneArg.invoke(elContext, new Object[] { event});
+ }
}
public boolean isTransient() {
15 years, 9 months
JBoss Rich Faces SVN: r18796 - in branches: RF-7939-showcase and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-08-19 05:18:01 -0400 (Thu, 19 Aug 2010)
New Revision: 18796
Added:
branches/RF-7939-showcase/
branches/RF-7939-showcase/src/main/java-gae-jsf-ri/
branches/RF-7939-showcase/src/main/java-gae-jsf-ri/com/
branches/RF-7939-showcase/src/main/resources/logging.properties
branches/RF-7939-showcase/src/main/webapp-gae/
branches/RF-7939-showcase/src/main/webapp-gae/WEB-INF/
branches/RF-7939-showcase/src/main/webapp-gae/WEB-INF/appengine-web.xml
branches/RF-7939-showcase/src/main/webapp-gae/WEB-INF/web.xml
Modified:
branches/RF-7939-showcase/pom.xml
branches/RF-7939-showcase/src/main/webapp/WEB-INF/web.xml
Log:
GAE preparation work for richfaces-showcase initial check-in
Copied: branches/RF-7939-showcase (from rev 18794, trunk/examples/richfaces-showcase)
Modified: branches/RF-7939-showcase/pom.xml
===================================================================
--- trunk/examples/richfaces-showcase/pom.xml 2010-08-19 07:44:52 UTC (rev 18794)
+++ branches/RF-7939-showcase/pom.xml 2010-08-19 09:18:01 UTC (rev 18796)
@@ -1,295 +1,428 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
+ <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.richfaces</groupId>
- <artifactId>richfaces-parent</artifactId>
- <version>10-SNAPSHOT</version>
- </parent>
+ <parent>
+ <groupId>org.richfaces</groupId>
+ <artifactId>richfaces-parent</artifactId>
+ <version>10-SNAPSHOT</version>
+ </parent>
- <groupId>org.richfaces.examples</groupId>
- <artifactId>richfaces-showcase</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- <packaging>war</packaging>
- <name>Richfaces Examples: Richfaces Showcase Application</name>
+ <groupId>org.richfaces.examples</groupId>
+ <artifactId>richfaces-showcase</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <packaging>war</packaging>
+ <name>Richfaces Examples: Richfaces Showcase Application</name>
- <properties>
- <!-- FIXME these should be through the richfaces-parent -->
- <snapshotRepository>dav:https://repository.jboss.org/nexus/content/repositories/snapshots/</snapshotRepository>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+ <properties>
+ <!-- FIXME these should be through the richfaces-parent -->
+ <snapshotRepository>dav:https://repository.jboss.org/nexus/content/repositories/snapshots/</snapshotRepository>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
- <jetty.port>8080</jetty.port>
- <richfaces.checkstyle.version>1</richfaces.checkstyle.version>
- <org.richfaces.bom.version>4.0.0-SNAPSHOT</org.richfaces.bom.version>
- </properties>
+ <jetty.port>8080</jetty.port>
+ <richfaces.checkstyle.version>1</richfaces.checkstyle.version>
+ <org.richfaces.bom.version>4.0.0-SNAPSHOT</org.richfaces.bom.version>
+ </properties>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>richfaces-bom</artifactId>
- <version>${org.richfaces.bom.version}</version>
- <scope>import</scope>
- <type>pom</type>
- </dependency>
- </dependencies>
- </dependencyManagement>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces</groupId>
+ <artifactId>richfaces-bom</artifactId>
+ <version>${org.richfaces.bom.version}</version>
+ <scope>import</scope>
+ <type>pom</type>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.richfaces.ui</groupId>
- <artifactId>richfaces-components-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.richfaces.ui</groupId>
- <artifactId>richfaces-components-ui</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-api</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-impl</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>jsp-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
- </dependency>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-components-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-components-ui</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ </dependency>
- <dependency>
- <groupId>net.sf.ehcache</groupId>
- <artifactId>ehcache</artifactId>
- </dependency>
+ <dependency>
+ <groupId>net.sf.ehcache</groupId>
+ <artifactId>ehcache</artifactId>
+ </dependency>
- <!--
- simple logger binding: only messages of level INFO and higher are
- printed
- -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.5.8</version>
- </dependency>
+ <!-- simple logger binding: only messages of level INFO and higher
+ are printed -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.5.8</version>
+ </dependency>
- <!-- Log4J dependency used in examples -->
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.14</version>
- </dependency>
- </dependencies>
+ <!-- Log4J dependency used in examples -->
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ </dependency>
+ </dependencies>
- <build>
- <finalName>richfaces-showcase</finalName>
+ <build>
+ <finalName>richfaces-showcase</finalName>
- <plugins>
- <plugin>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>maven-jetty-plugin</artifactId>
- <version>6.1.18</version>
- <configuration>
- <scanIntervalSeconds>10</scanIntervalSeconds>
- <connectors>
- <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
- <port>${jetty.port}</port>
- <maxIdleTime>60000</maxIdleTime>
- </connector>
- </connectors>
- <webResources>
- <resource>
- <directory>${basedir}/src/main/java</directory>
- <targetPath>/WEB-INF/src</targetPath>
- </resource>
- </webResources>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-war-plugin</artifactId>
- <configuration>
- <webResources>
- <resource>
- <directory>${basedir}/src/main/java</directory>
- <targetPath>/WEB-INF/src</targetPath>
- </resource>
- </webResources>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ <version>6.1.18</version>
+ <configuration>
+ <scanIntervalSeconds>10</scanIntervalSeconds>
+ <connectors>
+ <connector
+ implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+ <port>${jetty.port}</port>
+ <maxIdleTime>60000</maxIdleTime>
+ </connector>
+ </connectors>
+ <webResources>
+ <resource>
+ <directory>${basedir}/src/main/java</directory>
+ <targetPath>/WEB-INF/src</targetPath>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <webResources>
+ <resource>
+ <directory>${basedir}/src/main/java</directory>
+ <targetPath>/WEB-INF/src</targetPath>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
- <profiles>
- <profile>
- <id>jdk5</id>
- <activation>
- <jdk>1.5</jdk>
- </activation>
- <dependencies>
- <dependency>
- <groupId>javax.xml.bind</groupId>
- <artifactId>jaxb-api</artifactId>
- <version>2.2</version>
- </dependency>
- </dependencies>
- </profile>
- <profile>
- <id>release</id>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-war-plugin</artifactId>
- <executions>
- <execution>
- <id>jee6</id>
- <phase>package</phase>
- <goals>
- <goal>war</goal>
- </goals>
- <configuration>
- <webappDirectory>${project.build.directory}/${project.build.finalName}-jee6</webappDirectory>
- <classifier>jee6</classifier>
- <packagingExcludes>WEB-INF/lib/jsf-api*,WEB-INF/lib/jsf-impl*,WEB-INF/lib/jta-*,WEB-INF/lib/jstl-*</packagingExcludes>
- <warSourceExcludes>WEB-INF/lib/jsf-api*,WEB-INF/lib/jsf-impl*,WEB-INF/lib/jta-*,WEB-INF/lib/jstl-*</warSourceExcludes>
- <webResources>
- <resource>
- <directory>${basedir}/src/main/java</directory>
- <targetPath>/WEB-INF/src</targetPath>
- </resource>
- </webResources>
- </configuration>
- </execution>
- </executions>
- <configuration>
- <classifier>tomcat6</classifier>
- <webResources>
- <resource>
- <directory>${basedir}/src/main/java</directory>
- <targetPath>/WEB-INF/src</targetPath>
- </resource>
- </webResources>
- </configuration>
- </plugin>
+ <profiles>
+ <profile>
+ <id>gae</id>
+ <dependencies>
+ <dependency>
+ <groupId>net.sf.ehcache</groupId>
+ <artifactId>ehcache</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>el-impl</groupId>
+ <artifactId>el-impl</artifactId>
+ <scope>runtime</scope>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jta_1.1_spec</artifactId>
+ <version>1.1.1</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jpa_3.0_spec</artifactId>
+ <version>1.1.1</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>xalan</groupId>
+ <artifactId>xalan</artifactId>
+ <version>2.7.1</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.9.1</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-source</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>src/main/java-gae-jsf-ri</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <webResources>
+ <resource>
+ <directory>src/main/webapp-gae</directory>
+ </resource>
+ <resource>
+ <directory>src/main/webapp</directory>
+ </resource>
+ <resource>
+ <directory>${project.build.directory}/generated-resources</directory>
+ <targetPath>static-resources</targetPath>
+ </resource>
+ <resource>
+ <directory>${basedir}/src/main/java</directory>
+ <targetPath>/WEB-INF/src</targetPath>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <configuration>
+ </configuration>
+ <executions>
+ <execution>
+ <id>process</id>
+ <goals>
+ <goal>process</goal>
+ </goals>
+ <configuration>
+ <outputDir>generated-resources</outputDir>
+ <skins>
+ <skin>blueSky</skin>
+ <skin>classic</skin>
+ <skin>deepMarine</skin>
+ <skin>emeraldTown</skin>
+ <skin>japanCherry</skin>
+ <skin>ruby</skin>
+ <skin>wine</skin>
+ </skins>
+ <includedContentTypes>
+ <include>application/javascript</include>
+ <include>text/css</include>
+ <include>image/.+</include>
+ </includedContentTypes>
+ <fileNameMappings>
+ <property>
+ <name>^\Qorg.richfaces.renderkit.html\E</name>
+ <value>org.richfaces/images</value>
+ </property>
+ <property>
+ <name>^\Qorg.richfaces.renderkit.html.images\E</name>
+ <value>org.richfaces/images</value>
+ </property>
+ <property>
+ <name>^css/</name>
+ <value>org.richfaces/css/</value>
+ </property>
+ </fileNameMappings>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>jdk5</id>
+ <activation>
+ <jdk>1.5</jdk>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <version>2.2</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>release</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>jee6</id>
+ <phase>package</phase>
+ <goals>
+ <goal>war</goal>
+ </goals>
+ <configuration>
+ <webappDirectory>${project.build.directory}/${project.build.finalName}-jee6</webappDirectory>
+ <classifier>jee6</classifier>
+ <packagingExcludes>WEB-INF/lib/jsf-api*,WEB-INF/lib/jsf-impl*,WEB-INF/lib/jta-*,WEB-INF/lib/jstl-*</packagingExcludes>
+ <warSourceExcludes>WEB-INF/lib/jsf-api*,WEB-INF/lib/jsf-impl*,WEB-INF/lib/jta-*,WEB-INF/lib/jstl-*</warSourceExcludes>
+ <webResources>
+ <resource>
+ <directory>${basedir}/src/main/java</directory>
+ <targetPath>/WEB-INF/src</targetPath>
+ </resource>
+ </webResources>
+ </configuration>
+ </execution>
+ </executions>
+ <configuration>
+ <classifier>tomcat6</classifier>
+ <webResources>
+ <resource>
+ <directory>${basedir}/src/main/java</directory>
+ <targetPath>/WEB-INF/src</targetPath>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <executions>
- <execution>
- <id>group-sources</id>
- <goals>
- <goal>single</goal>
- </goals>
- <phase>package</phase>
- <configuration>
- <finalName>sources</finalName>
- <descriptor>assembler.xml</descriptor>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>jar</goal>
- </goals>
- <phase>package</phase>
- <configuration>
- <classesDirectory>${basedir}/target/sources/sources</classesDirectory>
- <classifier>sources</classifier>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>jee6</id>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-war-plugin</artifactId>
- <configuration>
- <webappDirectory>${project.build.directory}/${project.build.finalName}-jee6</webappDirectory>
- <webResources>
- <resource>
- <directory>${basedir}/src/main/java</directory>
- <targetPath>/WEB-INF/src</targetPath>
- </resource>
- </webResources>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>group-sources</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <finalName>sources</finalName>
+ <descriptor>assembler.xml</descriptor>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <classesDirectory>${basedir}/target/sources/sources</classesDirectory>
+ <classifier>sources</classifier>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>jee6</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <webappDirectory>${project.build.directory}/${project.build.finalName}-jee6</webappDirectory>
+ <webResources>
+ <resource>
+ <directory>${basedir}/src/main/java</directory>
+ <targetPath>/WEB-INF/src</targetPath>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
- <dependencies>
- <dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-impl</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.transaction</groupId>
- <artifactId>jta</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
- <scope>provided</scope>
- </dependency>
- </dependencies>
- </profile>
- </profiles>
+ <dependencies>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ <version>1.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
- <repositories>
- <!-- FIXME - This should be set globally in parent -->
- <repository>
- <id>maven-repository2.dev.java.net</id>
- <name>Java.net Repository for Maven 2</name>
- <url>http://download.java.net/maven/2</url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </repository>
- </repositories>
+ <repositories>
+ <!-- FIXME - This should be set globally in parent -->
+ <repository>
+ <id>maven-repository2.dev.java.net</id>
+ <name>Java.net Repository for Maven 2</name>
+ <url>http://download.java.net/maven/2</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/trunk/examples/richfaces...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/trunk/examples/richfaces-sh...</developerConnection>
- <url>http://fisheye.jboss.org/browse/richfaces</url>
- </scm>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/trunk/examples/richfaces...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/trunk/examples/richfaces-sh...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces</url>
+ </scm>
</project>
Copied: branches/RF-7939-showcase/src/main/java-gae-jsf-ri/com (from rev 18772, sandbox/trunk/examples/richfaces-showcase-gae/src/main/java/com)
Added: branches/RF-7939-showcase/src/main/resources/logging.properties
===================================================================
--- branches/RF-7939-showcase/src/main/resources/logging.properties (rev 0)
+++ branches/RF-7939-showcase/src/main/resources/logging.properties 2010-08-19 09:18:01 UTC (rev 18796)
@@ -0,0 +1,28 @@
+# A default java.util.logging configuration.
+# (All App Engine logging is through java.util.logging by default).
+#
+# To use this configuration, copy it into your application's WEB-INF
+# folder and add the following to your appengine-web.xml:
+#
+# <system-properties>
+# <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
+# </system-properties>
+#
+
+# Set the default logging level for all loggers to WARNING
+.level = WARNING
+
+# Set the default logging level for ORM, specifically, to WARNING
+DataNucleus.JDO.level=WARNING
+DataNucleus.Persistence.level=WARNING
+DataNucleus.Cache.level=WARNING
+DataNucleus.MetaData.level=WARNING
+DataNucleus.General.level=WARNING
+DataNucleus.Utility.level=WARNING
+DataNucleus.Transaction.level=WARNING
+DataNucleus.Datastore.level=WARNING
+DataNucleus.ClassLoading.level=WARNING
+DataNucleus.Plugin.level=WARNING
+DataNucleus.ValueGeneration.level=WARNING
+DataNucleus.Enhancer.level=WARNING
+DataNucleus.SchemaTool.level=WARNING
Modified: branches/RF-7939-showcase/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/WEB-INF/web.xml 2010-08-19 07:44:52 UTC (rev 18794)
+++ branches/RF-7939-showcase/src/main/webapp/WEB-INF/web.xml 2010-08-19 09:18:01 UTC (rev 18796)
@@ -1,49 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
-<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="richfaces-showcase" version="2.5">
- <display-name>richfaces-showcase</display-name>
- <welcome-file-list>
- <welcome-file>index.html</welcome-file>
- <welcome-file>index.htm</welcome-file>
- <welcome-file>index.jsp</welcome-file>
- <welcome-file>default.html</welcome-file>
- <welcome-file>default.htm</welcome-file>
- <welcome-file>default.jsp</welcome-file>
- </welcome-file-list>
- <context-param>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ id="richfaces-showcase" version="2.5">
+ <display-name>richfaces-showcase</display-name>
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ <welcome-file>index.htm</welcome-file>
+ <welcome-file>index.jsp</welcome-file>
+ <welcome-file>default.html</welcome-file>
+ <welcome-file>default.htm</welcome-file>
+ <welcome-file>default.jsp</welcome-file>
+ </welcome-file-list>
+ <context-param>
<param-name>javax.faces.FACELETS_LIBRARIES</param-name>
<param-value>/WEB-INF/app-tags.taglib.xml</param-value>
</context-param>
- <context-param>
- <param-name>org.richfaces.enableControlSkinning</param-name>
- <param-value>true</param-value>
- </context-param>
- <context-param>
- <param-name>org.richfaces.enableControlSkinningClasses</param-name>
- <param-value>false</param-value>
- </context-param>
- <context-param>
- <param-name>org.richfaces.skin</param-name>
- <param-value>#{skinBean.skin}</param-value>
- </context-param>
- <context-param>
- <param-name>javax.faces.PROJECT_STAGE</param-name>
- <param-value>Development</param-value>
- </context-param>
- <context-param>
- <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
- <param-value>server</param-value>
- </context-param>
- <servlet>
- <servlet-name>Faces Servlet</servlet-name>
- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>*.jsf</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>/faces/*</url-pattern>
- </servlet-mapping>
+ <context-param>
+ <param-name>org.richfaces.enableControlSkinning</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.enableControlSkinningClasses</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.skin</param-name>
+ <param-value>#{skinBean.skin}</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.PROJECT_STAGE</param-name>
+ <param-value>Development</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
</web-app>
\ No newline at end of file
Copied: branches/RF-7939-showcase/src/main/webapp-gae/WEB-INF/appengine-web.xml (from rev 18768, sandbox/trunk/examples/richfaces-showcase-gae/src/main/webapp/WEB-INF/appengine-web.xml)
===================================================================
--- branches/RF-7939-showcase/src/main/webapp-gae/WEB-INF/appengine-web.xml (rev 0)
+++ branches/RF-7939-showcase/src/main/webapp-gae/WEB-INF/appengine-web.xml 2010-08-19 09:18:01 UTC (rev 18796)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
+ <application>richfaces-showcase-gae</application>
+ <version>11</version>
+ <sessions-enabled>true</sessions-enabled>
+
+ <system-properties>
+ <property name="java.util.logging.config.file" value="WEB-INF/classes/logging.properties"/>
+ </system-properties>
+
+</appengine-web-app>
Added: branches/RF-7939-showcase/src/main/webapp-gae/WEB-INF/web.xml
===================================================================
--- branches/RF-7939-showcase/src/main/webapp-gae/WEB-INF/web.xml (rev 0)
+++ branches/RF-7939-showcase/src/main/webapp-gae/WEB-INF/web.xml 2010-08-19 09:18:01 UTC (rev 18796)
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ id="richfaces-showcase" version="2.5">
+ <display-name>richfaces-showcase-gae</display-name>
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ <welcome-file>index.htm</welcome-file>
+ <welcome-file>index.jsp</welcome-file>
+ <welcome-file>default.html</welcome-file>
+ <welcome-file>default.htm</welcome-file>
+ <welcome-file>default.jsp</welcome-file>
+ </welcome-file-list>
+ <context-param>
+ <param-name>javax.faces.FACELETS_LIBRARIES</param-name>
+ <param-value>/WEB-INF/app-tags.taglib.xml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.enableControlSkinning</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.enableControlSkinningClasses</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.skin</param-name>
+ <param-value>#{skinBean.skin}</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.PROJECT_STAGE</param-name>
+ <param-value>Development</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.staticResourceLocation</param-name>
+ <param-value>#{facesContext.externalContext.requestContextPath}/static-resources/#{resourceLocation}</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>org.ajax4jsf.cache.CACHE_MANAGER_FACTORY_CLASS</param-name>
+ <param-value>org.ajax4jsf.cache.lru.LRUMapCacheFactory</param-value>
+ </context-param>
+
+ <context-param>
+ <description>
+ Set this flag to true if you want the JavaServer Faces
+ Reference Implementation to validate the XML in your
+ faces-config.xml resources against the DTD. Default
+ value is false.
+ </description>
+ <param-name>com.sun.faces.validateXml</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <!-- ***** Accommodate Single-Threaded Requirement of Google AppEngine -->
+ <context-param>
+ <description>
+ When enabled, the runtime initialization and default ResourceHandler
+ implementation will use threads to perform their functions. Set this
+ value to false if threads aren't desired (as in the case of running
+ within the Google Application Engine).
+
+ Note that when this option is disabled, the ResourceHandler will not
+ pick up new versions of resources when ProjectStage is development.
+ </description>
+ <param-name>com.sun.faces.enableThreading</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.expressionFactory</param-name>
+ <param-value>com.sun.el.ExpressionFactoryImpl</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.executeAWTInitializer</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
15 years, 9 months
JBoss Rich Faces SVN: r18795 - in trunk/cdk/maven-resources-plugin/src/main/java/org/richfaces/cdk/resource: writer/impl and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-08-19 05:14:23 -0400 (Thu, 19 Aug 2010)
New Revision: 18795
Modified:
trunk/cdk/maven-resources-plugin/src/main/java/org/richfaces/cdk/resource/scan/impl/reflections/ReflectionsExt.java
trunk/cdk/maven-resources-plugin/src/main/java/org/richfaces/cdk/resource/writer/impl/JavaScriptResourceProcessor.java
trunk/cdk/maven-resources-plugin/src/main/java/org/richfaces/cdk/resource/writer/impl/MavenLogErrorReporter.java
Log:
Maven resources plugin:
- fixed CNFE
- improved JavaScript compressor logging better in multi-threded envs.
Modified: trunk/cdk/maven-resources-plugin/src/main/java/org/richfaces/cdk/resource/scan/impl/reflections/ReflectionsExt.java
===================================================================
--- trunk/cdk/maven-resources-plugin/src/main/java/org/richfaces/cdk/resource/scan/impl/reflections/ReflectionsExt.java 2010-08-19 07:44:52 UTC (rev 18794)
+++ trunk/cdk/maven-resources-plugin/src/main/java/org/richfaces/cdk/resource/scan/impl/reflections/ReflectionsExt.java 2010-08-19 09:14:23 UTC (rev 18795)
@@ -30,6 +30,9 @@
import org.reflections.scanners.Scanner;
import org.reflections.util.Utils;
+import com.google.common.base.Function;
+import com.google.common.base.Predicates;
+import com.google.common.collect.Collections2;
import com.google.common.collect.Multimap;
/**
@@ -38,6 +41,22 @@
*/
public class ReflectionsExt extends Reflections {
+ private static final Function<String, Class<?>> CLASS_FOR_NAME = new Function<String, Class<?>>() {
+ public java.lang.Class<?> apply(String from) {
+ try {
+ return Class.forName(from, true, Utils.getContextClassLoader());
+ } catch (ClassNotFoundException e) {
+ // TODO: handle exception
+ e.printStackTrace();
+ } catch (LinkageError e) {
+ // TODO: handle exception
+ e.printStackTrace();
+ }
+
+ return null;
+ };
+ };
+
public ReflectionsExt() {
super();
}
@@ -56,7 +75,9 @@
if (scannerMMap == null) {
return Collections.emptySet();
}
- return Utils.forNames(scannerMMap.get(MarkerResourcesScanner.STORE_KEY));
+
+ return Collections2.filter(Collections2.transform(scannerMMap.get(MarkerResourcesScanner.STORE_KEY), CLASS_FOR_NAME),
+ Predicates.notNull());
}
}
Modified: trunk/cdk/maven-resources-plugin/src/main/java/org/richfaces/cdk/resource/writer/impl/JavaScriptResourceProcessor.java
===================================================================
--- trunk/cdk/maven-resources-plugin/src/main/java/org/richfaces/cdk/resource/writer/impl/JavaScriptResourceProcessor.java 2010-08-19 07:44:52 UTC (rev 18794)
+++ trunk/cdk/maven-resources-plugin/src/main/java/org/richfaces/cdk/resource/writer/impl/JavaScriptResourceProcessor.java 2010-08-19 09:14:23 UTC (rev 18795)
@@ -49,8 +49,16 @@
@Override
protected void doActualProcess(String resourceName, Reader in, Writer out) throws IOException {
- MavenLogErrorReporter reporter = new MavenLogErrorReporter(log, resourceName);
+ MavenLogErrorReporter reporter = new MavenLogErrorReporter(resourceName);
new JavaScriptCompressor(in, reporter).compress(out, 0, true, true, false, false);
+
+ if (reporter.hasErrors()) {
+ log.error(reporter.getErrorsLog());
+ }
+
+ if (reporter.hasWarnings()) {
+ log.warn(reporter.getWarningsLog());
+ }
}
}
Modified: trunk/cdk/maven-resources-plugin/src/main/java/org/richfaces/cdk/resource/writer/impl/MavenLogErrorReporter.java
===================================================================
--- trunk/cdk/maven-resources-plugin/src/main/java/org/richfaces/cdk/resource/writer/impl/MavenLogErrorReporter.java 2010-08-19 07:44:52 UTC (rev 18794)
+++ trunk/cdk/maven-resources-plugin/src/main/java/org/richfaces/cdk/resource/writer/impl/MavenLogErrorReporter.java 2010-08-19 09:14:23 UTC (rev 18795)
@@ -24,7 +24,6 @@
import java.text.MessageFormat;
-import org.apache.maven.plugin.logging.Log;
import org.mozilla.javascript.ErrorReporter;
import org.mozilla.javascript.EvaluatorException;
@@ -38,11 +37,12 @@
private String resourceName;
- private Log log;
+ private StringBuilder errorMessages = new StringBuilder();
- public MavenLogErrorReporter(Log log, String resourceName) {
+ private StringBuilder warningMessages = new StringBuilder();
+
+ public MavenLogErrorReporter(String resourceName) {
super();
- this.log = log;
this.resourceName = resourceName;
}
@@ -55,7 +55,8 @@
@Override
public void warning(String message, String sourceName, int line, String lineSource, int lineOffset) {
- log.warn(formatMessage(message, sourceName, line, lineSource, lineOffset));
+ warningMessages.append(formatMessage(message, sourceName, line, lineSource, lineOffset));
+ warningMessages.append('\n');
}
@Override
@@ -65,6 +66,23 @@
@Override
public void error(String message, String sourceName, int line, String lineSource, int lineOffset) {
- log.error(formatMessage(message, sourceName, line, lineSource, lineOffset));
+ errorMessages.append(formatMessage(message, sourceName, line, lineSource, lineOffset));
+ errorMessages.append('\n');
}
+
+ public boolean hasErrors() {
+ return errorMessages.length() > 0;
+ }
+
+ public String getErrorsLog() {
+ return errorMessages.toString();
+ }
+
+ public boolean hasWarnings() {
+ return warningMessages.length() > 0;
+ }
+
+ public String getWarningsLog() {
+ return warningMessages.toString();
+ }
}
\ No newline at end of file
15 years, 9 months
JBoss Rich Faces SVN: r18794 - trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/common.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-08-19 03:44:52 -0400 (Thu, 19 Aug 2010)
New Revision: 18794
Modified:
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/common/SelectsBean.java
Log:
https://jira.jboss.org/browse/RF-9113
Modified: trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/common/SelectsBean.java
===================================================================
--- trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/common/SelectsBean.java 2010-08-19 06:02:37 UTC (rev 18793)
+++ trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/common/SelectsBean.java 2010-08-19 07:44:52 UTC (rev 18794)
@@ -10,13 +10,13 @@
/**
* @author Ilya Shaikovsky
- *
+ *
*/
@ManagedBean(name = "selectsBean")
@RequestScoped
public class SelectsBean {
- private static final String[] FRUITS = {"", "Banana", "Cranberry", "Blueberry", "Orange"};
- private static final String[] VEGETABLES = {"", "Potatoes", "Broccoli", "Garlic", "Carrot"};
+ private static final String[] FRUITS = { "", "Banana", "Cranberry", "Blueberry", "Orange" };
+ private static final String[] VEGETABLES = { "", "Potatoes", "Broccoli", "Garlic", "Carrot" };
private String currentItem = "";
private String currentType = "";
private List<SelectItem> firstList = new ArrayList<SelectItem>();
@@ -54,19 +54,20 @@
public void valueChanged(ValueChangeEvent event) {
secondList.clear();
+ if (null != event.getNewValue()) {
+ String[] currentItems;
- String[] currentItems;
+ if (((String) event.getNewValue()).equals("fruits")) {
+ currentItems = FRUITS;
+ } else {
+ currentItems = VEGETABLES;
+ }
- if (((String) event.getNewValue()).equals("fruits")) {
- currentItems = FRUITS;
- } else {
- currentItems = VEGETABLES;
- }
+ for (int i = 0; i < currentItems.length; i++) {
+ SelectItem item = new SelectItem(currentItems[i]);
- for (int i = 0; i < currentItems.length; i++) {
- SelectItem item = new SelectItem(currentItems[i]);
-
- secondList.add(item);
+ secondList.add(item);
+ }
}
}
15 years, 9 months