JBoss Rich Faces SVN: r18813 - in modules/tests/metamer/trunk/application/src/main: webapp/components and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-08-19 10:00:05 -0400 (Thu, 19 Aug 2010)
New Revision: 18813
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelItemBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/
modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/simple.xhtml
Log:
RFPL-739
* added one page for rich:togglePanelItem
Added: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelItemBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelItemBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelItemBean.java 2010-08-19 14:00:05 UTC (rev 18813)
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.html.HtmlTogglePanelItem;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:togglePanelItem.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richTogglePanelItemBean")
+@ViewScoped
+public class RichTogglePanelItemBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getUIComponentAttributes(HtmlTogglePanelItem.class, getClass());
+
+ attributes.setAttribute("name", "item1");
+ attributes.setAttribute("rendered", true);
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+}
Property changes on: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelItemBean.java
___________________________________________________________________
Name: svn:keywords
+ Revision
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/list.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/list.xhtml 2010-08-19 14:00:05 UTC (rev 18813)
@@ -0,0 +1,41 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:metamer="http://java.sun.com/jsf/composite/metamer">
+
+ <ui:composition template="/templates/list.xhtml">
+
+ <ui:define name="pageTitle">Rich Toggle Panel Item</ui:define>
+
+ <ui:define name="links">
+
+ <metamer:testPageLink id="simple" outcome="simple" value="Simple">
+ Page containing a toggle panel with 3 <b>rich:togglePanelItem</b>s and inputs for all its attributes.
+ </metamer:testPageLink>
+
+ </ui:define>
+
+ </ui:composition>
+
+</html>
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/simple.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/simple.xhtml 2010-08-19 14:00:05 UTC (rev 18813)
@@ -0,0 +1,99 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
+ xmlns:rich="http://richfaces.org/rich">
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="templates" value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ </ui:define>
+
+ <ui:define name="component">
+
+ <h:commandLink id="tcLink1" value="Toggle Panel Item 1">
+ <rich:toggleControl id="toggleControl1" targetPanel="richTogglePanel" targetItem="item1" />
+ </h:commandLink>
+ <h:outputText value=" | " />
+ <h:commandLink id="tcLink2" value="Toggle Panel Item 2">
+ <rich:toggleControl id="toggleControl2" targetPanel="richTogglePanel" targetItem="item2" />
+ </h:commandLink>
+ <h:outputText value=" | " />
+ <h:commandLink id="tcLink3" value="Toggle Panel Item 3">
+ <rich:toggleControl id="toggleControl3" targetPanel="richTogglePanel" targetItem="item3" />
+ </h:commandLink>
+
+ <br/><br/>
+
+ <rich:togglePanel id="richTogglePanel" activeItem="item1" switchType="client">
+ <rich:togglePanelItem id="item1"
+ active="#{richTogglePanelItemBean.attributes['active'].value}"
+ converter="#{richTogglePanelItemBean.attributes['converter'].value}"
+ dir="#{richTogglePanelItemBean.attributes['dir'].value}"
+ lang="#{richTogglePanelItemBean.attributes['lang'].value}"
+ localValue="#{richTogglePanelItemBean.attributes['localValue'].value}"
+ name="#{richTogglePanelItemBean.attributes['name'].value}"
+ onclick="#{richTogglePanelItemBean.attributes['onclick'].value}"
+ ondblclick="#{richTogglePanelItemBean.attributes['ondblclick'].value}"
+ onenter="#{richTogglePanelItemBean.attributes['onenter'].value}"
+ onleave="#{richTogglePanelItemBean.attributes['onleave'].value}"
+ onmousedown="#{richTogglePanelItemBean.attributes['onmousedown'].value}"
+ onmousemove="#{richTogglePanelItemBean.attributes['onmousemove'].value}"
+ onmouseout="#{richTogglePanelItemBean.attributes['onmouseout'].value}"
+ onmouseover="#{richTogglePanelItemBean.attributes['onmouseover'].value}"
+ onmouseup="#{richTogglePanelItemBean.attributes['onmouseup'].value}"
+ rendered="#{richTogglePanelItemBean.attributes['rendered'].value}"
+ style="#{richTogglePanelItemBean.attributes['style'].value}"
+ styleClass="#{richTogglePanelItemBean.attributes['styleClass'].value}"
+ switchType="#{richTogglePanelItemBean.attributes['switchType'].value}"
+ title="#{richTogglePanelItemBean.attributes['title'].value}"
+ value="#{richTogglePanelItemBean.attributes['value'].value}">
+ <p>content of panel 1</p>
+ </rich:togglePanelItem>
+ <rich:togglePanelItem id="item2" name="item2">
+ <p>content of panel 2</p>
+ </rich:togglePanelItem>
+ <rich:togglePanelItem id="item3" name="item3">
+ <p>content of panel 3</p>
+ </rich:togglePanelItem>
+ </rich:togglePanel>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <br/>
+ Attributes for the first toggle panel item:
+ <br/><br/>
+ <metamer:attributes value="#{richTogglePanelItemBean.attributes}" id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
15 years, 9 months
JBoss Rich Faces SVN: r18812 - in modules/tests/metamer/trunk/application/src/main: webapp/components and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-08-19 09:15:27 -0400 (Thu, 19 Aug 2010)
New Revision: 18812
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionItemBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordionItem/
modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordionItem/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordionItem/simple.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
Log:
RFPL-753
* added one page for rich:accordionItem
Added: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionItemBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionItemBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionItemBean.java 2010-08-19 13:15:27 UTC (rev 18812)
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+import org.richfaces.component.html.HtmlAccordionItem;
+
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:accordionItem.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richAccordionItemBean")
+@ViewScoped
+public class RichAccordionItemBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getUIComponentAttributes(HtmlAccordionItem.class, getClass());
+
+ attributes.setAttribute("header", "Item 1");
+ attributes.setAttribute("name", "item1");
+ attributes.setAttribute("rendered", true);
+
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+}
Property changes on: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionItemBean.java
___________________________________________________________________
Name: svn:keywords
+ Revision
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-08-19 12:49:29 UTC (rev 18811)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-08-19 13:15:27 UTC (rev 18812)
@@ -109,6 +109,7 @@
components.put("commandButton", "JSF Command Button");
components.put("hDataTable", "JSF Data Table");
components.put("richAccordion", "Rich Accordion");
+ components.put("richAccordionItem", "Rich Accordion Item");
components.put("richColumn", "Rich Column");
components.put("richComponentControl", "Rich Component Control");
components.put("richDataGrid", "Rich Data Grid");
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordionItem/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordionItem/list.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordionItem/list.xhtml 2010-08-19 13:15:27 UTC (rev 18812)
@@ -0,0 +1,41 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:metamer="http://java.sun.com/jsf/composite/metamer">
+
+ <ui:composition template="/templates/list.xhtml">
+
+ <ui:define name="pageTitle">Rich Accordion Item</ui:define>
+
+ <ui:define name="links">
+
+ <metamer:testPageLink id="simple" outcome="simple" value="Simple">
+ Simple page that contains an accordion with four <b>rich:accordionItem</b>s and input boxes for all attributes of one item.
+ </metamer:testPageLink>
+
+ </ui:define>
+
+ </ui:composition>
+
+</html>
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordionItem/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordionItem/simple.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordionItem/simple.xhtml 2010-08-19 13:15:27 UTC (rev 18812)
@@ -0,0 +1,131 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
+ xmlns:rich="http://richfaces.org/rich">
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="templates" value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ </ui:define>
+
+ <ui:define name="component">
+ <rich:accordion id="accordion" activeItem="item3">
+ <rich:accordionItem id="item1"
+ active="#{richAccordionItemBean.attributes['active'].value}"
+ contentClass="#{richAccordionItemBean.attributes['contentClass'].value}"
+ converter="#{richAccordionItemBean.attributes['converter'].value}"
+ dir="#{richAccordionItemBean.attributes['dir'].value}"
+ disabled="#{richAccordionItemBean.attributes['disabled'].value}"
+ header="#{richAccordionItemBean.attributes['header'].value}"
+ headerClass="#{richAccordionItemBean.attributes['headerClass'].value}"
+ headerClassActive="#{richAccordionItemBean.attributes['headerClassActive'].value}"
+ headerClassDisabled="#{richAccordionItemBean.attributes['headerClassDisabled'].value}"
+ headerClassInactive="#{richAccordionItemBean.attributes['headerClassInactive'].value}"
+ headerStyle="#{richAccordionItemBean.attributes['headerStyle'].value}"
+ lang="#{richAccordionItemBean.attributes['lang'].value}"
+ localValue="#{richAccordionItemBean.attributes['localValue'].value}"
+ name="#{richAccordionItemBean.attributes['name'].value}"
+ onclick="#{richAccordionItemBean.attributes['onclick'].value}"
+ ondblclick="#{richAccordionItemBean.attributes['ondblclick'].value}"
+ onenter="#{richAccordionItemBean.attributes['onenter'].value}"
+ onheaderclick="#{richAccordionItemBean.attributes['onheaderclick'].value}"
+ onheaderdblclick="#{richAccordionItemBean.attributes['onheaderdblclick'].value}"
+ onheadermousedown="#{richAccordionItemBean.attributes['onheadermousedown'].value}"
+ onheadermousemove="#{richAccordionItemBean.attributes['onheadermousemove'].value}"
+ onheadermouseup="#{richAccordionItemBean.attributes['onheadermouseup'].value}"
+ onleave="#{richAccordionItemBean.attributes['onleave'].value}"
+ onmousedown="#{richAccordionItemBean.attributes['onmousedown'].value}"
+ onmousemove="#{richAccordionItemBean.attributes['onmousemove'].value}"
+ onmouseout="#{richAccordionItemBean.attributes['onmouseout'].value}"
+ onmouseover="#{richAccordionItemBean.attributes['onmouseover'].value}"
+ onmouseup="#{richAccordionItemBean.attributes['onmouseup'].value}"
+ rendered="#{richAccordionItemBean.attributes['rendered'].value}"
+ style="#{richAccordionItemBean.attributes['style'].value}"
+ styleClass="#{richAccordionItemBean.attributes['styleClass'].value}"
+ switchType="#{richAccordionItemBean.attributes['switchType'].value}"
+ title="#{richAccordionItemBean.attributes['title'].value}"
+ value="#{richAccordionItemBean.attributes['value'].value}">
+ content of item 1
+ </rich:accordionItem>
+ <rich:accordionItem id="item2" name="item2" header="Item 2">
+ content of item 2
+ </rich:accordionItem>
+ <rich:accordionItem id="item3" name="item3" header="Item 3">
+ content of item 3
+ </rich:accordionItem>
+ <rich:accordionItem id="item4" name="item4" header="Item 4">
+ content of item 4
+ </rich:accordionItem>
+ </rich:accordion>
+
+ <br/><br/>
+ <fieldset>
+ <legend>JavaScript API of rich:accordion</legend>
+
+ <h:commandButton id="switchButton1" value="switch to item1">
+ <rich:componentControl id="componentControl1" event="click" operation="switchToItem" target="accordion" >
+ <f:param value="item1" />
+ </rich:componentControl>
+ </h:commandButton>
+ <h:commandButton id="switchButton2" value="switch to item2">
+ <rich:componentControl id="componentControl2" event="click" operation="switchToItem" target="accordion" >
+ <f:param value="item2" />
+ </rich:componentControl>
+ </h:commandButton>
+ <h:commandButton id="switchButton3" value="switch to item3">
+ <rich:componentControl id="componentControl1" event="click" operation="switchToItem" target="accordion" >
+ <f:param value="item3" />
+ </rich:componentControl>
+ </h:commandButton>
+ <h:commandButton id="switchButton4" value="switch to item4">
+ <rich:componentControl id="componentControl1" event="click" operation="switchToItem" target="accordion" >
+ <f:param value="item4" />
+ </rich:componentControl>
+ </h:commandButton>
+ <h:commandButton id="switchButtonCustom" value="switch to item with custom name (#{richAccordionItemBean.attributes['name'].value})">
+ <rich:componentControl id="componentControlCustom" event="click" operation="switchToItem" target="accordion" >
+ <f:param value="#{richAccordionItemBean.attributes['name'].value}" />
+ </rich:componentControl>
+ </h:commandButton>
+
+ </fieldset>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ Settings for the first item:
+ <br/><br/>
+ <metamer:attributes value="#{richAccordionItemBean.attributes}" id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
15 years, 9 months
JBoss Rich Faces SVN: r18811 - in branches/RF-9112: cdk/maven-resources-plugin/src/main/java/org/richfaces/cdk/resource/scan/impl/reflections and 11 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2010-08-19 08:49:29 -0400 (Thu, 19 Aug 2010)
New Revision: 18811
Modified:
branches/RF-9112/
branches/RF-9112/cdk/maven-resources-plugin/src/main/java/org/richfaces/cdk/resource/scan/impl/reflections/ReflectionsExt.java
branches/RF-9112/cdk/maven-resources-plugin/src/main/java/org/richfaces/cdk/resource/writer/impl/JavaScriptResourceProcessor.java
branches/RF-9112/cdk/maven-resources-plugin/src/main/java/org/richfaces/cdk/resource/writer/impl/MavenLogErrorReporter.java
branches/RF-9112/examples/iteration-demo/src/main/webapp/list.xhtml
branches/RF-9112/examples/richfaces-showcase/src/main/java/org/richfaces/demo/common/SelectsBean.java
branches/RF-9112/examples/richfaces-showcase/src/main/webapp/richfaces/autocomplete/samples/cachedAjax-sample.xhtml
branches/RF-9112/ui/core/ui/src/main/java/org/ajax4jsf/component/behavior/MethodExpressionAjaxBehaviorListener.java
branches/RF-9112/ui/core/ui/src/main/java/org/richfaces/component/AbstractAjaxLog.java
branches/RF-9112/ui/core/ui/src/main/java/org/richfaces/renderkit/LogRendererBase.java
branches/RF-9112/ui/input/ui/src/main/java/org/richfaces/renderkit/InputNumberSliderRendererBase.java
branches/RF-9112/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.ecss
branches/RF-9112/ui/input/ui/src/main/templates/inplaceInput.template.xml
branches/RF-9112/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ListRendererBase.java
Log:
Merged revisions 18794-18795,18797-18800,18805-18807 via svnmerge from
https://svn.jboss.org/repos/richfaces/trunk
.......
r18794 | ilya_shaikovsky | 2010-08-19 03:44:52 -0400 (Thu, 19 Aug 2010) | 1 line
https://jira.jboss.org/browse/RF-9113
.......
r18795 | nbelaevski | 2010-08-19 05:14:23 -0400 (Thu, 19 Aug 2010) | 3 lines
Maven resources plugin:
- fixed CNFE
- improved JavaScript compressor logging better in multi-threded envs.
.......
r18797 | abelevich | 2010-08-19 06:42:19 -0400 (Thu, 19 Aug 2010) | 1 line
https://jira.jboss.org/browse/RF-9095
.......
r18798 | ilya_shaikovsky | 2010-08-19 07:28:57 -0400 (Thu, 19 Aug 2010) | 1 line
syntax error in attribute name corrected.
.......
r18799 | nbelaevski | 2010-08-19 07:49:08 -0400 (Thu, 19 Aug 2010) | 1 line
logMode attribute default value set via CDK
.......
r18800 | nbelaevski | 2010-08-19 07:49:41 -0400 (Thu, 19 Aug 2010) | 1 line
Removed unnecessary null check in inputNumberSlider
.......
r18805 | nbelaevski | 2010-08-19 07:55:53 -0400 (Thu, 19 Aug 2010) | 1 line
https://jira.jboss.org/browse/RF-9075
.......
r18806 | nbelaevski | 2010-08-19 07:56:09 -0400 (Thu, 19 Aug 2010) | 1 line
https://jira.jboss.org/browse/RF-9075
.......
r18807 | abelevich | 2010-08-19 07:59:59 -0400 (Thu, 19 Aug 2010) | 1 line
https://jira.jboss.org/browse/RF-9065
.......
Property changes on: branches/RF-9112
___________________________________________________________________
Name: svnmerge-integrated
- /trunk:1-18778 /branches/RF-9023:1-18690 /branches/RF-9040_build_updated_m2:1-18626
+ /trunk:1-18810 /branches/RF-9023:1-18690 /branches/RF-9040_build_updated_m2:1-18626
Modified: branches/RF-9112/cdk/maven-resources-plugin/src/main/java/org/richfaces/cdk/resource/scan/impl/reflections/ReflectionsExt.java
===================================================================
--- branches/RF-9112/cdk/maven-resources-plugin/src/main/java/org/richfaces/cdk/resource/scan/impl/reflections/ReflectionsExt.java 2010-08-19 12:31:45 UTC (rev 18810)
+++ branches/RF-9112/cdk/maven-resources-plugin/src/main/java/org/richfaces/cdk/resource/scan/impl/reflections/ReflectionsExt.java 2010-08-19 12:49:29 UTC (rev 18811)
@@ -30,6 +30,9 @@
import org.reflections.scanners.Scanner;
import org.reflections.util.Utils;
+import com.google.common.base.Function;
+import com.google.common.base.Predicates;
+import com.google.common.collect.Collections2;
import com.google.common.collect.Multimap;
/**
@@ -38,6 +41,22 @@
*/
public class ReflectionsExt extends Reflections {
+ private static final Function<String, Class<?>> CLASS_FOR_NAME = new Function<String, Class<?>>() {
+ public java.lang.Class<?> apply(String from) {
+ try {
+ return Class.forName(from, true, Utils.getContextClassLoader());
+ } catch (ClassNotFoundException e) {
+ // TODO: handle exception
+ e.printStackTrace();
+ } catch (LinkageError e) {
+ // TODO: handle exception
+ e.printStackTrace();
+ }
+
+ return null;
+ };
+ };
+
public ReflectionsExt() {
super();
}
@@ -56,7 +75,9 @@
if (scannerMMap == null) {
return Collections.emptySet();
}
- return Utils.forNames(scannerMMap.get(MarkerResourcesScanner.STORE_KEY));
+
+ return Collections2.filter(Collections2.transform(scannerMMap.get(MarkerResourcesScanner.STORE_KEY), CLASS_FOR_NAME),
+ Predicates.notNull());
}
}
Modified: branches/RF-9112/cdk/maven-resources-plugin/src/main/java/org/richfaces/cdk/resource/writer/impl/JavaScriptResourceProcessor.java
===================================================================
--- branches/RF-9112/cdk/maven-resources-plugin/src/main/java/org/richfaces/cdk/resource/writer/impl/JavaScriptResourceProcessor.java 2010-08-19 12:31:45 UTC (rev 18810)
+++ branches/RF-9112/cdk/maven-resources-plugin/src/main/java/org/richfaces/cdk/resource/writer/impl/JavaScriptResourceProcessor.java 2010-08-19 12:49:29 UTC (rev 18811)
@@ -49,8 +49,16 @@
@Override
protected void doActualProcess(String resourceName, Reader in, Writer out) throws IOException {
- MavenLogErrorReporter reporter = new MavenLogErrorReporter(log, resourceName);
+ MavenLogErrorReporter reporter = new MavenLogErrorReporter(resourceName);
new JavaScriptCompressor(in, reporter).compress(out, 0, true, true, false, false);
+
+ if (reporter.hasErrors()) {
+ log.error(reporter.getErrorsLog());
+ }
+
+ if (reporter.hasWarnings()) {
+ log.warn(reporter.getWarningsLog());
+ }
}
}
Modified: branches/RF-9112/cdk/maven-resources-plugin/src/main/java/org/richfaces/cdk/resource/writer/impl/MavenLogErrorReporter.java
===================================================================
--- branches/RF-9112/cdk/maven-resources-plugin/src/main/java/org/richfaces/cdk/resource/writer/impl/MavenLogErrorReporter.java 2010-08-19 12:31:45 UTC (rev 18810)
+++ branches/RF-9112/cdk/maven-resources-plugin/src/main/java/org/richfaces/cdk/resource/writer/impl/MavenLogErrorReporter.java 2010-08-19 12:49:29 UTC (rev 18811)
@@ -24,7 +24,6 @@
import java.text.MessageFormat;
-import org.apache.maven.plugin.logging.Log;
import org.mozilla.javascript.ErrorReporter;
import org.mozilla.javascript.EvaluatorException;
@@ -38,11 +37,12 @@
private String resourceName;
- private Log log;
+ private StringBuilder errorMessages = new StringBuilder();
- public MavenLogErrorReporter(Log log, String resourceName) {
+ private StringBuilder warningMessages = new StringBuilder();
+
+ public MavenLogErrorReporter(String resourceName) {
super();
- this.log = log;
this.resourceName = resourceName;
}
@@ -55,7 +55,8 @@
@Override
public void warning(String message, String sourceName, int line, String lineSource, int lineOffset) {
- log.warn(formatMessage(message, sourceName, line, lineSource, lineOffset));
+ warningMessages.append(formatMessage(message, sourceName, line, lineSource, lineOffset));
+ warningMessages.append('\n');
}
@Override
@@ -65,6 +66,23 @@
@Override
public void error(String message, String sourceName, int line, String lineSource, int lineOffset) {
- log.error(formatMessage(message, sourceName, line, lineSource, lineOffset));
+ errorMessages.append(formatMessage(message, sourceName, line, lineSource, lineOffset));
+ errorMessages.append('\n');
}
+
+ public boolean hasErrors() {
+ return errorMessages.length() > 0;
+ }
+
+ public String getErrorsLog() {
+ return errorMessages.toString();
+ }
+
+ public boolean hasWarnings() {
+ return warningMessages.length() > 0;
+ }
+
+ public String getWarningsLog() {
+ return warningMessages.toString();
+ }
}
\ No newline at end of file
Modified: branches/RF-9112/examples/iteration-demo/src/main/webapp/list.xhtml
===================================================================
--- branches/RF-9112/examples/iteration-demo/src/main/webapp/list.xhtml 2010-08-19 12:31:45 UTC (rev 18810)
+++ branches/RF-9112/examples/iteration-demo/src/main/webapp/list.xhtml 2010-08-19 12:49:29 UTC (rev 18811)
@@ -22,10 +22,10 @@
<h:form id="form1">
<it:list id="list" var="item" value="#{dataBean.employeeList}" rows="20" type="#{listBean.listType}">
<f:facet name="term">
- #{item.EMail}
+ E-mail: #{item.EMail}
</f:facet>
- #{item.name}
+ Name: #{item.name}
</it:list>
<it:dataScroller for="list" />
Modified: branches/RF-9112/examples/richfaces-showcase/src/main/java/org/richfaces/demo/common/SelectsBean.java
===================================================================
--- branches/RF-9112/examples/richfaces-showcase/src/main/java/org/richfaces/demo/common/SelectsBean.java 2010-08-19 12:31:45 UTC (rev 18810)
+++ branches/RF-9112/examples/richfaces-showcase/src/main/java/org/richfaces/demo/common/SelectsBean.java 2010-08-19 12:49:29 UTC (rev 18811)
@@ -10,13 +10,13 @@
/**
* @author Ilya Shaikovsky
- *
+ *
*/
@ManagedBean(name = "selectsBean")
@RequestScoped
public class SelectsBean {
- private static final String[] FRUITS = {"", "Banana", "Cranberry", "Blueberry", "Orange"};
- private static final String[] VEGETABLES = {"", "Potatoes", "Broccoli", "Garlic", "Carrot"};
+ private static final String[] FRUITS = { "", "Banana", "Cranberry", "Blueberry", "Orange" };
+ private static final String[] VEGETABLES = { "", "Potatoes", "Broccoli", "Garlic", "Carrot" };
private String currentItem = "";
private String currentType = "";
private List<SelectItem> firstList = new ArrayList<SelectItem>();
@@ -54,19 +54,20 @@
public void valueChanged(ValueChangeEvent event) {
secondList.clear();
+ if (null != event.getNewValue()) {
+ String[] currentItems;
- String[] currentItems;
+ if (((String) event.getNewValue()).equals("fruits")) {
+ currentItems = FRUITS;
+ } else {
+ currentItems = VEGETABLES;
+ }
- if (((String) event.getNewValue()).equals("fruits")) {
- currentItems = FRUITS;
- } else {
- currentItems = VEGETABLES;
- }
+ for (int i = 0; i < currentItems.length; i++) {
+ SelectItem item = new SelectItem(currentItems[i]);
- for (int i = 0; i < currentItems.length; i++) {
- SelectItem item = new SelectItem(currentItems[i]);
-
- secondList.add(item);
+ secondList.add(item);
+ }
}
}
Modified: branches/RF-9112/examples/richfaces-showcase/src/main/webapp/richfaces/autocomplete/samples/cachedAjax-sample.xhtml
===================================================================
--- branches/RF-9112/examples/richfaces-showcase/src/main/webapp/richfaces/autocomplete/samples/cachedAjax-sample.xhtml 2010-08-19 12:31:45 UTC (rev 18810)
+++ branches/RF-9112/examples/richfaces-showcase/src/main/webapp/richfaces/autocomplete/samples/cachedAjax-sample.xhtml 2010-08-19 12:49:29 UTC (rev 18811)
@@ -13,7 +13,7 @@
<p>Autocomplete without direct suggestions to input(<b>autoFill="false"</b>). Also in the sample comma and space are input <b>tokens</b>, so separate
autocompletion requests will be fired for different parts in input</p>
<h:form>
- <rich:autocomplete mode="cachedAjax" tokens=", " autoFill="false"
+ <rich:autocomplete mode="cachedAjax" tokens=", " autofill="false"
autocompleteMethod="#{autocompleteBean.autocomplete}" />
</h:form>
<p>In that sample <b>selectFirst</b> set to false so pressing enter will not choose the value from list
Modified: branches/RF-9112/ui/core/ui/src/main/java/org/ajax4jsf/component/behavior/MethodExpressionAjaxBehaviorListener.java
===================================================================
--- branches/RF-9112/ui/core/ui/src/main/java/org/ajax4jsf/component/behavior/MethodExpressionAjaxBehaviorListener.java 2010-08-19 12:31:45 UTC (rev 18810)
+++ branches/RF-9112/ui/core/ui/src/main/java/org/ajax4jsf/component/behavior/MethodExpressionAjaxBehaviorListener.java 2010-08-19 12:49:29 UTC (rev 18811)
@@ -23,7 +23,6 @@
package org.ajax4jsf.component.behavior;
import javax.el.ELContext;
-import javax.el.ELException;
import javax.el.MethodExpression;
import javax.el.MethodNotFoundException;
import javax.faces.component.StateHolder;
@@ -67,36 +66,14 @@
public void processAjaxBehavior(AjaxBehaviorEvent event) throws AbortProcessingException {
- Throwable cause = null;
- Throwable thrown = null;
-
- if (event == null) {
- throw new NullPointerException();
- }
-
FacesContext context = FacesContext.getCurrentInstance();
ELContext elContext = context.getELContext();
+
try {
methodExpressionZeroArg.invoke(elContext, new Object[] {});
} catch (MethodNotFoundException mnfe) {
- if (null != methodExpressionOneArg) {
-
- try {
- methodExpressionOneArg.invoke(elContext, new Object[] { event});
- } catch (ELException ee) {
- cause = ee.getCause();
- thrown = ee;
- }
- }
- } catch (ELException ee) {
- cause = ee.getCause();
- thrown = ee;
- }
-
- if (null != thrown) {
- throw cause == null ? new AbortProcessingException(thrown.getMessage(), thrown)
- : new AbortProcessingException(thrown.getMessage(), cause);
- }
+ methodExpressionOneArg.invoke(elContext, new Object[] { event});
+ }
}
public boolean isTransient() {
Modified: branches/RF-9112/ui/core/ui/src/main/java/org/richfaces/component/AbstractAjaxLog.java
===================================================================
--- branches/RF-9112/ui/core/ui/src/main/java/org/richfaces/component/AbstractAjaxLog.java 2010-08-19 12:31:45 UTC (rev 18810)
+++ branches/RF-9112/ui/core/ui/src/main/java/org/richfaces/component/AbstractAjaxLog.java 2010-08-19 12:49:29 UTC (rev 18811)
@@ -63,6 +63,7 @@
@Attribute(defaultValue = "")
public abstract String getStyleClass();
+ @Attribute(defaultValue = "LogMode.DEFAULT")
public abstract LogMode getMode();
// public abstract String getHotkey();
Modified: branches/RF-9112/ui/core/ui/src/main/java/org/richfaces/renderkit/LogRendererBase.java
===================================================================
--- branches/RF-9112/ui/core/ui/src/main/java/org/richfaces/renderkit/LogRendererBase.java 2010-08-19 12:31:45 UTC (rev 18810)
+++ branches/RF-9112/ui/core/ui/src/main/java/org/richfaces/renderkit/LogRendererBase.java 2010-08-19 12:49:29 UTC (rev 18811)
@@ -32,10 +32,6 @@
protected boolean isInline(Object attributeValue) {
LogMode mode = (LogMode) attributeValue;
- if (mode == null) {
- mode = LogMode.DEFAULT;
- }
-
return mode == LogMode.inline;
}
Modified: branches/RF-9112/ui/input/ui/src/main/java/org/richfaces/renderkit/InputNumberSliderRendererBase.java
===================================================================
--- branches/RF-9112/ui/input/ui/src/main/java/org/richfaces/renderkit/InputNumberSliderRendererBase.java 2010-08-19 12:31:45 UTC (rev 18810)
+++ branches/RF-9112/ui/input/ui/src/main/java/org/richfaces/renderkit/InputNumberSliderRendererBase.java 2010-08-19 12:49:29 UTC (rev 18811)
@@ -33,10 +33,6 @@
protected boolean isInputPosition(UIComponent component, String name) {
InputNumberSliderInputPosition type = (InputNumberSliderInputPosition) component.getAttributes().get("inputPosition");
- if (type == null) {
- type = InputNumberSliderInputPosition.DEFAULT;
- }
-
return type == InputNumberSliderInputPosition.valueOf(name);
}
Modified: branches/RF-9112/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.ecss
===================================================================
--- branches/RF-9112/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.ecss 2010-08-19 12:31:45 UTC (rev 18810)
+++ branches/RF-9112/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.ecss 2010-08-19 12:49:29 UTC (rev 18811)
@@ -13,6 +13,10 @@
font-size : inherit;
}
+.rf-ii-lbl {
+ white-space : nowrap;
+}
+
.rf-ii-d-s {
display : inline-block;
white-space : nowrap;
@@ -38,6 +42,7 @@
top : 0px;
left : 0px;
display : inline-block;
+ width: 100%;
}
.rf-ii-f {
@@ -59,13 +64,14 @@
.rf-ii-btn {
background-image : "url(#{resource['org.richfaces.renderkit.html.images.InplaceComponentButtonGradientImage']})";
- background-position: top;
+ background-attachment: scroll;
+ background-position: center top;
background-repeat: repeat-x;
background-color: '#{richSkin.tabBackgroundColor}';
border-width : 1px;
border-style: outset;
border-color: '#{richSkin.panelBorderColor}';
- padding : 0px;
+ padding : 3px;
margin : 0px;
}
@@ -104,6 +110,7 @@
}
.rf-ii-btn-shadow {
+ display: inline-block;
position: relative;
padding : 6px 6px 6px 6px;
top : -6px;
@@ -111,8 +118,11 @@
}
.rf-ii-btn-shadow-t {
- background-position : top left;
+ background-position : left top;
background-image : url("#{resource['org.richfaces:bg_shadow.png']}");
+ background-attachment: scroll;
+ background-color: transparent;
+ background-repeat: repeat;
position : absolute;
width : 6px;
top : 0px;
@@ -121,8 +131,11 @@
}
.rf-ii-btn-shadow-l {
- background-position : bottom left;
- background-image : url("#{resource['org.richfaces:bg_shadow.png']}");
+ background-position : left bottom;
+ background-image : url("#{resource['org.richfaces:bg_shadow.png']}");
+ background-attachment: scroll;
+ background-color: transparent;
+ background-repeat: repeat;
position : absolute;
height : 6px;
bottom : 0px;
@@ -131,8 +144,11 @@
}
.rf-ii-btn-shadow-r {
- background-position : bottom right;
+ background-position : right bottom;
background-image : url("#{resource['org.richfaces:bg_shadow.png']}");
+ background-attachment: scroll;
+ background-color: transparent;
+ background-repeat: repeat;
position: absolute;
width: 6px;
top: 6px;
@@ -143,6 +159,9 @@
.rf-ii-btn-shadow-b {
background-position : right top;
background-image : url("#{resource['org.richfaces:bg_shadow.png']}");
+ background-attachment: scroll;
+ background-color: transparent;
+ background-repeat: repeat;
position: absolute;
height: 6px;
top: 0px;
Modified: branches/RF-9112/ui/input/ui/src/main/templates/inplaceInput.template.xml
===================================================================
--- branches/RF-9112/ui/input/ui/src/main/templates/inplaceInput.template.xml 2010-08-19 12:31:45 UTC (rev 18810)
+++ branches/RF-9112/ui/input/ui/src/main/templates/inplaceInput.template.xml 2010-08-19 12:49:29 UTC (rev 18811)
@@ -19,23 +19,23 @@
<cdk:object type="org.richfaces.component.InplaceState" name="inplaceState" value="#{getInplaceState(component)}" />
<cdk:object type="java.lang.String" name="inplaceValue" value="#{getValue(facesContext, component)}" />
- <div id="#{clientId}" class="#{getReadyStyleClass(component, inplaceState)}" cdk:passThroughWithExclusions="id class">
- <span id="#{clientId}:label">
+ <span id="#{clientId}" class="#{getReadyStyleClass(component, inplaceState)}" cdk:passThroughWithExclusions="id class">
+ <span id="#{clientId}:label" class="rf-ii-lbl">
#{inplaceValue}
</span>
- <div id="#{clientId}:edit" class="#{getEditStyleClass(component, inplaceState)}">
+ <span id="#{clientId}:edit" class="#{getEditStyleClass(component, inplaceState)}">
<input id="#{clientId}:input" autocomplete="off" name="#{clientId}:input" type="text" value="#{inplaceValue}" class="rf-ii-f" cdk:passThrough="tabIndex"/>
<c:if test="#{component.attributes['showControls']}">
- <div class="rf-ii-btn-prepos">
- <div class="rf-ii_btn_pos">
- <div id="#{clientId}:btnshadow" class="rf-ii-btn-shadow">
- <div class="rf-ii-btn-shadow-t"></div>
- <div class="rf-ii-btn-shadow-l"></div>
- <div class="rf-ii-btn-shadow-r"></div>
- <div class="rf-ii-btn-shadow-b"></div>
+ <span class="rf-ii-btn-prepos">
+ <span class="rf-ii-btn-pos">
+ <span id="#{clientId}:btnshadow" class="rf-ii-btn-shadow">
+ <span class="rf-ii-btn-shadow-t"></span>
+ <span class="rf-ii-btn-shadow-l"></span>
+ <span class="rf-ii-btn-shadow-r"></span>
+ <span class="rf-ii-btn-shadow-b"></span>
- <div id="#{clientId}:btn" style="position : relative">
+ <span id="#{clientId}:btn" style="position : relative">
<input type="image"
id="#{clientId}:okbtn"
src="#{getResourcePath(facesContext, 'org.richfaces/ico_ok.gif')}"
@@ -47,15 +47,15 @@
class="rf-ii-btn" onmousedown="this.className='rf-ii-btn-press'"
onmouseout="this.className='rf-ii-btn'" onmouseup="this.className='rf-ii-btn'" />
<br />
- </div>
- </div>
- </div>
- </div>
+ </span>
+ </span>
+ </span>
+ </span>
</c:if>
- </div>
+ </span>
<script type="text/javascript">
<cdk:call expression="buildScript(responseWriter, facesContext, component);"/>
</script>
- </div>
+ </span>
</cc:implementation>
</cdk:root>
\ No newline at end of file
Modified: branches/RF-9112/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ListRendererBase.java
===================================================================
--- branches/RF-9112/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ListRendererBase.java 2010-08-19 12:31:45 UTC (rev 18810)
+++ branches/RF-9112/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ListRendererBase.java 2010-08-19 12:49:29 UTC (rev 18811)
@@ -269,4 +269,14 @@
}
}
}
+
+ @Override
+ public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
+ //do nothing
+ }
+
+ @Override
+ public void encodeChildren(FacesContext context, UIComponent component) throws IOException {
+ //do nothing
+ }
}
15 years, 9 months
JBoss Rich Faces SVN: r18810 - in sandbox/trunk/prototypes/indexed-png-transformation: src and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-08-19 08:31:45 -0400 (Thu, 19 Aug 2010)
New Revision: 18810
Added:
sandbox/trunk/prototypes/indexed-png-transformation/source.png
Modified:
sandbox/trunk/prototypes/indexed-png-transformation/
sandbox/trunk/prototypes/indexed-png-transformation/src/Main.java
Log:
Added image example to indexed-png-transformation
Property changes on: sandbox/trunk/prototypes/indexed-png-transformation
___________________________________________________________________
Name: svn:ignore
+ bin
target.png
Added: sandbox/trunk/prototypes/indexed-png-transformation/source.png
===================================================================
(Binary files differ)
Property changes on: sandbox/trunk/prototypes/indexed-png-transformation/source.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: sandbox/trunk/prototypes/indexed-png-transformation/src/Main.java
===================================================================
--- sandbox/trunk/prototypes/indexed-png-transformation/src/Main.java 2010-08-19 12:13:59 UTC (rev 18809)
+++ sandbox/trunk/prototypes/indexed-png-transformation/src/Main.java 2010-08-19 12:31:45 UTC (rev 18810)
@@ -26,7 +26,7 @@
private OutputStream outChannel;
private Color[] colors = new Color[] {
- Color.BLUE, Color.GREEN, Color.BLACK
+ new Color(255, 240, 230), new Color(255, 240, 230), new Color(0, 210, 48)
};
private boolean isIndexed = false;
@@ -357,8 +357,7 @@
break;
default:
- System.out.println(bs[0]);
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException(Integer.toHexString(bs[0]));
}
filters[i].bs = bs;
15 years, 9 months
JBoss Rich Faces SVN: r18809 - in sandbox/trunk/prototypes: indexed-png-transformation and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-08-19 08:13:59 -0400 (Thu, 19 Aug 2010)
New Revision: 18809
Added:
sandbox/trunk/prototypes/indexed-png-transformation/
sandbox/trunk/prototypes/indexed-png-transformation/src/
sandbox/trunk/prototypes/indexed-png-transformation/src/Main.java
Log:
Initial import of Main class doing all the work
Added: sandbox/trunk/prototypes/indexed-png-transformation/src/Main.java
===================================================================
--- sandbox/trunk/prototypes/indexed-png-transformation/src/Main.java (rev 0)
+++ sandbox/trunk/prototypes/indexed-png-transformation/src/Main.java 2010-08-19 12:13:59 UTC (rev 18809)
@@ -0,0 +1,486 @@
+import java.awt.Color;
+import java.io.BufferedInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.FilterInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.nio.IntBuffer;
+import java.nio.charset.Charset;
+import java.util.zip.CRC32;
+import java.util.zip.Deflater;
+import java.util.zip.DeflaterOutputStream;
+import java.util.zip.Inflater;
+import java.util.zip.InflaterInputStream;
+
+
+public class Main {
+
+ private InputStream inChannel;
+
+ private OutputStream outChannel;
+
+ private Color[] colors = new Color[] {
+ Color.BLUE, Color.GREEN, Color.BLACK
+ };
+
+ private boolean isIndexed = false;
+
+ private Charset asciiCharset = Charset.forName("US-ASCII");
+
+ private static final int _8192 = 8192;
+
+ private int sectionLength;
+
+ private int imageWidth;
+
+ private byte[] lengthBytes = new byte[4];
+
+ private byte[] chunkTypeBytes = new byte[4];
+
+ private class Section {
+
+ protected void writeHeaderSectionData() throws IOException {
+ outChannel.write(lengthBytes);
+ outChannel.write(chunkTypeBytes);
+ }
+
+ protected void writeInt(int value) throws IOException {
+ byte[] bs = new byte[4];
+ ByteBuffer.wrap(bs).order(ByteOrder.BIG_ENDIAN).asIntBuffer().put(value);
+ outChannel.write(bs);
+ }
+
+ protected void writeSectionData() throws IOException {
+ byte[] bs = new byte[_8192];
+ int read = 0;
+ int remaining = sectionLength;
+
+ while ((read = inChannel.read(bs, 0, Math.min(remaining, bs.length))) > 0) {
+ outChannel.write(bs, 0, read);
+ remaining -= read;
+ }
+
+ if (remaining > 0) {
+ throw new IllegalArgumentException();
+ }
+
+ byte[] crc = new byte[4];
+ if (inChannel.read(crc) < crc.length) {
+ throw new IllegalArgumentException();
+ }
+
+ outChannel.write(crc);
+ }
+
+
+ public void write() throws IOException {
+ writeHeaderSectionData();
+ writeSectionData();
+ }
+ };
+
+ private class HeaderSection extends Section {
+
+ @Override
+ protected void writeSectionData() throws IOException {
+//// Width 4 bytes
+//// Height 4 bytes
+//// Bit depth 1 byte
+//// Colour type 1 byte
+//// Compression method 1 byte
+//// Filter method 1 byte
+//// Interlace method 1 byte
+
+ byte[] headerBytes = new byte[sectionLength];
+
+ if (inChannel.read(headerBytes) < headerBytes.length) {
+ throw new IllegalArgumentException();
+ }
+
+ if (headerBytes[8] != 8) {
+ throw new IllegalStateException("Color depth is not 8");
+ }
+
+ if (headerBytes[9] != 2 && headerBytes[9] != 3) {
+ throw new IllegalStateException("Unsupported color type");
+ }
+
+ imageWidth = ByteBuffer.wrap(headerBytes, 0, 4).order(ByteOrder.BIG_ENDIAN).asIntBuffer().get();
+
+ isIndexed = (headerBytes[9] == 3);
+
+ outChannel.write(headerBytes);
+
+ byte[] crc = new byte[4];
+ if (inChannel.read(crc) < crc.length) {
+ throw new IllegalArgumentException();
+ }
+
+ outChannel.write(crc);
+ }
+
+ };
+
+ private void transformColors(byte[] data, int offset, int length) {
+ float[] intensities = new float[3];
+
+ for (int i = offset; i < length + offset; i+= 3) {
+ float weight = 0;
+ for (int j = 0; j < intensities.length; j++) {
+ weight += (intensities[j] = ((float)(data[i + j] & 0xFF)) / 255);
+ }
+
+ float r = 0;
+ float g = 0;
+ float b = 0;
+
+ for (int j = 0; j < intensities.length; j++) {
+ r += intensities[j] * colors[j].getRed();
+ g += intensities[j] * colors[j].getGreen();
+ b += intensities[j] * colors[j].getBlue();
+ }
+
+ data[i] = (byte) (r);
+ data[i + 1] = (byte) (g);
+ data[i + 2] = (byte) (b);
+ }
+ }
+
+ private class PaletteSection extends Section {
+ @Override
+ protected void writeSectionData() throws IOException {
+ if (!isIndexed) {
+ super.writeSectionData();
+ } else {
+ byte[] data = new byte[2000 * 3];
+ int read;
+ int remaining = sectionLength;
+
+ assert (data.length < _8192);
+
+ CRC32 crc32 = new CRC32();
+ crc32.update(chunkTypeBytes);
+
+ while ((read = (inChannel.read(data, 0, Math.min(remaining, data.length)))) > 0) {
+ remaining -= read;
+
+ transformColors(data, 0, read);
+
+ outChannel.write(data, 0, read);
+ crc32.update(data, 0, read);
+ }
+
+ if (remaining > 0) {
+ throw new IllegalArgumentException();
+ }
+
+ inChannel.skip(4);
+
+ writeInt((int) crc32.getValue());
+ }
+ }
+ };
+
+ private class LimitedInputStream extends FilterInputStream {
+
+ private int remaining;
+
+ protected LimitedInputStream() {
+ super(inChannel);
+
+ this.remaining = sectionLength;
+ }
+
+ @Override
+ public int available() throws IOException {
+ return Math.min(super.available(), this.remaining);
+ }
+
+ @Override
+ public int read() throws IOException {
+ if (this.remaining > 0) {
+ int read = super.read();
+ if (read != -1) {
+ this.remaining--;
+ }
+
+ return read;
+ } else {
+ return -1;
+ }
+ }
+
+ @Override
+ public int read(byte[] b) throws IOException {
+ return read(b, 0, b.length);
+ }
+
+ @Override
+ public int read(byte[] b, int off, int len) throws IOException {
+ int read = super.read(b, 0, Math.min(len, this.remaining));
+ if (read > 0) {
+ this.remaining -= read;
+ }
+
+ return read;
+ }
+
+ @Override
+ public synchronized void mark(int readlimit) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean markSupported() {
+ return false;
+ }
+
+ @Override
+ public synchronized void reset() throws IOException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public long skip(long n) throws IOException {
+ long toSkip = Math.min(this.remaining, n);
+ long skipped = super.skip(toSkip);
+
+ if (skipped > 0) {
+ this.remaining -= skipped;
+ }
+
+ return skipped;
+ }
+ };
+
+ private class DataSection extends Section {
+
+ private byte paeth(byte a, byte b, byte c) {
+ int p = (a & 0xFF) + (b & 0xFF) - (c & 0xFF);
+ int pa = Math.abs(p - a);
+ int pb = Math.abs(p - b);
+ int pc = Math.abs(p - c);
+
+ int pr;
+
+ if (pa <= pb && pa <= pc) {
+ pr = a;
+ } else if (pb <= pc) {
+ pr = b;
+ } else {
+ pr = c;
+ }
+
+ return (byte) pr;
+ };
+
+ private class Filter {
+ byte a = 0;
+ byte b = 0;
+ byte c = 0;
+
+ byte oa = 0;
+ byte ob = 0;
+ byte oc = 0;
+
+ int step = 3;
+ protected int idx;
+
+ byte[] bs;
+ byte[] ps;
+
+ public void setIdx(int idx) {
+ this.idx = idx;
+
+ oa = a;
+ ob = b;
+ oc = c;
+
+ b = ps[idx];
+ if (idx > step) {
+ a = bs[idx - step];
+ c = ps[idx - step];
+ }
+ }
+
+ public void next() {
+ setIdx(idx += step);
+ }
+ };
+
+ private class SubFilter extends Filter {
+ @Override
+ public void next() {
+ bs[idx] = (byte)((bs[idx] & 0xFF) + (a & 0xFF) - (oa & 0xFF));
+ setIdx(idx + step);
+ }
+ };
+
+ private class UpFilter extends Filter {
+ @Override
+ public void next() {
+ bs[idx] = (byte)((bs[idx] & 0xFF) + (b & 0xFF) - (ob & 0xFF));
+ setIdx(idx + step);
+ }
+ };
+
+ private class PaethFilter extends Filter {
+ @Override
+ public void next() {
+ bs[idx] = (byte) (paeth(a, b, c) - paeth(oa, ob, oc) + (bs[idx] & 0xFF));
+ setIdx(idx + step);
+ }
+ }
+
+ private void reconstruct(byte[] bs, byte[] ps) {
+ Filter[] filters = new Filter[3];
+
+ for (int i = 0; i < filters.length; i++) {
+ switch (bs[0]) {
+ case 0:
+ filters[i] = new Filter();
+ break;
+ case 1:
+ filters[i] = new SubFilter();
+ break;
+ case 2:
+ filters[i] = new UpFilter();
+ break;
+ case 4:
+ filters[i] = new PaethFilter();
+ break;
+
+ default:
+ System.out.println(bs[0]);
+ throw new IllegalArgumentException();
+ }
+
+ filters[i].bs = bs;
+ filters[i].ps = ps;
+ filters[i].step = 3;
+
+ filters[i].setIdx(1 + i);
+ }
+
+ for (int i = 1; i < (bs.length - 1) / 3; i++) {
+ for (Filter filter : filters) {
+ filter.next();
+ }
+ }
+
+ bs[0] = 0;
+ }
+
+ @Override
+ public void write() throws IOException {
+ if (isIndexed) {
+ super.write();
+ } else {
+ byte[] ps = new byte[imageWidth * 3 + 1];
+ byte[] bs = new byte[imageWidth * 3 + 1];
+
+ assert (bs.length < _8192);
+
+ int read = 0;
+
+ InputStream inflaterInputStream = new BufferedInputStream(new InflaterInputStream(new LimitedInputStream(), new Inflater(), 2048), _8192);
+ ByteArrayOutputStream baos = new ByteArrayOutputStream(sectionLength);
+ DeflaterOutputStream deflaterOutputStream = new DeflaterOutputStream(baos, new Deflater(), 2048);
+
+ while ((read = (inflaterInputStream.read(bs)) ) > 0) {
+ reconstruct(bs, ps);
+ transformColors(bs, 1, read - 1);
+
+ deflaterOutputStream.write(bs, 0, read);
+
+ byte[] swapVar = bs;
+ bs = ps;
+ ps = swapVar;
+ }
+
+ deflaterOutputStream.finish();
+
+ byte[] compressedSectionBytes = baos.toByteArray();
+ writeInt(compressedSectionBytes.length);
+
+ CRC32 crc32 = new CRC32();
+ outChannel.write(chunkTypeBytes);
+ crc32.update(chunkTypeBytes);
+
+ if (inChannel.skip(4) < 4) {
+ throw new IllegalArgumentException();
+ }
+
+ outChannel.write(compressedSectionBytes);
+
+ writeInt((int) crc32.getValue());
+ }
+ }
+
+ };
+
+ private Section readNextSection() throws IOException {
+ int read = inChannel.read(lengthBytes);
+ if (read != -1) {
+ if (read < lengthBytes.length) {
+ throw new IllegalArgumentException();
+ }
+
+ if (inChannel.read(chunkTypeBytes) < chunkTypeBytes.length) {
+ throw new IllegalArgumentException();
+ }
+
+ IntBuffer lengthBuffer = ByteBuffer.wrap(lengthBytes).order(ByteOrder.BIG_ENDIAN).asIntBuffer();
+ sectionLength = lengthBuffer.get(0);
+ String chunkTypeString = new String(chunkTypeBytes, asciiCharset);
+
+ if ("IHDR".equals(chunkTypeString)) {
+ return new HeaderSection();
+ } else if ("PLTE".equals(chunkTypeString)) {
+ return new PaletteSection();
+ } else if ("IDAT".equals(chunkTypeString)) {
+ return new DataSection();
+ } else {
+ return new Section();
+ }
+ } else {
+ return null;
+ }
+ }
+
+ private void process(File inFile, File outFile) throws Exception {
+ try {
+ inChannel = new BufferedInputStream(new FileInputStream(inFile), _8192);
+ outChannel = new FileOutputStream(outFile);
+
+ //skip 8-bytes of header
+ byte[] bs = new byte[8];
+ if (inChannel.read(bs) < bs.length) {
+ throw new IllegalArgumentException();
+ }
+ outChannel.write(bs);
+
+ Section section = null;
+ while ((section = readNextSection()) != null) {
+ section.write();
+ }
+ } finally {
+ inChannel.close();
+ outChannel.close();
+ }
+ }
+
+ public static void main(String[] args) throws Exception {
+ File outFile = new File(args[1]);
+ outFile.delete();
+ outFile.createNewFile();
+
+ new Main().process(new File(args[0]), outFile);
+ }
+}
15 years, 9 months
JBoss Rich Faces SVN: r18808 - sandbox/trunk.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-08-19 08:10:59 -0400 (Thu, 19 Aug 2010)
New Revision: 18808
Added:
sandbox/trunk/prototypes/
Log:
Added prototypes folder
15 years, 9 months
JBoss Rich Faces SVN: r18807 - in trunk/ui/input/ui/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-08-19 07:59:59 -0400 (Thu, 19 Aug 2010)
New Revision: 18807
Modified:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.ecss
trunk/ui/input/ui/src/main/templates/inplaceInput.template.xml
Log:
https://jira.jboss.org/browse/RF-9065
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.ecss
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.ecss 2010-08-19 11:56:09 UTC (rev 18806)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.ecss 2010-08-19 11:59:59 UTC (rev 18807)
@@ -13,6 +13,10 @@
font-size : inherit;
}
+.rf-ii-lbl {
+ white-space : nowrap;
+}
+
.rf-ii-d-s {
display : inline-block;
white-space : nowrap;
@@ -38,6 +42,7 @@
top : 0px;
left : 0px;
display : inline-block;
+ width: 100%;
}
.rf-ii-f {
@@ -59,13 +64,14 @@
.rf-ii-btn {
background-image : "url(#{resource['org.richfaces.renderkit.html.images.InplaceComponentButtonGradientImage']})";
- background-position: top;
+ background-attachment: scroll;
+ background-position: center top;
background-repeat: repeat-x;
background-color: '#{richSkin.tabBackgroundColor}';
border-width : 1px;
border-style: outset;
border-color: '#{richSkin.panelBorderColor}';
- padding : 0px;
+ padding : 3px;
margin : 0px;
}
@@ -104,6 +110,7 @@
}
.rf-ii-btn-shadow {
+ display: inline-block;
position: relative;
padding : 6px 6px 6px 6px;
top : -6px;
@@ -111,8 +118,11 @@
}
.rf-ii-btn-shadow-t {
- background-position : top left;
+ background-position : left top;
background-image : url("#{resource['org.richfaces:bg_shadow.png']}");
+ background-attachment: scroll;
+ background-color: transparent;
+ background-repeat: repeat;
position : absolute;
width : 6px;
top : 0px;
@@ -121,8 +131,11 @@
}
.rf-ii-btn-shadow-l {
- background-position : bottom left;
- background-image : url("#{resource['org.richfaces:bg_shadow.png']}");
+ background-position : left bottom;
+ background-image : url("#{resource['org.richfaces:bg_shadow.png']}");
+ background-attachment: scroll;
+ background-color: transparent;
+ background-repeat: repeat;
position : absolute;
height : 6px;
bottom : 0px;
@@ -131,8 +144,11 @@
}
.rf-ii-btn-shadow-r {
- background-position : bottom right;
+ background-position : right bottom;
background-image : url("#{resource['org.richfaces:bg_shadow.png']}");
+ background-attachment: scroll;
+ background-color: transparent;
+ background-repeat: repeat;
position: absolute;
width: 6px;
top: 6px;
@@ -143,6 +159,9 @@
.rf-ii-btn-shadow-b {
background-position : right top;
background-image : url("#{resource['org.richfaces:bg_shadow.png']}");
+ background-attachment: scroll;
+ background-color: transparent;
+ background-repeat: repeat;
position: absolute;
height: 6px;
top: 0px;
Modified: trunk/ui/input/ui/src/main/templates/inplaceInput.template.xml
===================================================================
--- trunk/ui/input/ui/src/main/templates/inplaceInput.template.xml 2010-08-19 11:56:09 UTC (rev 18806)
+++ trunk/ui/input/ui/src/main/templates/inplaceInput.template.xml 2010-08-19 11:59:59 UTC (rev 18807)
@@ -19,23 +19,23 @@
<cdk:object type="org.richfaces.component.InplaceState" name="inplaceState" value="#{getInplaceState(component)}" />
<cdk:object type="java.lang.String" name="inplaceValue" value="#{getValue(facesContext, component)}" />
- <div id="#{clientId}" class="#{getReadyStyleClass(component, inplaceState)}" cdk:passThroughWithExclusions="id class">
- <span id="#{clientId}:label">
+ <span id="#{clientId}" class="#{getReadyStyleClass(component, inplaceState)}" cdk:passThroughWithExclusions="id class">
+ <span id="#{clientId}:label" class="rf-ii-lbl">
#{inplaceValue}
</span>
- <div id="#{clientId}:edit" class="#{getEditStyleClass(component, inplaceState)}">
+ <span id="#{clientId}:edit" class="#{getEditStyleClass(component, inplaceState)}">
<input id="#{clientId}:input" autocomplete="off" name="#{clientId}:input" type="text" value="#{inplaceValue}" class="rf-ii-f" cdk:passThrough="tabIndex"/>
<c:if test="#{component.attributes['showControls']}">
- <div class="rf-ii-btn-prepos">
- <div class="rf-ii_btn_pos">
- <div id="#{clientId}:btnshadow" class="rf-ii-btn-shadow">
- <div class="rf-ii-btn-shadow-t"></div>
- <div class="rf-ii-btn-shadow-l"></div>
- <div class="rf-ii-btn-shadow-r"></div>
- <div class="rf-ii-btn-shadow-b"></div>
+ <span class="rf-ii-btn-prepos">
+ <span class="rf-ii-btn-pos">
+ <span id="#{clientId}:btnshadow" class="rf-ii-btn-shadow">
+ <span class="rf-ii-btn-shadow-t"></span>
+ <span class="rf-ii-btn-shadow-l"></span>
+ <span class="rf-ii-btn-shadow-r"></span>
+ <span class="rf-ii-btn-shadow-b"></span>
- <div id="#{clientId}:btn" style="position : relative">
+ <span id="#{clientId}:btn" style="position : relative">
<input type="image"
id="#{clientId}:okbtn"
src="#{getResourcePath(facesContext, 'org.richfaces/ico_ok.gif')}"
@@ -47,15 +47,15 @@
class="rf-ii-btn" onmousedown="this.className='rf-ii-btn-press'"
onmouseout="this.className='rf-ii-btn'" onmouseup="this.className='rf-ii-btn'" />
<br />
- </div>
- </div>
- </div>
- </div>
+ </span>
+ </span>
+ </span>
+ </span>
</c:if>
- </div>
+ </span>
<script type="text/javascript">
<cdk:call expression="buildScript(responseWriter, facesContext, component);"/>
</script>
- </div>
+ </span>
</cc:implementation>
</cdk:root>
\ No newline at end of file
15 years, 9 months
JBoss Rich Faces SVN: r18806 - trunk/examples/iteration-demo/src/main/webapp.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-08-19 07:56:09 -0400 (Thu, 19 Aug 2010)
New Revision: 18806
Modified:
trunk/examples/iteration-demo/src/main/webapp/list.xhtml
Log:
https://jira.jboss.org/browse/RF-9075
Modified: trunk/examples/iteration-demo/src/main/webapp/list.xhtml
===================================================================
--- trunk/examples/iteration-demo/src/main/webapp/list.xhtml 2010-08-19 11:55:53 UTC (rev 18805)
+++ trunk/examples/iteration-demo/src/main/webapp/list.xhtml 2010-08-19 11:56:09 UTC (rev 18806)
@@ -22,10 +22,10 @@
<h:form id="form1">
<it:list id="list" var="item" value="#{dataBean.employeeList}" rows="20" type="#{listBean.listType}">
<f:facet name="term">
- #{item.EMail}
+ E-mail: #{item.EMail}
</f:facet>
- #{item.name}
+ Name: #{item.name}
</it:list>
<it:dataScroller for="list" />
15 years, 9 months
JBoss Rich Faces SVN: r18805 - trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-08-19 07:55:53 -0400 (Thu, 19 Aug 2010)
New Revision: 18805
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ListRendererBase.java
Log:
https://jira.jboss.org/browse/RF-9075
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ListRendererBase.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ListRendererBase.java 2010-08-19 11:55:43 UTC (rev 18804)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ListRendererBase.java 2010-08-19 11:55:53 UTC (rev 18805)
@@ -269,4 +269,14 @@
}
}
}
+
+ @Override
+ public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
+ //do nothing
+ }
+
+ @Override
+ public void encodeChildren(FacesContext context, UIComponent component) throws IOException {
+ //do nothing
+ }
}
15 years, 9 months
JBoss Rich Faces SVN: r18804 - in modules/tests/metamer/trunk/application/src/main: resources/org/richfaces/tests/metamer/bean and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-08-19 07:55:43 -0400 (Thu, 19 Aug 2010)
New Revision: 18804
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionBean.java
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAccordionBean.properties
modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/
modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/simple.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
Log:
RFPL-674
* added one page for rich:accordion
Added: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionBean.java 2010-08-19 11:55:43 UTC (rev 18804)
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+import org.richfaces.component.html.HtmlAccordion;
+
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:accordion.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richAccordionBean")
+@ViewScoped
+public class RichAccordionBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getUIComponentAttributes(HtmlAccordion.class, getClass());
+
+ attributes.setAttribute("rendered", true);
+
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+}
Property changes on: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionBean.java
___________________________________________________________________
Name: svn:keywords
+ Revision
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-08-19 11:55:16 UTC (rev 18803)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-08-19 11:55:43 UTC (rev 18804)
@@ -108,7 +108,8 @@
components.put("a4jStatus", "A4J Status");
components.put("commandButton", "JSF Command Button");
components.put("hDataTable", "JSF Data Table");
- components.put("richColumn", "Rich Column Component");
+ components.put("richAccordion", "Rich Accordion");
+ components.put("richColumn", "Rich Column");
components.put("richComponentControl", "Rich Component Control");
components.put("richDataGrid", "Rich Data Grid");
components.put("richDataScroller", "Rich Data Scroller");
Added: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAccordionBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAccordionBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAccordionBean.properties 2010-08-19 11:55:43 UTC (rev 18804)
@@ -0,0 +1,7 @@
+attr.dir.ltr=ltr
+attr.dir.rtl=rtl
+attr.dir.none=
+attr.switchType.client=client
+attr.switchType.server=server
+attr.switchType.ajax=ajax
+attr.switchType.none=
\ No newline at end of file
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/list.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/list.xhtml 2010-08-19 11:55:43 UTC (rev 18804)
@@ -0,0 +1,41 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:metamer="http://java.sun.com/jsf/composite/metamer">
+
+ <ui:composition template="/templates/list.xhtml">
+
+ <ui:define name="pageTitle">Rich Accordion</ui:define>
+
+ <ui:define name="links">
+
+ <metamer:testPageLink id="simple" outcome="simple" value="Simple">
+ Simple page that contains <b>rich:accordion</b> with several panels and input boxes for all its attributes.
+ </metamer:testPageLink>
+
+ </ui:define>
+
+ </ui:composition>
+
+</html>
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/simple.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/simple.xhtml 2010-08-19 11:55:43 UTC (rev 18804)
@@ -0,0 +1,137 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
+ xmlns:rich="http://richfaces.org/rich">
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="templates" value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ </ui:define>
+
+ <ui:define name="component">
+ <rich:accordion id="accordion"
+ activeItem="#{richAccordionBean.attributes['activeItem'].value}"
+ bypassUpdates="#{richAccordionBean.attributes['bypassUpdates'].value}"
+ converter="#{richAccordionBean.attributes['converter'].value}"
+ cycledSwitching="#{richAccordionBean.attributes['cycledSwitching'].value}"
+ data="#{richAccordionBean.attributes['data'].value}"
+ dir="#{richAccordionBean.attributes['dir'].value}"
+ execute="#{richAccordionBean.attributes['execute'].value}"
+ firstItem="#{richAccordionBean.attributes['firstItem'].value}"
+ immediate="#{richAccordionBean.attributes['immediate'].value}"
+ itemByIndex="#{richAccordionBean.attributes['itemByIndex'].value}"
+ itemChangeListener="#{richAccordionBean.attributes['itemChangeListener'].value}"
+ itemChangeListeners="#{richAccordionBean.attributes['itemChangeListeners'].value}"
+ itemContentClass="#{richAccordionBean.attributes['itemContentClass'].value}"
+ itemHeaderClass="#{richAccordionBean.attributes['itemHeaderClass'].value}"
+ itemHeaderClassActive="#{richAccordionBean.attributes['itemHeaderClassActive'].value}"
+ itemHeaderClassDisabled="#{richAccordionBean.attributes['itemHeaderClassDisabled'].value}"
+ itemHeaderClassInactive="#{richAccordionBean.attributes['itemHeaderClassInactive'].value}"
+ lang="#{richAccordionBean.attributes['lang'].value}"
+ lastItem="#{richAccordionBean.attributes['lastItem'].value}"
+ limitToList="#{richAccordionBean.attributes['limitToList'].value}"
+ localValue="#{richAccordionBean.attributes['localValue'].value}"
+ localValueSet="#{richAccordionBean.attributes['localValueSet'].value}"
+ nextItem="#{richAccordionBean.attributes['nextItem'].value}"
+ onbeforeitemchange="#{richAccordionBean.attributes['onbeforeitemchange'].value}"
+ onclick="#{richAccordionBean.attributes['onclick'].value}"
+ ondblclick="#{richAccordionBean.attributes['ondblclick'].value}"
+ onitemchange="#{richAccordionBean.attributes['onitemchange'].value}"
+ onmousedown="#{richAccordionBean.attributes['onmousedown'].value}"
+ onmousemove="#{richAccordionBean.attributes['onmousemove'].value}"
+ onmouseout="#{richAccordionBean.attributes['onmouseout'].value}"
+ onmouseover="#{richAccordionBean.attributes['onmouseover'].value}"
+ onmouseup="#{richAccordionBean.attributes['onmouseup'].value}"
+ prevItem="#{richAccordionBean.attributes['prevItem'].value}"
+ render="#{richAccordionBean.attributes['render'].value}"
+ rendered="#{richAccordionBean.attributes['rendered'].value}"
+ required="#{richAccordionBean.attributes['required'].value}"
+ status="#{richAccordionBean.attributes['status'].value}"
+ style="#{richAccordionBean.attributes['style'].value}"
+ styleClass="#{richAccordionBean.attributes['styleClass'].value}"
+ submittedActiveItem="#{richAccordionBean.attributes['submittedActiveItem'].value}"
+ submittedValue="#{richAccordionBean.attributes['submittedValue'].value}"
+ switchType="#{richAccordionBean.attributes['switchType'].value}"
+ title="#{richAccordionBean.attributes['title'].value}"
+ valid="#{richAccordionBean.attributes['valid'].value}"
+ value="#{richAccordionBean.attributes['value'].value}"
+ >
+
+ <rich:accordionItem id="item1" name="item1" header="Item 1">
+ content of item 1
+ </rich:accordionItem>
+ <rich:accordionItem id="item2" name="item2" header="Item 2">
+ content of item 2
+ </rich:accordionItem>
+ <rich:accordionItem id="item3" name="item3" header="Item 3">
+ content of item 3
+ </rich:accordionItem>
+ <rich:accordionItem id="item4" name="item4" header="Item 4">
+ content of item 4
+ </rich:accordionItem>
+ </rich:accordion>
+
+ <br/><br/>
+ <fieldset>
+ <legend>JavaScript API</legend>
+
+ <h:commandButton id="switchButton1" value="switch to item1">
+ <rich:componentControl id="componentControl1" event="click" operation="switchToItem" target="accordion" >
+ <f:param value="item1" />
+ </rich:componentControl>
+ </h:commandButton>
+ <h:commandButton id="switchButton2" value="switch to item2">
+ <rich:componentControl id="componentControl2" event="click" operation="switchToItem" target="accordion" >
+ <f:param value="item2" />
+ </rich:componentControl>
+ </h:commandButton>
+ <h:commandButton id="switchButton3" value="switch to item3">
+ <rich:componentControl id="componentControl1" event="click" operation="switchToItem" target="accordion" >
+ <f:param value="item3" />
+ </rich:componentControl>
+ </h:commandButton>
+ <h:commandButton id="switchButton4" value="switch to item4">
+ <rich:componentControl id="componentControl1" event="click" operation="switchToItem" target="accordion" >
+ <f:param value="item4" />
+ </rich:componentControl>
+ </h:commandButton>
+
+ </fieldset>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richAccordionBean.attributes}" id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
15 years, 9 months