JBoss Rich Faces SVN: r13152 - trunk/test-applications/richfaces-docs/web/src/main/webapp/layout.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2009-03-24 13:34:28 -0400 (Tue, 24 Mar 2009)
New Revision: 13152
Modified:
trunk/test-applications/richfaces-docs/web/src/main/webapp/layout/mainMenu.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-6419https://jira.jboss.org/jira/bro...
added new features
Modified: trunk/test-applications/richfaces-docs/web/src/main/webapp/layout/mainMenu.xhtml
===================================================================
--- trunk/test-applications/richfaces-docs/web/src/main/webapp/layout/mainMenu.xhtml 2009-03-24 17:34:09 UTC (rev 13151)
+++ trunk/test-applications/richfaces-docs/web/src/main/webapp/layout/mainMenu.xhtml 2009-03-24 17:34:28 UTC (rev 13152)
@@ -21,8 +21,16 @@
<rich:panelMenuItem actionListener="#{menuBean.select}" mode="server">
<h:outputLink value="colorPicker.xhtml" >rich:colorPicker</h:outputLink>
</rich:panelMenuItem>
+<rich:panelMenuItem actionListener="#{menuBean.select}" mode="server">
+<h:outputLink value="fileUpload.xhtml" >rich:fileUpload</h:outputLink>
+</rich:panelMenuItem>
<rich:panelMenuItem actionListener="#{menuBean.select}" mode="server">
+<h:outputLink value="page.xhtml" >rich:page</h:outputLink>
+</rich:panelMenuItem>
+
+
+<rich:panelMenuItem actionListener="#{menuBean.select}" mode="server">
<h:outputLink value="tree.xhtml" >rich:tree</h:outputLink>
</rich:panelMenuItem>
15 years, 9 months
JBoss Rich Faces SVN: r13150 - in trunk/test-applications/richfaces-docs/web/src/main/java/org/docs: fileUpload and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2009-03-24 13:27:12 -0400 (Tue, 24 Mar 2009)
New Revision: 13150
Added:
trunk/test-applications/richfaces-docs/web/src/main/java/org/docs/fileUpload/
trunk/test-applications/richfaces-docs/web/src/main/java/org/docs/fileUpload/FileUpload.java
Log:
https://jira.jboss.org/jira/browse/RF-6419https://jira.jboss.org/jira/bro...
added new features
Added: trunk/test-applications/richfaces-docs/web/src/main/java/org/docs/fileUpload/FileUpload.java
===================================================================
--- trunk/test-applications/richfaces-docs/web/src/main/java/org/docs/fileUpload/FileUpload.java (rev 0)
+++ trunk/test-applications/richfaces-docs/web/src/main/java/org/docs/fileUpload/FileUpload.java 2009-03-24 17:27:12 UTC (rev 13150)
@@ -0,0 +1,102 @@
+package org.docs.fileUpload;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+import org.richfaces.event.UploadEvent;
+import org.richfaces.model.UploadItem;
+
+
+
+
+
+public class FileUpload {
+
+ private List data;
+
+
+ File f1 = new File(
+ "C:\\Projects\\RichFaces\\test-applications\\richfaces-docs\\web\\src\\main\\webapp\\img\\fileUploadImages\\");
+String[] strFilesDirs = f1.list();
+
+ public FileUpload() {
+ data = new ArrayList();
+
+
+
+ }
+
+ public String[] getStrFilesDirs() {
+ return strFilesDirs;
+ }
+
+ public void setStrFilesDirs(String[] strFilesDirs) {
+ this.strFilesDirs = strFilesDirs;
+ }
+
+ public void fileUploadListener(UploadEvent event) throws Exception {
+ UploadItem upload = event.getUploadItem();
+ if (upload.isTempFile()) {
+ File file = upload.getFile();
+ System.out.println(upload.getFileName());
+
+ // FileReader in = new FileReader(upload.getFile());
+ InputStream in = new FileInputStream(upload.getFile());
+ // ByteInputStream in = new ByteInputStream(upload.getData(), 1000);
+ FileOutputStream outputFile = new FileOutputStream(
+ "C:\\Projects\\RichFaces\\test-applications\\richfaces-docs\\web\\src\\main\\webapp\\img\\fileUploadImages\\"
+ + upload.getFileName());
+ // FileWriter out = new FileWriter(outputFile);
+ DataOutputStream filewr = new DataOutputStream(outputFile);
+
+ int c;
+ while ((c = in.read()) != -1) {
+
+ filewr.write(c);
+ }
+ in.close();
+ filewr.close();
+ //
+ //
+ // ByteArrayOutputStream b = new ByteArrayOutputStream();
+ // b.write(upload.getData());
+
+ } else {
+ ByteArrayOutputStream b = new ByteArrayOutputStream();
+ b.write(upload.getData());
+ }
+
+ }
+
+ public void listener(UploadEvent event) throws Exception {
+
+ try {
+ UploadItem item = event.getUploadItem();
+ System.out
+ .println("File : " + item.getFileName() + " was uploaded");
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ public List getData() {
+ for (int i = 0; i < data.size(); i++)
+ System.out.println(data.get(i));
+ return data;
+ }
+
+ public void setData(List data) {
+ this.data = data;
+ }
+
+
+
+
+}
15 years, 9 months
JBoss Rich Faces SVN: r13149 - trunk/test-applications/richfaces-docs/web/src/main/java/org/docs/tree.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2009-03-24 13:26:08 -0400 (Tue, 24 Mar 2009)
New Revision: 13149
Modified:
trunk/test-applications/richfaces-docs/web/src/main/java/org/docs/tree/Tree.java
Log:
https://jira.jboss.org/jira/browse/RF-6419https://jira.jboss.org/jira/bro...
added new features
Modified: trunk/test-applications/richfaces-docs/web/src/main/java/org/docs/tree/Tree.java
===================================================================
--- trunk/test-applications/richfaces-docs/web/src/main/java/org/docs/tree/Tree.java 2009-03-24 17:25:39 UTC (rev 13148)
+++ trunk/test-applications/richfaces-docs/web/src/main/java/org/docs/tree/Tree.java 2009-03-24 17:26:08 UTC (rev 13149)
@@ -3,7 +3,6 @@
import javax.faces.context.FacesContext;
-import org.richfaces.*;
import org.richfaces.component.xml.XmlTreeDataBuilder;
import org.richfaces.model.TreeNode;
import org.richfaces.model.TreeNodeImpl;
15 years, 9 months
JBoss Rich Faces SVN: r13148 - trunk/test-applications/richfaces-docs/web.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2009-03-24 13:25:39 -0400 (Tue, 24 Mar 2009)
New Revision: 13148
Modified:
trunk/test-applications/richfaces-docs/web/pom.xml
Log:
https://jira.jboss.org/jira/browse/RF-6419
added new features
Modified: trunk/test-applications/richfaces-docs/web/pom.xml
===================================================================
--- trunk/test-applications/richfaces-docs/web/pom.xml 2009-03-24 17:03:25 UTC (rev 13147)
+++ trunk/test-applications/richfaces-docs/web/pom.xml 2009-03-24 17:25:39 UTC (rev 13148)
@@ -30,7 +30,19 @@
<version>1.2_12</version>
<scope>provided</scope>
- </dependency>
+ </dependency>
+
+
+
+ <dependency>
+
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-ui</artifactId>
+ <version>3.3.1-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+
+
</dependencies>
<build>
<plugins>
15 years, 9 months
JBoss Rich Faces SVN: r13147 - trunk/test-applications/realworld2/doc.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2009-03-24 13:03:25 -0400 (Tue, 24 Mar 2009)
New Revision: 13147
Added:
trunk/test-applications/realworld2/doc/tree_build_descr.xhtml
trunk/test-applications/realworld2/doc/tree_click_descr.xhtml
Log:
Added: trunk/test-applications/realworld2/doc/tree_build_descr.xhtml
===================================================================
--- trunk/test-applications/realworld2/doc/tree_build_descr.xhtml (rev 0)
+++ trunk/test-applications/realworld2/doc/tree_build_descr.xhtml 2009-03-24 17:03:25 UTC (rev 13147)
@@ -0,0 +1,85 @@
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+<h1> The <rich:tree> component</h1>
+<p>The component is designed for hierarchical data presentation and is applied for building a tree structure. The component also uses built-in drag and drop.</p>
+
+<p>The <rich:tree> component in the PhotoAlbum application helps to represent and realize inherently the �Shelves�Albums�Photos� paradigm. Shelf is the highest possible level in the tree hierarchy. Shelfs are used to group thematic albums and may contain as many albums as needed. Photos are not represented in the tree because of their possible big quantities, which can make tree clumsy. Photos by themselves are rendered in the center of the screen (hereinafter referred to as watching area).</p>
+
+<p>Implicitly, the <rich:tree> components takes one of the main position in the PhotoAlbum and bounded with many application logic. There are several ways to realize the <rich:tree>. In the current application the <rich:tree> is realized using model tag <rich:treeNodesAdaptor>.</p>
+
+<p>Using the <rich:treeNodesAdaptor> means that the typical hierarchical tree structure is built on page straight in the component tree. The code snippet below shows the idea of how the tree can be built on the page with the help of adaptors:</p>
+
+<BLOCKQUOTE>
+<rich:tree>
+ <rich:treeNodesAdaptor>
+ <rich:treeNode />
+
+ <rich:treeNodesAdaptor>
+ <rich:treeNode />
+
+ <rich:treeNodesAdaptor>
+ <rich:treeNode />
+
+ <rich:treeNodesAdaptor>
+ <rich:treeNode />
+ </rich:treeNodesAdaptor>
+
+ </rich:treeNodesAdaptor>
+ </rich:treeNodesAdaptor>
+ </rich:treeNodesAdaptor>
+</rich:tree>
+</BLOCKQUOTE>
+
+<p>The NodesAdaptors completely repeat the tree hierarchy that takes place in an application. Adaptors may be nested one into another as deeply as needed. </p>
+
+<p>When using <rich:treeNodesAdaptor> component there is no need to specify the "value" and "var" attributes for the <rich:tree>. The values for nodes to be rendered are passed directly into the corresponding adaptor and the component do all the necessary iterative job. </p>
+
+<p>The realization of the <rich:tree> in the application is very close to the model shown above. The <rich:treeNodesAdaptor> component has �nodes� attribute. This attribute accepts collections that may include lists, arrays, maps, XML NodeList and NamedNodeMap either as single objects. The top <rich:treeNodesAdaptor> in the application responses for shelfs rendering. It �nodes� attribute refers to getShelfs() method of ShelfManager class and gets the collection of shelfs associated with the current user and all the shared shelfs in the system. Take a look at this method:</p>
+
+<BLOCKQUOTE>
+ public List<Shelf> getShelfs(){
+ if(shelfs == null){
+ shelfs = shelfAction.getShelfs(user);
+ }
+ return shelfs;
+ }
+</BLOCKQUOTE>
+
+<p>After the �nodes� attribute of �shelf� <rich:treeNodesAdaptor> receives the collection of shelfs, it switches to the nested �album� <rich:treeNodesAdaptor>, which �nodes� attribute refers in it turn to albums field of the Shelf class and takes the collection of all albums associated with the current shelf. The <rich:treeNodesAdaptor> renders all the albums that belongs to current iterating shelf and switches back to the �shelf� adaptor to render and iterate the next shelf in the received earlier collection. Here is how it looks in the webapp/includes/index/tree.xhtml file:</p>
+<BLOCKQUOTE>
+<rich:tree id="tree" ...>
+ <rich:treeNodesAdaptor nodes="#{shelfManager.getShelfs()}" ...>
+ <rich:treeNode reRender="mainArea" ...>
+ <rich:dropSupport id="shelfDND" .../>
+ <ui:include src="/includes/contextMenu/CMForShelf.xhtml" >
+ <ui:param name="shelf" ... />
+ </ui:include>
+ <h:outputText value="#{shelf.name}" />
+ <h:outputText value=" :: " /> <strong>#{shelfManager.getCountUnvisitedImages(shelf)}
+ </strong> new
+ <a4j:support reRender="tree, mainArea" .../>
+ <a4j:support reRender="tree, mainArea" .../>
+ </rich:treeNode>
+ <rich:treeNodesAdaptor var="album" ...>
+ <rich:treeNode reRender="mainArea" ...>
+ <ui:include src="/includes/contextMenu/CMForAlbum.xhtml" >
+ <ui:param name="album" ... />
+ </ui:include>
+ <rich:dndParam name="label" ... />
+ <h:outputText value="#{album.name}" />
+ <h:outputText value=" :: " />
+ <strong>#{albumManager.getCountUnvisitedImages(album)}</strong> new
+ <rich:dropSupport id="php" .../>
+ <a4j:support reRender="tree, mainArea" .../>
+ <a4j:support reRender="tree, mainArea" .../>
+ </rich:treeNode>
+ </rich:treeNodesAdaptor>
+ </rich:treeNodesAdaptor>
+</rich:tree>
+<BLOCKQUOTE>
+</ui:composition>
\ No newline at end of file
Added: trunk/test-applications/realworld2/doc/tree_click_descr.xhtml
===================================================================
--- trunk/test-applications/realworld2/doc/tree_click_descr.xhtml (rev 0)
+++ trunk/test-applications/realworld2/doc/tree_click_descr.xhtml 2009-03-24 17:03:25 UTC (rev 13147)
@@ -0,0 +1,11 @@
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+<h1> How the tree built</h1>
+<h1> What happens when click on tree node</h1>
+<BLOCKQUOTE>
+</ui:composition>
\ No newline at end of file
15 years, 9 months
JBoss Rich Faces SVN: r13146 - in trunk/test-applications/facelets/src/main: java/componentsLayout and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2009-03-24 12:53:28 -0400 (Tue, 24 Mar 2009)
New Revision: 13146
Added:
trunk/test-applications/facelets/src/main/java/componentsLayout/
trunk/test-applications/facelets/src/main/java/componentsLayout/LayoutBean.java
trunk/test-applications/facelets/src/main/java/componentsLayout/LayoutPanelBean.java
trunk/test-applications/facelets/src/main/java/componentsLayout/PageBean.java
trunk/test-applications/facelets/src/main/webapp/LayoutComponents/
trunk/test-applications/facelets/src/main/webapp/LayoutComponents/LayoutComponents.xhtml
trunk/test-applications/facelets/src/main/webapp/LayoutComponents/LayoutComponentsProperty.xhtml
trunk/test-applications/facelets/src/main/webapp/LayoutComponents/LayoutComponentsStraightforward.xhtml
trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-LayoutComponents.xml
Modified:
trunk/test-applications/facelets/src/main/java/rich/RichBean.java
trunk/test-applications/facelets/src/main/java/util/event/Event.java
trunk/test-applications/facelets/src/main/webapp/WEB-INF/web.xml
Log:
Add layout components(rich:page,layout,layoutPanel)
Added: trunk/test-applications/facelets/src/main/java/componentsLayout/LayoutBean.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/componentsLayout/LayoutBean.java (rev 0)
+++ trunk/test-applications/facelets/src/main/java/componentsLayout/LayoutBean.java 2009-03-24 16:53:28 UTC (rev 13146)
@@ -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/facelets/src/main/java/componentsLayout/LayoutPanelBean.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/componentsLayout/LayoutPanelBean.java (rev 0)
+++ trunk/test-applications/facelets/src/main/java/componentsLayout/LayoutPanelBean.java 2009-03-24 16:53:28 UTC (rev 13146)
@@ -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/facelets/src/main/java/componentsLayout/PageBean.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/componentsLayout/PageBean.java (rev 0)
+++ trunk/test-applications/facelets/src/main/java/componentsLayout/PageBean.java 2009-03-24 16:53:28 UTC (rev 13146)
@@ -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 = "xhtml";
+ namespace = "http://www.w3.org/1999/xhtml";
+ 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/facelets/src/main/java/rich/RichBean.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/rich/RichBean.java 2009-03-24 16:42:24 UTC (rev 13145)
+++ trunk/test-applications/facelets/src/main/java/rich/RichBean.java 2009-03-24 16:53:28 UTC (rev 13146)
@@ -78,6 +78,7 @@
map.add("Queue", add("/Queue/Queue", new boolean [] {false, true, true}));
map.add("tTree", add("/tTree/tTree", new boolean [] {true, true, true}));
map.add("ColorPicker", add("/ColorPicker/ColorPicker", new boolean [] {false, true, false}));
+ 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()));
Modified: trunk/test-applications/facelets/src/main/java/util/event/Event.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/util/event/Event.java 2009-03-24 16:42:24 UTC (rev 13145)
+++ trunk/test-applications/facelets/src/main/java/util/event/Event.java 2009-03-24 16:53:28 UTC (rev 13146)
@@ -129,6 +129,8 @@
private String onsave;
private String onsizeexceeded;
private String onlistchanged;
+ private String onload;
+ private String onunload;
public String getOnlistchanged() {
return onlistchanged;
@@ -270,6 +272,8 @@
onbeforeshow = "showEvent('formID:infoSubview:onbeforeshowInputID', 'onbeforeshow work!')";
onadd = "showEvent('formID:infoSubview:onaddInputID', 'onadd work!')";
onsizeexceeded = "showEvent('formID:infoSubview:onsizeexceededInputID', 'onsizeexceeded work!')";
+ onload = "showEvent('formID:infoSubview:onloadInputID', 'onload work!')";
+ onunload = "showEvent('formID:infoSubview:onunloadInputID', 'onunload work!')";
}
public String getOncontextmenu() {
@@ -1419,4 +1423,20 @@
this.onsave = onsave;
}
+ public String getOnload() {
+ return onload;
+ }
+
+ public void setOnload(String onload) {
+ this.onload = onload;
+ }
+
+ public String getOnunload() {
+ return onunload;
+ }
+
+ public void setOnunload(String onunload) {
+ this.onunload = onunload;
+ }
+
}
\ No newline at end of file
Added: trunk/test-applications/facelets/src/main/webapp/LayoutComponents/LayoutComponents.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/LayoutComponents/LayoutComponents.xhtml (rev 0)
+++ trunk/test-applications/facelets/src/main/webapp/LayoutComponents/LayoutComponents.xhtml 2009-03-24 16:53:28 UTC (rev 13146)
@@ -0,0 +1,77 @@
+<f:subview xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ 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: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>
+ </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/facelets/src/main/webapp/LayoutComponents/LayoutComponentsProperty.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/LayoutComponents/LayoutComponentsProperty.xhtml (rev 0)
+++ trunk/test-applications/facelets/src/main/webapp/LayoutComponents/LayoutComponentsProperty.xhtml 2009-03-24 16:53:28 UTC (rev 13146)
@@ -0,0 +1,129 @@
+<f:subview xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ 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/facelets/src/main/webapp/LayoutComponents/LayoutComponentsStraightforward.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/LayoutComponents/LayoutComponentsStraightforward.xhtml (rev 0)
+++ trunk/test-applications/facelets/src/main/webapp/LayoutComponents/LayoutComponentsStraightforward.xhtml 2009-03-24 16:53:28 UTC (rev 13146)
@@ -0,0 +1,9 @@
+
+<f:subview xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ id="layoutComponentsStraightforwardSubviewID">
+ <div>layoutComponentsStraightforwardSubviewID</div>
+</f:subview>
\ No newline at end of file
Added: trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-LayoutComponents.xml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-LayoutComponents.xml (rev 0)
+++ trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-LayoutComponents.xml 2009-03-24 16:53:28 UTC (rev 13146)
@@ -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/facelets/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/WEB-INF/web.xml 2009-03-24 16:42:24 UTC (rev 13145)
+++ trunk/test-applications/facelets/src/main/webapp/WEB-INF/web.xml 2009-03-24 16:53:28 UTC (rev 13146)
@@ -47,7 +47,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-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,/WEB-INF/faces-config-ProgressBar.xml!
,/WEB-INF/faces-config-Options.xml,/WEB-INF/faces-config-SortingAndFil
tering.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-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-Even!
t.xml,/WEB-INF/faces-config-ProgressBar.xml,/WEB-INF/faces-config-Opti
ons.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>
<context-param>
15 years, 9 months
JBoss Rich Faces SVN: r13145 - in trunk/test-applications/seamApp/web/src/main: java/org/richfaces/helloworld/domain/componentsLayout and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2009-03-24 12:42:24 -0400 (Tue, 24 Mar 2009)
New Revision: 13145
Added:
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/componentsLayout/
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/componentsLayout/LayoutBean.java
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/componentsLayout/LayoutPanelBean.java
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/componentsLayout/PageBean.java
trunk/test-applications/seamApp/web/src/main/webapp/LayoutComponents/
trunk/test-applications/seamApp/web/src/main/webapp/LayoutComponents/LayoutComponents.xhtml
trunk/test-applications/seamApp/web/src/main/webapp/LayoutComponents/LayoutComponentsProperty.xhtml
trunk/test-applications/seamApp/web/src/main/webapp/LayoutComponents/LayoutComponentsStraightforward.xhtml
Modified:
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/rich/RichBean.java
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/event/Event.java
Log:
Added: trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/componentsLayout/LayoutBean.java
===================================================================
--- trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/componentsLayout/LayoutBean.java (rev 0)
+++ trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/componentsLayout/LayoutBean.java 2009-03-24 16:42:24 UTC (rev 13145)
@@ -0,0 +1,106 @@
+package org.richfaces.helloworld.domain.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.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.richfaces.component.html.HtmlLayout;
+
+import org.richfaces.helloworld.domain.util.componentInfo.ComponentInfo;
+
+@Name("layout")
+(a)Scope(ScopeType.EVENT)
+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/seamApp/web/src/main/java/org/richfaces/helloworld/domain/componentsLayout/LayoutPanelBean.java
===================================================================
--- trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/componentsLayout/LayoutPanelBean.java (rev 0)
+++ trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/componentsLayout/LayoutPanelBean.java 2009-03-24 16:42:24 UTC (rev 13145)
@@ -0,0 +1,88 @@
+package org.richfaces.helloworld.domain.componentsLayout;
+
+import java.util.ArrayList;
+
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+import javax.faces.model.SelectItem;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.richfaces.component.html.HtmlLayoutPanel;
+
+import org.richfaces.helloworld.domain.util.componentInfo.ComponentInfo;
+
+@Name("layoutPanel")
+(a)Scope(ScopeType.EVENT)
+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/seamApp/web/src/main/java/org/richfaces/helloworld/domain/componentsLayout/PageBean.java
===================================================================
--- trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/componentsLayout/PageBean.java (rev 0)
+++ trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/componentsLayout/PageBean.java 2009-03-24 16:42:24 UTC (rev 13145)
@@ -0,0 +1,192 @@
+package org.richfaces.helloworld.domain.componentsLayout;
+
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.richfaces.component.UIPage;
+
+import org.richfaces.helloworld.domain.util.componentInfo.ComponentInfo;
+
+@Name("page")
+(a)Scope(ScopeType.EVENT)
+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/seamApp/web/src/main/java/org/richfaces/helloworld/domain/rich/RichBean.java
===================================================================
--- trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/rich/RichBean.java 2009-03-24 16:29:20 UTC (rev 13144)
+++ trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/rich/RichBean.java 2009-03-24 16:42:24 UTC (rev 13145)
@@ -82,6 +82,7 @@
map.add("Editor", add("/Editor/Editor", new boolean [] {true, true, false}));
map.add("Queue", add("/Queue/Queue", new boolean [] {false, true, true}));
map.add("ColorPicker", add("/ColorPicker/ColorPicker", new boolean [] {false, true, false}));
+ 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()));
Modified: trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/event/Event.java
===================================================================
--- trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/event/Event.java 2009-03-24 16:29:20 UTC (rev 13144)
+++ trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/event/Event.java 2009-03-24 16:42:24 UTC (rev 13145)
@@ -128,6 +128,8 @@
private String onsetup;
private String onsave;
private String onsizeexceeded;
+ private String onload;
+ private String onunload;
public String getOnsizeexceeded() {
return onsizeexceeded;
@@ -260,6 +262,8 @@
onbeforeshow = "showEvent('formID:infoSubview:onbeforeshowInputID', 'onbeforeshow work!')";
onadd = "showEvent('formID:infoSubview:onaddInputID', 'onadd work!')";
onsizeexceeded = "showEvent('formID:infoSubview:onsizeexceededInputID', 'onsizeexceeded work!')";
+ onload = "showEvent('formID:infoSubview:onloadInputID', 'onload work!')";
+ onunload = "showEvent('formID:infoSubview:onunloadInputID', 'onunload work!')";
}
public String getOncontextmenu() {
@@ -1409,4 +1413,20 @@
this.onsave = onsave;
}
+ public String getOnload() {
+ return onload;
+ }
+
+ public void setOnload(String onload) {
+ this.onload = onload;
+ }
+
+ public String getOnunload() {
+ return onunload;
+ }
+
+ public void setOnunload(String onunload) {
+ this.onunload = onunload;
+ }
+
}
\ No newline at end of file
Added: trunk/test-applications/seamApp/web/src/main/webapp/LayoutComponents/LayoutComponents.xhtml
===================================================================
--- trunk/test-applications/seamApp/web/src/main/webapp/LayoutComponents/LayoutComponents.xhtml (rev 0)
+++ trunk/test-applications/seamApp/web/src/main/webapp/LayoutComponents/LayoutComponents.xhtml 2009-03-24 16:42:24 UTC (rev 13145)
@@ -0,0 +1,77 @@
+<f:subview xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ 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: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>
+ </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/seamApp/web/src/main/webapp/LayoutComponents/LayoutComponentsProperty.xhtml
===================================================================
--- trunk/test-applications/seamApp/web/src/main/webapp/LayoutComponents/LayoutComponentsProperty.xhtml (rev 0)
+++ trunk/test-applications/seamApp/web/src/main/webapp/LayoutComponents/LayoutComponentsProperty.xhtml 2009-03-24 16:42:24 UTC (rev 13145)
@@ -0,0 +1,129 @@
+<f:subview xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ 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/seamApp/web/src/main/webapp/LayoutComponents/LayoutComponentsStraightforward.xhtml
===================================================================
--- trunk/test-applications/seamApp/web/src/main/webapp/LayoutComponents/LayoutComponentsStraightforward.xhtml (rev 0)
+++ trunk/test-applications/seamApp/web/src/main/webapp/LayoutComponents/LayoutComponentsStraightforward.xhtml 2009-03-24 16:42:24 UTC (rev 13145)
@@ -0,0 +1,8 @@
+<f:subview xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ id="layoutComponentsStraightforwardSubviewID">
+ <div>layoutComponentsStraightforwardSubviewID</div>
+</f:subview>
\ No newline at end of file
15 years, 9 months
JBoss Rich Faces SVN: r13144 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2009-03-24 12:29:20 -0400 (Tue, 24 Mar 2009)
New Revision: 13144
Modified:
trunk/docs/userguide/en/src/main/docbook/included/columns.xml
Log:
RF-6528 - added code example and described it
Modified: trunk/docs/userguide/en/src/main/docbook/included/columns.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/columns.xml 2009-03-24 16:24:55 UTC (rev 13143)
+++ trunk/docs/userguide/en/src/main/docbook/included/columns.xml 2009-03-24 16:29:20 UTC (rev 13144)
@@ -171,6 +171,35 @@
</rich:columns>
</rich:dataTable>
...]]></programlisting>
+ <para>
+ Now, you can use a few <emphasis role="bold"><property><rich:columns></property></emphasis> together with <emphasis role="bold"><property><rich:column></property></emphasis> within the one table:
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:dataTable value="#{dataTableScrollerBean.model}" var="model" width="500px" rows="5">
+ <f:facet name="header">
+ <h:outputText value="Cars Available"></h:outputText>
+ </f:facet>
+ <rich:columns value="#{dataTableScrollerBean.columns}" var="columns" index="ind">
+ <f:facet name="header">
+ <h:outputText value="#{columns.header}" />
+ </f:facet>
+ <h:outputText value="#{model[ind].model} " />
+ </rich:columns>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Price" />
+ </f:facet>
+ <h:outputText value="Price" />
+ </rich:column>
+ <rich:columns value="#{dataTableScrollerBean.columns}" var="columns" index="ind">
+ <f:facet name="header">
+ <h:outputText value="#{columns.header}" />
+ </f:facet>
+ <h:outputText value="#{model[ind].mileage}$" />
+ </rich:columns>
+</rich:dataTable>
+...]]>
+ </programlisting>
<para> In order to group columns with text information into one row, use the <emphasis>
<property>"colspan"</property>
15 years, 9 months
JBoss Rich Faces SVN: r13143 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2009-03-24 12:24:55 -0400 (Tue, 24 Mar 2009)
New Revision: 13143
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCSettings.xml
trunk/docs/userguide/en/src/main/docbook/modules/RFCtechreqs.xml
Log:
RF-6532 - updated version for Seam and JSF. Checked dev guide (partly)
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCSettings.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCSettings.xml 2009-03-24 16:17:20 UTC (rev 13142)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCSettings.xml 2009-03-24 16:24:55 UTC (rev 13143)
@@ -19,7 +19,7 @@
change just because of RichFaces. </para> &wadParams; <section id="SunJSFRI">
<?dbhtml filename="SunJSFRI.html"?>
<title>Sun JSF RI</title>
- <para> RichFaces works with implementation of <property>JSF</property> (JSF 1.2)
+ <para> RichFaces works with implementation of <property>JSF</property> (JSF 1.2_12)
and with most <property>JSF</property> component libraries without any
additional settings. For more information look at: </para>
@@ -31,7 +31,7 @@
</simplelist>
<para> Additional information how to get <code> ViewExpiredExceptions </code>
when using <property>RichFaces</property> with <property>JSF
- 1.2</property> you can find <ulink
+ 1.2_12</property> you can find <ulink
url="http://wiki.jboss.org/auth/wiki//RichFacesCookbook/ViewExpiredException"
>here</ulink>. </para>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCtechreqs.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCtechreqs.xml 2009-03-24 16:17:20 UTC (rev 13142)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCtechreqs.xml 2009-03-24 16:24:55 UTC (rev 13143)
@@ -81,13 +81,13 @@
<title>Supported JavaServer Faces Implementations and Frameworks</title>
<itemizedlist>
- <listitem><para>Sun JSF-RI - 1.2</para></listitem>
+ <listitem><para>Sun JSF-RI - 1.2_12</para></listitem>
<listitem><para>MyFaces 1.2.5</para></listitem>
<listitem><para>Facelets 1.1.1 - 1.2</para></listitem>
- <listitem><para>Seam 1.2. - 2.0</para></listitem>
+ <listitem><para>Seam 1.2. - 2.1.0</para></listitem>
</itemizedlist>
</section>
15 years, 9 months