JBoss Rich Faces SVN: r13122 - in trunk/test-applications/jsp/src/main: java/componentsLayout and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2009-03-23 14:20:06 -0400 (Mon, 23 Mar 2009)
New Revision: 13122
Added:
trunk/test-applications/jsp/src/main/java/componentsLayout/
trunk/test-applications/jsp/src/main/java/componentsLayout/LayoutBean.java
trunk/test-applications/jsp/src/main/java/componentsLayout/LayoutPanelBean.java
trunk/test-applications/jsp/src/main/java/componentsLayout/PageBean.java
trunk/test-applications/jsp/src/main/webapp/LayoutComponents/
trunk/test-applications/jsp/src/main/webapp/LayoutComponents/LayoutComponents.jsp
trunk/test-applications/jsp/src/main/webapp/LayoutComponents/LayoutComponentsProperty.jsp
trunk/test-applications/jsp/src/main/webapp/LayoutComponents/LayoutComponentsStraightforward.jsp
trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-LayoutComponents.xml
Modified:
trunk/test-applications/jsp/src/main/java/rich/RichBean.java
trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml
Log:
Add layout components(rich:page,layout,layoutPanel)
Added: trunk/test-applications/jsp/src/main/java/componentsLayout/LayoutBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/componentsLayout/LayoutBean.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/componentsLayout/LayoutBean.java 2009-03-23 18:20:06 UTC (rev 13122)
@@ -0,0 +1,101 @@
+package componentsLayout;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+import org.richfaces.component.html.HtmlLayout;
+
+import util.componentInfo.ComponentInfo;
+
+public class LayoutBean {
+
+ private String[] pos = { "left", "right", "center", "top", "bottom" };
+ private LayoutPanelBean[] panels;
+ private LayoutPanelBean[] tempPanels;
+ private final int PANELS_COUNT = pos.length;
+ private HtmlLayout htmlLayout;
+ private boolean rendered;
+ private String layoutLabel;
+
+ public void addLayout(){
+ ComponentInfo info = ComponentInfo.getInstance();
+ info.addField(htmlLayout);
+ }
+
+ public void checkLayout(ActionEvent event){
+ FacesContext context = FacesContext.getCurrentInstance();
+ layoutLabel = htmlLayout.getClientId(context);
+ }
+
+ public String getLayoutLabel() {
+ return layoutLabel;
+ }
+
+ public void setLayoutLabel(String layoutLabel) {
+ this.layoutLabel = layoutLabel;
+ }
+
+ public HtmlLayout getHtmlLayout() {
+ return htmlLayout;
+ }
+
+ public void setHtmlLayout(HtmlLayout htmlLayout) {
+ this.htmlLayout = htmlLayout;
+ }
+
+ public boolean isRendered() {
+ return rendered;
+ }
+
+ public void setRendered(boolean rendered) {
+ this.rendered = rendered;
+ }
+
+ public LayoutBean() {
+ panels = new LayoutPanelBean[PANELS_COUNT];
+ tempPanels = new LayoutPanelBean[PANELS_COUNT];
+ for (int i = 0; i < PANELS_COUNT; i++) {
+ panels[i] = new LayoutPanelBean(pos[i]);
+ tempPanels[i] = new LayoutPanelBean(pos[i]);
+ }
+ rendered = true;
+ }
+
+ public LayoutPanelBean[] getPanels() {
+ return panels;
+ }
+
+ public void setPanels(LayoutPanelBean[] panels) {
+ this.panels = panels;
+ }
+
+ public LayoutPanelBean[] getTempPanels() {
+ return tempPanels;
+ }
+
+ public void setTempPanels(LayoutPanelBean[] tempPanels) {
+ this.tempPanels = tempPanels;
+ }
+
+ public String validate() {
+ List<String> complete = Arrays.asList(pos);
+ List<String> specific = new ArrayList<String>();
+ for (LayoutPanelBean panelBean : tempPanels) {
+ specific.add(panelBean.getPosition());
+ }
+ if (!specific.containsAll(complete)) {
+ FacesContext.getCurrentInstance().addMessage(
+ "",
+ new FacesMessage("position for each panel should be unique!!!"));
+ } else
+ for (int i = 0; i < PANELS_COUNT; i++) {
+ panels[i].setPosition(tempPanels[i].getPosition());
+ }
+ return null;
+ }
+}
Added: trunk/test-applications/jsp/src/main/java/componentsLayout/LayoutPanelBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/componentsLayout/LayoutPanelBean.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/componentsLayout/LayoutPanelBean.java 2009-03-23 18:20:06 UTC (rev 13122)
@@ -0,0 +1,83 @@
+package componentsLayout;
+
+import java.util.ArrayList;
+
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+import javax.faces.model.SelectItem;
+
+import org.richfaces.component.html.HtmlLayoutPanel;
+
+import util.componentInfo.ComponentInfo;
+
+public class LayoutPanelBean {
+
+ private String position;
+ private String[] pos = {"left","right","center","top","bottom"};
+ private ArrayList<SelectItem> positions;
+ private boolean rendered;
+ private HtmlLayoutPanel htmlLayoutPanel;
+ private String layoutPanelLabel;
+
+ public void addLayoutPanel(){
+ ComponentInfo info = ComponentInfo.getInstance();
+ info.addField(htmlLayoutPanel);
+ }
+
+ public void checkLayoutPanel(ActionEvent event){
+ FacesContext context = FacesContext.getCurrentInstance();
+ layoutPanelLabel = htmlLayoutPanel.getClientId(context);
+ }
+
+ public boolean isRendered() {
+ return rendered;
+ }
+
+ public void setRendered(boolean rendered) {
+ this.rendered = rendered;
+ }
+
+ public HtmlLayoutPanel getHtmlLayoutPanel() {
+ return htmlLayoutPanel;
+ }
+
+ public void setHtmlLayoutPanel(HtmlLayoutPanel htmlLayoutPanel) {
+ this.htmlLayoutPanel = htmlLayoutPanel;
+ }
+
+ public String getLayoutPanelLabel() {
+ return layoutPanelLabel;
+ }
+
+ public void setLayoutPanelLabel(String layoutPanelLabel) {
+ this.layoutPanelLabel = layoutPanelLabel;
+ }
+
+ public String getPosition() {
+ return position;
+ }
+
+ public void setPosition(String position) {
+ this.position = position;
+ }
+
+ public LayoutPanelBean() {
+ positions = new ArrayList<SelectItem>();
+ for(int i=0;i<pos.length;i++){
+ positions.add(new SelectItem(pos[i],pos[i]));
+ }
+ rendered = true;
+ }
+
+ public LayoutPanelBean(String position) {
+ this.position = position;
+ }
+
+ public ArrayList<SelectItem> getPositions() {
+ return positions;
+ }
+
+ public void setPositions(ArrayList<SelectItem> positions) {
+ this.positions = positions;
+ }
+}
\ No newline at end of file
Added: trunk/test-applications/jsp/src/main/java/componentsLayout/PageBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/componentsLayout/PageBean.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/componentsLayout/PageBean.java 2009-03-23 18:20:06 UTC (rev 13122)
@@ -0,0 +1,187 @@
+package componentsLayout;
+
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+import org.richfaces.component.UIPage;
+
+import util.componentInfo.ComponentInfo;
+
+public class PageBean {
+
+ private UIPage htmlPage;
+ private String bodyClass;
+ private String contentType;//mime content type
+ private String dir;
+ private String footerClass;
+ private String headerClass;
+ private String lang;
+ private String markupType;
+ private String namespace;
+ private String pageTitle;
+ private boolean rendered;
+ private String sidebarClass;
+ private String sidebarPosition;
+ private int sidebarWidth;
+ private String style;
+ private String styleClass;
+ private String theme;
+ private String title;
+ private int width;
+ private String pageLabel;
+
+ public String getPageLabel() {
+ return pageLabel;
+ }
+
+ public void setPageLabel(String pageLabel) {
+ this.pageLabel = pageLabel;
+ }
+
+ public PageBean(){
+ bodyClass = "pageBodyClass";
+ contentType = "text/html";//"text/html", "image/png", "image/gif", "video/mpeg", "text/css", and "audio/basic"
+ dir = "ltr";//ltr or rtl
+ footerClass = "pageFooterClass";
+ headerClass = "pageHeaderClass";
+ lang = "en";
+ markupType = "jsp";
+ namespace = "http://java.sun.com/JSP/Page";
+ pageTitle = "Layout components";
+ rendered = true;
+ sidebarClass = "sideBarClass";
+ sidebarPosition = "left";//left,right
+ sidebarWidth = 1400;
+ style = "font-style:normal";
+ styleClass = "pageStyleClass";
+ theme = "simple";
+ title = "Richfaces";
+ width = 1400;
+ pageLabel = "";
+ }
+
+ public void addPage(){
+ ComponentInfo info = ComponentInfo.getInstance();
+ info.addField(htmlPage);
+ }
+
+ public void checkPage(ActionEvent event){
+ FacesContext context = FacesContext.getCurrentInstance();
+ pageLabel = htmlPage.getClientId(context);
+ }
+
+ public UIPage getHtmlPage() {
+ return htmlPage;
+ }
+ public void setHtmlPage(UIPage htmlPage) {
+ this.htmlPage = htmlPage;
+ }
+ public String getBodyClass() {
+ return bodyClass;
+ }
+ public void setBodyClass(String bodyClass) {
+ this.bodyClass = bodyClass;
+ }
+ public String getContentType() {
+ return contentType;
+ }
+ public void setContentType(String contentType) {
+ this.contentType = contentType;
+ }
+ public String getDir() {
+ return dir;
+ }
+ public void setDir(String dir) {
+ this.dir = dir;
+ }
+ public String getFooterClass() {
+ return footerClass;
+ }
+ public void setFooterClass(String footerClass) {
+ this.footerClass = footerClass;
+ }
+ public String getHeaderClass() {
+ return headerClass;
+ }
+ public void setHeaderClass(String headerClass) {
+ this.headerClass = headerClass;
+ }
+ public String getLang() {
+ return lang;
+ }
+ public void setLang(String lang) {
+ this.lang = lang;
+ }
+ public String getMarkupType() {
+ return markupType;
+ }
+ public void setMarkupType(String markupType) {
+ this.markupType = markupType;
+ }
+ public String getNamespace() {
+ return namespace;
+ }
+ public void setNamespace(String namespace) {
+ this.namespace = namespace;
+ }
+ public String getPageTitle() {
+ return pageTitle;
+ }
+ public void setPageTitle(String pageTitle) {
+ this.pageTitle = pageTitle;
+ }
+ public boolean isRendered() {
+ return rendered;
+ }
+ public void setRendered(boolean rendered) {
+ this.rendered = rendered;
+ }
+ public String getSidebarClass() {
+ return sidebarClass;
+ }
+ public void setSidebarClass(String sidebarClass) {
+ this.sidebarClass = sidebarClass;
+ }
+ public String getSidebarPosition() {
+ return sidebarPosition;
+ }
+ public void setSidebarPosition(String sidebarPosition) {
+ this.sidebarPosition = sidebarPosition;
+ }
+ public int getSidebarWidth() {
+ return sidebarWidth;
+ }
+ public void setSidebarWidth(int sidebarWidth) {
+ this.sidebarWidth = sidebarWidth;
+ }
+ public String getStyle() {
+ return style;
+ }
+ public void setStyle(String style) {
+ this.style = style;
+ }
+ public String getStyleClass() {
+ return styleClass;
+ }
+ public void setStyleClass(String styleClass) {
+ this.styleClass = styleClass;
+ }
+ public String getTheme() {
+ return theme;
+ }
+ public void setTheme(String theme) {
+ this.theme = theme;
+ }
+ public String getTitle() {
+ return title;
+ }
+ public void setTitle(String title) {
+ this.title = title;
+ }
+ public int getWidth() {
+ return width;
+ }
+ public void setWidth(int width) {
+ this.width = width;
+ }
+}
Modified: trunk/test-applications/jsp/src/main/java/rich/RichBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/rich/RichBean.java 2009-03-23 18:09:41 UTC (rev 13121)
+++ trunk/test-applications/jsp/src/main/java/rich/RichBean.java 2009-03-23 18:20:06 UTC (rev 13122)
@@ -76,7 +76,8 @@
map.add("ExtendedDataTable", add("/ExtendedDataTable/ExtendedDataTable", new boolean [] {false, true, false}));
map.add("Editor", add("/Editor/Editor", new boolean [] {true, true, false}));
map.add("tTree", add("/tTree/tTree", new boolean [] {true, true, true}));
- map.add("Queue", add("/Queue/Queue", new boolean [] {false, true, true}));
+ map.add("Queue", add("/Queue/Queue", new boolean [] {false, true, true}));
+ map.add("LayoutComponents", add("/LayoutComponents/LayoutComponents", new boolean [] {true, true, true}));
Iterator<String> iterator = map.getSet().iterator();
while(iterator.hasNext()){
list.add(new SelectItem(iterator.next()));
Added: trunk/test-applications/jsp/src/main/webapp/LayoutComponents/LayoutComponents.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/LayoutComponents/LayoutComponents.jsp (rev 0)
+++ trunk/test-applications/jsp/src/main/webapp/LayoutComponents/LayoutComponents.jsp 2009-03-23 18:20:06 UTC (rev 13122)
@@ -0,0 +1,127 @@
+<%@ 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://richfaces.org/rich" prefix="rich"%>
+
+<style>
+.facetDiv {
+ border: 1px solid red;
+}
+
+.layoutDiv {
+ border: 1px solid green;
+}
+
+.layoutPanelDiv {
+ border: 1px solid blue;
+ width: 350px;
+ height: 100px;
+}
+
+/* Footer */
+#footer {
+ padding: 4px 0 6px 0;
+ background: url(pics/img08.gif) repeat-x;
+}
+
+#footer p {
+ width: 750px;
+ font-family: Georgia, "Times New Roman", Times, serif;
+ color: #A6C09B;
+}
+
+#footer a {
+ background: none;
+ font-weight: bold;
+ color: #A6C09B;
+}
+
+#legal {
+ margin: 0 auto;
+ text-align: right;
+ font-size: 12px;
+}
+
+#brand {
+ margin: -35px auto 0 auto;
+ padding: 10px 0 0 35px;
+ letter-spacing: -1px;
+ font-size: 24px;
+}
+</style>
+<link href="/src/main/webapp/LayoutComponents/default.css"
+ rel="stylesheet" type="text/css" />
+<f:subview id="layoutComponentsSubviewID">
+ <rich:page binding="#{page.htmlPage}" bodyClass="#{page.bodyClass}"
+ contentType="#{page.contentType}" footerClass="#{page.footerClass}"
+ headerClass="#{page.headerClass}" id="pageID" lang="#{page.lang}"
+ markupType="#{page.markupType}" namespace="#{page.namespace}"
+ onload="#{event.onload}" onunload="#{event.onunload}"
+ pageTitle="#{page.pageTitle}" rendered="#{page.rendered}"
+ sidebarClass="#{page.sidebarClass}"
+ sidebarPosition="#{page.sidebarPosition}"
+ sidebarWidth="#{page.sidebarWidth}" style="#{page.style}"
+ styleClass="#{page.styleClass}" theme="#{page.theme}"
+ title="#{page.title}" width="#{page.width}">
+ <f:facet name="header">
+ <h:panelGroup layout="block" styleClass="facetDiv">
+ <div id="header">
+ <h1>Header facet</h1>
+ <h2>By Richfaces team</h2>
+ </div>
+ </h:panelGroup>
+ </f:facet>
+ <f:facet name="sidebar">
+ <h:form>
+ <h:panelGroup>
+ <rich:layout id="layoutID" binding="#{layout.htmlLayout}"
+ rendered="#{layout.rendered}">
+ <div class="layoutDiv" align="center"><rich:layoutPanel
+ position="#{layout.panels[0].position}">
+ <div class="layoutPanelDiv" align="center"><h:graphicImage
+ value="/pics/construction_bucket_16.png" /> <b>LEFT LAYOUT
+ PANEL</b> <h:selectOneRadio value="#{layout.tempPanels[0].position}">
+ <f:selectItems value="#{layoutPanel.positions}" />
+ </h:selectOneRadio></div>
+ </rich:layoutPanel> <rich:layoutPanel position="#{layout.panels[1].position}">
+ <div class="layoutPanelDiv" align="center"><h:graphicImage
+ value="/pics/2.gif" /> <b>RIGHT LAYOUT PANEL</b> <h:selectOneRadio
+ value="#{layout.tempPanels[1].position}">
+ <f:selectItems value="#{layoutPanel.positions}" />
+ </h:selectOneRadio></div>
+ </rich:layoutPanel> <rich:layoutPanel position="#{layout.panels[2].position}"
+ binding="#{layoutPanel.htmlLayoutPanel}" id="layoutPanelID"
+ rendered="#{layoutPanel.rendered}">
+ <div class="layoutPanelDiv" align="center"><h:graphicImage
+ value="/pics/3.gif" /> <b>CENTER LAYOUT PANEL</b> <h:selectOneRadio
+ value="#{layout.tempPanels[2].position}">
+ <f:selectItems value="#{layoutPanel.positions}" />
+ </h:selectOneRadio></div>
+ </rich:layoutPanel> <rich:layoutPanel position="#{layout.panels[3].position}">
+ <div class="layoutPanelDiv" align="center"><h:graphicImage
+ value="/pics/4.gif" /> <b>TOP LAYOUT PANEL</b> <h:selectOneRadio
+ value="#{layout.tempPanels[3].position}">
+ <f:selectItems value="#{layoutPanel.positions}" />
+ </h:selectOneRadio></div>
+ </rich:layoutPanel> <rich:layoutPanel position="#{layout.panels[4].position}">
+ <div class="layoutPanelDiv" align="center"><h:graphicImage
+ value="/pics/caution_tape_16.png" /> <b>BOTTOM LAYOUT PANEL</b>
+ <h:selectOneRadio value="#{layout.tempPanels[4].position}">
+ <f:selectItems value="#{layoutPanel.positions}" />
+ </h:selectOneRadio></div>
+ </rich:layoutPanel></div>
+ </rich:layout>
+ </h:panelGroup>
+ </h:form>
+ </f:facet>
+ <f:facet name="footer">
+ <h:panelGroup layout="block" styleClass="facetDiv">
+ <div id="footer">
+ <p id="legal">Copyright © 2009 Richfaces. Designed by <a
+ href="http://www.jboss.org/">QA</a></p>
+ <p id="brand">FOOTER</p>
+ </div>
+ </h:panelGroup>
+ </f:facet>
+ </rich:page>
+</f:subview>
\ No newline at end of file
Added: trunk/test-applications/jsp/src/main/webapp/LayoutComponents/LayoutComponentsProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/LayoutComponents/LayoutComponentsProperty.jsp (rev 0)
+++ trunk/test-applications/jsp/src/main/webapp/LayoutComponents/LayoutComponentsProperty.jsp 2009-03-23 18:20:06 UTC (rev 13122)
@@ -0,0 +1,128 @@
+<%@ 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://richfaces.org/rich" prefix="rich"%>
+
+<f:subview id="layoutComponentsPropertySubviewID">
+ <h:commandButton value="regroup" action="#{layout.validate}"></h:commandButton>
+
+ <h:panelGrid columns="2" border="1" style="float:left;">
+ <h:outputText value="Component:" />
+ <h:outputText value="rich:page" style="font-weight:bold;" />
+
+ <h:outputText value="contentType" />
+ <h:selectOneRadio value="#{page.contentType}">
+ <f:selectItem itemLabel="text/html" itemValue="text/html" />
+ <f:selectItem itemLabel="image/png" itemValue="image/png" />
+ <f:selectItem itemLabel="image/gif" itemValue="image/gif" />
+ <f:selectItem itemLabel="video/mpeg" itemValue="video/mpeg" />
+ <f:selectItem itemLabel="text/css" itemValue="text/css" />
+ <f:selectItem itemLabel="audio/basic" itemValue="audio/basic" />
+ <a4j:support event="onchange" reRender="pageID"></a4j:support>
+ </h:selectOneRadio>
+
+ <h:outputText value="dir" />
+ <h:selectOneRadio value="#{page.dir}">
+ <f:selectItem itemLabel="rtl" itemValue="rtl" />
+ <f:selectItem itemLabel="ltr" itemValue="ltr" />
+ <a4j:support event="onchange" reRender="pageID"></a4j:support>
+ </h:selectOneRadio>
+
+ <h:outputText value="lang" />
+ <h:selectOneRadio value="#{page.lang}">
+ <f:selectItem itemLabel="en" itemValue="en" />
+ <f:selectItem itemLabel="ru" itemValue="ru" />
+ <f:selectItem itemLabel="fr" itemValue="fr" />
+ <a4j:support event="onchange" reRender="pageID"></a4j:support>
+ </h:selectOneRadio>
+
+ <h:outputText value="markupType" />
+ <h:panelGroup>
+ <h:inputText value="#{page.markupType}">
+ <a4j:support event="onblur" reRender="pageID"></a4j:support>
+ </h:inputText>
+ <h:outputText value="jsp,xhtml and so on" />
+ </h:panelGroup>
+
+ <h:outputText value="namespace" />
+ <h:inputText value="#{page.namespace}" onchange="submit">
+ <a4j:support event="onblur" reRender="pageID"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="pageTitle" />
+ <h:inputText value="#{page.pageTitle}" onchange="submit">
+ <a4j:support event="onblur" reRender="pageID"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="rendered" />
+ <h:selectBooleanCheckbox value="#{page.rendered}">
+ <a4j:support event="onclick" reRender="pageID"></a4j:support>
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="sidebarPosition" />
+ <h:selectOneMenu value="#{page.sidebarPosition}">
+ <f:selectItem itemValue="left" itemLabel="left"/>
+ <f:selectItem itemValue="right" itemLabel="right"/>
+ <a4j:support event="onchange" reRender="pageID"></a4j:support>
+ </h:selectOneMenu>
+
+ <h:outputText value="sidebarWidth" />
+ <h:inputText value="#{page.sidebarWidth}" onchange="submit">
+ <a4j:support event="onblur" reRender="pageID"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="theme" />
+ <h:inputText value="#{page.theme}" onchange="submit">
+ <a4j:support event="onblur" reRender="pageID"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="title" />
+ <h:inputText value="#{page.title}" onchange="submit">
+ <a4j:support event="onblur" reRender="pageID"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="width" />
+ <h:inputText value="#{page.width}" onchange="submit">
+ <a4j:support event="onblur" reRender="pageID"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="rich:page test" />
+ <h:commandButton value="add test" action="#{page.addPage}"></h:commandButton>
+
+ <h:commandButton actionListener="#{page.checkPage}"
+ value="Check Page Id" />
+ <h:outputText value="#{page.pageLabel}" />
+ </h:panelGrid>
+ <h:panelGrid columns="2" border="1">
+ <h:outputText value="Component:" />
+ <h:outputText value="rich:layout" style="font-weight:bold;" />
+
+ <h:outputText value="rendered" />
+ <h:selectBooleanCheckbox value="#{layout.rendered}">
+ <a4j:support event="onclick" reRender="pageID"></a4j:support>
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="rich:layout test" />
+ <h:commandButton value="add test" action="#{layout.addLayout}"></h:commandButton>
+
+ <h:commandButton actionListener="#{layout.checkLayout}"
+ value="Check Layout Id" />
+ <h:outputText value="#{layout.layoutLabel}" />
+ </h:panelGrid>
+ <h:panelGrid columns="2" border="1">
+ <h:outputText value="Component:" />
+ <h:outputText value="rich:layoutPanel" style="font-weight:bold;" />
+
+ <h:outputText value="rendered" />
+ <h:selectBooleanCheckbox value="#{layoutPanel.rendered}">
+ <a4j:support event="onclick" reRender="pageID"></a4j:support>
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="rich:layout test" />
+ <h:commandButton value="add test" action="#{layoutPanel.addLayoutPanel}"></h:commandButton>
+
+ <h:commandButton actionListener="#{layoutPanel.checkLayoutPanel}"
+ value="Check Layout Id" />
+ <h:outputText value="#{layoutPanel.layoutPanelLabel}" />
+ </h:panelGrid>
+</f:subview>
\ No newline at end of file
Added: trunk/test-applications/jsp/src/main/webapp/LayoutComponents/LayoutComponentsStraightforward.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/LayoutComponents/LayoutComponentsStraightforward.jsp (rev 0)
+++ trunk/test-applications/jsp/src/main/webapp/LayoutComponents/LayoutComponentsStraightforward.jsp 2009-03-23 18:20:06 UTC (rev 13122)
@@ -0,0 +1,8 @@
+<%@ 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://richfaces.org/rich" prefix="rich"%>
+
+<f:subview id="listShuttleStraightforwardSubviewID">
+<div>listShuttleStraightforwardSubviewID</div>
+</f:subview>
\ No newline at end of file
Added: trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-LayoutComponents.xml
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-LayoutComponents.xml (rev 0)
+++ trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-LayoutComponents.xml 2009-03-23 18:20:06 UTC (rev 13122)
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
+<faces-config>
+ <managed-bean>
+ <managed-bean-name>layout</managed-bean-name>
+ <managed-bean-class>componentsLayout.LayoutBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>layoutPanel</managed-bean-name>
+ <managed-bean-class>componentsLayout.LayoutPanelBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>page</managed-bean-name>
+ <managed-bean-class>componentsLayout.PageBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+</faces-config>
\ No newline at end of file
Modified: trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml 2009-03-23 18:09:41 UTC (rev 13121)
+++ trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml 2009-03-23 18:20:06 UTC (rev 13122)
@@ -196,7 +196,7 @@
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>
- /WEB-INF/faces-config-ColorPicker.xml,/WEB-INF/faces-config-tTree.xml,/WEB-INF/faces-config-Queue.xml,/WEB-INF/faces-config-Editor.xml,/WEB-INF/faces-config-ExtendedDataTable.xml,/WEB-INF/faces-config-DataGrid.xml,/WEB-INF/faces-config-Validator.xml,/WEB-INF/faces-config-ComponentInfo.xml,/WEB-INF/faces-config-HotKey.xml,/WEB-INF/faces-config-DataTable.xml,/WEB-INF/faces-config-SimpleTogglePanel.xml,/WEB-INF/faces-config-Panel.xml,/WEB-INF/faces-config-PanelBar.xml,/WEB-INF/faces-config-TabPanel.xml,/WEB-INF/faces-config-TogglePanel.xml,/WEB-INF/faces-config-Paint2D.xml,/WEB-INF/faces-config-InputNumberSlider.xml,/WEB-INF/faces-config-InputNumberSpinner.xml,/WEB-INF/faces-config-DDMenu.xml,/WEB-INF/faces-config-Tree.xml,/WEB-INF/faces-config-PanelMenu.xml,/WEB-INF/faces-config-Icon.xml,/WEB-INF/faces-config-ModalPanel.xml,/WEB-INF/faces-config-tooltip.xml,/WEB-INF/faces-config-Skin.xml,/WEB-INF/faces-config-Calendar.xml,/WEB-INF/faces-config-Gmap.xml,/WEB-INF/faces-confi!
g-DataFilterSlider.xml,/WEB-INF/faces-config-Separator.xml,/WEB-INF/faces-config-Spacer.xml,/WEB-INF/faces-config-ToolBar.xml,/WEB-INF/faces-config-DataScroller.xml,/WEB-INF/faces-config-SuggestionBox.xml,/WEB-INF/faces-config-Message.xml,/WEB-INF/faces-config-VirtualEarth.xml,/WEB-INF/faces-config-Effect.xml,/WEB-INF/faces-config-Insert.xml,/WEB-INF/faces-config-RichBean.xml,/WEB-INF/faces-config-RichTest.xml,/WEB-INF/faces-config-ScrollableDataTable.xml,/WEB-INF/faces-config-jQuery.xml,/WEB-INF/faces-config-DragAndDrop.xml,/WEB-INF/faces-config-OrderingList.xml,/WEB-INF/faces-config-DataOrderedList.xml,/WEB-INF/faces-config-DataDefinitionList.xml,/WEB-INF/faces-config-ContextMenu.xml,/WEB-INF/faces-config-ListShuttle.xml,/WEB-INF/faces-config-Converter.xml,/WEB-INF/faces-config-ComponentControl.xml,/WEB-INF/faces-config-Columns.xml,/WEB-INF/faces-config-PickList.xml,/WEB-INF/faces-config-Combobox.xml,/WEB-INF/faces-config-PTComponent.xml,/WEB-INF/faces-config-Event.xml,/W!
EB-INF/faces-config-ProgressBar.xml,/WEB-INF/faces-config-Options.xml,
/WEB-INF/faces-config-SortingAndFiltering.xml,/WEB-INF/faces-config-Style.xml,/WEB-INF/faces-config-FileUpload.xml,/WEB-INF/faces-config-InplaceSelect.xml,/WEB-INF/faces-config-InplaceInput.xml,/WEB-INF/faces-config-Skinning.xml,/WEB-INF/faces-config-Custom.xml
+ /WEB-INF/faces-config-LayoutComponents.xml,/WEB-INF/faces-config-ColorPicker.xml,/WEB-INF/faces-config-tTree.xml,/WEB-INF/faces-config-Queue.xml,/WEB-INF/faces-config-Editor.xml,/WEB-INF/faces-config-ExtendedDataTable.xml,/WEB-INF/faces-config-DataGrid.xml,/WEB-INF/faces-config-Validator.xml,/WEB-INF/faces-config-ComponentInfo.xml,/WEB-INF/faces-config-HotKey.xml,/WEB-INF/faces-config-DataTable.xml,/WEB-INF/faces-config-SimpleTogglePanel.xml,/WEB-INF/faces-config-Panel.xml,/WEB-INF/faces-config-PanelBar.xml,/WEB-INF/faces-config-TabPanel.xml,/WEB-INF/faces-config-TogglePanel.xml,/WEB-INF/faces-config-Paint2D.xml,/WEB-INF/faces-config-InputNumberSlider.xml,/WEB-INF/faces-config-InputNumberSpinner.xml,/WEB-INF/faces-config-DDMenu.xml,/WEB-INF/faces-config-Tree.xml,/WEB-INF/faces-config-PanelMenu.xml,/WEB-INF/faces-config-Icon.xml,/WEB-INF/faces-config-ModalPanel.xml,/WEB-INF/faces-config-tooltip.xml,/WEB-INF/faces-config-Skin.xml,/WEB-INF/faces-config-Calendar.xml,/WEB-INF!
/faces-config-Gmap.xml,/WEB-INF/faces-config-DataFilterSlider.xml,/WEB-INF/faces-config-Separator.xml,/WEB-INF/faces-config-Spacer.xml,/WEB-INF/faces-config-ToolBar.xml,/WEB-INF/faces-config-DataScroller.xml,/WEB-INF/faces-config-SuggestionBox.xml,/WEB-INF/faces-config-Message.xml,/WEB-INF/faces-config-VirtualEarth.xml,/WEB-INF/faces-config-Effect.xml,/WEB-INF/faces-config-Insert.xml,/WEB-INF/faces-config-RichBean.xml,/WEB-INF/faces-config-RichTest.xml,/WEB-INF/faces-config-ScrollableDataTable.xml,/WEB-INF/faces-config-jQuery.xml,/WEB-INF/faces-config-DragAndDrop.xml,/WEB-INF/faces-config-OrderingList.xml,/WEB-INF/faces-config-DataOrderedList.xml,/WEB-INF/faces-config-DataDefinitionList.xml,/WEB-INF/faces-config-ContextMenu.xml,/WEB-INF/faces-config-ListShuttle.xml,/WEB-INF/faces-config-Converter.xml,/WEB-INF/faces-config-ComponentControl.xml,/WEB-INF/faces-config-Columns.xml,/WEB-INF/faces-config-PickList.xml,/WEB-INF/faces-config-Combobox.xml,/WEB-INF/faces-config-PTCompo!
nent.xml,/WEB-INF/faces-config-Event.xml,/WEB-INF/faces-config-Progres
sBar.xml,/WEB-INF/faces-config-Options.xml,/WEB-INF/faces-config-SortingAndFiltering.xml,/WEB-INF/faces-config-Style.xml,/WEB-INF/faces-config-FileUpload.xml,/WEB-INF/faces-config-InplaceSelect.xml,/WEB-INF/faces-config-InplaceInput.xml,/WEB-INF/faces-config-Skinning.xml,/WEB-INF/faces-config-Custom.xml
</param-value>
</context-param>
15 years, 10 months
JBoss Rich Faces SVN: r13120 - trunk/test-applications/realworld2/doc.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2009-03-23 13:28:50 -0400 (Mon, 23 Mar 2009)
New Revision: 13120
Added:
trunk/test-applications/realworld2/doc/description.odt
Log:
https://jira.jboss.org/jira/browse/RF-6441
Added: trunk/test-applications/realworld2/doc/description.odt
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld2/doc/description.odt
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
15 years, 10 months
JBoss Rich Faces SVN: r13119 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2009-03-23 13:12:19 -0400 (Mon, 23 Mar 2009)
New Revision: 13119
Modified:
trunk/docs/userguide/en/src/main/docbook/included/datascroller.xml
Log:
https://jira.jboss.org/jira/browse/RF-6446
name of the facet is corrected
Modified: trunk/docs/userguide/en/src/main/docbook/included/datascroller.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/datascroller.xml 2009-03-23 17:08:09 UTC (rev 13118)
+++ trunk/docs/userguide/en/src/main/docbook/included/datascroller.xml 2009-03-23 17:12:19 UTC (rev 13119)
@@ -277,10 +277,10 @@
]]></programlisting>
<para> It's possible to insert optional separators between controls.
For this purpose use a <emphasis>
- <property>"controlSeparator"</property>
+ <property>"controlsSeparator"</property>
</emphasis> facet. An example is placed below. </para>
<programlisting role="XML"><![CDATA[ ...
- <f:facet name="controlSeparator">
+ <f:facet name="controlsSeparator">
<h:graphicImage value="/image/sep.png"/>
</f:facet>
...
@@ -345,7 +345,7 @@
</thead>
<tbody>
<row>
- <entry>controlSeparator</entry>
+ <entry>controlsSeparator</entry>
<entry>Redefines optional separators between controls</entry>
</row>
<row>
15 years, 10 months
JBoss Rich Faces SVN: r13118 - trunk/test-applications/realworld2/web/src/main/webapp/includes/fileUpload.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2009-03-23 13:08:09 -0400 (Mon, 23 Mar 2009)
New Revision: 13118
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/fileUpload/fileUploader.xhtml
Log:
Realworld: redesign of Files Upload page
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/fileUpload/fileUploader.xhtml
===================================================================
(Binary files differ)
15 years, 10 months
JBoss Rich Faces SVN: r13117 - in trunk/test-applications/realworld2/web/src/main: webapp/includes/fileUpload and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2009-03-23 12:46:33 -0400 (Mon, 23 Mar 2009)
New Revision: 13117
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Model.java
trunk/test-applications/realworld2/web/src/main/webapp/includes/fileUpload/fileUploader.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/fileUpload/uploadResult.xhtml
Log:
Realworld: redesign of Files Upload page
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Model.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Model.java 2009-03-23 16:43:11 UTC (rev 13116)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Model.java 2009-03-23 16:46:33 UTC (rev 13117)
@@ -70,7 +70,7 @@
return selectedAlbum;
}
- private void setSelectedAlbum(Album selectedAlbum) {
+ public void setSelectedAlbum(Album selectedAlbum) {
this.selectedAlbum = selectedAlbum;
}
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/fileUpload/fileUploader.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/fileUpload/uploadResult.xhtml
===================================================================
(Binary files differ)
15 years, 10 months
JBoss Rich Faces SVN: r13116 - trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataScroller.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-03-23 12:43:11 -0400 (Mon, 23 Mar 2009)
New Revision: 13116
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataScroller/dataScroller.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataScroller/dataScrollerAjax.xhtml
Log:
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataScroller/dataScroller.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataScroller/dataScroller.xhtml 2009-03-23 16:41:48 UTC (rev 13115)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataScroller/dataScroller.xhtml 2009-03-23 16:43:11 UTC (rev 13116)
@@ -22,12 +22,15 @@
<h:commandButton id="onpagechange" action="#{dataScrollerBean.onpagechange}" value="Test onpagechange" />
<h:commandButton id="pageVars" action="#{dataScrollerBean.pageVars}" value="Test page vars" />
<h:commandButton id="changeRenderIfSinglePage" action="#{dataScrollerBean.changeRenderIfSinglePage}" value="Change render if single page" />
+
</h:form>
<br/>
<h:form id="_data">
+
<rich:datascroller id="scroller"
for="tbl"
align="left"
+ ajaxSingle="#{dataScrollerBean.ajaxSingle}"
maxPages="#{dataScrollerBean.maxPages}"
page="#{dataScrollerBean.page}"
onclick="EventQueue.fire('onclick')"
@@ -37,11 +40,13 @@
onmouseover="EventQueue.fire('onmouseover')"
onmouseup="EventQueue.fire('onmouseup')"
onpagechange="#{dataScrollerBean.onpagechange}"
- reRender="#{dataScrollerBean.reRender}"
- pageIndexVar="activePage"
+ reRender="activePage, pagesCount,limit_input, limitControl"
+ pageIndexVar="activePage"
pagesVar="pagesCount"
renderIfSinglePage="#{dataScrollerBean.renderIfSinglePage}"
- >
+ limitToList="#{dataScrollerBean.limitToList}"
+ >
+
<f:facet name="next">
<h:outputText value="Next"></h:outputText>
</f:facet>
@@ -49,10 +54,34 @@
<h:outputText value="Previous"></h:outputText>
</f:facet>
</rich:datascroller>
-
-
<br/>
<br/>
+ <br/>
+ <fieldset>
+ <legend>Check "limitToList" attribute:</legend>
+
+ <h:panelGroup id="limitControl">
+ <h:selectBooleanCheckbox id="limit_checkbox" label="limit to list" value="#{dataScrollerBean.limitToList}" />
+ <h:selectBooleanCheckbox id="single_checkbox" label="ajax single" value="#{dataScrollerBean.ajaxSingle}" />
+
+ <a4j:commandButton id="limit_apply" reRender="limit_input, limitControl, scroller" value="apply limitToList"> </a4j:commandButton>
+ <a4j:commandButton id="limit_reset_button" action="#{dataScrollerBean.reset}" reRender="limit_input, limitControl" value="reset"></a4j:commandButton>
+ </h:panelGroup>
+
+ <h:panelGroup id="limit_input">
+ <h:inputText id="limit_content_input1" value="#{dataScrollerBean.content1}" valueChangeListener="#{dataScrollerBean.valueChangeContent1}"/>
+ <h:outputText value="ValueChangeListener is:"/>
+ <h:outputText id="limit_content_listener1" value="#{dataScrollerBean.contentListener1}"/>
+ </h:panelGroup>
+
+ <a4j:outputPanel ajaxRendered="true">
+ <h:inputText id="limit_content_input2" value="#{dataScrollerBean.content2}" valueChangeListener="#{dataScrollerBean.valueChangeContent2}"/>
+ <h:outputText value="ValueChangeListener is:"/>
+ <h:outputText id="limit_content_listener2" value="#{dataScrollerBean.contentListener2}"/>
+ </a4j:outputPanel>
+ </fieldset>
+ <br/>
+ <br/>
<rich:dataTable id="tbl" value="#{dataScrollerBean.data}" rows="#{dataScrollerBean.tableRows}" var="var">
<rich:column>
<f:facet name="header">
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataScroller/dataScrollerAjax.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataScroller/dataScrollerAjax.xhtml 2009-03-23 16:41:48 UTC (rev 13115)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataScroller/dataScrollerAjax.xhtml 2009-03-23 16:43:11 UTC (rev 13116)
@@ -17,11 +17,11 @@
immediate="#{autoTestBean.immediate}"
ajaxSingle="#{autoTestBean.ajaxSingle}"
reRender="#{autoTestBean.reRender}"
- limitToList="#{autoTestBean.limitToList}"
bypassUpdates="#{autoTestBean.bypassUpdate}"
rendered="#{autoTestBean.rendered}"
oncomplete="#{autoTestBean.oncomplete}"
onpagechange="EventQueue.fire('onpagechange')"
+ process="#{autoTestBean.process}"
>
<f:param name="parameter1" value="value1" />
<f:actionListener type="org.ajax4jsf.autotest.bean.AutoTestListener" />
15 years, 10 months
JBoss Rich Faces SVN: r13115 - trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-03-23 12:41:48 -0400 (Mon, 23 Mar 2009)
New Revision: 13115
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataScrollerBean.java
Log:
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataScrollerBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataScrollerBean.java 2009-03-23 16:41:28 UTC (rev 13114)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataScrollerBean.java 2009-03-23 16:41:48 UTC (rev 13115)
@@ -25,6 +25,7 @@
import java.util.List;
import javax.faces.event.ActionEvent;
+import javax.faces.event.ValueChangeEvent;
import org.richfaces.component.UIDatascroller;
@@ -53,6 +54,18 @@
private boolean renderIfSinglePage = true;
+ private String content1 = "content1";
+
+ private String content2 = "content2";
+
+ private boolean limitToList = false;
+
+ private boolean ajaxSingle = true;
+
+ private String listener1;
+
+ private String listener2;
+
private UIDatascroller scroller;
public DataScrollerBean() {
@@ -70,7 +83,7 @@
}
public String pageVars() {
- reRender = "activePage, pagesCount";
+ reRender = "activePage, pagesCount,limit_input, limitControl";
return null;
}
@@ -91,6 +104,12 @@
data = null;
onpagechange = "EventQueue.fire('onpagechange')";
renderIfSinglePage = true;
+ limitToList = false;
+ ajaxSingle = true;
+ content1 = "content1";
+ content2 = "content2";
+ listener1 = "reset";
+ listener2 = "reset";
}
public void apply(ActionEvent event) {
@@ -244,5 +263,53 @@
this.scroller = scroller;
}
+ public boolean isLimitToList() {
+ return limitToList;
+ }
+
+ public void setLimitToList(boolean limitToList) {
+ this.limitToList = limitToList;
+ }
+
+ public String getContent1() {
+ return content1;
+ }
+
+ public void setContent1(String content1) {
+ this.content1 = content1;
+ }
+
+ public String getContent2() {
+ return content2;
+ }
+
+ public void setContent2(String content2) {
+ this.content2 = content2;
+ }
+ public void valueChangeContent1(ValueChangeEvent event) {
+ listener1 = "invoked";
+ }
+
+ public void valueChangeContent2(ValueChangeEvent event) {
+ listener2 = "invoked";
+ }
+
+
+ public String getContentListener1() {
+ return listener1;
+ }
+
+ public String getContentListener2() {
+ return listener2;
+ }
+
+ public boolean isAjaxSingle() {
+ return ajaxSingle;
+ }
+
+ public void setAjaxSingle(boolean ajaxSingle) {
+ this.ajaxSingle = ajaxSingle;
+ }
+
}
15 years, 10 months
JBoss Rich Faces SVN: r13114 - trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-03-23 12:41:28 -0400 (Mon, 23 Mar 2009)
New Revision: 13114
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataFilterSliderBean.java
Log:
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataFilterSliderBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataFilterSliderBean.java 2009-03-23 16:40:48 UTC (rev 13113)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataFilterSliderBean.java 2009-03-23 16:41:28 UTC (rev 13114)
@@ -20,6 +20,7 @@
*/
package org.ajax4jsf.bean;
+import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@@ -27,9 +28,12 @@
public class DataFilterSliderBean {
- public static class Planet {
- private String name;
+ public static class Planet implements Serializable{
+
+ private static final long serialVersionUID = -5401892327427120802L;
+ private String name;
+
private double gravity;
Planet(String n, double g) {
15 years, 10 months
JBoss Rich Faces SVN: r13113 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-03-23 12:40:48 -0400 (Mon, 23 Mar 2009)
New Revision: 13113
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataScrollerTest.java
Log:
create ajax attributes autotests, fix limitToList test
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataScrollerTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataScrollerTest.java 2009-03-23 16:37:30 UTC (rev 13112)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataScrollerTest.java 2009-03-23 16:40:48 UTC (rev 13113)
@@ -122,18 +122,146 @@
}
+ @Test
+ public void testRendered(Template template){
+ AutoTester autoTester = getAutoTester(this);
+ dataScrollerTableId = autoTester.getClientId(AutoTester.COMPONENT_ID + "_table", template);
+ autoTester.renderPage(template, RESET_METHOD_ME);
+ autoTester.testRendered();
+
+ }
@Test
- public void testAutoAjaxAttributes(Template template) {
+ public void testReRendered(Template template) {
AutoTester autoTester = getAutoTester(this);
+ dataScrollerTableId = autoTester.getClientId(AutoTester.COMPONENT_ID + "_table", template);
+ autoTester.renderPage(template, RESET_METHOD_ME);
+ autoTester.testReRender();
+ }
+
+ @Test
+ public void testActionListener(Template template) {
+ AutoTester autoTester = getAutoTester(this);
dataScrollerTableId = autoTester.getClientId(AutoTester.COMPONENT_ID + "_table", template);
-
autoTester.renderPage(template, RESET_METHOD_ME);
- autoTester.testAllAjaxAttributes();
-
+ autoTester.testActionListener();
}
+ @Test
+ public void testAjaxSingle(Template template) {
+ AutoTester autoTester = getAutoTester(this);
+ dataScrollerTableId = autoTester.getClientId(AutoTester.COMPONENT_ID + "_table", template);
+ autoTester.renderPage(template, RESET_METHOD_ME);
+ autoTester.testAjaxSingle();
+ }
+
+ @Test
+ public void testImmediate(Template template) {
+ AutoTester autoTester = getAutoTester(this);
+ dataScrollerTableId = autoTester.getClientId(AutoTester.COMPONENT_ID + "_table", template);
+ autoTester.renderPage(template, RESET_METHOD_ME);
+ autoTester.testImmediate();
+ }
+
+ @Test
+ public void testImmediateWithExternalValidation(Template template) {
+ AutoTester autoTester = getAutoTester(this);
+ dataScrollerTableId = autoTester.getClientId(AutoTester.COMPONENT_ID + "_table", template);
+ autoTester.renderPage(template, RESET_METHOD_ME);
+ autoTester.testImmediateWithExternalValidationFailed();
+ }
+
+ @Test
+ public void testBypassUpdate(Template template) {
+ AutoTester autoTester = getAutoTester(this);
+ dataScrollerTableId = autoTester.getClientId(AutoTester.COMPONENT_ID + "_table", template);
+ autoTester.renderPage(template, RESET_METHOD_ME);
+ autoTester.testBypassUpdate();
+ }
+
+ @Test
+ public void testExtrenalValidationFailure(Template template) {
+ AutoTester autoTester = getAutoTester(this);
+ dataScrollerTableId = autoTester.getClientId(AutoTester.COMPONENT_ID + "_table", template);
+ autoTester.renderPage(template, RESET_METHOD_ME);
+ autoTester.testExtrenalValidationFailure();
+ }
+
+ @Test
+ public void testAjaxSingleWithExtrenalValidationFailure(Template template) {
+ AutoTester autoTester = getAutoTester(this);
+ dataScrollerTableId = autoTester.getClientId(AutoTester.COMPONENT_ID + "_table", template);
+ autoTester.renderPage(template, RESET_METHOD_ME);
+ autoTester.testAjaxSingleWithProcesExternalValidation(true);
+ }
+
+ @Test
+ public void testLimitToList(Template template) {
+ renderPage(template,RESET_METHOD_ME);
+ String parentId = getParentId();
+ String formId = parentId + "_data:";
+
+ // init id's
+ String limitCheckBox = formId + "limit_checkbox";
+ String singleCheckBox = formId + "single_checkbox";
+ String limitApplyButton = formId + "limit_apply";
+ String limitResetButton = formId + "limit_reset_button";
+ String limitContentInput1 = formId + "limit_content_input1";
+ String limitContentListener1 = formId + "limit_content_listener1";
+ String limitContentInput2 = formId + "limit_content_input2";
+ String limitContentListener2 = formId + "limit_content_listener2";
+
+ dataScrollerTableId = formId + "scroller_table";
+
+ // reset listeners status
+ AssertRendered(limitResetButton);
+ clickAjaxCommandAndWait(limitResetButton);
+
+ //ajaxSingle='false'
+ clickById(singleCheckBox);
+ clickAjaxCommandAndWait(limitApplyButton);
+
+ // check listeners default status
+ AssertRendered(limitContentListener1);
+ AssertTextEquals(limitContentListener1, "reset");
+
+ AssertRendered(limitContentListener2);
+ AssertTextEquals(limitContentListener2, "reset");
+
+ // change value
+ AssertRendered(limitContentInput1);
+ type(limitContentInput1, "content11");
+
+ AssertRendered(limitContentInput2);
+ type(limitContentInput2, "content22");
+
+ clickControl(8,dataScrollerTableId);
+
+ AssertTextEquals(limitContentListener1, "invoked");
+ AssertTextEquals(limitContentListener2, "invoked");
+
+ //reset listeners status again
+ clickAjaxCommandAndWait(limitResetButton);
+
+ //set limitToList='true'
+ clickById(limitCheckBox);
+
+ // change value
+ AssertRendered(limitContentInput1);
+ type(limitContentInput1, "content11");
+
+ AssertRendered(limitContentInput2);
+ type(limitContentInput2, "content22");
+
+ clickControl(9,dataScrollerTableId);
+
+ AssertTextEquals(limitContentListener1, "invoked");
+ AssertTextEquals(limitContentListener2, "reset");
+
+ }
+
+
@Override
public void sendAjax() {
clickControl(4, dataScrollerTableId);
15 years, 10 months