You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2009/08/11 11:55:44 UTC
svn commit: r803046 - in /myfaces/tobago/trunk/example/test/src/main:
java/org/apache/myfaces/tobago/example/test/InputSuggestController.java
webapp/WEB-INF/faces-config.xml webapp/tc/in/inputSuggest.xhtml
webapp/tx/in/inputSuggest.xhtml
Author: lofwyr
Date: Tue Aug 11 09:55:43 2009
New Revision: 803046
URL: http://svn.apache.org/viewvc?rev=803046&view=rev
Log:
TOBAGO-606: Layout-Manager
- sample for input suggest (layout not working yet)
(from Marcus)
Added:
myfaces/tobago/trunk/example/test/src/main/java/org/apache/myfaces/tobago/example/test/InputSuggestController.java
myfaces/tobago/trunk/example/test/src/main/webapp/tc/in/inputSuggest.xhtml
myfaces/tobago/trunk/example/test/src/main/webapp/tx/in/inputSuggest.xhtml
Modified:
myfaces/tobago/trunk/example/test/src/main/webapp/WEB-INF/faces-config.xml
Added: myfaces/tobago/trunk/example/test/src/main/java/org/apache/myfaces/tobago/example/test/InputSuggestController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/test/src/main/java/org/apache/myfaces/tobago/example/test/InputSuggestController.java?rev=803046&view=auto
==============================================================================
--- myfaces/tobago/trunk/example/test/src/main/java/org/apache/myfaces/tobago/example/test/InputSuggestController.java (added)
+++ myfaces/tobago/trunk/example/test/src/main/java/org/apache/myfaces/tobago/example/test/InputSuggestController.java Tue Aug 11 09:55:43 2009
@@ -0,0 +1,27 @@
+package org.apache.myfaces.tobago.example.test;
+
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+public class InputSuggestController {
+
+ private static final Log LOG = LogFactory.getLog(InputSuggestController.class);
+
+ public List<String> getInputSuggestItems(String prefix) {
+ LOG.info("createing items for prefix :\"" + prefix + "\"");
+ List<String> li = new ArrayList<String>();
+ li.add(prefix + 1);
+ li.add(prefix + 2);
+ li.add(prefix + 3);
+ li.add(prefix + 4);
+ li.add(prefix + 5);
+ li.add(prefix + 6);
+ return li;
+ }
+
+}
Modified: myfaces/tobago/trunk/example/test/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/test/src/main/webapp/WEB-INF/faces-config.xml?rev=803046&r1=803045&r2=803046&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/test/src/main/webapp/WEB-INF/faces-config.xml (original)
+++ myfaces/tobago/trunk/example/test/src/main/webapp/WEB-INF/faces-config.xml Tue Aug 11 09:55:43 2009
@@ -41,6 +41,12 @@
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
+ <managed-bean>
+ <managed-bean-name>inputSuggest</managed-bean-name>
+ <managed-bean-class>org.apache.myfaces.tobago.example.test.InputSuggestController</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+
<navigation-rule>
<navigation-case>
<from-outcome>navigation</from-outcome>
Added: myfaces/tobago/trunk/example/test/src/main/webapp/tc/in/inputSuggest.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/test/src/main/webapp/tc/in/inputSuggest.xhtml?rev=803046&view=auto
==============================================================================
--- myfaces/tobago/trunk/example/test/src/main/webapp/tc/in/inputSuggest.xhtml (added)
+++ myfaces/tobago/trunk/example/test/src/main/webapp/tc/in/inputSuggest.xhtml Tue Aug 11 09:55:43 2009
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<f:view
+ xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:tc="http://myfaces.apache.org/tobago/component"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+ <tc:page>
+ <f:facet name="layout">
+ <tc:gridLayout/>
+ </f:facet>
+ <tc:gridLayoutConstraint width="600px" height="300px"/>
+
+ <tc:in value="some value" required="true" tabIndex="1"
+ tip="test" suggestMethod="#{inputSuggest.getInputSuggestItems}"/>
+
+ </tc:page>
+</f:view>
Added: myfaces/tobago/trunk/example/test/src/main/webapp/tx/in/inputSuggest.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/test/src/main/webapp/tx/in/inputSuggest.xhtml?rev=803046&view=auto
==============================================================================
--- myfaces/tobago/trunk/example/test/src/main/webapp/tx/in/inputSuggest.xhtml (added)
+++ myfaces/tobago/trunk/example/test/src/main/webapp/tx/in/inputSuggest.xhtml Tue Aug 11 09:55:43 2009
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<f:view
+ xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:tc="http://myfaces.apache.org/tobago/component"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:tx="http://myfaces.apache.org/tobago/extension">
+
+ <tc:page>
+ <f:facet name="layout">
+ <tc:gridLayout/>
+ </f:facet>
+ <tc:gridLayoutConstraint width="600px" height="300px"/>
+
+ <tx:in value="some value" required="true" tabIndex="1" label="Suggest"
+ tip="test" suggestMethod="#{inputSuggest.getInputSuggestItems}"/>
+
+ </tc:page>
+</f:view>