Author: nbelaevski
Date: 2008-04-03 20:19:05 -0400 (Thu, 03 Apr 2008)
New Revision: 7594
Modified:
branches/3.1.x/samples/suggestionbox-sample/pom.xml
branches/3.1.x/samples/suggestionbox-sample/src/main/java/org/richfaces/SuggestionBox.java
branches/3.1.x/samples/suggestionbox-sample/src/main/webapp/pages/index.jsp
Log:
http://jira.jboss.com/jira/browse/RF-2699
http://jira.jboss.com/jira/browse/RF-1565
Modified: branches/3.1.x/samples/suggestionbox-sample/pom.xml
===================================================================
--- branches/3.1.x/samples/suggestionbox-sample/pom.xml 2008-04-04 00:18:56 UTC (rev
7593)
+++ branches/3.1.x/samples/suggestionbox-sample/pom.xml 2008-04-04 00:19:05 UTC (rev
7594)
@@ -16,11 +16,6 @@
<dependencies>
<dependency>
<groupId>org.richfaces.ui</groupId>
- <artifactId>richfaces-ui</artifactId>
- <version>3.1.5-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces.ui</groupId>
<artifactId>suggestionbox</artifactId>
<version>3.1.5-SNAPSHOT</version>
</dependency>
Modified:
branches/3.1.x/samples/suggestionbox-sample/src/main/java/org/richfaces/SuggestionBox.java
===================================================================
---
branches/3.1.x/samples/suggestionbox-sample/src/main/java/org/richfaces/SuggestionBox.java 2008-04-04
00:18:56 UTC (rev 7593)
+++
branches/3.1.x/samples/suggestionbox-sample/src/main/java/org/richfaces/SuggestionBox.java 2008-04-04
00:19:05 UTC (rev 7594)
@@ -28,6 +28,9 @@
import java.util.List;
import java.io.Serializable;
+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+
public class SuggestionBox implements Serializable {
private String property;
@@ -67,7 +70,10 @@
}
public List autocomplete(Object suggest) {
- String pref = (String)suggest;
+ FacesContext context = FacesContext.getCurrentInstance();
+ context.addMessage(null, new FacesMessage("SuggestionBox.autocomplete()
" + suggest));
+
+ String pref = (String)suggest;
ArrayList result = new ArrayList();
Iterator iterator = getAllData().iterator();
Modified: branches/3.1.x/samples/suggestionbox-sample/src/main/webapp/pages/index.jsp
===================================================================
--- branches/3.1.x/samples/suggestionbox-sample/src/main/webapp/pages/index.jsp 2008-04-04
00:18:56 UTC (rev 7593)
+++ branches/3.1.x/samples/suggestionbox-sample/src/main/webapp/pages/index.jsp 2008-04-04
00:19:05 UTC (rev 7594)
@@ -18,6 +18,13 @@
<br/>
<br/>
+<a4j:outputPanel ajaxRendered="true">
+ <h:messages />
+</a4j:outputPanel>
+
+<br/>
+<br/>
+
<h:outputText
value="Simple richfaces Suggestion Box test web application."
style="font: 18px;font-weight: bold;"/>