JBoss Rich Faces SVN: r19093 - in modules/tests/metamer/trunk/application/src/main/webapp/components: richExtendedDataTable and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-09-02 08:22:46 -0400 (Thu, 02 Sep 2010)
New Revision: 19093
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/components2.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/components2.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/facets.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richSubTable/components2.xhtml
Log:
RFPL-757
* all pages containing inplace input fixed
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/components2.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/components2.xhtml 2010-09-02 12:03:08 UTC (rev 19092)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/components2.xhtml 2010-09-02 12:22:46 UTC (rev 19093)
@@ -104,7 +104,9 @@
<h:outputText id="columnHeaderNameComponent" value="rich:inplaceInput" />
</f:facet>
- <rich:inplaceInput id="nameInput" value="#{record.name}" defaultLabel="Click here to edit"/>
+ <rich:inplaceInput id="nameInput" value="#{record.name}" defaultLabel="Click here to edit">
+ <a4j:ajax id="inplaceInputAjax" event="change"/>
+ </rich:inplaceInput>
<f:facet name="footer">
<h:outputText id="columnFooterState" value="Name" />
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/components2.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/components2.xhtml 2010-09-02 12:03:08 UTC (rev 19092)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/components2.xhtml 2010-09-02 12:22:46 UTC (rev 19093)
@@ -104,7 +104,9 @@
<h:outputText id="columnHeaderNameComponent" value="rich:inplaceInput" />
</f:facet>
- <rich:inplaceInput id="nameInput" value="#{record.name}" defaultLabel="Click here to edit"/>
+ <rich:inplaceInput id="nameInput" value="#{record.name}" defaultLabel="Click here to edit">
+ <a4j:ajax id="inplaceInputAjax" event="change"/>
+ </rich:inplaceInput>
<f:facet name="footer">
<h:outputText id="columnFooterState" value="Name" />
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/facets.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/facets.xhtml 2010-09-02 12:03:08 UTC (rev 19092)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/facets.xhtml 2010-09-02 12:22:46 UTC (rev 19093)
@@ -45,8 +45,35 @@
defaultLabel="#{richInplaceInputBean.attributes['defaultLabel'].value}"
editEvent="#{richInplaceInputBean.attributes['editEvent'].value}"
immediate="#{richInplaceInputBean.attributes['immediate'].value}"
+ inputWidth="#{richInplaceInputBean.attributes['inputWidth'].value}"
localValue="#{richInplaceInputBean.attributes['localValue'].value}"
localValueSet="#{richInplaceInputBean.attributes['localValueSet'].value}"
+ onInputBlur="#{richInplaceInputBean.attributes['onInputBlur'].value}"
+ onInputClick="#{richInplaceInputBean.attributes['onInputClick'].value}"
+ onInputDblClick="#{richInplaceInputBean.attributes['onInputDblClick'].value}"
+ onInputFocus="#{richInplaceInputBean.attributes['onInputFocus'].value}"
+ onInputKeydown="#{richInplaceInputBean.attributes['onInputKeydown'].value}"
+ onInputKeypress="#{richInplaceInputBean.attributes['onInputKeypress'].value}"
+ onInputKeyup="#{richInplaceInputBean.attributes['onInputKeyup'].value}"
+ onInputMousedown="#{richInplaceInputBean.attributes['onInputMousedown'].value}"
+ onInputMousemove="#{richInplaceInputBean.attributes['onInputMousemove'].value}"
+ onInputMouseout="#{richInplaceInputBean.attributes['onInputMouseout'].value}"
+ onInputMouseover="#{richInplaceInputBean.attributes['onInputMouseover'].value}"
+ onInputMouseup="#{richInplaceInputBean.attributes['onInputMouseup'].value}"
+ onblur="#{richInplaceInputBean.attributes['onblur'].value}"
+ onchange="#{richInplaceInputBean.attributes['onchange'].value}"
+ onclick="#{richInplaceInputBean.attributes['onclick'].value}"
+ ondblclick="#{richInplaceInputBean.attributes['ondblclick'].value}"
+ onfocus="#{richInplaceInputBean.attributes['onfocus'].value}"
+ onkeydown="#{richInplaceInputBean.attributes['onkeydown'].value}"
+ onkeypress="#{richInplaceInputBean.attributes['onkeypress'].value}"
+ onkeyup="#{richInplaceInputBean.attributes['onkeyup'].value}"
+ onmousedown="#{richInplaceInputBean.attributes['onmousedown'].value}"
+ onmousemove="#{richInplaceInputBean.attributes['onmousemove'].value}"
+ onmouseout="#{richInplaceInputBean.attributes['onmouseout'].value}"
+ onmouseover="#{richInplaceInputBean.attributes['onmouseover'].value}"
+ onmouseup="#{richInplaceInputBean.attributes['onmouseup'].value}"
+ onselect="#{richInplaceInputBean.attributes['onselect'].value}"
rendered="#{richInplaceInputBean.attributes['rendered'].value}"
required="#{richInplaceInputBean.attributes['required'].value}"
requiredMessage="#{richInplaceInputBean.attributes['requiredMessage'].value}"
@@ -62,14 +89,13 @@
valueChangeListener="#{richInplaceInputBean.attributes['valueChangeListener'].value}"
valueChangeListeners="#{richInplaceInputBean.attributes['valueChangeListeners'].value}"
>
+
<f:facet name="controls">
<button onmousedown="#{rich:component('inplaceInput')}.save();" type="button">Save</button>
<button onmousedown="#{rich:component('inplaceInput')}.cancel();" type="button">Cancel</button>
</f:facet>
- <ui:remove>
- <a4j:ajax id="inplaceInputAjax" event="change" render="output"/>
- </ui:remove>
+ <a4j:ajax id="inplaceInputAjax" event="change" render="output"/>
</rich:inplaceInput>
<br/><br/>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml 2010-09-02 12:03:08 UTC (rev 19092)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml 2010-09-02 12:22:46 UTC (rev 19093)
@@ -45,8 +45,35 @@
defaultLabel="#{richInplaceInputBean.attributes['defaultLabel'].value}"
editEvent="#{richInplaceInputBean.attributes['editEvent'].value}"
immediate="#{richInplaceInputBean.attributes['immediate'].value}"
+ inputWidth="#{richInplaceInputBean.attributes['inputWidth'].value}"
localValue="#{richInplaceInputBean.attributes['localValue'].value}"
localValueSet="#{richInplaceInputBean.attributes['localValueSet'].value}"
+ onInputBlur="#{richInplaceInputBean.attributes['onInputBlur'].value}"
+ onInputClick="#{richInplaceInputBean.attributes['onInputClick'].value}"
+ onInputDblClick="#{richInplaceInputBean.attributes['onInputDblClick'].value}"
+ onInputFocus="#{richInplaceInputBean.attributes['onInputFocus'].value}"
+ onInputKeydown="#{richInplaceInputBean.attributes['onInputKeydown'].value}"
+ onInputKeypress="#{richInplaceInputBean.attributes['onInputKeypress'].value}"
+ onInputKeyup="#{richInplaceInputBean.attributes['onInputKeyup'].value}"
+ onInputMousedown="#{richInplaceInputBean.attributes['onInputMousedown'].value}"
+ onInputMousemove="#{richInplaceInputBean.attributes['onInputMousemove'].value}"
+ onInputMouseout="#{richInplaceInputBean.attributes['onInputMouseout'].value}"
+ onInputMouseover="#{richInplaceInputBean.attributes['onInputMouseover'].value}"
+ onInputMouseup="#{richInplaceInputBean.attributes['onInputMouseup'].value}"
+ onblur="#{richInplaceInputBean.attributes['onblur'].value}"
+ onchange="#{richInplaceInputBean.attributes['onchange'].value}"
+ onclick="#{richInplaceInputBean.attributes['onclick'].value}"
+ ondblclick="#{richInplaceInputBean.attributes['ondblclick'].value}"
+ onfocus="#{richInplaceInputBean.attributes['onfocus'].value}"
+ onkeydown="#{richInplaceInputBean.attributes['onkeydown'].value}"
+ onkeypress="#{richInplaceInputBean.attributes['onkeypress'].value}"
+ onkeyup="#{richInplaceInputBean.attributes['onkeyup'].value}"
+ onmousedown="#{richInplaceInputBean.attributes['onmousedown'].value}"
+ onmousemove="#{richInplaceInputBean.attributes['onmousemove'].value}"
+ onmouseout="#{richInplaceInputBean.attributes['onmouseout'].value}"
+ onmouseover="#{richInplaceInputBean.attributes['onmouseover'].value}"
+ onmouseup="#{richInplaceInputBean.attributes['onmouseup'].value}"
+ onselect="#{richInplaceInputBean.attributes['onselect'].value}"
rendered="#{richInplaceInputBean.attributes['rendered'].value}"
required="#{richInplaceInputBean.attributes['required'].value}"
requiredMessage="#{richInplaceInputBean.attributes['requiredMessage'].value}"
@@ -62,9 +89,9 @@
valueChangeListener="#{richInplaceInputBean.attributes['valueChangeListener'].value}"
valueChangeListeners="#{richInplaceInputBean.attributes['valueChangeListeners'].value}"
>
- <ui:remove>
- <a4j:ajax id="inplaceInputAjax" event="change" render="output"/>
- </ui:remove>
+
+ <a4j:ajax id="inplaceInputAjax" event="change" render="output"/>
+
</rich:inplaceInput>
<br/><br/>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richSubTable/components2.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richSubTable/components2.xhtml 2010-09-02 12:03:08 UTC (rev 19092)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richSubTable/components2.xhtml 2010-09-02 12:22:46 UTC (rev 19093)
@@ -118,7 +118,9 @@
<h:outputText value="#{item.sex}" />
</rich:column>
<rich:column>
- <rich:inplaceInput id="nameInput" value="#{item.name}" defaultLabel="Click here to edit"/>
+ <rich:inplaceInput id="nameInput" value="#{item.name}" defaultLabel="Click here to edit">
+ <a4j:ajax id="inplaceInputAjax" event="change"/>
+ </rich:inplaceInput>
</rich:column>
<rich:column>
<h:outputText value="#{item.title}" />
14 years, 3 months
JBoss Rich Faces SVN: r19092 - trunk/ui/input/ui/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2010-09-02 08:03:08 -0400 (Thu, 02 Sep 2010)
New Revision: 19092
Modified:
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteRendererBase.java
Log:
Fix checkstyle
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-02 11:50:39 UTC (rev 19091)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteRendererBase.java 2010-09-02 12:03:08 UTC (rev 19092)
@@ -91,14 +91,14 @@
utils.addToScriptHash(options, "onchange", attributes.get("onchange"));
String mode = (String)attributes.get("mode");
if (mode != null) {
- if (mode.equals("ajax")){
- utils.addToScriptHash(options, "isCachedAjax", false, "true");
- } else if (mode.equals("client") || mode.equals("lazyClient")) {
- utils.addToScriptHash(options, "ajaxMode", false, "true");
- if (mode.equals("lazyClient")) {
- utils.addToScriptHash(options, "lazyClientMode", true, "false");
- }
- }
+ if (mode.equals("ajax")){
+ utils.addToScriptHash(options, "isCachedAjax", false, "true");
+ } else if (mode.equals("client") || mode.equals("lazyClient")) {
+ utils.addToScriptHash(options, "ajaxMode", false, "true");
+ if (mode.equals("lazyClient")) {
+ utils.addToScriptHash(options, "lazyClientMode", true, "false");
+ }
+ }
}
StringBuilder builder = new StringBuilder();
builder.append(ScriptUtils.toScript(options));
14 years, 3 months
JBoss Rich Faces SVN: r19091 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-09-02 07:50:39 -0400 (Thu, 02 Sep 2010)
New Revision: 19091
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java
Log:
Optimization for skipping all subsequent test method invocations, if the method failed for plan template.
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java 2010-09-02 10:26:45 UTC (rev 19090)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java 2010-09-02 11:50:39 UTC (rev 19091)
@@ -33,9 +33,11 @@
import org.jboss.test.selenium.locator.ElementLocator;
import org.jboss.test.selenium.locator.JQueryLocator;
import org.jboss.test.selenium.waiting.ajax.JavaScriptCondition;
+import org.richfaces.tests.metamer.Template;
import org.richfaces.tests.metamer.TemplatesList;
import org.richfaces.tests.metamer.ftest.annotations.Inject;
import org.richfaces.tests.metamer.ftest.annotations.Templates;
+import org.testng.ITestResult;
import org.testng.SkipException;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
@@ -79,8 +81,20 @@
selenium.open(buildUrl(getTestUrl() + "?templates=" + template.toString()));
selenium.waitForPageToLoad(TIMEOUT);
}
-
+
/**
+ * Optimization for skipping all subsequent test method invocations, if the method failed for plan template.
+ */
+ @AfterMethod(alwaysRun = true)
+ public void skipAllAfterPlainTemplateFailure(ITestResult result) {
+ if (template.size() == 1 && template.get(0) == Template.PLAIN) {
+ if (result.getStatus() == ITestResult.FAILURE) {
+ result.getMethod().setSkipFailedInvocations(true);
+ }
+ }
+ }
+
+ /**
* Invalidates session by clicking on a button on tested page.
*/
@AfterMethod(alwaysRun = true)
@@ -134,13 +148,13 @@
selenium.waitForPageToLoad(TIMEOUT);
selenium.fireEvent(element, event);
-
+
waitGui.until(new JavaScriptCondition() {
public JavaScript getJavaScriptCondition() {
return new JavaScript("selenium.isAlertPresent()");
}
});
-
+
assertEquals(selenium.getAlert(), event.getEventName(), event.getEventName()
+ " attribute did not change correctly");
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java 2010-09-02 10:26:45 UTC (rev 19090)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java 2010-09-02 11:50:39 UTC (rev 19091)
@@ -98,10 +98,32 @@
}
}
+ public void onTestStart(ITestResult result) {
+ if (!methodConfigured) {
+ configureMethod(result);
+ methodConfigured = true;
+ }
+ }
+
+ public void onTestSuccess(ITestResult result) {
+ methodConfigured = false;
+ }
+
+ public void onTestFailure(ITestResult result) {
+ methodConfigured = false;
+ }
+
public void onTestSkipped(ITestResult result) {
- configureMethod(result);
+ if (!methodConfigured) {
+ configureMethod(result);
+ }
+ methodConfigured = false;
}
+ public void onTestFailedButWithinSuccessPercentage(ITestResult result) {
+ methodConfigured = false;
+ }
+
private boolean isAfterConfiguration(ITestNGMethod m) {
return m.isAfterClassConfiguration() || m.isAfterGroupsConfiguration() || m.isAfterMethodConfiguration()
|| m.isAfterSuiteConfiguration() || m.isAfterTestConfiguration();
@@ -139,17 +161,10 @@
}
}
- public void afterInvocation(IInvokedMethod method, ITestResult testResult) {
- if (method.isTestMethod()) {
- methodConfigured = false;
- }
- }
-
public void transform(ITestAnnotation annotation, Class testClass, Constructor testConstructor, Method testMethod) {
super.transform(annotation, testClass, testConstructor, testMethod);
int invocationCount = createConfiguration(testMethod.getDeclaringClass(), testMethod);
annotation.setInvocationCount(invocationCount);
- annotation.setSkipFailedInvocations(true);
}
public int createConfiguration(Class<?> realClass, Method realMethod) {
@@ -480,21 +495,12 @@
}
}
- public void onTestStart(ITestResult result) {
- }
-
- public void onTestSuccess(ITestResult result) {
- }
-
- public void onTestFailure(ITestResult result) {
- }
-
- public void onTestFailedButWithinSuccessPercentage(ITestResult result) {
- }
-
public void onStart(ITestContext context) {
}
public void onFinish(ITestContext context) {
}
+
+ public void afterInvocation(IInvokedMethod method, ITestResult testResult) {
+ }
}
14 years, 3 months
JBoss Rich Faces SVN: r19090 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-09-02 06:26:45 -0400 (Thu, 02 Sep 2010)
New Revision: 19090
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java
Log:
skip all method invocations when some of previous method invocations failed
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java 2010-09-02 10:23:29 UTC (rev 19089)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java 2010-09-02 10:26:45 UTC (rev 19090)
@@ -48,12 +48,12 @@
import org.richfaces.tests.metamer.ftest.annotations.Templates;
import org.richfaces.tests.metamer.ftest.annotations.Use;
import org.richfaces.tests.metamer.ftest.annotations.Uses;
-import org.testng.IAnnotationTransformer;
import org.testng.IInvokedMethod;
import org.testng.IInvokedMethodListener;
import org.testng.IMethodInstance;
import org.testng.IMethodInterceptor;
import org.testng.ITestContext;
+import org.testng.ITestListener;
import org.testng.ITestNGMethod;
import org.testng.ITestResult;
import org.testng.annotations.ITestAnnotation;
@@ -62,8 +62,8 @@
* @author <a href="mailto:ppitonak@redhat.com">Lukas Fryc</a>
* @version $Revision$
*/
-public class MatrixConfigurator extends TestMethodSelector implements IAnnotationTransformer, IInvokedMethodListener,
- IMethodInterceptor {
+public class MatrixConfigurator extends TestMethodSelector implements IInvokedMethodListener, IMethodInterceptor,
+ ITestListener {
static Map<Field, Object> currentConfiguration;
@@ -98,6 +98,10 @@
}
}
+ public void onTestSkipped(ITestResult result) {
+ configureMethod(result);
+ }
+
private boolean isAfterConfiguration(ITestNGMethod m) {
return m.isAfterClassConfiguration() || m.isAfterGroupsConfiguration() || m.isAfterMethodConfiguration()
|| m.isAfterSuiteConfiguration() || m.isAfterTestConfiguration();
@@ -145,6 +149,7 @@
super.transform(annotation, testClass, testConstructor, testMethod);
int invocationCount = createConfiguration(testMethod.getDeclaringClass(), testMethod);
annotation.setInvocationCount(invocationCount);
+ annotation.setSkipFailedInvocations(true);
}
public int createConfiguration(Class<?> realClass, Method realMethod) {
@@ -474,4 +479,22 @@
throw new UnsupportedOperationException();
}
}
+
+ public void onTestStart(ITestResult result) {
+ }
+
+ public void onTestSuccess(ITestResult result) {
+ }
+
+ public void onTestFailure(ITestResult result) {
+ }
+
+ public void onTestFailedButWithinSuccessPercentage(ITestResult result) {
+ }
+
+ public void onStart(ITestContext context) {
+ }
+
+ public void onFinish(ITestContext context) {
+ }
}
14 years, 3 months
JBoss Rich Faces SVN: r19089 - in trunk: ui/output/ui/src/main/java/org/richfaces/component and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2010-09-02 06:23:29 -0400 (Thu, 02 Sep 2010)
New Revision: 19089
Modified:
trunk/examples/output-demo/src/main/webapp/resources/tests/richfaces-accordion-headers-qunit.js
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelTitledItem.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemRenderer.java
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanel.js
Log:
RF-9117 Accordion item: disabled item rendered wrong
Modified: trunk/examples/output-demo/src/main/webapp/resources/tests/richfaces-accordion-headers-qunit.js
===================================================================
--- trunk/examples/output-demo/src/main/webapp/resources/tests/richfaces-accordion-headers-qunit.js 2010-09-02 09:16:40 UTC (rev 19088)
+++ trunk/examples/output-demo/src/main/webapp/resources/tests/richfaces-accordion-headers-qunit.js 2010-09-02 10:23:29 UTC (rev 19089)
@@ -38,9 +38,9 @@
ok(!items[0].__header("inactive").is(":visible"), "1 item: inactive unvisible");
ok(!items[0].__header("disable" ).is(":visible"), "1 item: disabled unvisible");
- ok(!items[1].__header("active" ).is(":visible"), "2 item: active unvisible");
- ok(!items[1].__header("inactive").is(":visible"), "2 item: inactive unvisible");
- ok( items[1].__header("disable" ).is(":visible"), "2 item: disabled visible");
+// ok(!items[1].__header("active" ).is(":visible"), "2 item: active unvisible");
+// ok(!items[1].__header("inactive").is(":visible"), "2 item: inactive unvisible");
+// ok( items[1].__header("disable" ).is(":visible"), "2 item: disabled visible");
ok(!items[2].__header("active" ).is(":visible"), "3 item: active unvisible");
ok( items[2].__header("inactive").is(":visible"), "3 item: inactive visible");
@@ -51,9 +51,9 @@
ok( items[0].__header("inactive").is(":visible"), "1 item: inactive visible");
ok(!items[0].__header("disable" ).is(":visible"), "1 item: disabled unvisible");
- ok(!items[1].__header("active" ).is(":visible"), "2 item: active unvisible");
- ok(!items[1].__header("inactive").is(":visible"), "2 item: inactive unvisible");
- ok( items[1].__header("disable" ).is(":visible"), "2 item: disabled visible");
+// ok(!items[1].__header("active" ).is(":visible"), "2 item: active unvisible");
+// ok(!items[1].__header("inactive").is(":visible"), "2 item: inactive unvisible");
+// ok( items[1].__header("disable" ).is(":visible"), "2 item: disabled visible");
ok( items[2].__header("active" ).is(":visible"), "3 item: active visible");
ok(!items[2].__header("inactive").is(":visible"), "3 item: inactive unvisible");
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelTitledItem.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelTitledItem.java 2010-09-02 09:16:40 UTC (rev 19088)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelTitledItem.java 2010-09-02 10:23:29 UTC (rev 19089)
@@ -69,14 +69,16 @@
}
encodeBegin(context);
- if (getRendersChildren()) {
- encodeChildren(context);
- } else if (this.getChildCount() > 0) {
- for (UIComponent kid : getChildren()) {
- kid.encodeAll(context);
+ if (!isDisabled()) {
+ if (getRendersChildren()) {
+ encodeChildren(context);
+ } else if (this.getChildCount() > 0) {
+ for (UIComponent kid : getChildren()) {
+ kid.encodeAll(context);
+ }
}
}
-
+
encodeEnd(context);
}
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemRenderer.java 2010-09-02 09:16:40 UTC (rev 19088)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemRenderer.java 2010-09-02 10:23:29 UTC (rev 19089)
@@ -24,7 +24,6 @@
import org.ajax4jsf.javascript.JSObject;
import org.ajax4jsf.renderkit.RendererUtils;
-import org.richfaces.component.AbstractTogglePanelItem;
import org.richfaces.component.AbstractTogglePanelTitledItem;
import org.richfaces.renderkit.RenderKitUtils;
@@ -93,20 +92,20 @@
protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
encodeContentEnd(component, writer);
- super.doEncodeEnd(writer, context, component); //To change body of overridden methods use File | Settings | File Templates.
+ super.doEncodeEnd(writer, context, component);
}
@Override
protected void writeJavaScript(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
- // todo how to call method from parent of parent class?
-
Object script = getScriptObject(context, component);
- if (script != null) {
- writer.startElement(RendererUtils.HTML.SCRIPT_ELEM, component);
- writer.writeAttribute(RendererUtils.HTML.TYPE_ATTR, "text/javascript", "type");
- writer.writeText(script, null);
- writer.endElement(RendererUtils.HTML.SCRIPT_ELEM);
+ if (script == null || ((AbstractTogglePanelTitledItem) component).isDisabled()) {
+ return;
}
+
+ writer.startElement(RendererUtils.HTML.SCRIPT_ELEM, component);
+ writer.writeAttribute(RendererUtils.HTML.TYPE_ATTR, "text/javascript", "type");
+ writer.writeText(script, null);
+ writer.endElement(RendererUtils.HTML.SCRIPT_ELEM);
}
private void encodeContentBegin(UIComponent component, ResponseWriter writer) throws IOException {
@@ -114,7 +113,8 @@
writer.writeAttribute("class", concatClasses("rf-aci-c", attributeAsString(component, "contentClass")), null);
writer.writeAttribute("id", component.getClientId() + ":content", null);
- if (!((AbstractTogglePanelItem) component).isActive()) {
+ AbstractTogglePanelTitledItem item = (AbstractTogglePanelTitledItem) component;
+ if (!item.isActive() || item.isDisabled()) {
writer.writeAttribute("style", "display: none", null);
}
}
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanel.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanel.js 2010-09-02 09:16:40 UTC (rev 19088)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanel.js 2010-09-02 10:23:29 UTC (rev 19089)
@@ -315,18 +315,40 @@
/********************* Methods *************************/
- __ITEMS_META_NAMES : {
- "@first" : function (comp) { return 0; },
- "@prev" : function (comp) { return comp.__getItemIndex(comp.activeItem) - 1; },
- "@next" : function (comp) { return comp.__getItemIndex(comp.activeItem) + 1; },
- "@last" : function (comp) { return comp.items.length - 1; }
- },
+ __ITEMS_META_NAMES : (function () {
+ function goFrom (comp, ind, step) {
+ var res = ind;
+ while (!comp.items[res] && res < comp.items.length && res > 0) {
+ res += step;
+ }
+ return res;
+ }
+
+ return {
+ "@first" : function (comp) {
+ return goFrom(comp, 0, 1);
+ },
+
+ "@prev" : function (comp) {
+ return goFrom(comp, parseInt(comp.__getItemIndex(comp.activeItem)) - 1 , -1);
+ },
+
+ "@next" : function (comp) {
+ return goFrom(comp, parseInt(comp.__getItemIndex(comp.activeItem)) + 1 , 1);
+ },
+
+ "@last" : function (comp) {
+ return goFrom(comp, comp.items.length - 1, -1);
+ }
+ }
+ })(),
+
/**
* @private
* */
__getItemIndex : function (itemName) {
- for (var i = 0; i < this.items.length; i++) {
+ for (var i in this.items) {
if (this.items[i].getName() === itemName) {
return i;
}
14 years, 3 months
JBoss Rich Faces SVN: r19088 - modules/tests/metamer/trunk/application/src/main/webapp/WEB-INF.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-09-02 05:16:40 -0400 (Thu, 02 Sep 2010)
New Revision: 19088
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/WEB-INF/
Log:
added lib to svn:ignore (Eclipse-specific)
Property changes on: modules/tests/metamer/trunk/application/src/main/webapp/WEB-INF
___________________________________________________________________
Name: svn:ignore
- sun-web.xml
+ sun-web.xml
lib
14 years, 3 months
JBoss Rich Faces SVN: r19086 - trunk/core/impl/src/main/java/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-09-01 15:45:20 -0400 (Wed, 01 Sep 2010)
New Revision: 19086
Modified:
trunk/core/impl/src/main/java/org/richfaces/VersionBean.java
Log:
https://jira.jboss.org/browse/RF-9268
Modified: trunk/core/impl/src/main/java/org/richfaces/VersionBean.java
===================================================================
--- trunk/core/impl/src/main/java/org/richfaces/VersionBean.java 2010-09-01 18:09:30 UTC (rev 19085)
+++ trunk/core/impl/src/main/java/org/richfaces/VersionBean.java 2010-09-01 19:45:20 UTC (rev 19086)
@@ -22,16 +22,20 @@
package org.richfaces;
import java.io.IOException;
+import java.io.InputStream;
import java.net.JarURLConnection;
+import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.security.CodeSource;
import java.security.ProtectionDomain;
import java.text.MessageFormat;
import java.util.jar.Attributes;
+import java.util.jar.JarFile;
import java.util.jar.JarInputStream;
import java.util.jar.Manifest;
+import org.ajax4jsf.resource.util.URLToStreamHelper;
import org.richfaces.log.Logger;
import org.richfaces.log.RichfacesLogger;
@@ -45,9 +49,6 @@
public static final Version VERSION = new Version();
- private static final Logger LOGGER = RichfacesLogger.APPLICATION.getLogger();
-
-
/**
* Class for incapsulate version info.
*
@@ -56,6 +57,8 @@
*/
public static class Version {
+ private static final Logger LOGGER = RichfacesLogger.APPLICATION.getLogger();
+
private static final String UNKNOWN = "";
private String implementationVendor = UNKNOWN;
@@ -125,6 +128,30 @@
if (codeSource != null) {
URL url = codeSource.getLocation();
if (url != null) {
+ InputStream manifestStream = null;
+ try {
+ manifestStream = URLToStreamHelper.urlToStream(new URL(url, JarFile.MANIFEST_NAME));
+ return new Manifest(manifestStream);
+ } catch (MalformedURLException e1) {
+ //that's ok - just log in debug
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug(e1.getMessage(), e1);
+ }
+ } catch (IOException e) {
+ //that's ok - just log in debug
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug(e.getMessage(), e);
+ }
+ } finally {
+ if (manifestStream != null) {
+ try {
+ manifestStream.close();
+ } catch (IOException e) {
+ LOGGER.error(MessageFormat.format("Error closing stream: {0}", e.getMessage()), e);
+ }
+ }
+ }
+
JarInputStream jis = null;
try {
URLConnection urlConnection = url.openConnection();
14 years, 3 months
JBoss Rich Faces SVN: r19084 - trunk/core/impl/src/main/resources/META-INF/resources.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-09-01 12:37:13 -0400 (Wed, 01 Sep 2010)
New Revision: 19084
Modified:
trunk/core/impl/src/main/resources/META-INF/resources/richfaces.js
Log:
https://jira.jboss.org/browse/RF-9288
Modified: trunk/core/impl/src/main/resources/META-INF/resources/richfaces.js
===================================================================
--- trunk/core/impl/src/main/resources/META-INF/resources/richfaces.js 2010-09-01 16:01:31 UTC (rev 19083)
+++ trunk/core/impl/src/main/resources/META-INF/resources/richfaces.js 2010-09-01 16:37:13 UTC (rev 19084)
@@ -128,7 +128,7 @@
//there is the same pattern in server-side code:
//org.ajax4jsf.javascript.ScriptUtils.escapeCSSMetachars(String)
- var CSS_METACHARS_PATTERN = /([#;&,.+*~':"!^$[\]()=>|\/])/g;
+ var CSS_METACHARS_PATTERN = /([#;&,.+*~':"!^$\[\]()=>|\/])/g;
/**
* Escapes CSS meta-characters in string according to
14 years, 3 months