You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2007/09/24 09:52:01 UTC
svn commit: r578696 - in /myfaces/tobago/trunk/example/facelets/src/main:
java/org/apache/myfaces/tobago/example/facelets/BindingRequestBean.java
webapp/WEB-INF/faces-config.xml webapp/WEB-INF/tobago-config.xml
webapp/binding.xml
Author: bommel
Date: Mon Sep 24 00:52:00 2007
New Revision: 578696
URL: http://svn.apache.org/viewvc?rev=578696&view=rev
Log:
added binding test
Added:
myfaces/tobago/trunk/example/facelets/src/main/java/org/apache/myfaces/tobago/example/facelets/BindingRequestBean.java (with props)
myfaces/tobago/trunk/example/facelets/src/main/webapp/binding.xml (with props)
Modified:
myfaces/tobago/trunk/example/facelets/src/main/webapp/WEB-INF/faces-config.xml
myfaces/tobago/trunk/example/facelets/src/main/webapp/WEB-INF/tobago-config.xml
Added: myfaces/tobago/trunk/example/facelets/src/main/java/org/apache/myfaces/tobago/example/facelets/BindingRequestBean.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/facelets/src/main/java/org/apache/myfaces/tobago/example/facelets/BindingRequestBean.java?rev=578696&view=auto
==============================================================================
--- myfaces/tobago/trunk/example/facelets/src/main/java/org/apache/myfaces/tobago/example/facelets/BindingRequestBean.java (added)
+++ myfaces/tobago/trunk/example/facelets/src/main/java/org/apache/myfaces/tobago/example/facelets/BindingRequestBean.java Mon Sep 24 00:52:00 2007
@@ -0,0 +1,72 @@
+package org.apache.myfaces.tobago.example.facelets;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.myfaces.tobago.component.UISelectOne;
+import org.apache.myfaces.tobago.model.SelectItem;
+
+import javax.faces.event.ActionEvent;
+import javax.faces.event.ValueChangeEvent;
+
+/**
+ * Date: Sep 22, 2007
+ * Time: 8:47:48 AM
+ */
+public class BindingRequestBean {
+ private String selectOne;
+ private UISelectOne uiSelectOne;
+
+ private SelectItem [] items = {new SelectItem("Test1", "Test1"), new SelectItem("Test2", "Test2")};
+
+ public String getSelectOne() {
+ System.err.println("getSelectOne " +selectOne);
+ return selectOne;
+ }
+
+ public void setSelectOne(String selectOne) {
+ System.err.println("setSelectOne " +selectOne);
+ this.selectOne = selectOne;
+ }
+
+ public UISelectOne getUiSelectOne() {
+ System.err.println("getUISelectOne " + uiSelectOne);
+ return uiSelectOne;
+ }
+
+ public void setUiSelectOne(UISelectOne uiSelectOne) {
+ System.err.println("setUISelectOne " +uiSelectOne);
+ this.uiSelectOne = uiSelectOne;
+ }
+
+ public SelectItem[] getItems() {
+ return items;
+ }
+
+ public void setItems(SelectItem[] items) {
+ this.items = items;
+ }
+
+ public void processValueChange(ValueChangeEvent e) {
+ System.err.println("processValueChange " + e);
+ }
+
+ public void actionListener(ActionEvent e) {
+ System.err.println("actionListener " + e);
+
+ }
+}
Propchange: myfaces/tobago/trunk/example/facelets/src/main/java/org/apache/myfaces/tobago/example/facelets/BindingRequestBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/tobago/trunk/example/facelets/src/main/java/org/apache/myfaces/tobago/example/facelets/BindingRequestBean.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: myfaces/tobago/trunk/example/facelets/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/facelets/src/main/webapp/WEB-INF/faces-config.xml?rev=578696&r1=578695&r2=578696&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/facelets/src/main/webapp/WEB-INF/faces-config.xml (original)
+++ myfaces/tobago/trunk/example/facelets/src/main/webapp/WEB-INF/faces-config.xml Mon Sep 24 00:52:00 2007
@@ -43,6 +43,12 @@
</managed-bean>
<managed-bean>
+ <managed-bean-name>bindingRequestBean</managed-bean-name>
+ <managed-bean-class>org.apache.myfaces.tobago.example.facelets.BindingRequestBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+
+ <managed-bean>
<managed-bean-name>messageBackingBean</managed-bean-name>
<managed-bean-class>org.apache.myfaces.tobago.example.facelets.MessageBackingBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
Modified: myfaces/tobago/trunk/example/facelets/src/main/webapp/WEB-INF/tobago-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/facelets/src/main/webapp/WEB-INF/tobago-config.xml?rev=578696&r1=578695&r2=578696&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/facelets/src/main/webapp/WEB-INF/tobago-config.xml (original)
+++ myfaces/tobago/trunk/example/facelets/src/main/webapp/WEB-INF/tobago-config.xml Mon Sep 24 00:52:00 2007
@@ -28,5 +28,5 @@
<resource-dir>tobago-resource</resource-dir>
<resource-dir>org/apache/myfaces/tobago/renderkit</resource-dir>
-
+ <ajax-enabled>true</ajax-enabled>
</tobago-config>
Added: myfaces/tobago/trunk/example/facelets/src/main/webapp/binding.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/facelets/src/main/webapp/binding.xml?rev=578696&view=auto
==============================================================================
--- myfaces/tobago/trunk/example/facelets/src/main/webapp/binding.xml (added)
+++ myfaces/tobago/trunk/example/facelets/src/main/webapp/binding.xml Mon Sep 24 00:52:00 2007
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+
+<f:view xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:tc="http://myfaces.apache.org/tobago/component"
+ xmlns:tx="http://myfaces.apache.org/tobago/extension">
+
+ <tc:page label="Binding - Request">
+ <f:facet name="layout">
+ <tc:gridLayout rows="fixed;fixed;*" columns="*" />
+ </f:facet>
+
+ <tc:selectOneChoice value="#{bindingRequestBean.selectOne}"
+ binding="#{bindingRequestBean.uiSelectOne}"
+ valueChangeListener="#{bindingRequestBean.processValueChange}">
+ <f:selectItems value="#{bindingRequestBean.items}" />
+
+ <f:facet name="change">
+ <tc:command actionListener="#{bindingRequestBean.actionListener}" />
+ </f:facet>
+ </tc:selectOneChoice>
+
+ <tc:button label="Reload" action="reload" />
+ <tc:cell />
+ </tc:page>
+</f:view>
Propchange: myfaces/tobago/trunk/example/facelets/src/main/webapp/binding.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/tobago/trunk/example/facelets/src/main/webapp/binding.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL