JBoss Rich Faces SVN: r8221 - Reports/3.2.1 and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2008-04-28 05:26:24 -0400 (Mon, 28 Apr 2008)
New Revision: 8221
Added:
trunk/test-applications/qa/Test Reports/3.2.1/QA test report Build RF 3.2.1 CR1.xls
Log:
Added: trunk/test-applications/qa/Test Reports/3.2.1/QA test report Build RF 3.2.1 CR1.xls
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/qa/Test Reports/3.2.1/QA test report Build RF 3.2.1 CR1.xls
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 8 months
JBoss Rich Faces SVN: r8220 - in trunk/test-applications/seleniumTest/src: main/resources and 15 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-04-28 05:10:03 -0400 (Mon, 28 Apr 2008)
New Revision: 8220
Added:
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/A4JStatusTestBean.java
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/JSFunctionBean.java
trunk/test-applications/seleniumTest/src/main/resources/org/
trunk/test-applications/seleniumTest/src/main/resources/org/ajax4jsf/
trunk/test-applications/seleniumTest/src/main/resources/org/ajax4jsf/css/
trunk/test-applications/seleniumTest/src/main/resources/org/ajax4jsf/css/loadStyleTest.css
trunk/test-applications/seleniumTest/src/main/resources/org/ajax4jsf/js/
trunk/test-applications/seleniumTest/src/main/resources/org/ajax4jsf/js/loadScriptTest.js
trunk/test-applications/seleniumTest/src/main/webapp/layout/template.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxStatus/
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxStatus/ajaxStatusDescription.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxStatus/ajaxStatusTest.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/pages/jsFunction/
trunk/test-applications/seleniumTest/src/main/webapp/pages/jsFunction/jsFunctionDescription.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/pages/jsFunction/jsFunctionTest.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/pages/loadScript/
trunk/test-applications/seleniumTest/src/main/webapp/pages/loadScript/loadScriptDescription.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/pages/loadScript/loadScriptTest.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/pages/loadStyle/
trunk/test-applications/seleniumTest/src/main/webapp/pages/loadStyle/loadStyleDescription.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/pages/loadStyle/loadStyleTest.xhtml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxStatusTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/JSFunctionTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/LoadScriptTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/LoadStyleTest.java
Removed:
trunk/test-applications/seleniumTest/src/main/webapp/template/
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml
trunk/test-applications/seleniumTest/src/main/webapp/pages/progressBar/progressBarTest.xhtml
trunk/test-applications/seleniumTest/src/test/java/org/ajax4jsf/test/base/SeleniumTestBase.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandLinkTest.java
Log:
JSFunction/loadScript/loadStyle/ajaxStatus selenium tests
Added: trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/A4JStatusTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/A4JStatusTestBean.java (rev 0)
+++ trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/A4JStatusTestBean.java 2008-04-28 09:10:03 UTC (rev 8220)
@@ -0,0 +1,16 @@
+package org.ajax4jsf;
+
+import javax.faces.event.ActionEvent;
+
+public class A4JStatusTestBean {
+
+ public void actionListener(ActionEvent event) {
+ //mega time-consuming operation - sleeping
+ try {
+ Thread.sleep(2000);
+ } catch (InterruptedException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
Property changes on: trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/A4JStatusTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/JSFunctionBean.java
===================================================================
--- trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/JSFunctionBean.java (rev 0)
+++ trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/JSFunctionBean.java 2008-04-28 09:10:03 UTC (rev 8220)
@@ -0,0 +1,23 @@
+package org.ajax4jsf;
+
+public class JSFunctionBean {
+
+ private String name = "";
+
+ /**
+ * Gets value of name field.
+ * @return value of name field
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Set a new value for name field.
+ * @param name a new value for name field
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+}
Property changes on: trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/JSFunctionBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/test-applications/seleniumTest/src/main/resources/org/ajax4jsf/css/loadStyleTest.css
===================================================================
--- trunk/test-applications/seleniumTest/src/main/resources/org/ajax4jsf/css/loadStyleTest.css (rev 0)
+++ trunk/test-applications/seleniumTest/src/main/resources/org/ajax4jsf/css/loadStyleTest.css 2008-04-28 09:10:03 UTC (rev 8220)
@@ -0,0 +1,5 @@
+.rectangle {
+ background-color: blue;
+ width: 50px;
+ height: 100px;
+}
\ No newline at end of file
Property changes on: trunk/test-applications/seleniumTest/src/main/resources/org/ajax4jsf/css/loadStyleTest.css
___________________________________________________________________
Name: svn:mime-type
+ text/css
Name: svn:eol-style
+ native
Added: trunk/test-applications/seleniumTest/src/main/resources/org/ajax4jsf/js/loadScriptTest.js
===================================================================
--- trunk/test-applications/seleniumTest/src/main/resources/org/ajax4jsf/js/loadScriptTest.js (rev 0)
+++ trunk/test-applications/seleniumTest/src/main/resources/org/ajax4jsf/js/loadScriptTest.js 2008-04-28 09:10:03 UTC (rev 8220)
@@ -0,0 +1,3 @@
+function summarize (operand1, operand2) {
+ return operand1 + operand2;
+}
\ No newline at end of file
Property changes on: trunk/test-applications/seleniumTest/src/main/resources/org/ajax4jsf/js/loadScriptTest.js
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Modified: trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml 2008-04-28 08:11:32 UTC (rev 8219)
+++ trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml 2008-04-28 09:10:03 UTC (rev 8220)
@@ -40,6 +40,15 @@
<managed-bean-name>panelBean</managed-bean-name>
<managed-bean-class>org.ajax4jsf.RichPanelTestBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>jsFunctionBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.JSFunctionBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>statusBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.A4JStatusTestBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
</managed-bean>
-
</faces-config>
\ No newline at end of file
Copied: trunk/test-applications/seleniumTest/src/main/webapp/layout/template.xhtml (from rev 8108, trunk/test-applications/seleniumTest/src/main/webapp/layout/template.xhtml)
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/layout/template.xhtml (rev 0)
+++ trunk/test-applications/seleniumTest/src/main/webapp/layout/template.xhtml 2008-04-28 09:10:03 UTC (rev 8220)
@@ -0,0 +1,112 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+<head>
+ <script>
+ var errorMessage = null;
+ var pauseHolder = {};
+ window.onerror = function (message, url, code) {
+ errorMessage = message;
+ };
+ function checkError () {
+ return errorMessage;
+ }
+
+ function pause (miliseconds, id) {
+ pauseHolder[id] = false;
+ window.setTimeout(function () { pauseHolder[id] = true; }, miliseconds);
+ }
+
+ function submitForm () {
+ document.getElementById('_form').submit();
+ }
+
+ function reRenderAll () {
+ document.getElementById('_Selenium_Test_ReRender_Form:_reRender').onclick();
+ return;
+ }
+ </script>
+ <style type="text/css">
+ <ui:insert name="style"/>
+ </style>
+</head>
+<f:view>
+<body>
+<div style="padding: 10px; font-size: 24px;">Rich faces component testing by Selenium</div><br/>
+<h:form id="_Selenium_Test_ReRender_Form">
+ <table border="0" cellpadding="5" cellspacing="0">
+ <tr>
+ <td colspan="2">
+ <a4j:commandLink reRender="_Selenium_Test_Form1, _Selenium_Test_Form2" style="text-decoration: underline; color: blue" value="ReRenderAll" id="_reRender"/>
+ </td>
+ </tr>
+ <!-- tr>
+ <td>
+ <b>Ajax Status:</b>
+ </td>
+ <td>
+ <a4j:status startText="Ajax in progress...">
+ <f:facet name="stop">
+ <h:outputText value="Completed" style="color: green"></h:outputText>
+ </f:facet>
+ <f:facet name="start">
+ <h:outputText value="In progress..." style="color: red"></h:outputText>
+ </f:facet>
+ </a4j:status>
+ </td>
+ </tr-->
+ </table>
+</h:form>
+<br/>
+<div id="_Selenium_Test_ControlPoint1" style="display: none;">Control1</div>
+ <br/>
+<table border="0" cellpadding="0" cellspacing="10"><tr><td style="vertical-align: top">
+ <rich:dataTable value="1" id="_Selenium_Test_Description">
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Description area"></h:outputText>
+ </f:facet>
+ <ui:insert name="description"></ui:insert>
+ </h:column>
+ </rich:dataTable>
+</td></tr></table>
+
+ <br/><br/>
+<table border="0" cellpadding="0" cellspacing="10"><tr><td style="vertical-align: top">
+<h:form id="_Selenium_Test_Form1">
+ <rich:dataTable value="1" id="_Selenium_Test_DataTable" style="width: auto">
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Testing area inside Data Table"></h:outputText>
+ </f:facet>
+ <ui:insert name="component" />
+ </h:column>
+ </rich:dataTable>
+</h:form>
+</td>
+<td style="width: 20px">
+</td>
+<td style="vertical-align: top">
+<h:form id="_Selenium_Test_Form2">
+ <rich:panel id="_Selenium_Test_Panel">
+ <f:facet name="header">
+ <h:outputText value="Testing area inside Panel"></h:outputText>
+ </f:facet>
+ <ui:insert name="component" />
+ </rich:panel>
+</h:form>
+</td></tr></table>
+
+
+<script type="text/javascript">
+ window.done=false;A4J.AJAX.AddListener(new A4J.AJAX.Listener(function(){window.done=true}));
+</script>
+
+<div id="_Selenium_Test_ControlPoint2" style="display: none;">Control2</div>
+</body>
+</f:view>
+</html>
\ No newline at end of file
Added: trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxStatus/ajaxStatusDescription.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxStatus/ajaxStatusDescription.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxStatus/ajaxStatusTest.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxStatus/ajaxStatusTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seleniumTest/src/main/webapp/pages/jsFunction/jsFunctionDescription.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/src/main/webapp/pages/jsFunction/jsFunctionDescription.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seleniumTest/src/main/webapp/pages/jsFunction/jsFunctionTest.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/src/main/webapp/pages/jsFunction/jsFunctionTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seleniumTest/src/main/webapp/pages/loadScript/loadScriptDescription.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/src/main/webapp/pages/loadScript/loadScriptDescription.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seleniumTest/src/main/webapp/pages/loadScript/loadScriptTest.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/src/main/webapp/pages/loadScript/loadScriptTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seleniumTest/src/main/webapp/pages/loadStyle/loadStyleDescription.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/src/main/webapp/pages/loadStyle/loadStyleDescription.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seleniumTest/src/main/webapp/pages/loadStyle/loadStyleTest.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/src/main/webapp/pages/loadStyle/loadStyleTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/progressBar/progressBarTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/pages/progressBar/progressBarTest.xhtml 2008-04-28 08:11:32 UTC (rev 8219)
+++ trunk/test-applications/seleniumTest/src/main/webapp/pages/progressBar/progressBarTest.xhtml 2008-04-28 09:10:03 UTC (rev 8220)
@@ -14,7 +14,7 @@
<h:outputText value="Process not started"></h:outputText>
</f:facet>
<f:facet name="complete">
- <h:outputText value="Process not started"></h:outputText>
+ <h:outputText value="Process completed"></h:outputText>
</f:facet>
<h:outputText value="{value}%"></h:outputText>
</rich:progressBar><br/>
@@ -24,7 +24,7 @@
<h:outputText value="Process not started"></h:outputText>
</f:facet>
<f:facet name="complete">
- <h:outputText value="Process not started"></h:outputText>
+ <h:outputText value="Process completed"></h:outputText>
</f:facet>
<h:outputText value="{value}%"></h:outputText>
</rich:progressBar> <br/>
Modified: trunk/test-applications/seleniumTest/src/test/java/org/ajax4jsf/test/base/SeleniumTestBase.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/ajax4jsf/test/base/SeleniumTestBase.java 2008-04-28 08:11:32 UTC (rev 8219)
+++ trunk/test-applications/seleniumTest/src/test/java/org/ajax4jsf/test/base/SeleniumTestBase.java 2008-04-28 09:10:03 UTC (rev 8220)
@@ -331,8 +331,7 @@
public String getValueById(String id) {
return selenium.getValue("id=" + id);
}
-
-
+
/**
* Returns element's width
* @param id - DOM element id
@@ -343,6 +342,15 @@
}
/**
+ * Returns element's height
+ * @param id - DOM element id
+ * @return
+ */
+ public Number getHeightById(String id) {
+ return selenium.getElementHeight("id=" + id);
+ }
+
+ /**
* Clicks on element
*
* @param id -
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandLinkTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandLinkTest.java 2008-04-28 08:11:32 UTC (rev 8219)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandLinkTest.java 2008-04-28 09:10:03 UTC (rev 8220)
@@ -90,7 +90,7 @@
}
public String getTestUrl() {
- return null;
- }
+ return "/faces/pages/ajaxCommandLink/ajaxLinkTest.xhtml";
+ }
}
Added: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxStatusTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxStatusTest.java (rev 0)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxStatusTest.java 2008-04-28 09:10:03 UTC (rev 8220)
@@ -0,0 +1,41 @@
+package org.richfaces;
+
+import org.ajax4jsf.test.base.SeleniumTestBase;
+import org.ajax4jsf.test.base.Templates;
+import org.testng.annotations.AfterTest;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+public class AjaxStatusTest extends SeleniumTestBase {
+
+ public AjaxStatusTest() {
+ super("http", "localhost", "8080");
+ }
+
+ /**
+ * This method are invoking before selenium tests started
+ */
+ @BeforeTest
+ @Parameters( { "browser" })
+ public void startSelenium(String browser) {
+ super.startSelenium(browser);
+ }
+
+ /**
+ * This method are invoking after selenium tests completed
+ */
+ @AfterTest
+ public void stopSelenium() {
+ super.stopSelenium();
+ }
+
+ @Test
+ public void testAjaxStatusComponent() throws Exception {
+ _testAjaxStatusComponent(Templates.DATATABLE);
+ }
+
+ private void _testAjaxStatusComponent(Templates template) {
+ renderPage("/faces/pages/ajaxStatus/ajaxStatusTest.xhtml", template);
+ }
+}
Property changes on: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxStatusTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/JSFunctionTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/JSFunctionTest.java (rev 0)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/JSFunctionTest.java 2008-04-28 09:10:03 UTC (rev 8220)
@@ -0,0 +1,56 @@
+package org.richfaces;
+
+import static org.testng.Assert.assertEquals;
+import org.ajax4jsf.test.base.SeleniumTestBase;
+import org.ajax4jsf.test.base.Templates;
+
+import org.testng.annotations.AfterTest;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+public class JSFunctionTest extends SeleniumTestBase {
+
+ public JSFunctionTest() {
+ super("http", "localhost", "8080");
+ }
+
+ /**
+ * This method are invoking before selenium tests started
+ */
+ @BeforeTest
+ @Parameters( { "browser" })
+ public void startSelenium(String browser) {
+ super.startSelenium(browser);
+ }
+
+ /**
+ * This method are invoking after selenium tests completed
+ */
+ @AfterTest
+ public void stopSelenium() {
+ super.stopSelenium();
+ }
+
+ @Test
+ public void testJSFunctionComponent() throws Exception {
+ _testJSFunctionComponent(Templates.DATATABLE);
+ }
+
+ private void _testJSFunctionComponent(Templates template) {
+ renderPage("/faces/pages/jsFunction/jsFunctionTest.xhtml", template);
+
+ selenium.mouseOver("alex");
+ waitForAjaxCompletion();
+ assertEquals(getTextById("alex"), "Alex");
+
+ selenium.mouseOver("jonh");
+ waitForAjaxCompletion();
+ assertEquals(getTextById("jonh"), "Jonh");
+
+ selenium.mouseOver("roger");
+ waitForAjaxCompletion();
+ assertEquals(getTextById("roger"), "Roger");
+ }
+
+}
Property changes on: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/JSFunctionTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/LoadScriptTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/LoadScriptTest.java (rev 0)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/LoadScriptTest.java 2008-04-28 09:10:03 UTC (rev 8220)
@@ -0,0 +1,48 @@
+package org.richfaces;
+
+import static org.testng.Assert.assertEquals;
+
+import org.ajax4jsf.test.base.SeleniumTestBase;
+import org.ajax4jsf.test.base.Templates;
+import org.testng.annotations.AfterTest;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+public class LoadScriptTest extends SeleniumTestBase {
+
+ public LoadScriptTest() {
+ super("http", "localhost", "8080");
+ }
+
+ /**
+ * This method are invoking before selenium tests started
+ */
+ @BeforeTest
+ @Parameters( { "browser" })
+ public void startSelenium(String browser) {
+ super.startSelenium(browser);
+ }
+
+ /**
+ * This method are invoking after selenium tests completed
+ */
+ @AfterTest
+ public void stopSelenium() {
+ super.stopSelenium();
+ }
+
+ @Test
+ public void testLoadScriptComponent() throws Exception {
+ _testLoadScriptComponent(Templates.DATATABLE);
+ }
+
+ private void _testLoadScriptComponent(Templates template) {
+ renderPage("/faces/pages/loadScript/loadScriptTest.xhtml", template);
+ String jsCall = "summarize(%1$s, %2$s);";
+ int opr1 = 1;
+ int opr2 = 2;
+ String result = runScript(String.format(jsCall, opr1, opr2));
+ assertEquals(Integer.parseInt(result), opr1 + opr2);
+ }
+}
Property changes on: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/LoadScriptTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/LoadStyleTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/LoadStyleTest.java (rev 0)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/LoadStyleTest.java 2008-04-28 09:10:03 UTC (rev 8220)
@@ -0,0 +1,46 @@
+package org.richfaces;
+
+import org.ajax4jsf.test.base.SeleniumTestBase;
+import org.ajax4jsf.test.base.Templates;
+
+import static org.testng.Assert.assertEquals;
+import org.testng.annotations.AfterTest;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+public class LoadStyleTest extends SeleniumTestBase {
+
+ public LoadStyleTest() {
+ super("http", "localhost", "8080");
+ }
+
+ /**
+ * This method are invoking before selenium tests started
+ */
+ @BeforeTest
+ @Parameters( { "browser" })
+ public void startSelenium(String browser) {
+ super.startSelenium(browser);
+ }
+
+ /**
+ * This method are invoking after selenium tests completed
+ */
+ @AfterTest
+ public void stopSelenium() {
+ super.stopSelenium();
+ }
+
+ @Test
+ public void testLoadStyleComponent() throws Exception {
+ _testLoadStyleComponent(Templates.DATATABLE);
+ }
+
+ private void _testLoadStyleComponent(Templates template) {
+ renderPage("/faces/pages/loadStyle/loadStyleTest.xhtml", template);
+ String divId = getParentId() + "rectangle";
+ assertEquals(50, getWidthById(divId));
+ assertEquals(100, getHeightById(divId));
+ }
+}
Property changes on: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/LoadStyleTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
16 years, 8 months
JBoss Rich Faces SVN: r8219 - trunk/test-applications/facelets/src/main/java/fileUpload.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2008-04-28 04:11:32 -0400 (Mon, 28 Apr 2008)
New Revision: 8219
Modified:
trunk/test-applications/facelets/src/main/java/fileUpload/FileUpload.java
Log:
rename isTemp -> isTempFile
Modified: trunk/test-applications/facelets/src/main/java/fileUpload/FileUpload.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/fileUpload/FileUpload.java 2008-04-28 08:11:03 UTC (rev 8218)
+++ trunk/test-applications/facelets/src/main/java/fileUpload/FileUpload.java 2008-04-28 08:11:32 UTC (rev 8219)
@@ -36,7 +36,7 @@
public void fileUploadListener(UploadEvent event) throws Exception{
UploadItem upload = event.getUploadItem();
- if (upload.isFile()) {
+ if (upload.isTempFile()) {
File file = upload.getFile();
} else {
ByteArrayOutputStream b = new ByteArrayOutputStream();
16 years, 8 months
JBoss Rich Faces SVN: r8218 - trunk/test-applications/jsp/src/main/java/fileUpload.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2008-04-28 04:11:03 -0400 (Mon, 28 Apr 2008)
New Revision: 8218
Modified:
trunk/test-applications/jsp/src/main/java/fileUpload/FileUpload.java
Log:
rename isTemp -> isTempFile
Modified: trunk/test-applications/jsp/src/main/java/fileUpload/FileUpload.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/fileUpload/FileUpload.java 2008-04-27 21:34:37 UTC (rev 8217)
+++ trunk/test-applications/jsp/src/main/java/fileUpload/FileUpload.java 2008-04-28 08:11:03 UTC (rev 8218)
@@ -99,7 +99,7 @@
public void fileUploadListener(UploadEvent event) throws Exception{
UploadItem upload = event.getUploadItem();
- if (upload.isFile()) {
+ if (upload.isTempFile()) {
File file = upload.getFile();
System.out.println("FileUpload.fileUploadListener()");
} else {
16 years, 8 months
JBoss Rich Faces SVN: r8217 - in trunk/ui/modal-panel/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-04-27 17:34:37 -0400 (Sun, 27 Apr 2008)
New Revision: 8217
Modified:
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanelBorders.js
trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
Log:
http://jira.jboss.com/jira/browse/RF-3079
http://jira.jboss.com/jira/browse/RF-2366
Modified: trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
===================================================================
--- trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2008-04-27 21:34:31 UTC (rev 8216)
+++ trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2008-04-27 21:34:37 UTC (rev 8217)
@@ -6,9 +6,6 @@
window.Richfaces = {};
}
-sizeA = 4;
-sizeB = 40;
-
function discardElement(element) {
var garbageBin = document.getElementById('IELeakGarbageBin');
if (!garbageBin) {
@@ -71,42 +68,18 @@
ModalPanel.panels = new Array();
ModalPanel.activePanels = new Array();
-ModalPanel.Context = Class.create();
-ModalPanel.Context.prototype = {
- initialize: function(modalPanel) {
- this.cdiv = modalPanel.contentDiv;
- this.isPositionFixed = Richfaces.getComputedStyle(this.cdiv, "position") == "fixed";
- },
-
- left: function(offset) {
- return offset;
- },
-
- top: function(offset) {
- return offset;
- },
-
- width: function() {
- return $(this.cdiv).offsetWidth;
- },
-
- height: function() {
- return $(this.cdiv).offsetHeight;
+function getSizeElement() {
+ var element;
+ var element;
+ if (RichFaces.navigatorType() != RichFaces.OPERA && document.compatMode=='CSS1Compat') {
+ element = document.documentElement;
+ } else {
+ element = document.body;
}
+
+ return element;
}
- function getSizeElement() {
- var element;
- if (RichFaces.navigatorType() != RichFaces.OPERA && document.compatMode=='CSS1Compat') {
- element = document.documentElement;
- } else {
- element = document.body;
- }
-
- return element;
- }
-
-
ModalPanel.prototype = {
initialize: function(id, options) {
this["rich:destructor"] = "destroy";
@@ -119,17 +92,16 @@
this.baseZIndex = this.options.zindex ? this.options.zindex : 100;
- this.minWidth = Math.max(this.options.minWidth, 2*sizeA + 2);
- this.minHeight = Math.max(this.options.minHeight, 2*sizeA + 2);
+ this.minWidth = Math.max(this.options.minWidth, 2*ModalPanel.Sizer.INITIAL_MIN + 2);
+ this.minHeight = Math.max(this.options.minHeight, 2*ModalPanel.Sizer.INITIAL_MIN + 2);
this.div = id + "Div";
this.cursorDiv = id + "CursorDiv";
this.cdiv = id + "CDiv";
this.contentDiv = id + "ContentDiv";
+ this.contentTable = id + "ContentTable";
this.shadowDiv = id + "ShadowDiv";
- this.context = new ModalPanel.Context(this);
-
this.borders = new Array();
if (this.options.resizeable) {
@@ -186,7 +158,25 @@
this.selectBehavior = options.selectBehavior;
},
+ width: function() {
+ return this.getContentElement().offsetWidth;
+ },
+
+ height: function() {
+ return this.getContentElement().offsetHeight;
+ },
+
+ getContentElement: function() {
+ if (!this._sizedElement) {
+ this._sizedElement = this.options.autosized ? $(this.contentTable) : $(this.contentDiv);
+ }
+
+ return this._sizedElement;
+ },
+
destroy: function() {
+ this._sizedElement = null;
+
ModalPanel.panels = ModalPanel.panels.without(this);
this.traverseSelects(true);
@@ -394,7 +384,7 @@
show: function(event, opts) {
var element = this.id;
- if(this.invokeEvent("beforeshow",event,null,element)){
+ if(this.invokeEvent("beforeshow",event,null,element)) {
this.preventFocus();
if (!this.floatedToBody) {
@@ -420,7 +410,7 @@
"<iframe src=\"javascript:''\" frameborder=\"0\" scrolling=\"no\" id=\"" + this.iframe + "\" " +
"style=\"position: absolute; width: 1px; height: 1px; background-color: white; overflow-y: hidden; z-index: 1;\">" +
"</iframe>");
-
+
eIframe = $(this.iframe);
//alert("IFrame:" + eIframe + "created!");
@@ -441,27 +431,21 @@
Object.extend(this.userOptions, opts);
}
- var eContentDiv = $(this.contentDiv);
+ var eContentElt = this.getContentElement();
- if (this.options.autosized) {
- eContentDiv.style.overflow = "";
- options.width = -1;
- options.height = -1;
-
- } else {
+ if (!this.options.autosized) {
if (options.width && options.width == -1)
options.width = 300;
if (options.height && options.height == -1)
options.height = 200;
}
- var eContentDiv = $(this.contentDiv);
if (options.width && options.width != -1) {
if (this.minWidth > options.width) {
options.width = this.minWidth;
}
-
- eContentDiv.style.width = options.width + (/px/.test(options.width) ? '' : 'px');
+
+ eContentElt.style.width = options.width + (/px/.test(options.width) ? '' : 'px');
}
if (options.height && options.height != -1) {
@@ -469,9 +453,9 @@
options.height = this.minHeight;
}
- eContentDiv.style.height = options.height + (/px/.test(options.height) ? '' : 'px');
+ eContentElt.style.height = options.height + (/px/.test(options.height) ? '' : 'px');
}
-
+
eCdiv.mpSet = true;
//Element.setStyle(this.dialogWindow.document.body, { "margin" : "0px 0px 0px 0px" });
@@ -528,22 +512,19 @@
Element.show(element);
this.correctShadowSizeEx();
-
+
if (options.left) {
var _left;
if (options.left != "auto") {
_left = parseInt(options.left, 10);
} else {
var cw = getSizeElement().clientWidth;
- if (RichFaces.navigatorType() == RichFaces.OPERA)
- {
- _left = (cw - eContentDiv.getWidth()) / 2;
+ var _width = this.width(); //Richfaces.getComputedStyleSize(eContentElt, "width");
+ if (cw >= _width) {
+ _left = (cw - _width) / 2;
+ } else {
+ _left = 0;
}
- else {
- var _width = eContentDiv.clientWidth;
- _left = (cw - _width) / 2;
- }
-
}
this.setLeft(_left);
@@ -555,19 +536,17 @@
_top = parseInt(options.top, 10);
} else {
var cw = getSizeElement().clientHeight;
- if (RichFaces.navigatorType() == RichFaces.OPERA)
- {
- _top = (cw - eContentDiv.getHeight()) / 2;
- }
- else {
- var _height = eContentDiv.clientHeight;
+ var _height = this.height(); //Richfaces.getComputedStyleSize(eContentElt, "height");
+ if (cw >= _height) {
_top = (cw - _height) / 2;
+ } else {
+ _top = 0;
}
}
this.setTop(_top);
}
-
+
if (this.options.autosized) {
this.observerSize =
window.setInterval(this.correctShadowSize.bindAsEventListener(this), 500);
@@ -583,17 +562,17 @@
this.header.doPosition();
}
- Element.hide(eCdiv);
- element.style.visibility = "";
-
+ Element.hide(eCdiv);
+ element.style.visibility = "";
+
this.lastOnfocus();
-
- Element.show(eCdiv);
-
- var event = {};
- event.parameters = opts || {};
- this.shown = true;
- this.invokeEvent("show",event,null,element);
+
+ Element.show(eCdiv);
+
+ var event = {};
+ event.parameters = opts || {};
+ this.shown = true;
+ this.invokeEvent("show",event,null,element);
}
},
@@ -690,9 +669,9 @@
var vetoeChange = false;
var newSize;
- var eContentDiv = $(this.contentDiv);
+ var eContentElt = this.getContentElement();
- newSize = this._getStyle(eContentDiv, "width");//Richfaces.getComputedStyleSize(eContentDiv, "width");
+ newSize = this._getStyle(eContentElt, "width");//Richfaces.getComputedStyleSize(eContentDiv, "width");
var oldSize = newSize;
newSize += diff.deltaWidth || 0;
@@ -728,7 +707,7 @@
cssHash.left = newPos + 'px';
}
- newSize = this._getStyle(eContentDiv, "height")//;Richfaces.getComputedStyleSize(eContentDiv, "height");
+ newSize = this._getStyle(eContentElt, "height")//;Richfaces.getComputedStyleSize(eContentDiv, "height");
var oldSize = newSize;
newSize += diff.deltaHeight || 0;
@@ -772,28 +751,28 @@
Element.setStyle(eCdiv, cssHash);
- Element.setStyle(eContentDiv, cssHashWH);
+ Element.setStyle(eContentElt, cssHashWH);
this.correctShadowSizeEx();
Object.extend(this.userOptions, cssHash);
Object.extend(this.userOptions, cssHashWH);
- var w = this.context.width();
- var h = this.context.height();
+ var w = this.width();
+ var h = this.height();
- this.context.reduced = null;
+ this.reductionData = null;
- if (w <= 2*sizeB) {
- this.context.reduced = {};
- this.context.reduced.w = w;
+ if (w <= 2*ModalPanel.Sizer.INITIAL_MAX) {
+ this.reductionData = {};
+ this.reductionData.w = w;
}
- if (h <= 2*sizeB) {
- if (!this.context.reduced) {
- this.context.reduced = {};
+ if (h <= 2*ModalPanel.Sizer.INITIAL_MAX) {
+ if (!this.reductionData) {
+ this.reductionData = {};
}
- this.context.reduced.h = h;
+ this.reductionData.h = h;
}
if (this.header) {
@@ -841,8 +820,7 @@
correctShadowSizeEx: function() {
var eShadowDiv = $(this.shadowDiv);
- var eContentDiv = $(this.contentDiv);
- if (!eShadowDiv || !eContentDiv) {
+ if (!eShadowDiv) {
return;
}
var eIframe = $(this.iframe);
@@ -854,8 +832,8 @@
dx = eShadowDiv.offsetWidth-eShadowDiv.clientWidth;
dy = eShadowDiv.offsetHeight-eShadowDiv.clientHeight;
}
- var w = eContentDiv.offsetWidth;
- var h = eContentDiv.offsetHeight;
+ var w = this.width();
+ var h = this.height();
eShadowDiv.style.width = (w-dx)+"px";
eShadowDiv.style.height = (h-dy)+"px";
Modified: trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanelBorders.js
===================================================================
--- trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanelBorders.js 2008-04-27 21:34:31 UTC (rev 8216)
+++ trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanelBorders.js 2008-04-27 21:34:37 UTC (rev 8217)
@@ -150,6 +150,9 @@
ModalPanel.Sizer = Class.create();
+ModalPanel.Sizer.INITIAL_MIN = 4;
+ModalPanel.Sizer.INITIAL_MAX = 40;
+
ModalPanel.Sizer.Diff = Class.create();
ModalPanel.Sizer.Diff.prototype = {
initialize: function(dX, dY, dWidth, dHeight) {
@@ -172,15 +175,15 @@
var width = 0;
var height = 0;
- var context = modalPanel.context;
+ var reductionData = modalPanel.reductionData;
- if (context.reduced) {
- if (context.reduced.w) {
- width = context.reduced.w / 2;
+ if (reductionData) {
+ if (reductionData.w) {
+ width = reductionData.w / 2;
}
- if (context.reduced.h) {
- height = context.reduced.h / 2;
+ if (reductionData.h) {
+ height = reductionData.h / 2;
}
}
@@ -190,7 +193,7 @@
elt.reducedWidth = elt.style.width;
}
elt.style.width = width + 'px';
- } else if (width < sizeB && /* TODO fix the dirty code */elt.reducedWidth == sizeB + 'px') {
+ } else if (width < ModalPanel.Sizer.INITIAL_MAX && /* TODO fix the dirty code */elt.reducedWidth == ModalPanel.Sizer.INITIAL_MAX + 'px') {
elt.style.width = width + 'px';
}
} else {
@@ -206,7 +209,7 @@
elt.reducedHeight = elt.style.height;
}
elt.style.height = height + 'px';
- } else if (height < sizeB && /* TODO fix the dirty code */elt.reducedHeight == sizeB + 'px') {
+ } else if (height < ModalPanel.Sizer.INITIAL_MAX && /* TODO fix the dirty code */elt.reducedHeight == ModalPanel.Sizer.INITIAL_MAX + 'px') {
elt.style.height = height + 'px';
}
} else {
@@ -218,10 +221,8 @@
},
doSetupPosition: function (modalPanel, elt, left, top) {
- var context = modalPanel.context;
-
- elt.style.left = context.left(left) + 'px';
- elt.style.top = context.top(top) + 'px';
+ elt.style.left = left + 'px';
+ elt.style.top = top + 'px';
},
doPosition: function (modalPanel, elt) {
@@ -246,7 +247,7 @@
ModalPanel.Sizer.N = new ModalPanel.Sizer();
ModalPanel.Sizer.N.doPosition = function (modalPanel, elt) {
- elt.style.width = modalPanel.context.width() + 'px';
+ elt.style.width = modalPanel.width() + 'px';
this.doSetupPosition(modalPanel, elt, 0, 0);
};
ModalPanel.Sizer.N.doDiff = function(dx, dy) {
@@ -256,7 +257,7 @@
ModalPanel.Sizer.NEU = new ModalPanel.Sizer();
ModalPanel.Sizer.NEU.doPosition = function (modalPanel, elt) {
this.doSetupSize(modalPanel, elt);
- this.doSetupPosition(modalPanel, elt, modalPanel.context.width() - elt.clientWidth, 0);
+ this.doSetupPosition(modalPanel, elt, modalPanel.width() - elt.clientWidth, 0);
};
ModalPanel.Sizer.NEU.doDiff = function(dx, dy) {
return new ModalPanel.Sizer.Diff(0, dy, dx, -dy);
@@ -265,7 +266,7 @@
ModalPanel.Sizer.NEL = new ModalPanel.Sizer();
ModalPanel.Sizer.NEL.doPosition = function (modalPanel, elt) {
this.doSetupSize(modalPanel, elt);
- this.doSetupPosition(modalPanel, elt, modalPanel.context.width() - elt.clientWidth, 0);
+ this.doSetupPosition(modalPanel, elt, modalPanel.width() - elt.clientWidth, 0);
};
ModalPanel.Sizer.NEL.doDiff = function(dx, dy) {
return new ModalPanel.Sizer.Diff(0, dy, dx, -dy);
@@ -273,8 +274,8 @@
ModalPanel.Sizer.E = new ModalPanel.Sizer();
ModalPanel.Sizer.E.doPosition = function (modalPanel, elt) {
- elt.style.height = modalPanel.context.height() + 'px';
- this.doSetupPosition(modalPanel, elt, modalPanel.context.width() - elt.clientWidth, 0);
+ elt.style.height = modalPanel.height() + 'px';
+ this.doSetupPosition(modalPanel, elt, modalPanel.width() - elt.clientWidth, 0);
};
ModalPanel.Sizer.E.doDiff = function(dx, dy) {
return new ModalPanel.Sizer.Diff(0, 0, dx, 0);
@@ -283,8 +284,8 @@
ModalPanel.Sizer.SEU = new ModalPanel.Sizer();
ModalPanel.Sizer.SEU.doPosition = function (modalPanel, elt) {
this.doSetupSize(modalPanel, elt);
- this.doSetupPosition(modalPanel, elt, modalPanel.context.width() - elt.clientWidth,
- modalPanel.context.height() - elt.clientHeight);
+ this.doSetupPosition(modalPanel, elt, modalPanel.width() - elt.clientWidth,
+ modalPanel.height() - elt.clientHeight);
};
ModalPanel.Sizer.SEU.doDiff = function(dx, dy) {
return new ModalPanel.Sizer.Diff(0, 0, dx, dy);
@@ -293,8 +294,8 @@
ModalPanel.Sizer.SEL = new ModalPanel.Sizer();
ModalPanel.Sizer.SEL.doPosition = function (modalPanel, elt) {
this.doSetupSize(modalPanel, elt);
- this.doSetupPosition(modalPanel, elt, modalPanel.context.width() - elt.clientWidth,
- modalPanel.context.height() - elt.clientHeight);
+ this.doSetupPosition(modalPanel, elt, modalPanel.width() - elt.clientWidth,
+ modalPanel.height() - elt.clientHeight);
};
ModalPanel.Sizer.SEL.doDiff = function(dx, dy) {
return new ModalPanel.Sizer.Diff(0, 0, dx, dy);
@@ -302,8 +303,8 @@
ModalPanel.Sizer.S = new ModalPanel.Sizer();
ModalPanel.Sizer.S.doPosition = function (modalPanel, elt) {
- elt.style.width = modalPanel.context.width() + 'px';
- this.doSetupPosition(modalPanel, elt, 0, modalPanel.context.height() - elt.clientHeight);
+ elt.style.width = modalPanel.width() + 'px';
+ this.doSetupPosition(modalPanel, elt, 0, modalPanel.height() - elt.clientHeight);
};
ModalPanel.Sizer.S.doDiff = function(dx, dy) {
return new ModalPanel.Sizer.Diff(0, 0, 0, dy);
@@ -312,7 +313,7 @@
ModalPanel.Sizer.SWL = new ModalPanel.Sizer();
ModalPanel.Sizer.SWL.doPosition = function (modalPanel, elt) {
this.doSetupSize(modalPanel, elt);
- this.doSetupPosition(modalPanel, elt, 0, modalPanel.context.height() - elt.clientHeight);
+ this.doSetupPosition(modalPanel, elt, 0, modalPanel.height() - elt.clientHeight);
};
ModalPanel.Sizer.SWL.doDiff = function(dx, dy) {
return new ModalPanel.Sizer.Diff(dx, 0, -dx, dy);
@@ -321,7 +322,7 @@
ModalPanel.Sizer.SWU = new ModalPanel.Sizer();
ModalPanel.Sizer.SWU.doPosition = function (modalPanel, elt) {
this.doSetupSize(modalPanel, elt);
- this.doSetupPosition(modalPanel, elt, 0, modalPanel.context.height() - elt.clientHeight);
+ this.doSetupPosition(modalPanel, elt, 0, modalPanel.height() - elt.clientHeight);
};
ModalPanel.Sizer.SWU.doDiff = function(dx, dy) {
return new ModalPanel.Sizer.Diff(dx, 0, -dx, dy);
@@ -329,7 +330,7 @@
ModalPanel.Sizer.W = new ModalPanel.Sizer();
ModalPanel.Sizer.W.doPosition = function (modalPanel, elt) {
- elt.style.height = modalPanel.context.height() + 'px';
+ elt.style.height = modalPanel.height() + 'px';
this.doSetupPosition(modalPanel, elt, 0, 0);
};
ModalPanel.Sizer.W.doDiff = function(dx, dy) {
@@ -347,8 +348,7 @@
ModalPanel.Header = new ModalPanel.Sizer();
ModalPanel.Header.doPosition = function (modalPanel, elt) {
- //elt.style.width = modalPanel.context.width() - 2*sizeA + 'px';
- //this.doSetupPosition(modalPanel, elt, 0, 0);
+
};
ModalPanel.Header.doDiff = function(dx, dy) {
return new ModalPanel.Sizer.Diff(dx, dy, 0, 0);
Modified: trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
===================================================================
--- trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2008-04-27 21:34:31 UTC (rev 8216)
+++ trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2008-04-27 21:34:37 UTC (rev 8217)
@@ -105,13 +105,16 @@
tableStyle += "width: " + (width > 0 ? width : 1) + "px;";
tableStyle += "height: " + (height > 0 ? height : 1) + "px;";
+ divStyle = "";
+
} else {
tableStyle = "height: 100%; width: 100%;";
+ divStyle = "overflow: hidden;";
}
]]>
</jsp:scriptlet>
- <div id="#{clientId}ContentDiv" style="position: absolute; z-index: 2; overflow: hidden; #{component.attributes['style']}" class="dr-mpnl-pnl rich-mp-content">
+ <div id="#{clientId}ContentDiv" style="#{divStyle} position: absolute; z-index: 2; #{component.attributes['style']}" class="dr-mpnl-pnl rich-mp-content">
<jsp:scriptlet>
<![CDATA[if(component.getFacet("controls")!=null && component.getFacet("controls").isRendered()) {]]>
</jsp:scriptlet>
@@ -122,7 +125,7 @@
<![CDATA[}]]>
</jsp:scriptlet>
- <table style="#{tableStyle}" border="0" cellpadding="0" cellspacing="0">
+ <table id="#{clientId}ContentTable" style="#{tableStyle}" border="0" cellpadding="0" cellspacing="0">
<jsp:scriptlet>
<![CDATA[if(component.getFacet("header")!=null && component.getFacet("header").isRendered()) {]]>
</jsp:scriptlet>
16 years, 8 months
JBoss Rich Faces SVN: r8216 - trunk/samples/modalpanel-sample/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-04-27 17:34:31 -0400 (Sun, 27 Apr 2008)
New Revision: 8216
Modified:
trunk/samples/modalpanel-sample/src/main/webapp/pages/index.jsp
Log:
http://jira.jboss.com/jira/browse/RF-3079
http://jira.jboss.com/jira/browse/RF-2366
Modified: trunk/samples/modalpanel-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/modalpanel-sample/src/main/webapp/pages/index.jsp 2008-04-27 18:57:51 UTC (rev 8215)
+++ trunk/samples/modalpanel-sample/src/main/webapp/pages/index.jsp 2008-04-27 21:34:31 UTC (rev 8216)
@@ -148,7 +148,8 @@
<a href="javascript:Richfaces.showModalPanel(':_panel', {top: 'auto', width: 800});">Show: width = 800; top = auto</a>
<a href="javascript:Richfaces.showModalPanel(':_panel', {width: 1});">Show: width = 1</a>
<a href="javascript:Richfaces.showModalPanel('eventInfoID');">Show autosized panel</a>
- </f:verbatim>
+ <a href="javascript:Richfaces.showModalPanel('eventInfoID', {width: 1100, height: 700});">Show big autosized panel</a>
+ </f:verbatim>
<mp:modalPanel id="eventInfoID" autosized="true" minHeight="250" minWidth="200" moveable="true" style="overflow: true;">
@@ -161,7 +162,7 @@
</f:facet>
- <h:outputText value="Eventsaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ..." />
+ <h:outputText value="Eventsaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ..." />
</mp:modalPanel>
</h:panelGrid>
16 years, 8 months
JBoss Rich Faces SVN: r8215 - trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-04-27 14:57:51 -0400 (Sun, 27 Apr 2008)
New Revision: 8215
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java
Log:
http://jira.jboss.com/jira/browse/RF-3113
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java 2008-04-26 11:33:42 UTC (rev 8214)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java 2008-04-27 18:57:51 UTC (rev 8215)
@@ -842,6 +842,15 @@
*/
public UIComponent findComponentFor(UIComponent component,
String id) {
+
+ if (id == null) {
+ throw new NullPointerException("id is null!");
+ }
+
+ if (id.length() == 0) {
+ return null;
+ }
+
UIComponent target = null;
UIComponent parent = component;
UIComponent root = component;
16 years, 8 months
JBoss Rich Faces SVN: r8214 - trunk/ui/message/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-04-26 07:33:42 -0400 (Sat, 26 Apr 2008)
New Revision: 8214
Modified:
trunk/ui/message/src/main/config/component/message.xml
Log:
http://jira.jboss.com/jira/browse/RF-730
http://jira.jboss.com/jira/browse/RF-2220
Corrected language and added default values
Modified: trunk/ui/message/src/main/config/component/message.xml
===================================================================
--- trunk/ui/message/src/main/config/component/message.xml 2008-04-26 11:33:32 UTC (rev 8213)
+++ trunk/ui/message/src/main/config/component/message.xml 2008-04-26 11:33:42 UTC (rev 8214)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://labs.jboss.com/jbossrichfaces/component-config.dtd
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://labs.jboss.com/jbossrichfaces/component-config.dtd
">
<components>
@@ -41,10 +41,11 @@
<property>
<name>level</name>
<classname>java.lang.String</classname>
- <defaultvalue>"ALL"</defaultvalue>
<description>
- comma-separated list of messages categoris which should be displayed
+ A comma-separated list of messages categories which should be displayed. Default value is "ALL".
</description>
+ <defaultvalue>"ALL"</defaultvalue>
+
</property>
<property attachedstate="true">
@@ -69,7 +70,7 @@
<classname>boolean</classname>
<defaultvalue>true</defaultvalue>
<description>
- Flag indicating whether the summary portion of displayed messages should be included. Default value is "true"
+ Flag indicating whether the summary portion of displayed messages should be included. Default value is "true".
</description>
</property>
@@ -78,7 +79,7 @@
<classname>boolean</classname>
<defaultvalue>false</defaultvalue>
<description>
- Flag indicating whether the summary portion of displayed messages should be included. Default value is "false"
+ Flag indicating whether the summary portion of displayed messages should be included. Default value is "false".
</description>
</property>
@@ -95,7 +96,7 @@
<classname>boolean</classname>
<defaultvalue>false</defaultvalue>
<description>
- Flag indicating whether the detail portion of the message should be displayed as a tooltip
+ Flag indicating whether the detail portion of the message should be displayed as a tooltip. Default value is "false".
</description>
</property>
@@ -306,7 +307,7 @@
<name>level</name>
<classname>java.lang.String</classname>
<description>
- comma-separated list of messages categoris which should be displayed
+ A comma-separated list of messages categories which should be displayed. Default value is "ALL".
</description>
<defaultvalue>"ALL"</defaultvalue>
@@ -317,7 +318,7 @@
<classname>java.lang.String</classname>
<defaultvalue>"list"</defaultvalue>
<description>
- The type of layout markup to use when rendering error messages. Valid values are "table" (an HTML table), "list" (an HTML list) and iterator. If not specified, the default value is "list"
+ The type of layout markup to use when rendering error messages. Possible values are "table" (an HTML table), "list" (an HTML list) and iterator. If not specified, the default value is "list".
</description>
</property>
@@ -361,7 +362,7 @@
<classname>boolean</classname>
<defaultvalue>false</defaultvalue>
<description>
- Flag indicating whether the detail portion of the message should be displayed as a tooltip
+ Flag indicating whether the detail portion of the message should be displayed as a tooltip. Default value is "false".
</description>
</property>
16 years, 8 months
JBoss Rich Faces SVN: r8213 - trunk/ui/menu-components/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-04-26 07:33:32 -0400 (Sat, 26 Apr 2008)
New Revision: 8213
Modified:
trunk/ui/menu-components/src/main/config/component/menucomponents.xml
Log:
http://jira.jboss.com/jira/browse/RF-730
http://jira.jboss.com/jira/browse/RF-2220
Corrected language and added default values
Modified: trunk/ui/menu-components/src/main/config/component/menucomponents.xml
===================================================================
--- trunk/ui/menu-components/src/main/config/component/menucomponents.xml 2008-04-26 11:33:22 UTC (rev 8212)
+++ trunk/ui/menu-components/src/main/config/component/menucomponents.xml 2008-04-26 11:33:32 UTC (rev 8213)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://labs.jboss.com/jbossrichfaces/component-config.dtd
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://labs.jboss.com/jbossrichfaces/component-config.dtd
">
<components>
@@ -47,8 +47,8 @@
<property>
<name>disabled</name>
<classname>boolean</classname>
- <description>If "true" sets state of the item to disabled state.
- "false" is default</description>
+ <description>If "true" sets state of the item to disabled state. Default value is "false".
+ </description>
<defaultvalue>false</defaultvalue>
</property>
<property required="true">
@@ -78,13 +78,13 @@
<name>event</name>
<classname>java.lang.String</classname>
<description>Defines the event on the representation element that
- triggers the menu's appearance</description>
+ triggers the menu's appearance. Default value is "onmouseover".</description>
<defaultvalue>"onmouseover"</defaultvalue>
</property>
<property>
<name>showDelay</name>
<classname>java.lang.Integer</classname>
- <description>Delay between event and menu showing</description>
+ <description>Delay between event and menu showing. Default value is "300".</description>
<defaultvalue><![CDATA[new Integer(300)]]></defaultvalue>
</property>
<property>
@@ -126,13 +126,13 @@
<property>
<name>selectStyle</name>
<classname>java.lang.String</classname>
- <description>CSS style rules to be applied to selected items</description>
+ <description>CSS style rules to be applied to selected items</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>selectClass</name>
<classname>java.lang.String</classname>
- <description>Class to be applied to selected items</description>
+ <description>Class to be applied to selected items</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
@@ -143,15 +143,15 @@
<property>
<name>iconClass</name>
<classname>java.lang.String</classname>
- <description>Class to be applied to icon element</description>
+ <description>Class to be applied to icon element</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>labelClass</name>
- <classname>java.lang.String</classname>
- <description>Class to be applied to label element</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
+ <property>
+ <name>labelClass</name>
+ <classname>java.lang.String</classname>
+ <description>Class to be applied to label element</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
<property>
<name>converter</name>
<classname>javax.faces.convert.Converter</classname>
@@ -213,8 +213,8 @@
<property>
<name>disabled</name>
<classname>boolean</classname>
- <description>If "true" sets state of the item to disabled state.
- "false" is default</description>
+ <description>If "true" sets state of the item to disabled state. . Default value is "false".
+ </description>
<defaultvalue>false</defaultvalue>
</property>
<!-- property>
@@ -270,33 +270,33 @@
<property>
<name>selectClass</name>
<classname>java.lang.String</classname>
- <description>Class to be applied to selected items</description>
+ <description>Class to be applied to selected items</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>selectStyle</name>
<classname>java.lang.String</classname>
- <description>CSS style rules to be applied to selected items</description>
+ <description>CSS style rules to be applied to selected items</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>iconClass</name>
<classname>java.lang.String</classname>
- <description>Class to be applied to icon element</description>
+ <description>Class to be applied to icon element</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>iconStyle</name>
<classname>java.lang.String</classname>
- <description>CSS style rules to be applied to icon element</description>
+ <description>CSS style rules to be applied to icon element</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>labelClass</name>
- <classname>java.lang.String</classname>
- <description>Class to be applied to label element</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
+ <property>
+ <name>labelClass</name>
+ <classname>java.lang.String</classname>
+ <description>Class to be applied to label element</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
&ajax_component_attributes;
</component>
16 years, 8 months
JBoss Rich Faces SVN: r8212 - trunk/ui/listShuttle/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-04-26 07:33:22 -0400 (Sat, 26 Apr 2008)
New Revision: 8212
Modified:
trunk/ui/listShuttle/src/main/config/component/listShuttle.xml
Log:
http://jira.jboss.com/jira/browse/RF-730
http://jira.jboss.com/jira/browse/RF-2220
Corrected language and added default values
Modified: trunk/ui/listShuttle/src/main/config/component/listShuttle.xml
===================================================================
--- trunk/ui/listShuttle/src/main/config/component/listShuttle.xml 2008-04-26 11:33:11 UTC (rev 8211)
+++ trunk/ui/listShuttle/src/main/config/component/listShuttle.xml 2008-04-26 11:33:22 UTC (rev 8212)
@@ -70,14 +70,14 @@
<property>
<name>switchByClick</name>
<classname>boolean</classname>
- <description>If "true", dragging between lists realized by click </description>
+ <description>If "true", dragging between lists realized by click. Default value is "false". </description>
<defaultvalue>false</defaultvalue>
</property>
<property>
<name>sourceListWidth</name>
<classname>java.lang.String</classname>
<description>
- Defines width of a source list
+ Defines width of a source list. Default value is "140".
</description>
<defaultvalue>"140"</defaultvalue>
</property>
@@ -85,7 +85,7 @@
<name>targetListWidth</name>
<classname>java.lang.String</classname>
<description>
- Defines width of a target list
+ Defines width of a target list. Default value is "140".
</description>
<defaultvalue>"140"</defaultvalue>
</property>
@@ -93,7 +93,7 @@
<name>listsHeight</name>
<classname>java.lang.String</classname>
<description>
- Defines height of the list
+ Defines height of the list. Default value is "140".
</description>
<defaultvalue>"140"</defaultvalue>
</property>
@@ -101,7 +101,7 @@
<name>orderControlsVisible</name>
<classname>boolean</classname>
<description>
- If "false", 'Up' and 'Down' controls aren't displayed.
+ If "false", 'Up' and 'Down' controls aren't displayed. Default value is "true".
</description>
<defaultvalue>true</defaultvalue>
</property>
@@ -109,7 +109,7 @@
<name>fastOrderControlsVisible</name>
<classname>boolean</classname>
<description>
- If "false", 'Top' and 'Bottom' controls aren't displayed.
+ If "false", 'Top' and 'Bottom' controls aren't displayed. Default value is "true".
</description>
<defaultvalue>true</defaultvalue>
</property>
@@ -118,7 +118,7 @@
<name>moveControlsVisible</name>
<classname>boolean</classname>
<description>
- If "false", 'Copy' and 'Remove' controls aren't displayed
+ If "false", 'Copy' and 'Remove' controls aren't displayed. Default value is "true".
</description>
<defaultvalue>true</defaultvalue>
</property>
@@ -126,7 +126,7 @@
<name>fastMoveControlsVisible</name>
<classname>boolean</classname>
<description>
- If "false", 'Copy All' and 'Remove All' controls aren't displayed
+ If "false", 'Copy All' and 'Remove All' controls aren't displayed. Default value is "true".
</description>
<defaultvalue>true</defaultvalue>
</property>
@@ -145,7 +145,7 @@
<name>showButtonLabels</name>
<classname>boolean</classname>
<description>
- Shows a label for a button
+ Shows a label for a button. Default value is "true".
</description>
<defaultvalue><![CDATA[true]]></defaultvalue>
</property>
@@ -313,7 +313,7 @@
<name>controlsType</name>
<classname>java.lang.String</classname>
<description>
- Defines type of a control: button or none.
+ Defines type of a control: button or none. Default value is "button".
</description>
<defaultvalue><![CDATA["button"]]></defaultvalue>
</property>
16 years, 8 months