Author: ppitonak(a)redhat.com
Date: 2011-03-15 13:29:41 -0400 (Tue, 15 Mar 2011)
New Revision: 22227
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richPopupPanel/formInsidePanel.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPopupPanelBean.java
Log:
added sample with a form inside popup panel
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPopupPanelBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPopupPanelBean.java 2011-03-15
16:02:57 UTC (rev 22226)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPopupPanelBean.java 2011-03-15
17:29:41 UTC (rev 22227)
@@ -45,6 +45,9 @@
private static final long serialVersionUID = -1L;
private static Logger logger;
private Attributes attributes;
+ private String value1;
+ private String value2;
+ private String value3;
/**
* Initializes the managed bean.
@@ -78,4 +81,35 @@
public void setAttributes(Attributes attributes) {
this.attributes = attributes;
}
+
+ public String getValue1() {
+ return value1;
+ }
+
+ public void setValue1(String value1) {
+ this.value1 = value1;
+ }
+
+ public String getValue2() {
+ return value2;
+ }
+
+ public void setValue2(String value2) {
+ this.value2 = value2;
+ }
+
+ public String getValue3() {
+ return value3;
+ }
+
+ public void setValue3(String value3) {
+ this.value3 = value3;
+ }
+
+ public String save() {
+ logger.warn("1: " + value1);
+ logger.warn("2: " + value2);
+ logger.warn("3: " + value3);
+ return null;
+ }
}
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richPopupPanel/formInsidePanel.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richPopupPanel/formInsidePanel.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richPopupPanel/formInsidePanel.xhtml 2011-03-15
17:29:41 UTC (rev 22227)
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
+
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software 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 software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="view">
+ <f:metadata>
+ <f:viewParam name="templates"
value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ </ui:define>
+
+ <ui:define name="component">
+ input1 <h:inputText id="input1"
value="#{richPopupPanelBean.value1}"/>
+
+ <br/><br/>
+
+ <h:commandButton id="openPanelButton" value="Call the
popup">
+ <rich:componentControl target="popupPanel"
operation="show" />
+ </h:commandButton>
+
+ <rich:popupPanel id="popupPanel" modal="true"
header="header">
+ <f:facet name="controls">
+ <h:outputLink value="#"
onclick="#{rich:component('popupPanel')}.hide(); return
false;">X</h:outputLink>
+ </f:facet>
+
+ <h:panelGrid id="inputs" columns="2">
+ input2 <h:inputText id="input2"
value="#{richPopupPanelBean.value2}"/>
+ input3 <h:inputText id="input3"
value="#{richPopupPanelBean.value3}"/>
+ </h:panelGrid>
+
+ <a4j:commandButton action="#{richPopupPanelBean.save}"
value="Save"
+ render="output1 output2 output3"
execute="input1 input2 input3"/>
+ </rich:popupPanel>
+
+ <h:panelGrid id="outputs" columns="2">
+ output1 <h:outputText id="output1"
value="#{richPopupPanelBean.value1}"/>
+ output2 <h:outputText id="output2"
value="#{richPopupPanelBean.value2}"/>
+ output3 <h:outputText id="output3"
value="#{richPopupPanelBean.value3}"/>
+ </h:panelGrid>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file