[richfaces-svn-commits] JBoss Rich Faces SVN: r14404 - in branches/community/3.3.X/samples/suggestionbox-sample/src/main: webapp/WEB-INF and 1 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Fri May 29 07:22:48 EDT 2009


Author: Alex.Kolonitsky
Date: 2009-05-29 07:22:48 -0400 (Fri, 29 May 2009)
New Revision: 14404

Added:
   branches/community/3.3.X/samples/suggestionbox-sample/src/main/java/org/richfaces/CustomComponent.java
   branches/community/3.3.X/samples/suggestionbox-sample/src/main/webapp/pages/RF-5599.jsp
Modified:
   branches/community/3.3.X/samples/suggestionbox-sample/src/main/webapp/WEB-INF/faces-config.xml
Log:
Content between angle brackets is being stripped out from selected item of a suggestion box
https://jira.jboss.org/jira/browse/RF-5599

Added: branches/community/3.3.X/samples/suggestionbox-sample/src/main/java/org/richfaces/CustomComponent.java
===================================================================
--- branches/community/3.3.X/samples/suggestionbox-sample/src/main/java/org/richfaces/CustomComponent.java	                        (rev 0)
+++ branches/community/3.3.X/samples/suggestionbox-sample/src/main/java/org/richfaces/CustomComponent.java	2009-05-29 11:22:48 UTC (rev 14404)
@@ -0,0 +1,51 @@
+/**
+ * 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;
+
+import java.util.ArrayList;
+
+public class CustomComponent {
+
+    private ArrayList<String> value;
+
+    private String input;
+
+    public ArrayList<String> suggestionAction(Object obj) {
+
+        if (null == value) {
+            value = new ArrayList<String>();
+            value.add("String <string> 1");
+            value.add("String <string> 2");
+            value.add("String <string> 3");
+        }
+
+        return value;
+    }
+
+    public String getInput() {
+        return input;
+    }
+
+    public void setInput(String input) {
+        this.input = input;
+    }
+}
+

Modified: branches/community/3.3.X/samples/suggestionbox-sample/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/community/3.3.X/samples/suggestionbox-sample/src/main/webapp/WEB-INF/faces-config.xml	2009-05-29 11:22:12 UTC (rev 14403)
+++ branches/community/3.3.X/samples/suggestionbox-sample/src/main/webapp/WEB-INF/faces-config.xml	2009-05-29 11:22:48 UTC (rev 14404)
@@ -8,6 +8,11 @@
         <managed-bean-scope>session</managed-bean-scope>
     </managed-bean>
     <managed-bean>
+        <managed-bean-name>customComponent</managed-bean-name>
+        <managed-bean-class>org.richfaces.CustomComponent</managed-bean-class>
+        <managed-bean-scope>session</managed-bean-scope>
+    </managed-bean>
+    <managed-bean>
         <managed-bean-name>skinBean</managed-bean-name>
         <managed-bean-class>org.richfaces.SkinBean</managed-bean-class>
         <managed-bean-scope>session</managed-bean-scope>

Added: branches/community/3.3.X/samples/suggestionbox-sample/src/main/webapp/pages/RF-5599.jsp
===================================================================
--- branches/community/3.3.X/samples/suggestionbox-sample/src/main/webapp/pages/RF-5599.jsp	                        (rev 0)
+++ branches/community/3.3.X/samples/suggestionbox-sample/src/main/webapp/pages/RF-5599.jsp	2009-05-29 11:22:48 UTC (rev 14404)
@@ -0,0 +1,24 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
+<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/suggestionbox"
+    prefix="rich"%>
+<html>
+<head>
+<title>Custom Component</title>
+</head>
+<body>
+<f:view>
+    <h:form id="f">
+        <h:inputText id="text" value="#{customComponent.input}" />
+        <rich:suggestionbox for="text" height="100" width="200"
+            suggestionAction="#{customComponent.suggestionAction}"
+            var="row" fetchValue="#{row}">
+            <h:column>
+                <h:outputText value="#{row}" />
+            </h:column>
+        </rich:suggestionbox>
+    </h:form>
+</f:view>
+</body>
+</html>
\ No newline at end of file




More information about the richfaces-svn-commits mailing list