JBoss Rich Faces SVN: r10539 - trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: pgolawski
Date: 2008-09-23 02:39:57 -0400 (Tue, 23 Sep 2008)
New Revision: 10539
Modified:
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/TableSelectionRendererContributor.java
Log:
set event handler for onselectionchange by default
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/TableSelectionRendererContributor.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/TableSelectionRendererContributor.java 2008-09-23 06:38:26 UTC (rev 10538)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/TableSelectionRendererContributor.java 2008-09-23 06:39:57 UTC (rev 10539)
@@ -17,6 +17,7 @@
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.javascript.JSFunctionDefinition;
+import org.ajax4jsf.javascript.JSReference;
import org.ajax4jsf.model.DataVisitor;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.richfaces.model.selection.ClientSelection;
@@ -202,14 +203,7 @@
attribut = "";
}
scriptOptions.addOption("selectionMode", attribut);
-
- attribut = attributes.get("onselectionchange");
- if (attribut == null) {
- attribut = "";
- }
- JSFunctionDefinition function = new JSFunctionDefinition();
- function.addToBody(attribut);
- scriptOptions.addEventHandler("onselectionchange", function);
+ scriptOptions.addEventHandler("onselectionchange");
return scriptOptions;
}
16 years, 3 months
JBoss Rich Faces SVN: r10538 - trunk/ui/extendedDataTable/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: pgolawski
Date: 2008-09-23 02:38:26 -0400 (Tue, 23 Sep 2008)
New Revision: 10538
Modified:
trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java
Log:
Adding facets to both dataChildren and fixed children to make both supports and header/footer work
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java 2008-09-22 16:36:43 UTC (rev 10537)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java 2008-09-23 06:38:26 UTC (rev 10538)
@@ -20,6 +20,7 @@
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.event.AjaxEvent;
import org.ajax4jsf.model.ExtendedDataModel;
+import org.apache.commons.collections.iterators.IteratorChain;
import org.richfaces.event.extdt.ChangeColumnVisibilityEvent;
import org.richfaces.event.extdt.ColumnResizeEvent;
import org.richfaces.event.extdt.DragDropEvent;
@@ -335,5 +336,20 @@
protected void resetModel() {
super.resetDataModel();
}
+
+ @SuppressWarnings("unchecked")
+ public Iterator<UIComponent> fixedChildren() {
+ IteratorChain chain = new IteratorChain(getFacets().values().iterator());
+ //RF-1248 Adding facets to both dataChildren and fixed children
+ //To make both supports and header/footer work
+ for (Iterator<UIComponent> i = getChildren().iterator(); i.hasNext(); ) {
+ UIComponent kid = (UIComponent)i.next();
+ if (kid instanceof Column || kid instanceof UIColumn) {
+ chain.addIterator(kid.getFacets().values().iterator());
+ }
+ }
+
+ return chain;
+ }
}
16 years, 3 months
JBoss Rich Faces SVN: r10537 - trunk/sandbox/samples/editor-sample/src/main/java/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-09-22 12:36:43 -0400 (Mon, 22 Sep 2008)
New Revision: 10537
Modified:
trunk/sandbox/samples/editor-sample/src/main/java/org/richfaces/EditorBean.java
Log:
Adding basic attributes for Editor
Modified: trunk/sandbox/samples/editor-sample/src/main/java/org/richfaces/EditorBean.java
===================================================================
--- trunk/sandbox/samples/editor-sample/src/main/java/org/richfaces/EditorBean.java 2008-09-22 16:32:28 UTC (rev 10536)
+++ trunk/sandbox/samples/editor-sample/src/main/java/org/richfaces/EditorBean.java 2008-09-22 16:36:43 UTC (rev 10537)
@@ -28,7 +28,7 @@
}
public String action1(){
- value += value;
+ value += "1";
return null;
}
}
16 years, 3 months
JBoss Rich Faces SVN: r10536 - in trunk/sandbox/samples/editor-sample/src/main: webapp/WEB-INF and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-09-22 12:32:28 -0400 (Mon, 22 Sep 2008)
New Revision: 10536
Modified:
trunk/sandbox/samples/editor-sample/src/main/java/org/richfaces/EditorBean.java
trunk/sandbox/samples/editor-sample/src/main/webapp/WEB-INF/web.xml
trunk/sandbox/samples/editor-sample/src/main/webapp/pages/editor.jsp
Log:
Adding basic attributes for Editor
Modified: trunk/sandbox/samples/editor-sample/src/main/java/org/richfaces/EditorBean.java
===================================================================
--- trunk/sandbox/samples/editor-sample/src/main/java/org/richfaces/EditorBean.java 2008-09-22 16:32:22 UTC (rev 10535)
+++ trunk/sandbox/samples/editor-sample/src/main/java/org/richfaces/EditorBean.java 2008-09-22 16:32:28 UTC (rev 10536)
@@ -4,6 +4,10 @@
import java.util.Map;
public class EditorBean {
+
+ private String value = "Some value....";
+
+
private Map<String, Object> dataMap;
public EditorBean () {
dataMap = new HashMap<String, Object>();
@@ -16,5 +20,15 @@
public void setDataMap(Map<String, Object> dataMap) {
this.dataMap = dataMap;
}
+ public String getValue() {
+ return value;
+ }
+ public void setValue(String value) {
+ this.value = value;
+ }
+ public String action1(){
+ value += value;
+ return null;
+ }
}
Modified: trunk/sandbox/samples/editor-sample/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/sandbox/samples/editor-sample/src/main/webapp/WEB-INF/web.xml 2008-09-22 16:32:22 UTC (rev 10535)
+++ trunk/sandbox/samples/editor-sample/src/main/webapp/WEB-INF/web.xml 2008-09-22 16:32:28 UTC (rev 10536)
@@ -7,7 +7,15 @@
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+ </context-param>
<context-param>
+ <param-name>org.ajax4jsf.xmlparser.ORDER</param-name>
+ <param-value>NONE</param-value>
+ </context-param>
+ <context-param>
<param-name>org.ajax4jsf.SKIN</param-name>
<param-value>#{skinBean.skin}</param-value>
</context-param>
@@ -39,7 +47,7 @@
</servlet>
<servlet-mapping>
<servlet-name>TinyMCELoaderServlet</servlet-name>
- <url-pattern>/a4j/g/3_3_0-SNAPSHOTorg/richfaces/renderkit/html/scripts/tiny_mce/*</url-pattern>
+ <url-pattern>/a4j/g/3_3_0-SNAPSHOTscripts/tiny_mce/*</url-pattern>
</servlet-mapping>
<login-config>
<auth-method>BASIC</auth-method>
Modified: trunk/sandbox/samples/editor-sample/src/main/webapp/pages/editor.jsp
===================================================================
--- trunk/sandbox/samples/editor-sample/src/main/webapp/pages/editor.jsp 2008-09-22 16:32:22 UTC (rev 10535)
+++ trunk/sandbox/samples/editor-sample/src/main/webapp/pages/editor.jsp 2008-09-22 16:32:28 UTC (rev 10536)
@@ -8,12 +8,19 @@
</head>
<body>
<f:view >
- <h:form>
- <ed:editor id="editor_id" >
+ <h:form>
+ <h:panelGroup>
+ <ed:editor id="editorId" value="#{editorBean.value}" width="100" height="100">
<f:param name="mode" value="textareas"/>
- <f:param name="theme" value="advanced"/>
+ <f:param name="theme" value="advanced"/>
</ed:editor>
- <h:commandButton value="Submit"/>
+
+ </h:panelGroup>
+
+ <br/>
+ <h:commandButton value="h:commandButton" action="#{editorBean.action1}"/>
+ <a4j:commandButton value="a4j:commandButton" action="#{editorBean.action1}"
+ reRender="editorId"/>
</h:form>
</f:view>
</body>
16 years, 3 months
JBoss Rich Faces SVN: r10535 - in trunk/sandbox/ui/editor/src/main: java/org/richfaces/component and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-09-22 12:32:22 -0400 (Mon, 22 Sep 2008)
New Revision: 10535
Added:
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js
Modified:
trunk/sandbox/ui/editor/src/main/config/component/editor.xml
trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/TinyMceLoaderServlet.java
trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java
trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java
trunk/sandbox/ui/editor/src/main/templates/editor.jspx
Log:
Adding basic attributes for Editor
Modified: trunk/sandbox/ui/editor/src/main/config/component/editor.xml
===================================================================
--- trunk/sandbox/ui/editor/src/main/config/component/editor.xml 2008-09-22 16:26:48 UTC (rev 10534)
+++ trunk/sandbox/ui/editor/src/main/config/component/editor.xml 2008-09-22 16:32:22 UTC (rev 10535)
@@ -34,5 +34,21 @@
</description>
<defaultvalue>"TinyMCE"</defaultvalue>
</property>
+ <property>
+ <name>width</name>
+ <classname>int</classname>
+ <description>
+ Attribute defines width of component. Default value is "300".
+ </description>
+ <defaultvalue>300</defaultvalue>
+ </property>
+ <property>
+ <name>height</name>
+ <classname>int</classname>
+ <description>
+ Attribute defines height of component. Default value is "200".
+ </description>
+ <defaultvalue>200</defaultvalue>
+ </property>
</component>
</components>
Modified: trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/TinyMceLoaderServlet.java
===================================================================
--- trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/TinyMceLoaderServlet.java 2008-09-22 16:26:48 UTC (rev 10534)
+++ trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/TinyMceLoaderServlet.java 2008-09-22 16:32:22 UTC (rev 10535)
@@ -12,76 +12,87 @@
import org.apache.commons.logging.LogFactory;
/**
- * Servlet for loading TinyMCE resources
+ * Servlet for loading TinyMCE resources
*
- * @web.servlet name="TinyMCELoaderServlet" display-name="TinyMCE Loader Servlet"
+ * @web.servlet name="TinyMCELoaderServlet" display-name="TinyMCE Loader
+ * Servlet"
*
* @web.servlet-mapping url-pattern="/a4j/g/3_3_0-SNAPSHOTorg/richfaces/renderkit/html/scripts/tiny_mce/*"
*
* @author Alexandr Levkovsky
- *
+ *
*/
public class TinyMceLoaderServlet extends javax.servlet.http.HttpServlet {
- private static final long serialVersionUID = 1L;
- protected final Log logger = LogFactory.getLog(getClass());
-
- private static final String TINYMCE_RESOURCES_LOCATION = "org/richfaces/renderkit/html/scripts/tiny_mce";
+ private static final long serialVersionUID = 1L;
+ protected final Log logger = LogFactory.getLog(getClass());
- protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException {
- String path = TINYMCE_RESOURCES_LOCATION + request.getPathInfo();
- try {
+ private static final String TINYMCE_RESOURCES_LOCATION = "org/richfaces/renderkit/html/scripts/tiny_mce";
- copyFileToOutput(path, response.getOutputStream());
+ protected void doGet(HttpServletRequest request,
+ HttpServletResponse response) throws ServletException {
+ String requestedResource = request.getPathInfo();
+ if (requestedResource.indexOf(".jsf") > 0) {
+ requestedResource = requestedResource.split(".jsf")[0];
+ }
+ String path = TINYMCE_RESOURCES_LOCATION + requestedResource;
+ try {
- } catch (Exception e) {
- e.printStackTrace();
- }
+ if(requestedResource.indexOf(".js") > 0){
+ response.setContentType("text/javascript");
+ }
+ copyFileToOutput(path, response.getOutputStream());
- }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
- /**
- * Open input stream using path to file
- * @param path
- * @return
- */
- private InputStream getFileStream(String path) {
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- InputStream is = cl.getResourceAsStream(path);
+ }
- return is;
- }
+ /**
+ * Open input stream using path to file
+ *
+ * @param path
+ * @return
+ */
+ private InputStream getFileStream(String path) {
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ InputStream is = cl.getResourceAsStream(path);
- /**
- * Copies file to output stream
- * @param path
- * @param os
- */
- private void copyFileToOutput(String path, OutputStream os) {
- InputStream is = getFileStream(path);
+ return is;
+ }
- try {
- if (is != null) {
+ /**
+ * Copies file to output stream
+ *
+ * @param path
+ * @param os
+ */
+ private void copyFileToOutput(String path, OutputStream os) {
+ InputStream is = getFileStream(path);
- int size = is.available();
- byte[] buf = new byte[size];
- int i = 0;
- while ((i = is.read(buf)) != -1) {
- os.write(buf, 0, i);
- }
- } else {
- logger.warn("Cannot load TinyMCE resource: " + path);
- }
- } catch (IOException ioex) {
- logger.warn("Cannot load TinyMCE resource: " + path);
- } finally {
- if (is != null) {
try {
- is.close();
+ if (is != null) {
+
+ int size = is.available();
+ byte[] buf = new byte[size];
+ int i = 0;
+ while ((i = is.read(buf)) != -1) {
+ os.write(buf, 0, i);
+ }
+ } else {
+ logger.warn("Cannot load TinyMCE resource: " + path);
+ }
} catch (IOException ioex) {
- //just ignore it here
+ logger.warn("Cannot load TinyMCE resource: " + path);
+ } finally {
+ if (is != null) {
+ try {
+ is.close();
+ } catch (IOException ioex) {
+ // just ignore it here
+ }
+ }
}
- }
}
- }
}
Modified: trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java
===================================================================
--- trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java 2008-09-22 16:26:48 UTC (rev 10534)
+++ trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java 2008-09-22 16:32:22 UTC (rev 10535)
@@ -6,24 +6,32 @@
package org.richfaces.component;
-import javax.faces.component.UIComponentBase;
+import javax.faces.component.UIInput;
/**
* JSF component class
* @author Alexandr Levkovsky
*
*/
-public abstract class UIEditor extends UIComponentBase {
+public abstract class UIEditor extends UIInput {
- public static final String COMPONENT_TYPE = "org.richfaces.Editor";
+ public static final String COMPONENT_TYPE = "org.richfaces.Editor";
- public static final String COMPONENT_FAMILY = "org.richfaces.Editor";
-
- public abstract void setType(String type);
+ public static final String COMPONENT_FAMILY = "org.richfaces.Editor";
- public abstract String getType();
+ public abstract void setType(String type);
- public boolean getRendersChildren() {
- return true;
- }
+ public abstract String getType();
+
+ public abstract int getWidth();
+
+ public abstract void setWidth(int width);
+
+ public abstract int getHeight();
+
+ public abstract void setHeight(int height);
+
+ public boolean getRendersChildren() {
+ return true;
+ }
}
Modified: trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java
===================================================================
--- trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java 2008-09-22 16:26:48 UTC (rev 10534)
+++ trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java 2008-09-22 16:32:22 UTC (rev 10535)
@@ -29,38 +29,57 @@
import javax.faces.component.UIParameter;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
+import javax.faces.convert.ConverterException;
import org.ajax4jsf.javascript.ScriptUtils;
-import org.ajax4jsf.renderkit.HeaderResourcesRendererBase;
+import org.ajax4jsf.util.InputUtils;
import org.richfaces.component.UIEditor;
+
/**
* @author Pavel Yaschenko - mailto:pyaschenko@exadel.com created 09.17.2008
*
*/
-public class EditorRendererBase extends HeaderResourcesRendererBase {
+public class EditorRendererBase extends InputRendererBase {
- @Override
- protected Class<? extends UIComponent> getComponentClass() {
- return UIEditor.class;
- }
+ @Override
+ protected Class<? extends UIComponent> getComponentClass() {
+ return UIEditor.class;
+ }
- public void writeEditorScript(FacesContext context, UIEditor component) throws IOException {
+ public void writeEditorScriptParameters(FacesContext context,
+ UIEditor component) throws IOException {
- ResponseWriter writer = context.getResponseWriter();
- List<UIComponent> children = component.getChildren();
- Map<String, Object> params = new HashMap<String, Object>();
- for (UIComponent child : children) {
- UIParameter c = (UIParameter) child;
- if (c instanceof UIParameter) {
- params.put(c.getName(), c.getValue());
- }
+ ResponseWriter writer = context.getResponseWriter();
+ List<UIComponent> children = component.getChildren();
+ Map<String, Object> params = new HashMap<String, Object>();
+ for (UIComponent child : children) {
+ UIParameter c = (UIParameter) child;
+ if (c instanceof UIParameter) {
+ params.put(c.getName(), c.getValue());
+ }
+ }
+ if (component.getType() != null
+ && component.getType().equalsIgnoreCase("TinyMCE")) {
+ writer.writeText("//<![CDATA[ \n", null);
+ writer.writeText("tinyMCE.init(", null);
+ writer.writeText(ScriptUtils.toScript(params), null);
+ writer.writeText(");", null);
+ writer.writeText("\n //]]>", null);
+ } else {
+ // TODO add supporting for other types
+ }
}
- if (component.getType() != null && component.getType().equalsIgnoreCase("TinyMCE")) {
- writer.writeText("tinyMCE.init(", null);
- writer.writeText(ScriptUtils.toScript(params), null);
- writer.writeText(");", null);
- } else {
- // TODO add supporting for other types
+
+ @Override
+ public Object getConvertedValue(FacesContext context,
+ UIComponent component, Object submittedValue)
+ throws ConverterException {
+ return InputUtils.getConvertedValue(context, component, submittedValue);
}
- }
+
+ protected String getConvertedStringValue(FacesContext context,
+ UIEditor component, Object value) {
+ return InputUtils.getConvertedStringValue(context, component, value);
+ }
+
}
Added: trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js
===================================================================
Property changes on: trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Modified: trunk/sandbox/ui/editor/src/main/templates/editor.jspx
===================================================================
--- trunk/sandbox/ui/editor/src/main/templates/editor.jspx 2008-09-22 16:26:48 UTC (rev 10534)
+++ trunk/sandbox/ui/editor/src/main/templates/editor.jspx 2008-09-22 16:32:22 UTC (rev 10535)
@@ -1,31 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<f:root
- xmlns:f="http://jsf.exadel.com/template"
- xmlns:vcp=" http://jsf.exadel.com/vcp"
- xmlns:ui=" http://jsf.exadel.com/ui"
- xmlns:x=" http://jsf.exadel.com/vcp"
- xmlns:u="http://jsf.exadel.com/util"
- xmlns:h="http://jsf.exadel.com/header"
+ xmlns:f="http://ajax4jsf.org/cdk/template"
+ xmlns:c=" http://java.sun.com/jsf/core"
+ xmlns:ui=" http://ajax4jsf.org/cdk/ui"
+ xmlns:u=" http://ajax4jsf.org/cdk/u"
+ xmlns:jsp=" http://ajax4jsf.org/cdk/jsp"
+ xmlns:x=" http://ajax4jsf.org/cdk/x"
baseclass="org.richfaces.renderkit.EditorRendererBase"
class="org.richfaces.renderkit.html.EditorRenderer"
component="org.richfaces.component.UIEditor">
<f:clientid var="clientId"/>
<h:styles>css/editor.xcss</h:styles>
- <h:scripts>/org/richfaces/renderkit/html/scripts/tiny_mce/tiny_mce_src.js</h:scripts>
- <div id="#{clientId}" x:passThruWithExclusions="id,value,styleClass,class" class="rich-editor #{component.attributes['styleClass']}">
-
- <script type="text/javascript">
- <f:call name="writeEditorScript"></f:call>
- </script>
-
-
- <textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 100%">
- <p>Some paragraph</p>
- <p>Some other paragraph</p>
- <p>Some <b>element</b>, this is to be editor 1. <br /> This editor instance has a 100% width to it.
- <p>Some paragraph. <a href="http://www.sourceforge.net">Some link</a></p>
+ <h:scripts>scripts/tiny_mce/tiny_mce_src.js, scripts/editor.js</h:scripts>
+ <div id="#{clientId}" x:passThruWithExclusions="id,value,styleClass,class"
+ class="rich-editor #{component.attributes['styleClass']}">
+
+ <textarea id="#{clientId}TextArea" name='#{clientId}'
+ style="width: #{component.attributes['width']}px; height: #{component.attributes['height']}px;">
+ <jsp:scriptlet>
+ <![CDATA[
+ String fieldValue = (String)component.getSubmittedValue();
+ if (fieldValue == null) {
+ fieldValue = getConvertedStringValue(context, component, component.getValue());
+ }
+ variables.setVariable("fieldValue", fieldValue);
+ writer.write(fieldValue);
+ ]]>
+ </jsp:scriptlet>
</textarea>
-
+
+ <script type="text/javascript">
+ <f:call name="writeEditorScriptParameters" />
+ </script>
</div>
</f:root>
16 years, 3 months
JBoss Rich Faces SVN: r10534 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2008-09-22 12:26:48 -0400 (Mon, 22 Sep 2008)
New Revision: 10534
Modified:
trunk/docs/userguide/en/src/main/resources/images/new.png
trunk/docs/userguide/en/src/main/resources/images/updated.png
Log:
https://jira.jboss.org/jira/browse/JBDS-320
markers font is improved
Modified: trunk/docs/userguide/en/src/main/resources/images/new.png
===================================================================
(Binary files differ)
Modified: trunk/docs/userguide/en/src/main/resources/images/updated.png
===================================================================
(Binary files differ)
16 years, 3 months
JBoss Rich Faces SVN: r10533 - trunk/test-applications/regressionArea.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-09-22 11:39:35 -0400 (Mon, 22 Sep 2008)
New Revision: 10533
Modified:
trunk/test-applications/regressionArea/readMe.txt
Log:
Update readMe
Modified: trunk/test-applications/regressionArea/readMe.txt
===================================================================
--- trunk/test-applications/regressionArea/readMe.txt 2008-09-22 15:10:48 UTC (rev 10532)
+++ trunk/test-applications/regressionArea/readMe.txt 2008-09-22 15:39:35 UTC (rev 10533)
@@ -2,10 +2,12 @@
2. Open regressionArea/pom.xml file. Define there jboss home property.
-3. Launch 'build.bat' to build project.
+3. Copy data source file from /regreassionArea/Seam-ear/resources/seam-ds.xml to jboss deploy dir.
-4. Launch 'Test.bat' to start selenium testing.
+4. Launch 'build.bat' to build project.
+5. Launch 'Test.bat' to start selenium testing.
+
-----------------------------------------------------
16 years, 3 months
JBoss Rich Faces SVN: r10532 - trunk/test-applications/regressionArea.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-09-22 11:10:48 -0400 (Mon, 22 Sep 2008)
New Revision: 10532
Modified:
trunk/test-applications/regressionArea/pom.xml
Log:
Add repo
Modified: trunk/test-applications/regressionArea/pom.xml
===================================================================
--- trunk/test-applications/regressionArea/pom.xml 2008-09-22 15:07:47 UTC (rev 10531)
+++ trunk/test-applications/regressionArea/pom.xml 2008-09-22 15:10:48 UTC (rev 10532)
@@ -45,6 +45,18 @@
<enabled>true</enabled>
</releases>
</repository>
+ <repository>
+ <id>openqa-snapshots</id>
+ <name>OpenQA Snapshots Repository</name>
+ <url>http://archiva.openqa.org/repository/snapshots</url>
+ <layout>default</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </repository>
</repositories>
<properties>
16 years, 3 months
JBoss Rich Faces SVN: r10531 - in trunk/test-applications/seleniumTest/richfaces/src: test/java/org/richfaces/testng and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-09-22 11:07:47 -0400 (Mon, 22 Sep 2008)
New Revision: 10531
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxValidator/ajaxValidatorTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxValidatorTest.java
Log:
AjaxValidator test completed
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxValidator/ajaxValidatorTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxValidatorTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxValidatorTest.java 2008-09-22 15:05:32 UTC (rev 10530)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxValidatorTest.java 2008-09-22 15:07:47 UTC (rev 10531)
@@ -6,11 +6,122 @@
public class AjaxValidatorTest extends SeleniumTestBase {
+ private static final String NAME = "name";
+
+ private static final String AGE = "age";
+
+ private static final String EMAIL = "email";
+
+ private static final String ERR_MSG_POSTFIX = "_err_msg";
+
@Test
- public void testAjaxValidatorComponent(Template template) {
+ public void testAjaxValidatorComponentWithStandartValidators(Template template) {
renderPage(template);
+
+ writeStatus("Check ajax validator component with standart validators. "
+ + "Validation has to be occured by javascript event 'onblur'");
+ String parentId = getParentId() + "_form:";
+
+ String tfNameId = parentId + NAME;
+ String tfAgeId = parentId + AGE;
+
+ String tfNameErrMsg = tfNameId + ERR_MSG_POSTFIX;
+ String tfAgeErrMsg = tfAgeId + ERR_MSG_POSTFIX;
+
+ assertNotPresent(tfNameErrMsg);
+ assertNotPresent(tfAgeErrMsg);
+
+ writeStatus("Name must be between 3 and 12 at length. Type shorter one");
+ type(tfNameId, "Mi");
+ selenium.fireEvent(tfNameId, "blur");
+ waitForAjaxCompletion();
+ assertPresent(tfNameErrMsg);
+
+ writeStatus("Age must be greater than or equal to 18. Type less than that");
+ type(tfAgeId, "3");
+ selenium.fireEvent(tfAgeId, "blur");
+ waitForAjaxCompletion();
+ assertPresent(tfAgeErrMsg);
+
+ writeStatus("Correct the inputs and leave. Error messages have to disappear");
+
+ type(tfNameId, "Mick");
+ selenium.fireEvent(tfNameId, "blur");
+ waitForAjaxCompletion();
+ assertNotPresent(tfNameErrMsg);
+
+ type(tfAgeId, "33");
+ selenium.fireEvent(tfAgeId, "blur");
+ waitForAjaxCompletion();
+ assertNotPresent(tfAgeErrMsg);
+
}
+ @Test
+ public void testAjaxValidatorComponentWithHibernateValidator(Template template) {
+ renderPage(template);
+
+ writeStatus("Check ajax validator component with hibernate validator. "
+ + "Validation has to be occured by javascript event 'onblur'");
+ String parentId = getParentId() + "_form1:";
+
+ String tfNameId = parentId + NAME;
+ String tfAgeId = parentId + AGE;
+ String tfEmailId = parentId + EMAIL;
+
+ String tfNameErrMsg = tfNameId + ERR_MSG_POSTFIX;
+ String tfAgeErrMsg = tfAgeId + ERR_MSG_POSTFIX;
+ String tfEmailErrMsg = tfEmailId + ERR_MSG_POSTFIX;
+
+ assertNotPresent(tfNameErrMsg);
+ assertNotPresent(tfAgeErrMsg);
+ assertNotPresent(tfEmailErrMsg);
+
+ writeStatus("Name must be between 3 and 12 at length. Type shorter one");
+ type(tfNameId, "Mi");
+ selenium.fireEvent(tfNameId, "blur");
+ waitForAjaxCompletion();
+ assertPresent(tfNameErrMsg);
+
+ writeStatus("Age must be between 18 and 100. Type less than that");
+ type(tfAgeId, "3");
+ selenium.fireEvent(tfAgeId, "blur");
+ waitForAjaxCompletion();
+ assertPresent(tfAgeErrMsg);
+
+ writeStatus("Email must be an email. Type not a well-formed email");
+ type(tfEmailId, "notemail");
+ selenium.fireEvent(tfEmailId, "blur");
+ waitForAjaxCompletion();
+ assertPresent(tfEmailErrMsg);
+
+ writeStatus("Correct the inputs and leave. Error messages have to disappear");
+
+ type(tfNameId, "Mick");
+ selenium.fireEvent(tfNameId, "blur");
+ waitForAjaxCompletion();
+ assertNotPresent(tfNameErrMsg);
+
+ type(tfAgeId, "33");
+ selenium.fireEvent(tfAgeId, "blur");
+ waitForAjaxCompletion();
+ assertNotPresent(tfAgeErrMsg);
+
+ type(tfEmailId, "email(a)ya.com");
+ selenium.fireEvent(tfEmailId, "blur");
+ waitForAjaxCompletion();
+ assertNotPresent(tfEmailErrMsg);
+
+ }
+
+ private void assertPresent(String id) {
+ AssertTextNotEquals(id, "", "Message [" + id + "] must not be empty on the page");
+ }
+
+ private void assertNotPresent(String id) {
+ AssertTextEquals(id, "", "Message [" + id + "] must be empty on the page");
+ }
+
@Override
public String getTestUrl() {
return "pages/ajaxValidator/ajaxValidatorTest.xhtml";
16 years, 3 months
JBoss Rich Faces SVN: r10530 - trunk/test-applications/regressionArea.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-09-22 11:05:32 -0400 (Mon, 22 Sep 2008)
New Revision: 10530
Modified:
trunk/test-applications/regressionArea/pom.xml
Log:
Add selenium repo
Modified: trunk/test-applications/regressionArea/pom.xml
===================================================================
--- trunk/test-applications/regressionArea/pom.xml 2008-09-22 14:51:59 UTC (rev 10529)
+++ trunk/test-applications/regressionArea/pom.xml 2008-09-22 15:05:32 UTC (rev 10530)
@@ -33,6 +33,18 @@
<id>repository.jboss.org</id>
<url>http://repository.jboss.org/maven2</url>
</repository>
+ <repository>
+ <id>openqa</id>
+ <name>OpenQA Repository</name>
+ <url>http://archiva.openqa.org/repository/releases</url>
+ <layout>default</layout>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
</repositories>
<properties>
16 years, 3 months