JBoss Rich Faces SVN: r14285 - branches/community/3.3.X/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-05-22 12:20:55 -0400 (Fri, 22 May 2009)
New Revision: 14285
Modified:
branches/community/3.3.X/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
Log:
Modified: branches/community/3.3.X/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
===================================================================
--- branches/community/3.3.X/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2009-05-22 15:17:51 UTC (rev 14284)
+++ branches/community/3.3.X/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2009-05-22 16:20:55 UTC (rev 14285)
@@ -370,8 +370,8 @@
}
var value = jQuery(this.comboList.activeItem).text();
-
- if(this.comboValue.value != value) {
+
+ if((this.comboValue.value && (this.comboValue.value != value)) {
Richfaces.invokeEvent(this.onchange, this.combobox, "onchange", {value:value});
}
14 years, 11 months
JBoss Rich Faces SVN: r14284 - branches/community/3.3.X/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: ochikvina
Date: 2009-05-22 11:17:51 -0400 (Fri, 22 May 2009)
New Revision: 14284
Modified:
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/tree.xml
Log:
https://jira.jboss.org/jira/browse/RF-2329 - updating the 'Details of usage' section;
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/tree.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/tree.xml 2009-05-22 15:09:26 UTC (rev 14283)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/tree.xml 2009-05-22 15:17:51 UTC (rev 14284)
@@ -554,11 +554,13 @@
</emphasis> component uses a data model to represent the tree-like
nodes structure on the page. To identify a particular node during a
client request, the model provides a set of unique keys for tree
- nodes. The <property>tree</property> can use strings as keys values
+ nodes. The <emphasis role="bold">
+ <property><rich:tree></property>
+ </emphasis> can use strings as keys values
which may contain special characters not allowed by browsers, such as
the left angle bracket (<), ampersand (&), ant etc. Thus, to
have a possibility to use unallowed characters in the
- <property>tree</property> nodes, the following converters
+ <property>tree</property> nodes keys, the following converters
are provided: </para>
<itemizedlist>
<listitem>
@@ -632,17 +634,7 @@
}
...]]></programlisting>
- <para>This is the result:</para>
-
- <figure>
- <title>The tree with the <code>org.richfaces.TreeRowKeyConverter</code> usage</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/treeRowKeyConverter.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
+ </section>
<section id="tsebro" role="updated">
<title>Built-In Drag and Drop</title>
14 years, 11 months
JBoss Rich Faces SVN: r14283 - branches/community/3.3.X/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-05-22 11:09:26 -0400 (Fri, 22 May 2009)
New Revision: 14283
Modified:
branches/community/3.3.X/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
Log:
Modified: branches/community/3.3.X/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
===================================================================
--- branches/community/3.3.X/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2009-05-22 14:52:11 UTC (rev 14282)
+++ branches/community/3.3.X/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2009-05-22 15:09:26 UTC (rev 14283)
@@ -371,11 +371,10 @@
var value = jQuery(this.comboList.activeItem).text();
- if(this.comboValue && value) {
- if(this.comboValue.value != value) {
- Richfaces.invokeEvent(this.onchange, this.combobox, "onchange", {value:value});
- }
+ if(this.comboValue.value != value) {
+ Richfaces.invokeEvent(this.onchange, this.combobox, "onchange", {value:value});
}
+
if (toSetOnly) {
var oV = this.field.value;
14 years, 11 months
JBoss Rich Faces SVN: r14282 - in branches/community/3.3.X/ui/combobox/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-05-22 10:52:11 -0400 (Fri, 22 May 2009)
New Revision: 14282
Modified:
branches/community/3.3.X/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
branches/community/3.3.X/ui/combobox/src/main/templates/combobox.jspx
Log:
https://jira.jboss.org/jira/browse/RF-5524
Modified: branches/community/3.3.X/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
===================================================================
--- branches/community/3.3.X/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2009-05-22 13:54:09 UTC (rev 14281)
+++ branches/community/3.3.X/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2009-05-22 14:52:11 UTC (rev 14282)
@@ -7,7 +7,7 @@
initialize: function(combobox, listId, parentListId, valueFieldId, fieldId, buttonId, buttonBGId, shadowId, commonStyles, userStyles,
listWidth, listHeight, itemsText, directInputSuggestions, filterNewValue,
selectFirstOnUpdate, onlistcall, onlistclose, onselected, defaultMessage, isDisabled, value,
- showDelay, hideDelay) {
+ showDelay, hideDelay, onchange) {
this.directInputSuggestions = directInputSuggestions;
this.filterNewValue = filterNewValue;
@@ -15,7 +15,8 @@
this.comboValue = document.getElementById(valueFieldId);
this.field = document.getElementById(fieldId);
this.tempItem;
-
+ this.onchange = onchange;
+
this.BUTTON_WIDTH = 17; //px
this.classes = Richfaces.mergeStyles(userStyles,commonStyles.getCommonStyles());
@@ -369,7 +370,13 @@
}
var value = jQuery(this.comboList.activeItem).text();
-
+
+ if(this.comboValue && value) {
+ if(this.comboValue.value != value) {
+ Richfaces.invokeEvent(this.onchange, this.combobox, "onchange", {value:value});
+ }
+ }
+
if (toSetOnly) {
var oV = this.field.value;
if (oV == value) {
Modified: branches/community/3.3.X/ui/combobox/src/main/templates/combobox.jspx
===================================================================
--- branches/community/3.3.X/ui/combobox/src/main/templates/combobox.jspx 2009-05-22 13:54:09 UTC (rev 14281)
+++ branches/community/3.3.X/ui/combobox/src/main/templates/combobox.jspx 2009-05-22 14:52:11 UTC (rev 14282)
@@ -217,7 +217,6 @@
value="#{value}"
x:onblur="#{component.attributes['onblur']}"
onfocus = "#{component.attributes['onfocus']}"
- onchange = "#{component.attributes['onchange']}"
style="width:#{correction}; #{inputInactiveStyle}"
autocomplete="off"
tabindex="#{component.attributes['tabindex']}"
@@ -360,7 +359,7 @@
#{this:getAsEventHandler(context, component, "onselect")},
"#{defaultLabel}",
#{disabled}, #{convertedValue},
- #{component.attributes["showDelay"]}, #{component.attributes["hideDelay"]});
+ #{component.attributes["showDelay"]}, #{component.attributes["hideDelay"]}, #{this:getAsEventHandler(context, component, "onchange")});
</script>
</div>
</f:root>
14 years, 11 months
JBoss Rich Faces SVN: r14281 - branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2009-05-22 09:54:09 -0400 (Fri, 22 May 2009)
New Revision: 14281
Added:
branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf7172.xhtml
Log:
RF-7172 test page.
Added: branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf7172.xhtml
===================================================================
--- branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf7172.xhtml (rev 0)
+++ branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf7172.xhtml 2009-05-22 13:54:09 UTC (rev 14281)
@@ -0,0 +1,28 @@
+<!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:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+<ui:composition template="/layout/layout.xhtml">
+ <ui:define name="template">
+ <h:form id="form">
+ <h:outputLink value="#" id="clickID">
+ click
+ <rich:componentControl event="onclick" for="contextMenu" operation="show">
+ <f:param name="testParam" value="testValue"/>
+ </rich:componentControl>
+ </h:outputLink>
+
+ <rich:contextMenu id="contextMenu" attached="false">
+ <rich:menuItem onselect="alert('{testParam}');" id="menuItem">
+ Test
+ <f:param name="testParam" value="{testParam}"/>
+ </rich:menuItem>
+ </rich:contextMenu>
+ </h:form>
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file
14 years, 11 months
JBoss Rich Faces SVN: r14280 - in branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng: rf7172 and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2009-05-22 09:52:50 -0400 (Fri, 22 May 2009)
New Revision: 14280
Added:
branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf7172/
branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf7172/Test.java
Log:
RF-7172 java bean test.
Added: branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf7172/Test.java
===================================================================
--- branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf7172/Test.java (rev 0)
+++ branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf7172/Test.java 2009-05-22 13:52:50 UTC (rev 14280)
@@ -0,0 +1,32 @@
+package org.richfaces.testng.rf7172;
+
+import org.richfaces.SeleniumTestBase;
+
+public class Test extends SeleniumTestBase {
+
+ @org.testng.annotations.Test
+ public void testExecute() throws Exception {
+ renderPage();
+
+ // click 'click' link
+ clickById("form:clickID");
+ // the context menu should appears
+ AssertVisible("form:contextMenu");
+ // click menu item
+ clickById("form:menuItem");
+ // get alert message
+ String str = selenium.getAlert();
+
+ try {
+ if (!str.equalsIgnoreCase("testValue"))
+ throw new AssertionError("params test failed.");
+ } catch (Exception e) {
+ System.err.println(e.getStackTrace());
+ }
+ }
+
+ @Override
+ public String getTestUrl() {
+ return "pages/rf7172.xhtml";
+ }
+}
14 years, 11 months
JBoss Rich Faces SVN: r14279 - in branches/community/3.3.X/ui: editor/src/main/java/org/richfaces/convert/seamtext/tags and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-05-22 09:46:58 -0400 (Fri, 22 May 2009)
New Revision: 14279
Modified:
branches/community/3.3.X/ui/beanValidator/src/main/java/org/richfaces/component/html/HtmlInputSecret.java
branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/EmptyHtmlTag.java
branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/FormattingTag.java
branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/HtmlTag.java
branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/LineTag.java
branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/LinkTag.java
branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/OrderedListTag.java
branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/ParagraphTag.java
branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/RootTag.java
branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/TagFactory.java
branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/UnorderedListTag.java
Log:
add copyright
Modified: branches/community/3.3.X/ui/beanValidator/src/main/java/org/richfaces/component/html/HtmlInputSecret.java
===================================================================
--- branches/community/3.3.X/ui/beanValidator/src/main/java/org/richfaces/component/html/HtmlInputSecret.java 2009-05-22 13:17:00 UTC (rev 14278)
+++ branches/community/3.3.X/ui/beanValidator/src/main/java/org/richfaces/component/html/HtmlInputSecret.java 2009-05-22 13:46:58 UTC (rev 14279)
@@ -1,3 +1,23 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
package org.richfaces.component.html;
import java.util.List;
@@ -9,6 +29,10 @@
import org.richfaces.validator.FacesBeanValidator;
+/**
+ * @author Alex.Kolonitsky
+ * @since 3.3.2.CR1
+ * */
public class HtmlInputSecret extends javax.faces.component.html.HtmlInputSecret {
@Override
Modified: branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/EmptyHtmlTag.java
===================================================================
--- branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/EmptyHtmlTag.java 2009-05-22 13:17:00 UTC (rev 14278)
+++ branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/EmptyHtmlTag.java 2009-05-22 13:46:58 UTC (rev 14279)
@@ -1,3 +1,24 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
package org.richfaces.convert.seamtext.tags;
public class EmptyHtmlTag extends HtmlTag {
Modified: branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/FormattingTag.java
===================================================================
--- branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/FormattingTag.java 2009-05-22 13:17:00 UTC (rev 14278)
+++ branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/FormattingTag.java 2009-05-22 13:46:58 UTC (rev 14279)
@@ -1,3 +1,24 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
package org.richfaces.convert.seamtext.tags;
class FormattingTag extends HtmlTag {
Modified: branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/HtmlTag.java
===================================================================
--- branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/HtmlTag.java 2009-05-22 13:17:00 UTC (rev 14278)
+++ branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/HtmlTag.java 2009-05-22 13:46:58 UTC (rev 14279)
@@ -1,3 +1,24 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
package org.richfaces.convert.seamtext.tags;
import java.io.Serializable;
@@ -2,3 +23,2 @@
import java.util.LinkedList;
-import java.util.List;
import java.util.Map;
Modified: branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/LineTag.java
===================================================================
--- branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/LineTag.java 2009-05-22 13:17:00 UTC (rev 14278)
+++ branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/LineTag.java 2009-05-22 13:46:58 UTC (rev 14279)
@@ -1,3 +1,24 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
package org.richfaces.convert.seamtext.tags;
class LineTag extends HtmlTag {
Modified: branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/LinkTag.java
===================================================================
--- branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/LinkTag.java 2009-05-22 13:17:00 UTC (rev 14278)
+++ branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/LinkTag.java 2009-05-22 13:46:58 UTC (rev 14279)
@@ -1,3 +1,24 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
package org.richfaces.convert.seamtext.tags;
class LinkTag extends HtmlTag {
Modified: branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/OrderedListTag.java
===================================================================
--- branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/OrderedListTag.java 2009-05-22 13:17:00 UTC (rev 14278)
+++ branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/OrderedListTag.java 2009-05-22 13:46:58 UTC (rev 14279)
@@ -1,3 +1,24 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
package org.richfaces.convert.seamtext.tags;
class OrderedListTag extends UnorderedListTag {
Modified: branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/ParagraphTag.java
===================================================================
--- branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/ParagraphTag.java 2009-05-22 13:17:00 UTC (rev 14278)
+++ branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/ParagraphTag.java 2009-05-22 13:46:58 UTC (rev 14279)
@@ -1,5 +1,31 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
package org.richfaces.convert.seamtext.tags;
+
+/**
+ * @author Alex.Kolonitsky
+ * @since 3.3.2.CR1
+ * */
public class ParagraphTag extends LineTag {
private static final long serialVersionUID = 1720000557944774249L;
Modified: branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/RootTag.java
===================================================================
--- branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/RootTag.java 2009-05-22 13:17:00 UTC (rev 14278)
+++ branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/RootTag.java 2009-05-22 13:46:58 UTC (rev 14279)
@@ -1,3 +1,24 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
package org.richfaces.convert.seamtext.tags;
import java.util.LinkedList;
Modified: branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/TagFactory.java
===================================================================
--- branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/TagFactory.java 2009-05-22 13:17:00 UTC (rev 14278)
+++ branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/TagFactory.java 2009-05-22 13:46:58 UTC (rev 14279)
@@ -1,3 +1,24 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
package org.richfaces.convert.seamtext.tags;
import static org.richfaces.convert.seamtext.tags.HtmlTag.*;
@@ -69,7 +90,6 @@
}
},
-// getNewTagDefinition(PRE, SEAM_BACKTICK, SEAM_BACKTICK),
getNewTagDefinition(Q, SEAM_DOUBLEQUOTE, SEAM_DOUBLEQUOTE),
new LinkTag(),
Modified: branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/UnorderedListTag.java
===================================================================
--- branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/UnorderedListTag.java 2009-05-22 13:17:00 UTC (rev 14278)
+++ branches/community/3.3.X/ui/editor/src/main/java/org/richfaces/convert/seamtext/tags/UnorderedListTag.java 2009-05-22 13:46:58 UTC (rev 14279)
@@ -1,3 +1,24 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
package org.richfaces.convert.seamtext.tags;
class UnorderedListTag extends LineTag {
14 years, 11 months
JBoss Rich Faces SVN: r14278 - in branches/community/3.3.X/ui/beanValidator/src/main: java/org/richfaces/component/html and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-05-22 09:17:00 -0400 (Fri, 22 May 2009)
New Revision: 14278
Added:
branches/community/3.3.X/ui/beanValidator/src/main/java/org/richfaces/component/html/HtmlInputSecret.java
Modified:
branches/community/3.3.X/ui/beanValidator/src/main/config/faces/standart-components.xml
branches/community/3.3.X/ui/beanValidator/src/main/java/org/richfaces/component/html/HtmlInputText.java
branches/community/3.3.X/ui/beanValidator/src/main/java/org/richfaces/validator/HibernateValidator.java
Log:
InputSecret: empty values are not validated
https://jira.jboss.org/jira/browse/RF-7180
Modified: branches/community/3.3.X/ui/beanValidator/src/main/config/faces/standart-components.xml
===================================================================
--- branches/community/3.3.X/ui/beanValidator/src/main/config/faces/standart-components.xml 2009-05-22 13:15:26 UTC (rev 14277)
+++ branches/community/3.3.X/ui/beanValidator/src/main/config/faces/standart-components.xml 2009-05-22 13:17:00 UTC (rev 14278)
@@ -8,10 +8,15 @@
<component-class>org.richfaces.component.html.HtmlInputText</component-class>
</component>
<component>
+ <description><![CDATA[<p>Represents an HTML <code><input type="password" ...</code> element.</p>]]></description>
+ <display-name>Input Secret</display-name>
+ <component-type>javax.faces.HtmlInputSecret</component-type>
+ <component-class>org.richfaces.component.html.HtmlInputSecret</component-class>
+ </component>
+ <component>
<description><![CDATA[<p>Represents an HTML <code>textarea</code> element.</p>]]></description>
<display-name>Input Textarea</display-name>
<component-type>javax.faces.HtmlInputTextarea</component-type>
<component-class>org.richfaces.component.html.HtmlInputTextarea</component-class>
-
</component>
</faces-config>
\ No newline at end of file
Added: branches/community/3.3.X/ui/beanValidator/src/main/java/org/richfaces/component/html/HtmlInputSecret.java
===================================================================
--- branches/community/3.3.X/ui/beanValidator/src/main/java/org/richfaces/component/html/HtmlInputSecret.java (rev 0)
+++ branches/community/3.3.X/ui/beanValidator/src/main/java/org/richfaces/component/html/HtmlInputSecret.java 2009-05-22 13:17:00 UTC (rev 14278)
@@ -0,0 +1,72 @@
+package org.richfaces.component.html;
+
+import java.util.List;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.Validator;
+import javax.faces.validator.ValidatorException;
+
+import org.richfaces.validator.FacesBeanValidator;
+
+public class HtmlInputSecret extends javax.faces.component.html.HtmlInputSecret {
+
+ @Override
+ protected void validateValue(FacesContext context, Object newValue) {
+ // If our value is valid, enforce the required property if present
+ if (isValid() && isRequired() && isEmpty(newValue)) {
+ super.validateValue(context, newValue);
+ }
+ // If our value is valid and not empty, call all validators
+ if (isValid()) {
+ Validator[] validators = this.getValidators();
+ if (validators != null) {
+ for (Validator validator : validators) {
+ try {
+ if (validator instanceof FacesBeanValidator
+ || !isEmpty(newValue)) {
+ validator.validate(context, this, newValue);
+ }
+ } catch (ValidatorException ve) {
+ // If the validator throws an exception, we're
+ // invalid, and we need to add a message
+ setValid(false);
+ FacesMessage message;
+ String validatorMessageString = getValidatorMessage();
+
+ if (null != validatorMessageString) {
+ message = new FacesMessage(
+ FacesMessage.SEVERITY_ERROR,
+ validatorMessageString,
+ validatorMessageString);
+ message.setSeverity(FacesMessage.SEVERITY_ERROR);
+ } else {
+ message = ve.getFacesMessage();
+ }
+ if (message != null) {
+ context.addMessage(getClientId(context), message);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private static boolean isEmpty(Object value) {
+
+ if (value == null) {
+ return true;
+ } else if ((value instanceof String) && (((String) value).length() < 1)) {
+ return true;
+ } else if (value.getClass().isArray()) {
+ if (0 == java.lang.reflect.Array.getLength(value)) {
+ return true;
+ }
+ } else if (value instanceof List) {
+ if (((List<?>) value).isEmpty()) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
Modified: branches/community/3.3.X/ui/beanValidator/src/main/java/org/richfaces/component/html/HtmlInputText.java
===================================================================
--- branches/community/3.3.X/ui/beanValidator/src/main/java/org/richfaces/component/html/HtmlInputText.java 2009-05-22 13:15:26 UTC (rev 14277)
+++ branches/community/3.3.X/ui/beanValidator/src/main/java/org/richfaces/component/html/HtmlInputText.java 2009-05-22 13:17:00 UTC (rev 14278)
@@ -80,19 +80,19 @@
private static boolean isEmpty(Object value) {
if (value == null) {
- return (true);
+ return true;
} else if ((value instanceof String) && (((String) value).length() < 1)) {
- return (true);
+ return true;
} else if (value.getClass().isArray()) {
if (0 == java.lang.reflect.Array.getLength(value)) {
- return (true);
+ return true;
}
} else if (value instanceof List) {
- if (((List) value).isEmpty()) {
- return (true);
+ if (((List<?>) value).isEmpty()) {
+ return true;
}
}
- return (false);
+ return false;
}
}
Modified: branches/community/3.3.X/ui/beanValidator/src/main/java/org/richfaces/validator/HibernateValidator.java
===================================================================
--- branches/community/3.3.X/ui/beanValidator/src/main/java/org/richfaces/validator/HibernateValidator.java 2009-05-22 13:15:26 UTC (rev 14277)
+++ branches/community/3.3.X/ui/beanValidator/src/main/java/org/richfaces/validator/HibernateValidator.java 2009-05-22 13:17:00 UTC (rev 14278)
@@ -91,8 +91,9 @@
*/
protected InvalidValue[] validateClass(Class<? extends Object> beanClass,
String property, Object value, Locale locale) {
- ClassValidator<? extends Object> classValidator = getValidator(
- beanClass, locale);
+ ClassValidator<? extends Object> classValidator =
+ getValidator(beanClass, locale);
+
InvalidValue[] invalidValues = classValidator
.getPotentialInvalidValues(property, value);
return invalidValues;
@@ -158,11 +159,11 @@
*/
protected InvalidValue[] validateBean(Object base, String property, Object value,
Locale locale) {
- Class<? extends Object> beanClass = base.getClass();
- InvalidValue[] invalidValues = validateClass(beanClass, property,
- value, locale);
- return invalidValues;
- }
+ Class<? extends Object> beanClass = base.getClass();
+
+ InvalidValue[] invalidValues = validateClass(beanClass, property, value, locale);
+ return invalidValues;
+ }
}
14 years, 11 months
JBoss Rich Faces SVN: r14277 - branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2009-05-22 09:15:26 -0400 (Fri, 22 May 2009)
New Revision: 14277
Added:
branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf7203.xhtml
Log:
RF-7203 test page.
Added: branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf7203.xhtml
===================================================================
--- branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf7203.xhtml (rev 0)
+++ branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf7203.xhtml 2009-05-22 13:15:26 UTC (rev 14277)
@@ -0,0 +1,28 @@
+<!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:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+<ui:composition template="/layout/layout.xhtml">
+ <ui:define name="template">
+ <h:form id="form">
+ <h:outputLink id="link" value="#">
+ Click me!
+ <rich:componentControl event="onclick" for="contextMenu"
+ operation="show" />
+ </h:outputLink>
+
+ <rich:contextMenu id="contextMenu" attached="true" submitMode="ajax">
+ <rich:menuItem id="menuItem"
+ onselect="if(true) return false;"
+ oncomplete="alert('oncomplete');">
+ Select this
+ </rich:menuItem>
+ </rich:contextMenu>
+ </h:form>
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file
14 years, 11 months
JBoss Rich Faces SVN: r14276 - branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf7203.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2009-05-22 09:14:39 -0400 (Fri, 22 May 2009)
New Revision: 14276
Modified:
branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf7203/Test.java
Log:
RF-7203 java bean.
Modified: branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf7203/Test.java
===================================================================
--- branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf7203/Test.java 2009-05-22 09:39:30 UTC (rev 14275)
+++ branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf7203/Test.java 2009-05-22 13:14:39 UTC (rev 14276)
@@ -8,9 +8,20 @@
public void testExecute() throws Exception {
renderPage();
- clickCommandAndWait("form:link");
+ clickById("form:link");
AssertVisible("form:contextMenu");
- clickAjaxCommandAndWait("form:contextMenu:menuItem");
+
+ clickAjaxCommandAndWait("form:menuItem");
+ String str = selenium.getAlert();
+ System.out.println(str);
+
+ try{
+ if(str.equalsIgnoreCase("oncomplete")){
+ throw new AssertionError("'oncomplete' alert still appears.");
+ }}catch (Exception e) {
+ System.err.println(e.getStackTrace());
+ }
+
}
@Override
14 years, 11 months