Author: Alex.Kolonitsky
Date: 2010-08-13 10:12:36 -0400 (Fri, 13 Aug 2010)
New Revision: 18621
Added:
trunk/examples/output-demo/src/main/webapp/examples/accordion.xhtml
trunk/examples/output-demo/src/main/webapp/examples/accordion/
trunk/examples/output-demo/src/main/webapp/examples/togglePanel/
trunk/examples/output-demo/src/main/webapp/qunit/accordion.xhtml
trunk/examples/output-demo/src/main/webapp/resources/tests/richfaces-accordion-qunit.js
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractAccordion.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelTitledItem.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/UITogglePanelTitledItem.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlAccordion.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlAccordionItem.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTogglePanelTitledItem.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionRenderer.java
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/Accordion.js
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/AccordionItem.js
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/accordion.ecss
Modified:
trunk/core/commons/api/pom.xml
trunk/core/commons/api/src/main/java/org/richfaces/renderkit/RenderKitUtils.java
trunk/examples/output-demo/src/main/webapp/WEB-INF/faces-config.xml
trunk/examples/output-demo/src/main/webapp/resources/tests/richfaces-toggle-panel-qunit.js
trunk/examples/output-demo/src/main/webapp/templates/template.xhtml
trunk/ui/output/api/pom.xml
trunk/ui/output/ui/pom.xml
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanel.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelItem.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/UITogglePanel.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/UITogglePanelItem.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlDivPanel.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTogglePanel.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTogglePanelItem.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/DivPanelRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TogglePanelItemRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/view/facelets/html/TogglePanelTagHandler.java
trunk/ui/output/ui/src/main/resources/META-INF/MANIFEST.MF
trunk/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml
trunk/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanel.js
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanelItem.js
trunk/ui/output/ui/src/test/resources/panelTest.xhtml
trunk/ui/output/ui/src/test/resources/popupPanelTest.xhtml
Log:
RF-8747 Panelbar component
Modified: trunk/core/commons/api/pom.xml
===================================================================
--- trunk/core/commons/api/pom.xml 2010-08-13 14:10:24 UTC (rev 18620)
+++ trunk/core/commons/api/pom.xml 2010-08-13 14:12:36 UTC (rev 18621)
@@ -34,6 +34,11 @@
<!-- Runtime Dependencies -->
<!-- JSF2 api version set by bom/richface-parent -->
<dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>2.0.2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
<groupId>${jsf2.api.groupid}</groupId>
<artifactId>${jsf2.api.artifactid}</artifactId>
<scope>provided</scope>
Modified:
trunk/core/commons/api/src/main/java/org/richfaces/renderkit/RenderKitUtils.java
===================================================================
---
trunk/core/commons/api/src/main/java/org/richfaces/renderkit/RenderKitUtils.java 2010-08-13
14:10:24 UTC (rev 18620)
+++
trunk/core/commons/api/src/main/java/org/richfaces/renderkit/RenderKitUtils.java 2010-08-13
14:12:36 UTC (rev 18621)
@@ -404,6 +404,24 @@
return new Attributes();
}
+ public static Attributes attributes(Enum<?> ... attrs) {
+ Attributes res = new Attributes();
+ for (Enum<?> attr : attrs) {
+ res.generic(attr.toString(), attr.toString());
+ }
+
+ return res;
+ }
+
+ public static Attributes attributes(String ... attrs) {
+ Attributes res = new Attributes();
+ for (String attr : attrs) {
+ res.generic(attr, attr);
+ }
+
+ return res;
+ }
+
@SuppressWarnings("serial")
public static final class Attributes extends TreeSet<ComponentAttribute> {
Modified: trunk/examples/output-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/examples/output-demo/src/main/webapp/WEB-INF/faces-config.xml 2010-08-13
14:10:24 UTC (rev 18620)
+++ trunk/examples/output-demo/src/main/webapp/WEB-INF/faces-config.xml 2010-08-13
14:12:36 UTC (rev 18621)
@@ -30,6 +30,10 @@
<from-outcome>togglePanel/mixed</from-outcome>
<to-view-id>/examples/togglePanel-mixed.xhtml</to-view-id>
</navigation-case>
+ <navigation-case>
+ <from-outcome>accordion</from-outcome>
+ <to-view-id>/examples/accordion.xhtml</to-view-id>
+ </navigation-case>
<!-- QUnit -->
<navigation-case>
@@ -40,5 +44,9 @@
<from-outcome>qunit/togglePanelItem</from-outcome>
<to-view-id>/qunit/togglePanelItem.xhtml</to-view-id>
</navigation-case>
+ <navigation-case>
+ <from-outcome>qunit/accordion</from-outcome>
+ <to-view-id>/qunit/accordion.xhtml</to-view-id>
+ </navigation-case>
</navigation-rule>
</faces-config>
Added: trunk/examples/output-demo/src/main/webapp/examples/accordion.xhtml
===================================================================
--- trunk/examples/output-demo/src/main/webapp/examples/accordion.xhtml
(rev 0)
+++ trunk/examples/output-demo/src/main/webapp/examples/accordion.xhtml 2010-08-13
14:12:36 UTC (rev 18621)
@@ -0,0 +1,28 @@
+<!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:pn="http://richfaces.org/output">
+
+<body>
+<ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="title">Accordion Example</ui:define>
+ <ui:define name="body_head">Accordion Example</ui:define>
+
+ <ui:define name="body">
+ <p>Page</p>
+
+ <h:form id="f" style="border:blue solid thin;">
+ <pn:accordion>
+ <pn:accordionItem header="label 1">content
1</pn:accordionItem>
+ <pn:accordionItem header="label 2">content
2</pn:accordionItem>
+ <pn:accordionItem header="label 3">content
3</pn:accordionItem>
+ </pn:accordion>
+ </h:form>
+ </ui:define>
+</ui:composition>
+</body>
+</html>
+
Added: trunk/examples/output-demo/src/main/webapp/qunit/accordion.xhtml
===================================================================
--- trunk/examples/output-demo/src/main/webapp/qunit/accordion.xhtml
(rev 0)
+++ trunk/examples/output-demo/src/main/webapp/qunit/accordion.xhtml 2010-08-13 14:12:36
UTC (rev 18621)
@@ -0,0 +1,90 @@
+<!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:pn="http://richfaces.org/output">
+
+<body>
+<ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="scripts">
+ <h:outputScript name="qunit/qunit.js" />
+ <h:outputScript name="qunit/richfaces-qunit.js" />
+
+ <!--<h:outputScript name="richfaces-event.js" />-->
+ <!--<h:outputScript name="richfaces-base-component.js"
/>-->
+ <!--<h:outputScript name="richfaces.js" />-->
+ <!--<h:outputScript name="TogglePanel.js" />-->
+ <!--<h:outputScript name="TogglePanelItem.js" />-->
+ <!--<h:outputScript name="TogglePanelTitledItem.js" />-->
+ <!--<h:outputScript name="AccordionItem.js" />-->
+ <!--<h:outputScript name="Accordion.js" />-->
+
+ <h:outputStylesheet name="qunit/qunit.css" />
+ </ui:define>
+
+ <ui:define name="title">Accordion Example</ui:define>
+ <ui:define name="body_head">Accordion Example</ui:define>
+
+ <ui:define name="body">
+ <p>Page</p>
+
+ <h:form id="f" style="border:blue solid thin;">
+ <pn:accordion id="panel" style="padding: 0px; height:
400px; width: 500px;" switchType="ajax">
+ <pn:accordionItem header="label 1">content
1</pn:accordionItem>
+ <pn:accordionItem header="label 2">content
2</pn:accordionItem>
+ <pn:accordionItem header="label 3">content
3</pn:accordionItem>
+ </pn:accordion>
+ </h:form>
+
+<!-- <h:form id="f" style="border:blue solid thin;">
+ <div id="f:panel" style="padding: 0px; height: 400px;
width: 500px;" class="rich-panelbar rich-panelbar-b">
+ <input type="hidden" id="f:panel-value" />
+ <div id="f:name1" class="rich-panelbar
rich-panelbar-interior ">
+ <div id="f:name1-header"
class="rich-panelbar-header">label 1</div>
+ <div id="f:name1-content" style="display: block;
width: 100%; overflow: auto;"
+ class="rich-panelbar-content-exterior">
+ content 1
+ </div>
+ </div>
+ <div id="f:name2" class="rich-panelbar
rich-panelbar-interior ">
+ <div id="f:name2-header"
class="rich-panelbar-header">label 2</div>
+ <div id="f:name2-content" style="display: none;
width: 100%; overflow: auto;"
+ class="rich-panelbar-content-exterior">
+ content 2
+ </div>
+ </div>
+ <div id="f:name3" class="rich-panelbar
rich-panelbar-interior ">
+ <div id="f:name3-header"
class="rich-panelbar-header ">label 3</div>
+ <div id="f:name3-content" style="display: none;
width: 100%; overflow: auto;"
+ class="rich-panelbar-content-exterior">
+ content 3
+ </div>
+ </div>
+ <script type="text/javascript">
+ new RichFaces.ui.Accordion("f:panel",{
+ "items":[
+ new
RichFaces.ui.AccordionItem("f:name1",{"togglePanelId":"f:panel","switchMode":"client","name":"name1"}
),
+ new
RichFaces.ui.AccordionItem("f:name2",{"togglePanelId":"f:panel","switchMode":"client","name":"name2"}
),
+ new
RichFaces.ui.AccordionItem("f:name3",{"togglePanelId":"f:panel","switchMode":"client","name":"name3"}
)] ,
+
"ajax":{"status":"null","incId":"1"} ,
+ "activeItem":"name1",
+ "isKeepHeight": false} )
+ </script>
+ </div>
+ </h:form>-->
+
+ <p>Result</p>
+ <div>
+ <ol id="qunit-tests"></ol>
+
+ <div id="testDiv" style="margin-top:10px; border:1px solid
#a0a0a0">Main Test Div</div>
+
+ </div>
+ <h:outputScript name="tests/richfaces-accordion-qunit.js" />
+ </ui:define>
+</ui:composition>
+</body>
+</html>
+
Added:
trunk/examples/output-demo/src/main/webapp/resources/tests/richfaces-accordion-qunit.js
===================================================================
---
trunk/examples/output-demo/src/main/webapp/resources/tests/richfaces-accordion-qunit.js
(rev 0)
+++
trunk/examples/output-demo/src/main/webapp/resources/tests/richfaces-accordion-qunit.js 2010-08-13
14:12:36 UTC (rev 18621)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.
+ */
+
+RichFaces.QUnit.run(function() {
+ module("richfaces-accordion");
+
+ var ACCORDION_ID = "f:panel";
+
+ test("RichFaces.ui.Accordion test constructor", function () {
+ var c = RichFaces.$(ACCORDION_ID);
+
+ ok(c instanceof RichFaces.ui.Accordion, "inctance of
RichFaces.ui.Accordion");
+ equals(c.id, ACCORDION_ID, "id");
+
+ equals(c.getItems().length, 3, "getItems().length");
+ });
+
+ test("RichFaces.ui.Accordion test public api", function () {
+ var c = RichFaces.$(ACCORDION_ID);
+
+ var PUBLIC_API = [/* ... */];
+
+ for (i in PUBLIC_API) {
+ var funcName = PUBLIC_API[i];
+ ok(c[funcName], funcName + "present in component")
+ // TODO check other functions + check is it function
+ }
+ });
+
+ test("RichFaces.ui.Accordion test events", function () {
+
+ });
+});
Modified:
trunk/examples/output-demo/src/main/webapp/resources/tests/richfaces-toggle-panel-qunit.js
===================================================================
---
trunk/examples/output-demo/src/main/webapp/resources/tests/richfaces-toggle-panel-qunit.js 2010-08-13
14:10:24 UTC (rev 18620)
+++
trunk/examples/output-demo/src/main/webapp/resources/tests/richfaces-toggle-panel-qunit.js 2010-08-13
14:12:36 UTC (rev 18621)
@@ -19,7 +19,6 @@
ok(c instanceof RichFaces.ui.TogglePanel, "inctance of
RichFaces.ui.TogglePanel");
equals(c.componentId, undefined, "componentId shouldn't be here, we must
use id form component base");
equals(c.id, TOGGLE_PANEL_ID, "id");
- equals(c.switchMode, "client", "switchMode");
equals(c.activeItem, "name1", "activeItem");
equals(c.items.length, 3, "items");
Modified: trunk/examples/output-demo/src/main/webapp/templates/template.xhtml
===================================================================
--- trunk/examples/output-demo/src/main/webapp/templates/template.xhtml 2010-08-13
14:10:24 UTC (rev 18620)
+++ trunk/examples/output-demo/src/main/webapp/templates/template.xhtml 2010-08-13
14:12:36 UTC (rev 18621)
@@ -30,16 +30,28 @@
<h:form id="nav">
<p>Examples</p>
<ul>
- <li><h:commandLink value="togglePanel"
action="togglePanel" /></li>
- <li><h:commandLink value="togglePanel
Ajax" action="togglePanel/ajax" /></li>
- <li><h:commandLink value="togglePanel
Client" action="togglePanel/client" /></li>
- <li><h:commandLink value="togglePanel
Server" action="togglePanel/server" /></li>
- <li><h:commandLink value="togglePanel
Mixed" action="togglePanel/mixed" /></li>
+ <li>
+ <p>Toggle Panel</p>
+ <ul>
+ <li><h:commandLink
value="togglePanel" action="togglePanel" /></li>
+ <li><h:commandLink value="togglePanel
Ajax" action="togglePanel/ajax" /></li>
+ <li><h:commandLink value="togglePanel
Client" action="togglePanel/client" /></li>
+ <li><h:commandLink value="togglePanel
Server" action="togglePanel/server" /></li>
+ <li><h:commandLink value="togglePanel
Mixed" action="togglePanel/mixed" /></li>
+ </ul>
+ </li>
+ <li>
+ <p>Accordion</p>
+ <ul>
+ <li><h:commandLink
value="accordion" action="accordion" /></li>
+ </ul>
+ </li>
</ul>
<p>QUnit</p>
<ul>
<li><h:commandLink value="togglePanel"
action="qunit/togglePanel" /></li>
<li><h:commandLink value="togglePanelItem"
action="qunit/togglePanelItem" /></li>
+ <li><h:commandLink value="accordion"
action="qunit/accordion" /></li>
</ul>
</h:form>
</td>
Modified: trunk/ui/output/api/pom.xml
===================================================================
--- trunk/ui/output/api/pom.xml 2010-08-13 14:10:24 UTC (rev 18620)
+++ trunk/ui/output/api/pom.xml 2010-08-13 14:12:36 UTC (rev 18621)
@@ -43,6 +43,7 @@
<dependency>
<groupId>org.richfaces.ui.common</groupId>
<artifactId>richfaces-ui-common-api</artifactId>
+ <version>${org.richfaces.commons.version}</version>
</dependency>
<!-- JSF with dependencies -->
Modified: trunk/ui/output/ui/pom.xml
===================================================================
--- trunk/ui/output/ui/pom.xml 2010-08-13 14:10:24 UTC (rev 18620)
+++ trunk/ui/output/ui/pom.xml 2010-08-13 14:12:36 UTC (rev 18621)
@@ -56,6 +56,7 @@
<dependency>
<groupId>org.richfaces.ui.common</groupId>
<artifactId>richfaces-ui-common-ui</artifactId>
+ <version>${org.richfaces.commons.version}</version>
</dependency>
<dependency>
<!-- todo remove this dependency -->
Added: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractAccordion.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractAccordion.java
(rev 0)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractAccordion.java 2010-08-13
14:12:36 UTC (rev 18621)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.component;
+
+
+
+/**
+ * @author akolonitsky
+ * @since 2010-08-05
+ */
+public abstract class AbstractAccordion extends UITogglePanel {
+
+ public static final String COMPONENT_TYPE = "org.richfaces.Accordion";
+
+ public static final String COMPONENT_FAMILY = "org.richfaces.Accordion";
+
+ protected AbstractAccordion() {
+ setRendererType("org.richfaces.Accordion");
+ }
+
+ @Override
+ public String getFamily() {
+ return COMPONENT_FAMILY;
+ }
+
+
+
+}
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanel.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanel.java 2010-08-13
14:10:24 UTC (rev 18620)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanel.java 2010-08-13
14:12:36 UTC (rev 18621)
@@ -327,7 +327,7 @@
} catch (Exception e) {
caught = e;
//message = MessageFactory.getMessage(context, UPDATE_MESSAGE_ID,
- // MessageFactory.getLabel(context, this));
+ // MessageFactory.getHeader(context, this));
setValid(false);
}
@@ -501,7 +501,7 @@
return getItemByIndex(getRenderedChildren().size() - 1);
}
- private int getChildIndex(String name) {
+ public int getChildIndex(String name) {
if (name == null) {
throw new IllegalArgumentException("Name is required parameter.");
}
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelItem.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelItem.java 2010-08-13
14:10:24 UTC (rev 18620)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelItem.java 2010-08-13
14:12:36 UTC (rev 18621)
@@ -54,6 +54,10 @@
return (AbstractTogglePanel) super.getParent();
}
+ public boolean isActive() {
+ return getParent().isActiveItem(this);
+ }
+
@Override
public Renderer getRenderer(FacesContext context) {
return super.getRenderer(context);
@@ -89,7 +93,7 @@
return "<div id=\"" + getClientId() + "\"
style=\"display: none\" ></div>";
}
- private static void hidePanelItem(UIComponent item) {
+ protected static void hidePanelItem(UIComponent item) {
//TODO nick - attributes shouldn't be overwritten
item.getAttributes().put(RendererUtils.HTML.STYLE_ATTRIBUTE,
"display:none");
}
Added:
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelTitledItem.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelTitledItem.java
(rev 0)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelTitledItem.java 2010-08-13
14:12:36 UTC (rev 18621)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.component;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import java.io.IOException;
+
+/**
+ * @author akolonitsky
+ * @since 2010-08-05
+ */
+public abstract class AbstractTogglePanelTitledItem extends UITogglePanelItem {
+
+ public static final String COMPONENT_TYPE =
"org.richfaces.TogglePanelTitledItem";
+
+ public static final String COMPONENT_FAMILY =
"org.richfaces.TogglePanelTitledItem";
+
+ protected AbstractTogglePanelTitledItem() {
+ setRendererType("org.richfaces.TogglePanelTitledItem");
+ }
+
+ @Override
+ public String getFamily() {
+ return COMPONENT_FAMILY;
+ }
+
+ public abstract boolean isDisabled();
+
+ public abstract String getHeader();
+
+ @Override
+ public String getName() {
+ return (String) getStateHelper().eval(PropertyKeys.name, getId());
+ }
+
+ @Override
+ public void encodeAll(FacesContext context) throws IOException {
+ if (!isRendered()) {
+ return;
+ }
+
+ encodeBegin(context);
+ if (getRendersChildren()) {
+ encodeChildren(context);
+ } else if (this.getChildCount() > 0) {
+ for (UIComponent kid : getChildren()) {
+ kid.encodeAll(context);
+ }
+ }
+
+ encodeEnd(context);
+ }
+}
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/UITogglePanel.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/UITogglePanel.java 2010-08-13
14:10:24 UTC (rev 18620)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/UITogglePanel.java 2010-08-13
14:12:36 UTC (rev 18621)
@@ -26,10 +26,11 @@
/**
* @author akolonitsky
+ * @since 2010-08-13
*/
public class UITogglePanel extends AbstractTogglePanel {
- private enum PropertyKeys {
+ public enum PropertyKeys {
switchType,
bypassUpdates,
limitToList,
@@ -73,7 +74,7 @@
}
public String getStatus() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.status));
+ return (String) getStateHelper().eval(PropertyKeys.status);
}
public void setStatus(String status) {
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/UITogglePanelItem.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/component/UITogglePanelItem.java 2010-08-13
14:10:24 UTC (rev 18620)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/component/UITogglePanelItem.java 2010-08-13
14:12:36 UTC (rev 18621)
@@ -22,26 +22,27 @@
package org.richfaces.component;
+
+
/**
* @author akolonitsky
+ * @since 2010-08-13
*/
public class UITogglePanelItem extends AbstractTogglePanelItem {
- private enum PropertyKeys {
+ public enum PropertyKeys {
name,
switchType
}
- @Override
public String getName() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.name));
+ return (String) getStateHelper().eval(PropertyKeys.name);
}
public void setName(String name) {
getStateHelper().put(PropertyKeys.name, name);
}
- @Override
public SwitchType getSwitchType() {
return (SwitchType) getStateHelper().eval(PropertyKeys.switchType,
getParent().getSwitchType());
}
@@ -49,4 +50,6 @@
public void setSwitchType(SwitchType switchType) {
getStateHelper().put(PropertyKeys.switchType, switchType);
}
+
+
}
Added:
trunk/ui/output/ui/src/main/java/org/richfaces/component/UITogglePanelTitledItem.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/UITogglePanelTitledItem.java
(rev 0)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/component/UITogglePanelTitledItem.java 2010-08-13
14:12:36 UTC (rev 18621)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.component;
+
+
+
+/**
+ * @author akolonitsky
+ * @since 2010-08-13
+ */
+public class UITogglePanelTitledItem extends AbstractTogglePanelTitledItem {
+
+ public enum PropertyKeys {
+ disabled,
+ header
+ }
+
+ public boolean isDisabled() {
+ return
Boolean.valueOf(String.valueOf(getStateHelper().eval(PropertyKeys.disabled)));
+ }
+
+ public void setDisabled(boolean disabled) {
+ getStateHelper().put(PropertyKeys.disabled, disabled);
+ }
+
+ public String getHeader() {
+ return (String) getStateHelper().eval(PropertyKeys.header);
+ }
+
+ public void setHeader(String header) {
+ getStateHelper().put(PropertyKeys.header, header);
+ }
+
+
+}
Added: trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlAccordion.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlAccordion.java
(rev 0)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlAccordion.java 2010-08-13
14:12:36 UTC (rev 18621)
@@ -0,0 +1,245 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.component.html;
+
+import org.richfaces.component.AbstractAccordion;
+import javax.faces.component.behavior.ClientBehaviorHolder;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+
+/**
+ * @author akolonitsky
+ * @since 2010-08-13
+ */
+public class HtmlAccordion extends AbstractAccordion implements ClientBehaviorHolder {
+
+ public static final String COMPONENT_TYPE = "org.richfaces.Accordion";
+
+ public static final String COMPONENT_FAMILY = "org.richfaces.Accordion";
+
+ private static final Collection<String> EVENT_NAMES =
Collections.unmodifiableCollection(Arrays.asList(
+ "itemchange",
+ "beforeitemchange",
+ "click",
+ "dblclick",
+ "mousedown",
+ "mousemove",
+ "mouseout",
+ "mouseover",
+ "mouseup"
+ ));
+
+
+ public enum PropertyKeys {
+ itemHeaderClassActive,
+ itemHeaderClassDisabled,
+ itemHeaderClassInactive,
+ itemContentClass,
+ itemHeaderClass,
+ onitemchange,
+ onbeforeitemchange,
+ lang,
+ title,
+ style,
+ styleClass,
+ dir,
+ onclick,
+ ondblclick,
+ onmousedown,
+ onmousemove,
+ onmouseout,
+ onmouseover,
+ onmouseup
+ }
+
+ public HtmlAccordion() {
+ setRendererType("org.richfaces.Accordion");
+ }
+
+ @Override
+ public String getFamily() {
+ return COMPONENT_FAMILY;
+ }
+
+ public String getItemHeaderClassActive() {
+ return (String) getStateHelper().eval(PropertyKeys.itemHeaderClassActive);
+ }
+
+ public void setItemHeaderClassActive(String itemHeaderClassActive) {
+ getStateHelper().put(PropertyKeys.itemHeaderClassActive, itemHeaderClassActive);
+ }
+
+ public String getItemHeaderClassDisabled() {
+ return (String) getStateHelper().eval(PropertyKeys.itemHeaderClassDisabled);
+ }
+
+ public void setItemHeaderClassDisabled(String itemHeaderClassDisabled) {
+ getStateHelper().put(PropertyKeys.itemHeaderClassDisabled,
itemHeaderClassDisabled);
+ }
+
+ public String getItemHeaderClassInactive() {
+ return (String) getStateHelper().eval(PropertyKeys.itemHeaderClassInactive);
+ }
+
+ public void setItemHeaderClassInactive(String itemHeaderClassInactive) {
+ getStateHelper().put(PropertyKeys.itemHeaderClassInactive,
itemHeaderClassInactive);
+ }
+
+ public String getItemContentClass() {
+ return (String) getStateHelper().eval(PropertyKeys.itemContentClass);
+ }
+
+ public void setItemContentClass(String itemContentClass) {
+ getStateHelper().put(PropertyKeys.itemContentClass, itemContentClass);
+ }
+
+ public String getItemHeaderClass() {
+ return (String) getStateHelper().eval(PropertyKeys.itemHeaderClass);
+ }
+
+ public void setItemHeaderClass(String itemHeaderClass) {
+ getStateHelper().put(PropertyKeys.itemHeaderClass, itemHeaderClass);
+ }
+
+ public String getOnitemchange() {
+ return (String) getStateHelper().eval(PropertyKeys.onitemchange);
+ }
+
+ public void setOnitemchange(String onitemchange) {
+ getStateHelper().put(PropertyKeys.onitemchange, onitemchange);
+ }
+
+ public String getOnbeforeitemchange() {
+ return (String) getStateHelper().eval(PropertyKeys.onbeforeitemchange);
+ }
+
+ public void setOnbeforeitemchange(String onbeforeitemchange) {
+ getStateHelper().put(PropertyKeys.onbeforeitemchange, onbeforeitemchange);
+ }
+
+ public String getLang() {
+ return (String) getStateHelper().eval(PropertyKeys.lang);
+ }
+
+ public void setLang(String lang) {
+ getStateHelper().put(PropertyKeys.lang, lang);
+ }
+
+ public String getTitle() {
+ return (String) getStateHelper().eval(PropertyKeys.title);
+ }
+
+ public void setTitle(String title) {
+ getStateHelper().put(PropertyKeys.title, title);
+ }
+
+ public String getStyle() {
+ return (String) getStateHelper().eval(PropertyKeys.style);
+ }
+
+ public void setStyle(String style) {
+ getStateHelper().put(PropertyKeys.style, style);
+ }
+
+ public String getStyleClass() {
+ return (String) getStateHelper().eval(PropertyKeys.styleClass);
+ }
+
+ public void setStyleClass(String styleClass) {
+ getStateHelper().put(PropertyKeys.styleClass, styleClass);
+ }
+
+ public String getDir() {
+ return (String) getStateHelper().eval(PropertyKeys.dir);
+ }
+
+ public void setDir(String dir) {
+ getStateHelper().put(PropertyKeys.dir, dir);
+ }
+
+ public String getOnclick() {
+ return (String) getStateHelper().eval(PropertyKeys.onclick);
+ }
+
+ public void setOnclick(String onclick) {
+ getStateHelper().put(PropertyKeys.onclick, onclick);
+ }
+
+ public String getOndblclick() {
+ return (String) getStateHelper().eval(PropertyKeys.ondblclick);
+ }
+
+ public void setOndblclick(String ondblclick) {
+ getStateHelper().put(PropertyKeys.ondblclick, ondblclick);
+ }
+
+ public String getOnmousedown() {
+ return (String) getStateHelper().eval(PropertyKeys.onmousedown);
+ }
+
+ public void setOnmousedown(String onmousedown) {
+ getStateHelper().put(PropertyKeys.onmousedown, onmousedown);
+ }
+
+ public String getOnmousemove() {
+ return (String) getStateHelper().eval(PropertyKeys.onmousemove);
+ }
+
+ public void setOnmousemove(String onmousemove) {
+ getStateHelper().put(PropertyKeys.onmousemove, onmousemove);
+ }
+
+ public String getOnmouseout() {
+ return (String) getStateHelper().eval(PropertyKeys.onmouseout);
+ }
+
+ public void setOnmouseout(String onmouseout) {
+ getStateHelper().put(PropertyKeys.onmouseout, onmouseout);
+ }
+
+ public String getOnmouseover() {
+ return (String) getStateHelper().eval(PropertyKeys.onmouseover);
+ }
+
+ public void setOnmouseover(String onmouseover) {
+ getStateHelper().put(PropertyKeys.onmouseover, onmouseover);
+ }
+
+ public String getOnmouseup() {
+ return (String) getStateHelper().eval(PropertyKeys.onmouseup);
+ }
+
+ public void setOnmouseup(String onmouseup) {
+ getStateHelper().put(PropertyKeys.onmouseup, onmouseup);
+ }
+
+
+
+ @Override
+ public Collection<String> getEventNames() {
+ return EVENT_NAMES;
+ }
+}
+
Added:
trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlAccordionItem.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlAccordionItem.java
(rev 0)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlAccordionItem.java 2010-08-13
14:12:36 UTC (rev 18621)
@@ -0,0 +1,304 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.component.html;
+
+import org.richfaces.component.UITogglePanelTitledItem;
+import javax.faces.component.behavior.ClientBehaviorHolder;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+
+/**
+ * @author akolonitsky
+ * @since 2010-08-13
+ */
+public class HtmlAccordionItem extends UITogglePanelTitledItem implements
ClientBehaviorHolder {
+
+ public static final String COMPONENT_TYPE =
"org.richfaces.TogglePanelTitledItem";
+
+ public static final String COMPONENT_FAMILY =
"org.richfaces.TogglePanelTitledItem";
+
+ private static final Collection<String> EVENT_NAMES =
Collections.unmodifiableCollection(Arrays.asList(
+ "headerclick",
+ "headerdblclick",
+ "headermousedown",
+ "headermousemove",
+ "headermouseup",
+ "enter",
+ "leave",
+ "click",
+ "dblclick",
+ "mousedown",
+ "mousemove",
+ "mouseout",
+ "mouseover",
+ "mouseup"
+ ));
+
+
+ public enum PropertyKeys {
+ headerClassActive,
+ headerClassDisabled,
+ headerClassInactive,
+ headerClass,
+ headerStyle,
+ contentClass,
+ onheaderclick,
+ onheaderdblclick,
+ onheadermousedown,
+ onheadermousemove,
+ onheadermouseup,
+ onenter,
+ onleave,
+ lang,
+ title,
+ style,
+ styleClass,
+ dir,
+ onclick,
+ ondblclick,
+ onmousedown,
+ onmousemove,
+ onmouseout,
+ onmouseover,
+ onmouseup
+ }
+
+ public HtmlAccordionItem() {
+ setRendererType("org.richfaces.AccordionItem");
+ }
+
+ @Override
+ public String getFamily() {
+ return COMPONENT_FAMILY;
+ }
+
+ public String getHeaderClassActive() {
+ return (String) getStateHelper().eval(PropertyKeys.headerClassActive);
+ }
+
+ public void setHeaderClassActive(String headerClassActive) {
+ getStateHelper().put(PropertyKeys.headerClassActive, headerClassActive);
+ }
+
+ public String getHeaderClassDisabled() {
+ return (String) getStateHelper().eval(PropertyKeys.headerClassDisabled);
+ }
+
+ public void setHeaderClassDisabled(String headerClassDisabled) {
+ getStateHelper().put(PropertyKeys.headerClassDisabled, headerClassDisabled);
+ }
+
+ public String getHeaderClassInactive() {
+ return (String) getStateHelper().eval(PropertyKeys.headerClassInactive);
+ }
+
+ public void setHeaderClassInactive(String headerClassInactive) {
+ getStateHelper().put(PropertyKeys.headerClassInactive, headerClassInactive);
+ }
+
+ public String getHeaderClass() {
+ return (String) getStateHelper().eval(PropertyKeys.headerClass);
+ }
+
+ public void setHeaderClass(String headerClass) {
+ getStateHelper().put(PropertyKeys.headerClass, headerClass);
+ }
+
+ public String getHeaderStyle() {
+ return (String) getStateHelper().eval(PropertyKeys.headerStyle);
+ }
+
+ public void setHeaderStyle(String headerStyle) {
+ getStateHelper().put(PropertyKeys.headerStyle, headerStyle);
+ }
+
+ public String getContentClass() {
+ return (String) getStateHelper().eval(PropertyKeys.contentClass);
+ }
+
+ public void setContentClass(String contentClass) {
+ getStateHelper().put(PropertyKeys.contentClass, contentClass);
+ }
+
+ public String getOnheaderclick() {
+ return (String) getStateHelper().eval(PropertyKeys.onheaderclick);
+ }
+
+ public void setOnheaderclick(String onheaderclick) {
+ getStateHelper().put(PropertyKeys.onheaderclick, onheaderclick);
+ }
+
+ public String getOnheaderdblclick() {
+ return (String) getStateHelper().eval(PropertyKeys.onheaderdblclick);
+ }
+
+ public void setOnheaderdblclick(String onheaderdblclick) {
+ getStateHelper().put(PropertyKeys.onheaderdblclick, onheaderdblclick);
+ }
+
+ public String getOnheadermousedown() {
+ return (String) getStateHelper().eval(PropertyKeys.onheadermousedown);
+ }
+
+ public void setOnheadermousedown(String onheadermousedown) {
+ getStateHelper().put(PropertyKeys.onheadermousedown, onheadermousedown);
+ }
+
+ public String getOnheadermousemove() {
+ return (String) getStateHelper().eval(PropertyKeys.onheadermousemove);
+ }
+
+ public void setOnheadermousemove(String onheadermousemove) {
+ getStateHelper().put(PropertyKeys.onheadermousemove, onheadermousemove);
+ }
+
+ public String getOnheadermouseup() {
+ return (String) getStateHelper().eval(PropertyKeys.onheadermouseup);
+ }
+
+ public void setOnheadermouseup(String onheadermouseup) {
+ getStateHelper().put(PropertyKeys.onheadermouseup, onheadermouseup);
+ }
+
+ public String getOnenter() {
+ return (String) getStateHelper().eval(PropertyKeys.onenter);
+ }
+
+ public void setOnenter(String onenter) {
+ getStateHelper().put(PropertyKeys.onenter, onenter);
+ }
+
+ public String getOnleave() {
+ return (String) getStateHelper().eval(PropertyKeys.onleave);
+ }
+
+ public void setOnleave(String onleave) {
+ getStateHelper().put(PropertyKeys.onleave, onleave);
+ }
+
+ public String getLang() {
+ return (String) getStateHelper().eval(PropertyKeys.lang);
+ }
+
+ public void setLang(String lang) {
+ getStateHelper().put(PropertyKeys.lang, lang);
+ }
+
+ public String getTitle() {
+ return (String) getStateHelper().eval(PropertyKeys.title);
+ }
+
+ public void setTitle(String title) {
+ getStateHelper().put(PropertyKeys.title, title);
+ }
+
+ public String getStyle() {
+ return (String) getStateHelper().eval(PropertyKeys.style);
+ }
+
+ public void setStyle(String style) {
+ getStateHelper().put(PropertyKeys.style, style);
+ }
+
+ public String getStyleClass() {
+ return (String) getStateHelper().eval(PropertyKeys.styleClass);
+ }
+
+ public void setStyleClass(String styleClass) {
+ getStateHelper().put(PropertyKeys.styleClass, styleClass);
+ }
+
+ public String getDir() {
+ return (String) getStateHelper().eval(PropertyKeys.dir);
+ }
+
+ public void setDir(String dir) {
+ getStateHelper().put(PropertyKeys.dir, dir);
+ }
+
+ public String getOnclick() {
+ return (String) getStateHelper().eval(PropertyKeys.onclick);
+ }
+
+ public void setOnclick(String onclick) {
+ getStateHelper().put(PropertyKeys.onclick, onclick);
+ }
+
+ public String getOndblclick() {
+ return (String) getStateHelper().eval(PropertyKeys.ondblclick);
+ }
+
+ public void setOndblclick(String ondblclick) {
+ getStateHelper().put(PropertyKeys.ondblclick, ondblclick);
+ }
+
+ public String getOnmousedown() {
+ return (String) getStateHelper().eval(PropertyKeys.onmousedown);
+ }
+
+ public void setOnmousedown(String onmousedown) {
+ getStateHelper().put(PropertyKeys.onmousedown, onmousedown);
+ }
+
+ public String getOnmousemove() {
+ return (String) getStateHelper().eval(PropertyKeys.onmousemove);
+ }
+
+ public void setOnmousemove(String onmousemove) {
+ getStateHelper().put(PropertyKeys.onmousemove, onmousemove);
+ }
+
+ public String getOnmouseout() {
+ return (String) getStateHelper().eval(PropertyKeys.onmouseout);
+ }
+
+ public void setOnmouseout(String onmouseout) {
+ getStateHelper().put(PropertyKeys.onmouseout, onmouseout);
+ }
+
+ public String getOnmouseover() {
+ return (String) getStateHelper().eval(PropertyKeys.onmouseover);
+ }
+
+ public void setOnmouseover(String onmouseover) {
+ getStateHelper().put(PropertyKeys.onmouseover, onmouseover);
+ }
+
+ public String getOnmouseup() {
+ return (String) getStateHelper().eval(PropertyKeys.onmouseup);
+ }
+
+ public void setOnmouseup(String onmouseup) {
+ getStateHelper().put(PropertyKeys.onmouseup, onmouseup);
+ }
+
+
+
+ @Override
+ public Collection<String> getEventNames() {
+ return EVENT_NAMES;
+ }
+}
+
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlDivPanel.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlDivPanel.java 2010-08-13
14:10:24 UTC (rev 18620)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlDivPanel.java 2010-08-13
14:12:36 UTC (rev 18621)
@@ -22,28 +22,47 @@
package org.richfaces.component.html;
-
import org.richfaces.component.AbstractDivPanel;
+import javax.faces.component.behavior.ClientBehaviorHolder;
-public class HtmlDivPanel extends AbstractDivPanel {
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+/**
+ * @author akolonitsky
+ * @since 2010-08-13
+ */
+public class HtmlDivPanel extends AbstractDivPanel implements ClientBehaviorHolder {
+
public static final String COMPONENT_TYPE = "org.richfaces.DivPanel";
public static final String COMPONENT_FAMILY = "org.richfaces.DivPanel";
- private enum PropertyKeys {
+ private static final Collection<String> EVENT_NAMES =
Collections.unmodifiableCollection(Arrays.asList(
+ "click",
+ "dblclick",
+ "mousedown",
+ "mousemove",
+ "mouseout",
+ "mouseover",
+ "mouseup"
+ ));
+
+
+ public enum PropertyKeys {
lang,
+ title,
+ style,
+ styleClass,
+ dir,
onclick,
ondblclick,
onmousedown,
onmousemove,
onmouseout,
onmouseover,
- onmouseup,
- title,
- style,
- styleClass,
- dir
+ onmouseup
}
public HtmlDivPanel() {
@@ -56,15 +75,47 @@
}
public String getLang() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.lang));
+ return (String) getStateHelper().eval(PropertyKeys.lang);
}
public void setLang(String lang) {
getStateHelper().put(PropertyKeys.lang, lang);
}
+ public String getTitle() {
+ return (String) getStateHelper().eval(PropertyKeys.title);
+ }
+
+ public void setTitle(String title) {
+ getStateHelper().put(PropertyKeys.title, title);
+ }
+
+ public String getStyle() {
+ return (String) getStateHelper().eval(PropertyKeys.style);
+ }
+
+ public void setStyle(String style) {
+ getStateHelper().put(PropertyKeys.style, style);
+ }
+
+ public String getStyleClass() {
+ return (String) getStateHelper().eval(PropertyKeys.styleClass);
+ }
+
+ public void setStyleClass(String styleClass) {
+ getStateHelper().put(PropertyKeys.styleClass, styleClass);
+ }
+
+ public String getDir() {
+ return (String) getStateHelper().eval(PropertyKeys.dir);
+ }
+
+ public void setDir(String dir) {
+ getStateHelper().put(PropertyKeys.dir, dir);
+ }
+
public String getOnclick() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.onclick));
+ return (String) getStateHelper().eval(PropertyKeys.onclick);
}
public void setOnclick(String onclick) {
@@ -72,7 +123,7 @@
}
public String getOndblclick() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.ondblclick));
+ return (String) getStateHelper().eval(PropertyKeys.ondblclick);
}
public void setOndblclick(String ondblclick) {
@@ -80,7 +131,7 @@
}
public String getOnmousedown() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.onmousedown));
+ return (String) getStateHelper().eval(PropertyKeys.onmousedown);
}
public void setOnmousedown(String onmousedown) {
@@ -88,7 +139,7 @@
}
public String getOnmousemove() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.onmousemove));
+ return (String) getStateHelper().eval(PropertyKeys.onmousemove);
}
public void setOnmousemove(String onmousemove) {
@@ -96,7 +147,7 @@
}
public String getOnmouseout() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.onmouseout));
+ return (String) getStateHelper().eval(PropertyKeys.onmouseout);
}
public void setOnmouseout(String onmouseout) {
@@ -104,7 +155,7 @@
}
public String getOnmouseover() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.onmouseover));
+ return (String) getStateHelper().eval(PropertyKeys.onmouseover);
}
public void setOnmouseover(String onmouseover) {
@@ -112,45 +163,18 @@
}
public String getOnmouseup() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.onmouseup));
+ return (String) getStateHelper().eval(PropertyKeys.onmouseup);
}
public void setOnmouseup(String onmouseup) {
getStateHelper().put(PropertyKeys.onmouseup, onmouseup);
}
- public String getTitle() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.title));
- }
- public void setTitle(String title) {
- getStateHelper().put(PropertyKeys.title, title);
- }
- public String getStyle() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.style));
+ @Override
+ public Collection<String> getEventNames() {
+ return EVENT_NAMES;
}
-
- public void setStyle(String style) {
- getStateHelper().put(PropertyKeys.style, style);
- }
-
- public String getStyleClass() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.styleClass));
- }
-
- public void setStyleClass(String styleClass) {
- getStateHelper().put(PropertyKeys.styleClass, styleClass);
- }
-
- public String getDir() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.dir));
- }
-
- public void setDir(String dir) {
- getStateHelper().put(PropertyKeys.dir, dir);
- }
-
-
}
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTogglePanel.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTogglePanel.java 2010-08-13
14:10:24 UTC (rev 18620)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTogglePanel.java 2010-08-13
14:12:36 UTC (rev 18621)
@@ -23,49 +23,50 @@
package org.richfaces.component.html;
import org.richfaces.component.UITogglePanel;
-
import javax.faces.component.behavior.ClientBehaviorHolder;
+
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
-// TODO nick - no behaviors support! check Push renderer to implement
+/**
+ * @author akolonitsky
+ * @since 2010-08-13
+ */
public class HtmlTogglePanel extends UITogglePanel implements ClientBehaviorHolder {
- // todo Html prefix
public static final String COMPONENT_TYPE = "org.richfaces.TogglePanel";
public static final String COMPONENT_FAMILY = "org.richfaces.TogglePanel";
private static final Collection<String> EVENT_NAMES =
Collections.unmodifiableCollection(Arrays.asList(
+ "itemchange",
+ "beforeitemchange",
"click",
"dblclick",
"mousedown",
"mousemove",
"mouseout",
"mouseover",
- "mouseup",
- "complete",
- "beforedomupdate"
+ "mouseup"
));
- private enum PropertyKeys {
+
+ public enum PropertyKeys {
+ onitemchange,
+ onbeforeitemchange,
lang,
+ title,
+ style,
+ styleClass,
+ dir,
onclick,
ondblclick,
onmousedown,
onmousemove,
onmouseout,
onmouseover,
- onmouseup,
- title,
- style,
- styleClass,
- dir,
- oncomplete,
- onbeforedomupdate,
- onitemchange,
- onitemchanged
+ onmouseup
}
public HtmlTogglePanel() {
@@ -77,16 +78,64 @@
return COMPONENT_FAMILY;
}
+ public String getOnitemchange() {
+ return (String) getStateHelper().eval(PropertyKeys.onitemchange);
+ }
+
+ public void setOnitemchange(String onitemchange) {
+ getStateHelper().put(PropertyKeys.onitemchange, onitemchange);
+ }
+
+ public String getOnbeforeitemchange() {
+ return (String) getStateHelper().eval(PropertyKeys.onbeforeitemchange);
+ }
+
+ public void setOnbeforeitemchange(String onbeforeitemchange) {
+ getStateHelper().put(PropertyKeys.onbeforeitemchange, onbeforeitemchange);
+ }
+
public String getLang() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.lang));
+ return (String) getStateHelper().eval(PropertyKeys.lang);
}
public void setLang(String lang) {
getStateHelper().put(PropertyKeys.lang, lang);
}
+ public String getTitle() {
+ return (String) getStateHelper().eval(PropertyKeys.title);
+ }
+
+ public void setTitle(String title) {
+ getStateHelper().put(PropertyKeys.title, title);
+ }
+
+ public String getStyle() {
+ return (String) getStateHelper().eval(PropertyKeys.style);
+ }
+
+ public void setStyle(String style) {
+ getStateHelper().put(PropertyKeys.style, style);
+ }
+
+ public String getStyleClass() {
+ return (String) getStateHelper().eval(PropertyKeys.styleClass);
+ }
+
+ public void setStyleClass(String styleClass) {
+ getStateHelper().put(PropertyKeys.styleClass, styleClass);
+ }
+
+ public String getDir() {
+ return (String) getStateHelper().eval(PropertyKeys.dir);
+ }
+
+ public void setDir(String dir) {
+ getStateHelper().put(PropertyKeys.dir, dir);
+ }
+
public String getOnclick() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.onclick));
+ return (String) getStateHelper().eval(PropertyKeys.onclick);
}
public void setOnclick(String onclick) {
@@ -94,7 +143,7 @@
}
public String getOndblclick() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.ondblclick));
+ return (String) getStateHelper().eval(PropertyKeys.ondblclick);
}
public void setOndblclick(String ondblclick) {
@@ -102,7 +151,7 @@
}
public String getOnmousedown() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.onmousedown));
+ return (String) getStateHelper().eval(PropertyKeys.onmousedown);
}
public void setOnmousedown(String onmousedown) {
@@ -110,7 +159,7 @@
}
public String getOnmousemove() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.onmousemove));
+ return (String) getStateHelper().eval(PropertyKeys.onmousemove);
}
public void setOnmousemove(String onmousemove) {
@@ -118,7 +167,7 @@
}
public String getOnmouseout() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.onmouseout));
+ return (String) getStateHelper().eval(PropertyKeys.onmouseout);
}
public void setOnmouseout(String onmouseout) {
@@ -126,7 +175,7 @@
}
public String getOnmouseover() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.onmouseover));
+ return (String) getStateHelper().eval(PropertyKeys.onmouseover);
}
public void setOnmouseover(String onmouseover) {
@@ -134,79 +183,18 @@
}
public String getOnmouseup() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.onmouseup));
+ return (String) getStateHelper().eval(PropertyKeys.onmouseup);
}
public void setOnmouseup(String onmouseup) {
getStateHelper().put(PropertyKeys.onmouseup, onmouseup);
}
- public String getTitle() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.title));
- }
- public void setTitle(String title) {
- getStateHelper().put(PropertyKeys.title, title);
- }
- public String getStyle() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.style));
- }
-
- public void setStyle(String style) {
- getStateHelper().put(PropertyKeys.style, style);
- }
-
- public String getStyleClass() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.styleClass));
- }
-
- public void setStyleClass(String styleClass) {
- getStateHelper().put(PropertyKeys.styleClass, styleClass);
- }
-
- public String getDir() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.dir));
- }
-
- public void setDir(String dir) {
- getStateHelper().put(PropertyKeys.dir, dir);
- }
-
- public String getOncomplete() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.oncomplete));
- }
-
- public void setOncomplete(String oncomplete) {
- getStateHelper().put(PropertyKeys.oncomplete, oncomplete);
- }
-
- public String getOnbeforedomupdate() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.onbeforedomupdate));
- }
-
- public void setOnbeforedomupdate(String onbeforedomupdate) {
- getStateHelper().put(PropertyKeys.onbeforedomupdate, onbeforedomupdate);
- }
-
- public String getOnitemchange() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.onitemchange));
- }
-
- public void setOnitemchange(String onitemchange) {
- getStateHelper().put(PropertyKeys.onitemchange, onitemchange);
- }
-
- public String getOnitemchanged() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.onitemchanged));
- }
-
- public void setOnitemchanged(String onitemchanged) {
- getStateHelper().put(PropertyKeys.onitemchanged, onitemchanged);
- }
-
@Override
public Collection<String> getEventNames() {
return EVENT_NAMES;
}
}
+
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTogglePanelItem.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTogglePanelItem.java 2010-08-13
14:10:24 UTC (rev 18620)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTogglePanelItem.java 2010-08-13
14:12:36 UTC (rev 18621)
@@ -23,13 +23,16 @@
package org.richfaces.component.html;
import org.richfaces.component.UITogglePanelItem;
+import javax.faces.component.behavior.ClientBehaviorHolder;
-import javax.faces.component.behavior.ClientBehaviorHolder;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
-// TODO nick - no behaviors support!
+/**
+ * @author akolonitsky
+ * @since 2010-08-13
+ */
public class HtmlTogglePanelItem extends UITogglePanelItem implements
ClientBehaviorHolder {
public static final String COMPONENT_TYPE =
"org.richfaces.TogglePanelItem";
@@ -37,6 +40,8 @@
public static final String COMPONENT_FAMILY =
"org.richfaces.TogglePanelItem";
private static final Collection<String> EVENT_NAMES =
Collections.unmodifiableCollection(Arrays.asList(
+ "enter",
+ "leave",
"click",
"dblclick",
"mousedown",
@@ -46,21 +51,22 @@
"mouseup"
));
- private enum PropertyKeys {
+
+ public enum PropertyKeys {
+ onenter,
+ onleave,
lang,
+ title,
+ style,
+ styleClass,
+ dir,
onclick,
ondblclick,
onmousedown,
onmousemove,
onmouseout,
onmouseover,
- onmouseup,
- title,
- style,
- styleClass,
- dir,
- onenter,
- onleave
+ onmouseup
}
public HtmlTogglePanelItem() {
@@ -72,16 +78,64 @@
return COMPONENT_FAMILY;
}
+ public String getOnenter() {
+ return (String) getStateHelper().eval(PropertyKeys.onenter);
+ }
+
+ public void setOnenter(String onenter) {
+ getStateHelper().put(PropertyKeys.onenter, onenter);
+ }
+
+ public String getOnleave() {
+ return (String) getStateHelper().eval(PropertyKeys.onleave);
+ }
+
+ public void setOnleave(String onleave) {
+ getStateHelper().put(PropertyKeys.onleave, onleave);
+ }
+
public String getLang() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.lang));
+ return (String) getStateHelper().eval(PropertyKeys.lang);
}
public void setLang(String lang) {
getStateHelper().put(PropertyKeys.lang, lang);
}
+ public String getTitle() {
+ return (String) getStateHelper().eval(PropertyKeys.title);
+ }
+
+ public void setTitle(String title) {
+ getStateHelper().put(PropertyKeys.title, title);
+ }
+
+ public String getStyle() {
+ return (String) getStateHelper().eval(PropertyKeys.style);
+ }
+
+ public void setStyle(String style) {
+ getStateHelper().put(PropertyKeys.style, style);
+ }
+
+ public String getStyleClass() {
+ return (String) getStateHelper().eval(PropertyKeys.styleClass);
+ }
+
+ public void setStyleClass(String styleClass) {
+ getStateHelper().put(PropertyKeys.styleClass, styleClass);
+ }
+
+ public String getDir() {
+ return (String) getStateHelper().eval(PropertyKeys.dir);
+ }
+
+ public void setDir(String dir) {
+ getStateHelper().put(PropertyKeys.dir, dir);
+ }
+
public String getOnclick() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.onclick));
+ return (String) getStateHelper().eval(PropertyKeys.onclick);
}
public void setOnclick(String onclick) {
@@ -89,7 +143,7 @@
}
public String getOndblclick() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.ondblclick));
+ return (String) getStateHelper().eval(PropertyKeys.ondblclick);
}
public void setOndblclick(String ondblclick) {
@@ -97,7 +151,7 @@
}
public String getOnmousedown() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.onmousedown));
+ return (String) getStateHelper().eval(PropertyKeys.onmousedown);
}
public void setOnmousedown(String onmousedown) {
@@ -105,7 +159,7 @@
}
public String getOnmousemove() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.onmousemove));
+ return (String) getStateHelper().eval(PropertyKeys.onmousemove);
}
public void setOnmousemove(String onmousemove) {
@@ -113,7 +167,7 @@
}
public String getOnmouseout() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.onmouseout));
+ return (String) getStateHelper().eval(PropertyKeys.onmouseout);
}
public void setOnmouseout(String onmouseout) {
@@ -121,7 +175,7 @@
}
public String getOnmouseover() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.onmouseover));
+ return (String) getStateHelper().eval(PropertyKeys.onmouseover);
}
public void setOnmouseover(String onmouseover) {
@@ -129,61 +183,15 @@
}
public String getOnmouseup() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.onmouseup));
+ return (String) getStateHelper().eval(PropertyKeys.onmouseup);
}
public void setOnmouseup(String onmouseup) {
getStateHelper().put(PropertyKeys.onmouseup, onmouseup);
}
- public String getTitle() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.title));
- }
- public void setTitle(String title) {
- getStateHelper().put(PropertyKeys.title, title);
- }
- public String getStyle() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.style));
- }
-
- public void setStyle(String style) {
- getStateHelper().put(PropertyKeys.style, style);
- }
-
- public String getStyleClass() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.styleClass));
- }
-
- public void setStyleClass(String styleClass) {
- getStateHelper().put(PropertyKeys.styleClass, styleClass);
- }
-
- public String getDir() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.dir));
- }
-
- public void setDir(String dir) {
- getStateHelper().put(PropertyKeys.dir, dir);
- }
-
- public String getOnenter() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.onenter));
- }
-
- public void setOnenter(String onenter) {
- getStateHelper().put(PropertyKeys.onenter, onenter);
- }
-
- public String getOnleave() {
- return String.valueOf(getStateHelper().eval(PropertyKeys.onleave));
- }
-
- public void setOnleave(String onleave) {
- getStateHelper().put(PropertyKeys.onleave, onleave);
- }
-
@Override
public Collection<String> getEventNames() {
return EVENT_NAMES;
Added:
trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTogglePanelTitledItem.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTogglePanelTitledItem.java
(rev 0)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTogglePanelTitledItem.java 2010-08-13
14:12:36 UTC (rev 18621)
@@ -0,0 +1,304 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.component.html;
+
+import org.richfaces.component.UITogglePanelTitledItem;
+import javax.faces.component.behavior.ClientBehaviorHolder;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+
+/**
+ * @author akolonitsky
+ * @since 2010-08-13
+ */
+public class HtmlTogglePanelTitledItem extends UITogglePanelTitledItem implements
ClientBehaviorHolder {
+
+ public static final String COMPONENT_TYPE =
"org.richfaces.TogglePanelTitledItem";
+
+ public static final String COMPONENT_FAMILY =
"org.richfaces.TogglePanelTitledItem";
+
+ private static final Collection<String> EVENT_NAMES =
Collections.unmodifiableCollection(Arrays.asList(
+ "headerclick",
+ "headerdblclick",
+ "headermousedown",
+ "headermousemove",
+ "headermouseup",
+ "enter",
+ "leave",
+ "click",
+ "dblclick",
+ "mousedown",
+ "mousemove",
+ "mouseout",
+ "mouseover",
+ "mouseup"
+ ));
+
+
+ public enum PropertyKeys {
+ headerClassActive,
+ headerClassDisabled,
+ headerClassInactive,
+ headerClass,
+ headerStyle,
+ contentClass,
+ onheaderclick,
+ onheaderdblclick,
+ onheadermousedown,
+ onheadermousemove,
+ onheadermouseup,
+ onenter,
+ onleave,
+ lang,
+ title,
+ style,
+ styleClass,
+ dir,
+ onclick,
+ ondblclick,
+ onmousedown,
+ onmousemove,
+ onmouseout,
+ onmouseover,
+ onmouseup
+ }
+
+ public HtmlTogglePanelTitledItem() {
+ setRendererType("org.richfaces.TogglePanelTitledItem");
+ }
+
+ @Override
+ public String getFamily() {
+ return COMPONENT_FAMILY;
+ }
+
+ public String getHeaderClassActive() {
+ return (String) getStateHelper().eval(PropertyKeys.headerClassActive);
+ }
+
+ public void setHeaderClassActive(String headerClassActive) {
+ getStateHelper().put(PropertyKeys.headerClassActive, headerClassActive);
+ }
+
+ public String getHeaderClassDisabled() {
+ return (String) getStateHelper().eval(PropertyKeys.headerClassDisabled);
+ }
+
+ public void setHeaderClassDisabled(String headerClassDisabled) {
+ getStateHelper().put(PropertyKeys.headerClassDisabled, headerClassDisabled);
+ }
+
+ public String getHeaderClassInactive() {
+ return (String) getStateHelper().eval(PropertyKeys.headerClassInactive);
+ }
+
+ public void setHeaderClassInactive(String headerClassInactive) {
+ getStateHelper().put(PropertyKeys.headerClassInactive, headerClassInactive);
+ }
+
+ public String getHeaderClass() {
+ return (String) getStateHelper().eval(PropertyKeys.headerClass);
+ }
+
+ public void setHeaderClass(String headerClass) {
+ getStateHelper().put(PropertyKeys.headerClass, headerClass);
+ }
+
+ public String getHeaderStyle() {
+ return (String) getStateHelper().eval(PropertyKeys.headerStyle);
+ }
+
+ public void setHeaderStyle(String headerStyle) {
+ getStateHelper().put(PropertyKeys.headerStyle, headerStyle);
+ }
+
+ public String getContentClass() {
+ return (String) getStateHelper().eval(PropertyKeys.contentClass);
+ }
+
+ public void setContentClass(String contentClass) {
+ getStateHelper().put(PropertyKeys.contentClass, contentClass);
+ }
+
+ public String getOnheaderclick() {
+ return (String) getStateHelper().eval(PropertyKeys.onheaderclick);
+ }
+
+ public void setOnheaderclick(String onheaderclick) {
+ getStateHelper().put(PropertyKeys.onheaderclick, onheaderclick);
+ }
+
+ public String getOnheaderdblclick() {
+ return (String) getStateHelper().eval(PropertyKeys.onheaderdblclick);
+ }
+
+ public void setOnheaderdblclick(String onheaderdblclick) {
+ getStateHelper().put(PropertyKeys.onheaderdblclick, onheaderdblclick);
+ }
+
+ public String getOnheadermousedown() {
+ return (String) getStateHelper().eval(PropertyKeys.onheadermousedown);
+ }
+
+ public void setOnheadermousedown(String onheadermousedown) {
+ getStateHelper().put(PropertyKeys.onheadermousedown, onheadermousedown);
+ }
+
+ public String getOnheadermousemove() {
+ return (String) getStateHelper().eval(PropertyKeys.onheadermousemove);
+ }
+
+ public void setOnheadermousemove(String onheadermousemove) {
+ getStateHelper().put(PropertyKeys.onheadermousemove, onheadermousemove);
+ }
+
+ public String getOnheadermouseup() {
+ return (String) getStateHelper().eval(PropertyKeys.onheadermouseup);
+ }
+
+ public void setOnheadermouseup(String onheadermouseup) {
+ getStateHelper().put(PropertyKeys.onheadermouseup, onheadermouseup);
+ }
+
+ public String getOnenter() {
+ return (String) getStateHelper().eval(PropertyKeys.onenter);
+ }
+
+ public void setOnenter(String onenter) {
+ getStateHelper().put(PropertyKeys.onenter, onenter);
+ }
+
+ public String getOnleave() {
+ return (String) getStateHelper().eval(PropertyKeys.onleave);
+ }
+
+ public void setOnleave(String onleave) {
+ getStateHelper().put(PropertyKeys.onleave, onleave);
+ }
+
+ public String getLang() {
+ return (String) getStateHelper().eval(PropertyKeys.lang);
+ }
+
+ public void setLang(String lang) {
+ getStateHelper().put(PropertyKeys.lang, lang);
+ }
+
+ public String getTitle() {
+ return (String) getStateHelper().eval(PropertyKeys.title);
+ }
+
+ public void setTitle(String title) {
+ getStateHelper().put(PropertyKeys.title, title);
+ }
+
+ public String getStyle() {
+ return (String) getStateHelper().eval(PropertyKeys.style);
+ }
+
+ public void setStyle(String style) {
+ getStateHelper().put(PropertyKeys.style, style);
+ }
+
+ public String getStyleClass() {
+ return (String) getStateHelper().eval(PropertyKeys.styleClass);
+ }
+
+ public void setStyleClass(String styleClass) {
+ getStateHelper().put(PropertyKeys.styleClass, styleClass);
+ }
+
+ public String getDir() {
+ return (String) getStateHelper().eval(PropertyKeys.dir);
+ }
+
+ public void setDir(String dir) {
+ getStateHelper().put(PropertyKeys.dir, dir);
+ }
+
+ public String getOnclick() {
+ return (String) getStateHelper().eval(PropertyKeys.onclick);
+ }
+
+ public void setOnclick(String onclick) {
+ getStateHelper().put(PropertyKeys.onclick, onclick);
+ }
+
+ public String getOndblclick() {
+ return (String) getStateHelper().eval(PropertyKeys.ondblclick);
+ }
+
+ public void setOndblclick(String ondblclick) {
+ getStateHelper().put(PropertyKeys.ondblclick, ondblclick);
+ }
+
+ public String getOnmousedown() {
+ return (String) getStateHelper().eval(PropertyKeys.onmousedown);
+ }
+
+ public void setOnmousedown(String onmousedown) {
+ getStateHelper().put(PropertyKeys.onmousedown, onmousedown);
+ }
+
+ public String getOnmousemove() {
+ return (String) getStateHelper().eval(PropertyKeys.onmousemove);
+ }
+
+ public void setOnmousemove(String onmousemove) {
+ getStateHelper().put(PropertyKeys.onmousemove, onmousemove);
+ }
+
+ public String getOnmouseout() {
+ return (String) getStateHelper().eval(PropertyKeys.onmouseout);
+ }
+
+ public void setOnmouseout(String onmouseout) {
+ getStateHelper().put(PropertyKeys.onmouseout, onmouseout);
+ }
+
+ public String getOnmouseover() {
+ return (String) getStateHelper().eval(PropertyKeys.onmouseover);
+ }
+
+ public void setOnmouseover(String onmouseover) {
+ getStateHelper().put(PropertyKeys.onmouseover, onmouseover);
+ }
+
+ public String getOnmouseup() {
+ return (String) getStateHelper().eval(PropertyKeys.onmouseup);
+ }
+
+ public void setOnmouseup(String onmouseup) {
+ getStateHelper().put(PropertyKeys.onmouseup, onmouseup);
+ }
+
+
+
+ @Override
+ public Collection<String> getEventNames() {
+ return EVENT_NAMES;
+ }
+}
+
Added:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemRenderer.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemRenderer.java
(rev 0)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemRenderer.java 2010-08-13
14:12:36 UTC (rev 18621)
@@ -0,0 +1,165 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.renderkit.html;
+
+import org.ajax4jsf.javascript.JSObject;
+import org.ajax4jsf.renderkit.RendererUtils;
+import org.richfaces.component.AbstractTogglePanelItem;
+import org.richfaces.component.AbstractTogglePanelTitledItem;
+
+import javax.faces.application.ResourceDependencies;
+import javax.faces.application.ResourceDependency;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import java.io.IOException;
+
+/**
+ *
+ * <div id="clientId" class="rf-aci">
+ * <div id="clientId:header" class="rf-aci-h">
+ * <div class="rf-aci-h-inactive">Level 1</div>
+ * <div class="rf-aci-h-active" >Level 1</div>
+ * <div class="rf-aci-h-disabled">Level 1</div>
+ * </div>
+ * <div id="clientId:content" class="rf-aci-c">
+ * Content will be here.
+ * </div>
+ * </div>
+ *
+ * @author akolonitsky
+ * @since 2010-08-05
+ */
+@ResourceDependencies({ // TODO review
+ @ResourceDependency(library = "javax.faces", name = "jsf.js"),
+ @ResourceDependency(name = "jquery.js"),
+ @ResourceDependency(name = "richfaces.js"),
+ @ResourceDependency(name = "richfaces-event.js"),
+ @ResourceDependency(name = "richfaces-base-component.js"),
+ @ResourceDependency(library = "org.richfaces", name =
"TogglePanelItem.js"),
+ @ResourceDependency(library = "org.richfaces", name =
"AccordionItem.js")
+ })
+public class AccordionItemRenderer extends TogglePanelItemRenderer {
+
+ @Override
+ protected void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent
component) throws IOException {
+ super.doEncodeBegin(writer, context, component);
+
+ encodeHeader(context, component, writer);
+
+ encodeContentBegin(component, writer);
+ }
+
+ @Override
+ protected String getStyleClass(UIComponent component) {
+ return "rf-aci " + attributeAsString(component,
"styleClass");
+ }
+
+ @Override
+ protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent
component) throws IOException {
+ encodeContentEnd(component, writer);
+
+ super.doEncodeEnd(writer, context, component); //To change body of overridden
methods use File | Settings | File Templates.
+ }
+
+ @Override
+ protected void writeJavaScript(ResponseWriter writer, FacesContext context,
UIComponent component) throws IOException {
+ // todo how to call method from parent of parent class?
+
+ Object script = getScriptObject(context, component);
+ if (script != null) {
+ writer.startElement(RendererUtils.HTML.SCRIPT_ELEM, component);
+ writer.writeAttribute(RendererUtils.HTML.TYPE_ATTR,
"text/javascript", "type");
+ writer.writeText(script, null);
+ writer.endElement(RendererUtils.HTML.SCRIPT_ELEM);
+ }
+ }
+
+ private void encodeContentBegin(UIComponent component, ResponseWriter writer) throws
IOException {
+ writer.startElement("div", component);
+ writer.writeAttribute("class", "rf-aci-c " +
attributeAsString(component, "contentClass"), null);
+ writer.writeAttribute("id", component.getClientId() +
":content", null);
+
+ if (!((AbstractTogglePanelItem) component).isActive()) {
+ writer.writeAttribute("style", "display: none", null);
+ }
+ }
+
+ private void encodeContentEnd(UIComponent component, ResponseWriter responseWriter)
throws IOException {
+ responseWriter.endElement("div");
+ }
+
+ private void encodeHeader(FacesContext facesContext, UIComponent component,
ResponseWriter responseWriter) throws IOException {
+
+ responseWriter.startElement("div", component);
+ responseWriter.writeAttribute("class", "rf-aci-h " +
attributeAsString(component, "contentClass"), null);
+ responseWriter.writeAttribute("id", component.getClientId() +
":header", null);
+
+ AbstractTogglePanelTitledItem titledItem = (AbstractTogglePanelTitledItem)
component;
+ boolean isActive = titledItem.isActive();
+ boolean isDisabled = titledItem.isDisabled();
+ encodeHeader(facesContext, component, responseWriter, "inactive",
!isActive && !isDisabled);
+ encodeHeader(facesContext, component, responseWriter, "active",
isActive && !isDisabled);
+ encodeHeader(facesContext, component, responseWriter, "disable",
isDisabled);
+
+ responseWriter.endElement("div");
+ }
+
+ private void encodeHeader(FacesContext facesContext, UIComponent component,
ResponseWriter writer,
+ String state, Boolean isDisplay) throws IOException {
+
+ writer.startElement("div", component);
+
+ if (!isDisplay) {
+ writer.writeAttribute("style", "display : none", null);
+ }
+
+ String name = "headerClass" + capitalize(state);
+ writer.writeAttribute("class", "rf-aci-h-" + state + "
" + attributeAsString(component, name), name);
+
+
+ UIComponent headerFacet = component.getFacet("header");
+ if (headerFacet != null && headerFacet.isRendered()) {
+ headerFacet.encodeAll(facesContext);
+ } else {
+ Object headerText = component.getAttributes().get("header");
+ if (headerText != null && !headerText.equals("")) {
+ writer.writeText(headerText, null);
+ }
+ }
+
+ writer.endElement("div");
+ }
+
+ @Override
+ protected JSObject getScriptObject(FacesContext context, UIComponent component) {
+ return new JSObject("RichFaces.ui.AccordionItem",
component.getClientId(),
+ getScriptObjectOptions(context, component));
+ }
+
+ @Override
+ protected Class<? extends UIComponent> getComponentClass() {
+ return AbstractTogglePanelTitledItem.class;
+ }
+}
+
Added:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionRenderer.java
(rev 0)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionRenderer.java 2010-08-13
14:12:36 UTC (rev 18621)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.renderkit.html;
+
+import org.ajax4jsf.javascript.JSObject;
+import org.ajax4jsf.renderkit.RendererUtils;
+import org.richfaces.component.AbstractAccordion;
+
+import javax.faces.application.ResourceDependencies;
+import javax.faces.application.ResourceDependency;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * @author akolonitsky
+ * @since 2010-08-05
+ */
+@ResourceDependencies( { // TODO review
+ @ResourceDependency(library = "javax.faces", name = "jsf.js"),
+ @ResourceDependency(name = "jquery.js"),
+ @ResourceDependency(name = "richfaces.js"),
+ @ResourceDependency(name = "richfaces-base-component.js"),
+ @ResourceDependency(library = "org.richfaces", name =
"accordion.ecss"),
+ @ResourceDependency(library = "org.richfaces", name =
"TogglePanel.js"),
+ @ResourceDependency(library = "org.richfaces", name =
"Accordion.js") })
+public class AccordionRenderer extends TogglePanelRenderer {
+
+ @Override
+ protected void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent
component) throws IOException {
+ super.doEncodeBegin(writer, context, component);
+
+ writeJavaScript(writer, context, component);
+ }
+
+ @Override
+ protected String getStyleClass(UIComponent component) {
+ return "rf-ac" + attributeAsString(component, "styleClass");
+ }
+
+ @Override
+ protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent
component) throws IOException {
+ writer.endElement(RendererUtils.HTML.DIV_ELEM);
+ }
+
+ @Override
+ protected Class<? extends UIComponent> getComponentClass() {
+ return AbstractAccordion.class;
+ }
+
+ @Override
+ protected JSObject getScriptObject(FacesContext context, UIComponent component) {
+ return new JSObject("RichFaces.ui.Accordion",
+ component.getClientId(), getScriptObjectOptions(context, component));
+ }
+
+ @Override
+ protected Map<String, Object> getScriptObjectOptions(FacesContext context,
UIComponent component) {
+ Map<String, Object> options = super.getScriptObjectOptions(context,
component);
+ options.remove("items");
+
+ return options;
+ }
+}
+
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/DivPanelRenderer.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/DivPanelRenderer.java 2010-08-13
14:10:24 UTC (rev 18620)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/DivPanelRenderer.java 2010-08-13
14:12:36 UTC (rev 18621)
@@ -22,17 +22,20 @@
package org.richfaces.renderkit.html;
-import java.io.IOException;
-import java.util.Map;
+import org.ajax4jsf.renderkit.RendererBase;
+import org.ajax4jsf.renderkit.RendererUtils.HTML;
+import org.richfaces.component.AbstractDivPanel;
+import org.richfaces.renderkit.RenderKitUtils;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
+import java.io.IOException;
+import java.util.Map;
-import org.ajax4jsf.renderkit.RendererBase;
-import org.ajax4jsf.renderkit.RendererUtils;
-import org.ajax4jsf.renderkit.RendererUtils.HTML;
-import org.richfaces.component.AbstractDivPanel;
+import static org.richfaces.component.html.HtmlDivPanel.PropertyKeys.*;
+import static org.richfaces.renderkit.RenderKitUtils.attributes;
+import static org.richfaces.renderkit.RenderKitUtils.renderPassThroughAttributes;
/**
* @author akolonitsky
@@ -40,30 +43,48 @@
*/
public class DivPanelRenderer extends RendererBase {
- public static final String[] ATTRIBUTES = new String[] {
- "lang",
- "onclick",
- "ondblclick",
- "onmousedown",
- "onmousemove",
- "onmouseout",
- "onmouseover",
- "onmouseup",
- "title",
- "style",
- "styleClass",
- "dir",
- };
+ private static final RenderKitUtils.Attributes PASS_THROUGH_ATTRIBUTES0 =
attributes(
+ lang,
+ onclick,
+ ondblclick,
+ onmousedown,
+ onmousemove,
+ onmouseout,
+ onmouseover,
+ onmouseup,
+ title,
+ style,
+ dir
+ );
+ protected static String attributeAsString(UIComponent comp, String attr) {
+ Object o = comp.getAttributes().get(attr);
+ return o == null ? "" : o.toString();
+ }
+
+ /**
+ * Capitalize the first character of the given string.
+ *
+ * @param string String to capitalize.
+ * @return Capitalized string.
+ * @throws IllegalArgumentException String is <kk>null</kk> or empty.
+ */
+ protected static String capitalize(final String string) {
+ return Character.toUpperCase(string.charAt(0)) + string.substring(1);
+ }
+
@Override
protected void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent
component) throws IOException {
super.doEncodeBegin(writer, context, component);
writer.startElement(HTML.DIV_ELEM, component);
writer.writeAttribute("id", component.getClientId(context),
"clientId");
+ writer.writeAttribute("class", getStyleClass(component), null);
+ renderPassThroughAttributes(context, component, PASS_THROUGH_ATTRIBUTES0);
+ }
- RendererUtils.getInstance()
- .encodeAttributesFromArray(context, component, ATTRIBUTES);
+ protected String getStyleClass(UIComponent component) {
+ return attributeAsString(component, "styleClass");
}
@Override
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TogglePanelItemRenderer.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TogglePanelItemRenderer.java 2010-08-13
14:10:24 UTC (rev 18620)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TogglePanelItemRenderer.java 2010-08-13
14:12:36 UTC (rev 18621)
@@ -22,19 +22,19 @@
package org.richfaces.renderkit.html;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
+import org.ajax4jsf.javascript.JSObject;
+import org.richfaces.component.AbstractTogglePanel;
+import org.richfaces.component.AbstractTogglePanelItem;
import javax.faces.application.ResourceDependencies;
import javax.faces.application.ResourceDependency;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
-import org.ajax4jsf.javascript.JSObject;
-import org.richfaces.component.AbstractTogglePanelItem;
-
/**
* @author akolonitsky
* @since -4712-01-01
@@ -73,6 +73,10 @@
options.put("togglePanelId", panelItem.getParent().getClientId());
options.put("switchMode", panelItem.getSwitchType());
+ AbstractTogglePanelItem item = (AbstractTogglePanelItem) component;
+ AbstractTogglePanel panel = item.getParent();
+ options.put("index", panel.getChildIndex(item.getName()));
+
TogglePanelRenderer.addEventOption(context, component, options, LEAVE);
TogglePanelRenderer.addEventOption(context, component, options, ENTER);
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/view/facelets/html/TogglePanelTagHandler.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/view/facelets/html/TogglePanelTagHandler.java 2010-08-13
14:10:24 UTC (rev 18620)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/view/facelets/html/TogglePanelTagHandler.java 2010-08-13
14:12:36 UTC (rev 18621)
@@ -22,6 +22,11 @@
package org.richfaces.view.facelets.html;
+import org.richfaces.component.AbstractTogglePanel;
+
+import org.richfaces.event.MethodExpressionItemChangeListener;
+import org.richfaces.event.ItemChangeEvent;
+
import javax.faces.view.facelets.ComponentConfig;
import javax.faces.view.facelets.ComponentHandler;
import javax.faces.view.facelets.FaceletContext;
@@ -31,14 +36,9 @@
import javax.faces.view.facelets.MetadataTarget;
import javax.faces.view.facelets.TagAttribute;
-import org.richfaces.component.AbstractTogglePanel;
-import org.richfaces.event.ItemChangeEvent;
-import org.richfaces.event.MethodExpressionItemChangeListener;
-
/**
* @author akolonitsky
- * @version 1.0
- * @since -4712-01-01
+ * @since 2010-08-13
*/
public class TogglePanelTagHandler extends ComponentHandler {
Modified: trunk/ui/output/ui/src/main/resources/META-INF/MANIFEST.MF
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/MANIFEST.MF 2010-08-13 14:10:24 UTC
(rev 18620)
+++ trunk/ui/output/ui/src/main/resources/META-INF/MANIFEST.MF 2010-08-13 14:12:36 UTC
(rev 18621)
@@ -1,3 +1,6 @@
Manifest-Version: 1.0
-Class-Path:
+Archiver-Version: Plexus Archiver
+Created-By: Apache Maven
+Built-By: akolonitsky
+Build-Jdk: 1.6.0_07
Modified: trunk/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml 2010-08-13 14:10:24
UTC (rev 18620)
+++ trunk/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml 2010-08-13 14:12:36
UTC (rev 18621)
@@ -11,46 +11,86 @@
</behavior>
<component>
- <component-type>org.richfaces.DivPanel</component-type>
-
<component-class>org.richfaces.component.html.HtmlDivPanel</component-class>
+ <component-type>org.richfaces.TogglePanel</component-type>
+
<component-class>org.richfaces.component.html.HtmlTogglePanel</component-class>
<property>
<description></description>
- <property-name>lang</property-name>
- <property-class>java.lang.String</property-class>
+ <property-name>switchType</property-name>
+
<property-class>org.richfaces.component.SwitchType</property-class>
</property>
<property>
<description></description>
- <property-name>onclick</property-name>
+ <property-name>activeItem</property-name>
<property-class>java.lang.String</property-class>
</property>
<property>
<description></description>
- <property-name>ondblclick</property-name>
- <property-class>java.lang.String</property-class>
+ <property-name>bypassUpdates</property-name>
+ <property-class>boolean</property-class>
</property>
<property>
<description></description>
- <property-name>onmousedown</property-name>
+ <property-name>limitToList</property-name>
+ <property-class>boolean</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>data</property-name>
+ <property-class>java.lang.Object</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>status</property-name>
<property-class>java.lang.String</property-class>
</property>
<property>
<description></description>
- <property-name>onmousemove</property-name>
+ <property-name>execute</property-name>
+ <property-class>java.lang.Object</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>render</property-name>
+ <property-class>java.lang.Object</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>immediate</property-name>
+ <property-class>boolean</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>itemChangeListener</property-name>
+ <property-class>javax.el.MethodExpression</property-class>
+ </property>
+ <property>
+ <description>Long long text</description>
+ <property-name>id</property-name>
<property-class>java.lang.String</property-class>
</property>
<property>
+ <description>binding description</description>
+ <property-name>binding</property-name>
+
<property-class>javax.faces.component.UIComponent</property-class>
+ </property>
+ <property>
+ <description>I don't know maybe some thing
strange</description>
+ <property-name>rendered</property-name>
+ <property-class>boolean</property-class>
+ </property>
+ <property>
<description></description>
- <property-name>onmouseout</property-name>
+ <property-name>onitemchange</property-name>
<property-class>java.lang.String</property-class>
</property>
<property>
<description></description>
- <property-name>onmouseover</property-name>
+ <property-name>onbeforeitemchange</property-name>
<property-class>java.lang.String</property-class>
</property>
<property>
<description></description>
- <property-name>onmouseup</property-name>
+ <property-name>lang</property-name>
<property-class>java.lang.String</property-class>
</property>
<property>
@@ -74,67 +114,87 @@
<property-class>java.lang.String</property-class>
</property>
<property>
- <description>Long long text</description>
- <property-name>id</property-name>
+ <description></description>
+ <property-name>onclick</property-name>
<property-class>java.lang.String</property-class>
</property>
<property>
- <description>binding description</description>
- <property-name>binding</property-name>
-
<property-class>javax.faces.component.UIComponent</property-class>
+ <description></description>
+ <property-name>ondblclick</property-name>
+ <property-class>java.lang.String</property-class>
</property>
<property>
- <description>I don't know maybe some thing
strange</description>
- <property-name>rendered</property-name>
- <property-class>boolean</property-class>
+ <description></description>
+ <property-name>onmousedown</property-name>
+ <property-class>java.lang.String</property-class>
</property>
-
- </component>
- <component>
- <component-type>org.richfaces.TogglePanel</component-type>
-
<component-class>org.richfaces.component.html.HtmlTogglePanel</component-class>
<property>
<description></description>
- <property-name>lang</property-name>
+ <property-name>onmousemove</property-name>
<property-class>java.lang.String</property-class>
</property>
<property>
<description></description>
- <property-name>onclick</property-name>
+ <property-name>onmouseout</property-name>
<property-class>java.lang.String</property-class>
</property>
<property>
<description></description>
- <property-name>ondblclick</property-name>
+ <property-name>onmouseover</property-name>
<property-class>java.lang.String</property-class>
</property>
<property>
<description></description>
- <property-name>onmousedown</property-name>
+ <property-name>onmouseup</property-name>
<property-class>java.lang.String</property-class>
</property>
+
+ </component>
+ <component>
+ <component-type>org.richfaces.TogglePanelItem</component-type>
+
<component-class>org.richfaces.component.html.HtmlTogglePanelItem</component-class>
<property>
<description></description>
- <property-name>onmousemove</property-name>
+ <property-name>name</property-name>
<property-class>java.lang.String</property-class>
</property>
<property>
<description></description>
- <property-name>onmouseout</property-name>
+ <property-name>switchType</property-name>
+
<property-class>org.richfaces.component.SwitchType</property-class>
+ </property>
+ <property>
+ <description>Long long text</description>
+ <property-name>id</property-name>
<property-class>java.lang.String</property-class>
</property>
<property>
+ <description>binding description</description>
+ <property-name>binding</property-name>
+
<property-class>javax.faces.component.UIComponent</property-class>
+ </property>
+ <property>
+ <description>I don't know maybe some thing
strange</description>
+ <property-name>rendered</property-name>
+ <property-class>boolean</property-class>
+ </property>
+ <property>
<description></description>
- <property-name>onmouseover</property-name>
+ <property-name>onenter</property-name>
<property-class>java.lang.String</property-class>
</property>
<property>
<description></description>
- <property-name>onmouseup</property-name>
+ <property-name>onleave</property-name>
<property-class>java.lang.String</property-class>
</property>
<property>
<description></description>
+ <property-name>lang</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
<property-name>title</property-name>
<property-class>java.lang.String</property-class>
</property>
@@ -154,40 +214,45 @@
<property-class>java.lang.String</property-class>
</property>
<property>
- <description>Long long text</description>
- <property-name>id</property-name>
+ <description></description>
+ <property-name>onclick</property-name>
<property-class>java.lang.String</property-class>
</property>
<property>
- <description>binding description</description>
- <property-name>binding</property-name>
-
<property-class>javax.faces.component.UIComponent</property-class>
+ <description></description>
+ <property-name>ondblclick</property-name>
+ <property-class>java.lang.String</property-class>
</property>
<property>
- <description>I don't know maybe some thing
strange</description>
- <property-name>rendered</property-name>
- <property-class>boolean</property-class>
+ <description></description>
+ <property-name>onmousedown</property-name>
+ <property-class>java.lang.String</property-class>
</property>
<property>
<description></description>
- <property-name>oncomplete</property-name>
+ <property-name>onmousemove</property-name>
<property-class>java.lang.String</property-class>
</property>
<property>
<description></description>
- <property-name>onbeforedomupdate</property-name>
+ <property-name>onmouseout</property-name>
<property-class>java.lang.String</property-class>
</property>
<property>
<description></description>
- <property-name>onitemchange</property-name>
+ <property-name>onmouseover</property-name>
<property-class>java.lang.String</property-class>
</property>
<property>
<description></description>
- <property-name>onitemchanged</property-name>
+ <property-name>onmouseup</property-name>
<property-class>java.lang.String</property-class>
</property>
+
+ </component>
+ <component>
+ <component-type>org.richfaces.Accordion</component-type>
+
<component-class>org.richfaces.component.html.HtmlAccordion</component-class>
<property>
<description></description>
<property-name>switchType</property-name>
@@ -238,18 +303,83 @@
<property-name>itemChangeListener</property-name>
<property-class>javax.el.MethodExpression</property-class>
</property>
-
- </component>
- <component>
- <component-type>org.richfaces.TogglePanelItem</component-type>
-
<component-class>org.richfaces.component.html.HtmlTogglePanelItem</component-class>
<property>
+ <description>Long long text</description>
+ <property-name>id</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description>binding description</description>
+ <property-name>binding</property-name>
+
<property-class>javax.faces.component.UIComponent</property-class>
+ </property>
+ <property>
+ <description>I don't know maybe some thing
strange</description>
+ <property-name>rendered</property-name>
+ <property-class>boolean</property-class>
+ </property>
+ <property>
<description></description>
+ <property-name>itemHeaderClassActive</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>itemHeaderClassDisabled</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>itemHeaderClassInactive</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>itemContentClass</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>itemHeaderClass</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>onitemchange</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>onbeforeitemchange</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
<property-name>lang</property-name>
<property-class>java.lang.String</property-class>
</property>
<property>
<description></description>
+ <property-name>title</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>style</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>styleClass</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>dir</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
<property-name>onclick</property-name>
<property-class>java.lang.String</property-class>
</property>
@@ -283,25 +413,30 @@
<property-name>onmouseup</property-name>
<property-class>java.lang.String</property-class>
</property>
+
+ </component>
+ <component>
+ <component-type>org.richfaces.TogglePanelTitledItem</component-type>
+
<component-class>org.richfaces.component.html.HtmlAccordionItem</component-class>
<property>
<description></description>
- <property-name>title</property-name>
- <property-class>java.lang.String</property-class>
+ <property-name>disabled</property-name>
+ <property-class>boolean</property-class>
</property>
<property>
<description></description>
- <property-name>style</property-name>
+ <property-name>label</property-name>
<property-class>java.lang.String</property-class>
</property>
<property>
<description></description>
- <property-name>styleClass</property-name>
+ <property-name>name</property-name>
<property-class>java.lang.String</property-class>
</property>
<property>
<description></description>
- <property-name>dir</property-name>
- <property-class>java.lang.String</property-class>
+ <property-name>switchType</property-name>
+
<property-class>org.richfaces.component.SwitchType</property-class>
</property>
<property>
<description>Long long text</description>
@@ -320,16 +455,61 @@
</property>
<property>
<description></description>
- <property-name>name</property-name>
+ <property-name>headerClassActive</property-name>
<property-class>java.lang.String</property-class>
</property>
<property>
<description></description>
- <property-name>switchType</property-name>
-
<property-class>org.richfaces.component.SwitchType</property-class>
+ <property-name>headerClassDisabled</property-name>
+ <property-class>java.lang.String</property-class>
</property>
<property>
<description></description>
+ <property-name>headerClassInactive</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>headerClass</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>headerStyle</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>contentClass</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>onheaderclick</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>onheaderdblclick</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>onheadermousedown</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>onheadermousemove</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>onheadermouseup</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
<property-name>onenter</property-name>
<property-class>java.lang.String</property-class>
</property>
@@ -338,18 +518,72 @@
<property-name>onleave</property-name>
<property-class>java.lang.String</property-class>
</property>
+ <property>
+ <description></description>
+ <property-name>lang</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>title</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>style</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>styleClass</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>dir</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>onclick</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>ondblclick</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>onmousedown</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>onmousemove</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>onmouseout</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>onmouseover</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>onmouseup</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
</component>
-
<render-kit>
<render-kit-id>HTML_BASIC</render-kit-id>
<renderer>
- <component-family>org.richfaces.DivPanel</component-family>
- <renderer-type>org.richfaces.DivPanel</renderer-type>
-
<renderer-class>org.richfaces.renderkit.html.DivPanelRenderer</renderer-class>
- </renderer>
- <renderer>
<component-family>org.richfaces.TogglePanel</component-family>
<renderer-type>org.richfaces.TogglePanel</renderer-type>
<renderer-class>org.richfaces.renderkit.html.TogglePanelRenderer</renderer-class>
@@ -359,13 +593,38 @@
<renderer-type>org.richfaces.TogglePanelItem</renderer-type>
<renderer-class>org.richfaces.renderkit.html.TogglePanelItemRenderer</renderer-class>
</renderer>
-
+ <renderer>
+ <component-family>org.richfaces.Accordion</component-family>
+ <renderer-type>org.richfaces.Accordion</renderer-type>
+
<renderer-class>org.richfaces.renderkit.html.AccordionRenderer</renderer-class>
+ </renderer>
+ <renderer>
+
<component-family>org.richfaces.TogglePanelTitledItem</component-family>
+ <renderer-type>org.richfaces.AccordionItem</renderer-type>
+
<renderer-class>org.richfaces.renderkit.html.AccordionItemRenderer</renderer-class>
+ </renderer>
+ <renderer>
+ <component-family>org.richfaces.Panel</component-family>
+ <renderer-type>org.richfaces.PanelRenderer</renderer-type>
+
<renderer-class>org.richfaces.renderkit.html.PanelRenderer</renderer-class>
+ <renderer-extension>
+ <cdk:renders-children>false</cdk:renders-children>
+ </renderer-extension>
+ </renderer>
+ <renderer>
+ <component-family>org.richfaces.PopupPanel</component-family>
+ <renderer-type>org.richfaces.PopupPanelRenderer</renderer-type>
+
<renderer-class>org.richfaces.renderkit.html.PopupPanelRenderer</renderer-class>
+ <renderer-extension>
+ <cdk:renders-children>false</cdk:renders-children>
+ </renderer-extension>
+ </renderer>
</render-kit>
<faces-config-extension>
<cdk:taglib>
- <cdk:shortName></cdk:shortName>
- <cdk:uri></cdk:uri>
+ <cdk:shortName>output</cdk:shortName>
+ <
cdk:uri>http://richfaces.org/output</cdk:uri>
</cdk:taglib>
</faces-config-extension>
</faces-config>
Modified: trunk/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml 2010-08-13 14:10:24 UTC
(rev 18620)
+++ trunk/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml 2010-08-13 14:12:36 UTC
(rev 18621)
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<facelet-taglib
xmlns="http://java.sun.com/xml/ns/javaee"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
-
http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
- version="2.0" id="pn">
- <
namespace>http://richfaces.org/panels</namespace>
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+
http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
version="2.0" id="output">
+ <
namespace>http://richfaces.org/output</namespace>
+
<tag>
<tag-name>toggleControl</tag-name>
<behavior>
@@ -14,99 +14,125 @@
</behavior>
</tag>
<tag>
- <tag-name>divPanel</tag-name>
+ <tag-name>panel</tag-name>
<component>
- <component-type>org.richfaces.DivPanel</component-type>
- <renderer-type>org.richfaces.DivPanel</renderer-type>
+ <component-type>org.richfaces.Panel</component-type>
+ <renderer-type>org.richfaces.PanelRenderer</renderer-type>
</component>
+ </tag>
+ <tag>
+ <tag-name>popupPanel</tag-name>
+ <component>
+ <component-type>org.richfaces.PopupPanel</component-type>
+ <renderer-type>org.richfaces.PopupPanelRenderer</renderer-type>
+ </component>
+ </tag>
+
+ <tag>
+ <tag-name>togglePanel</tag-name>
+ <component>
+ <component-type>org.richfaces.TogglePanel</component-type>
+ <renderer-type>org.richfaces.TogglePanel</renderer-type>
+
<handler-class>org.richfaces.view.facelets.html.TogglePanelTagHandler</handler-class>
+ </component>
<attribute>
<description></description>
- <name>lang</name>
- <type>java.lang.String</type>
+ <name>switchType</name>
+ <type>org.richfaces.component.SwitchType</type>
</attribute>
<attribute>
<description></description>
- <name>onclick</name>
+ <name>activeItem</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<description></description>
- <name>ondblclick</name>
- <type>java.lang.String</type>
+ <name>bypassUpdates</name>
+ <type>boolean</type>
</attribute>
<attribute>
<description></description>
- <name>onmousedown</name>
- <type>java.lang.String</type>
+ <name>limitToList</name>
+ <type>boolean</type>
</attribute>
<attribute>
<description></description>
- <name>onmousemove</name>
- <type>java.lang.String</type>
+ <name>data</name>
+ <type>java.lang.Object</type>
</attribute>
<attribute>
<description></description>
- <name>onmouseout</name>
+ <name>status</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<description></description>
- <name>onmouseover</name>
- <type>java.lang.String</type>
+ <name>execute</name>
+ <type>java.lang.Object</type>
</attribute>
<attribute>
<description></description>
- <name>onmouseup</name>
- <type>java.lang.String</type>
+ <name>render</name>
+ <type>java.lang.Object</type>
</attribute>
<attribute>
<description></description>
- <name>title</name>
+ <name>immediate</name>
+ <type>boolean</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>itemChangeListener</name>
+ <type>javax.el.MethodExpression</type>
+ </attribute>
+ <attribute>
+ <description>Long long text</description>
+ <name>id</name>
<type>java.lang.String</type>
</attribute>
<attribute>
+ <description>binding description</description>
+ <name>binding</name>
+ <type>javax.faces.component.UIComponent</type>
+ </attribute>
+ <attribute>
+ <description>I don't know maybe some thing
strange</description>
+ <name>rendered</name>
+ <type>boolean</type>
+ </attribute>
+ <attribute>
<description></description>
- <name>style</name>
+ <name>onitemchange</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<description></description>
- <name>styleClass</name>
+ <name>onbeforeitemchange</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<description></description>
- <name>dir</name>
+ <name>lang</name>
<type>java.lang.String</type>
</attribute>
<attribute>
- <description>Long long text</description>
- <name>id</name>
+ <description></description>
+ <name>title</name>
<type>java.lang.String</type>
</attribute>
<attribute>
- <description>binding description</description>
- <name>binding</name>
- <type>javax.faces.component.UIComponent</type>
+ <description></description>
+ <name>style</name>
+ <type>java.lang.String</type>
</attribute>
<attribute>
- <description>I don't know maybe some thing
strange</description>
- <name>rendered</name>
- <type>boolean</type>
+ <description></description>
+ <name>styleClass</name>
+ <type>java.lang.String</type>
</attribute>
-
- </tag>
-
- <tag>
- <tag-name>togglePanel</tag-name>
- <component>
- <component-type>org.richfaces.TogglePanel</component-type>
- <renderer-type>org.richfaces.TogglePanel</renderer-type>
-
<handler-class>org.richfaces.view.facelets.html.TogglePanelTagHandler</handler-class>
- </component>
<attribute>
<description></description>
- <name>lang</name>
+ <name>dir</name>
<type>java.lang.String</type>
</attribute>
<attribute>
@@ -144,25 +170,61 @@
<name>onmouseup</name>
<type>java.lang.String</type>
</attribute>
+
+ </tag>
+ <tag>
+ <description>
+ Register a ItemChangeListener instance on the UIComponent
+ associated with the closest parent UIComponent custom
+ action.
+ </description>
+ <tag-name>itemChangeListener</tag-name>
+
<handler-class>org.richfaces.view.facelets.html.ItemChangeListenerHandler</handler-class>
<attribute>
- <description></description>
- <name>title</name>
+ <description>
+ Fully qualified Java class name of a
+ ItemChangeListener to be created and registered.
+ </description>
+ <name>type</name>
<type>java.lang.String</type>
</attribute>
<attribute>
- <description></description>
- <name>style</name>
+ <description>
+ Value binding expression that evaluates to an object that
+ implements org.richfaces.event.ItemChangeListener.
+ </description>
+ <name>binding</name>
+ <required>false</required>
+ <type>org.richfaces.event.ItemChangeListener</type>
+ </attribute>
+ <attribute>
+ <description>
+ <p class="changed_added_2_0">If present, this
attribute refers
+ to the value of one of the exposed attached objects within the
+ composite component inside of which this tag is
nested.</p>
+ </description>
+ <name>for</name>
+ <required>false</required>
<type>java.lang.String</type>
</attribute>
+ </tag>
+
+ <tag>
+ <tag-name>togglePanelItem</tag-name>
+ <component>
+ <component-type>org.richfaces.TogglePanelItem</component-type>
+ <renderer-type>org.richfaces.TogglePanelItem</renderer-type>
+
+ </component>
<attribute>
<description></description>
- <name>styleClass</name>
+ <name>name</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<description></description>
- <name>dir</name>
- <type>java.lang.String</type>
+ <name>switchType</name>
+ <type>org.richfaces.component.SwitchType</type>
</attribute>
<attribute>
<description>Long long text</description>
@@ -181,26 +243,86 @@
</attribute>
<attribute>
<description></description>
- <name>oncomplete</name>
+ <name>onenter</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<description></description>
- <name>onbeforedomupdate</name>
+ <name>onleave</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<description></description>
- <name>onitemchange</name>
+ <name>lang</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<description></description>
- <name>onitemchanged</name>
+ <name>title</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<description></description>
+ <name>style</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>styleClass</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>dir</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>onclick</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>ondblclick</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>onmousedown</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>onmousemove</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>onmouseout</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>onmouseover</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>onmouseup</name>
+ <type>java.lang.String</type>
+ </attribute>
+
+ </tag>
+
+ <tag>
+ <tag-name>accordion</tag-name>
+ <component>
+ <component-type>org.richfaces.Accordion</component-type>
+ <renderer-type>org.richfaces.Accordion</renderer-type>
+
+ </component>
+ <attribute>
+ <description></description>
<name>switchType</name>
<type>org.richfaces.component.SwitchType</type>
</attribute>
@@ -249,58 +371,83 @@
<name>itemChangeListener</name>
<type>javax.el.MethodExpression</type>
</attribute>
-
- </tag>
- <tag>
- <description>
- Register a ItemChangeListener instance on the UIComponent
- associated with the closest parent UIComponent custom
- action.
- </description>
- <tag-name>itemChangeListener</tag-name>
-
<handler-class>org.richfaces.view.facelets.html.ItemChangeListenerHandler</handler-class>
<attribute>
- <description>
- Fully qualified Java class name of a
- ItemChangeListener to be created and registered.
- </description>
- <name>type</name>
+ <description>Long long text</description>
+ <name>id</name>
<type>java.lang.String</type>
</attribute>
<attribute>
- <description>
- Value binding expression that evaluates to an object that
- implements org.richfaces.event.ItemChangeListener.
- </description>
+ <description>binding description</description>
<name>binding</name>
- <required>false</required>
- <type>org.richfaces.event.ItemChangeListener</type>
+ <type>javax.faces.component.UIComponent</type>
</attribute>
<attribute>
- <description>
- <p class="changed_added_2_0">If present, this
attribute refers
- to the value of one of the exposed attached objects within the
- composite component inside of which this tag is nested.</p>
</description>
- <name>for</name>
- <required>false</required>
+ <description>I don't know maybe some thing
strange</description>
+ <name>rendered</name>
+ <type>boolean</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>itemHeaderClassActive</name>
<type>java.lang.String</type>
</attribute>
- </tag>
-
- <tag>
- <tag-name>togglePanelItem</tag-name>
- <component>
- <component-type>org.richfaces.TogglePanelItem</component-type>
- <renderer-type>org.richfaces.TogglePanelItem</renderer-type>
-
- </component>
<attribute>
<description></description>
+ <name>itemHeaderClassDisabled</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>itemHeaderClassInactive</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>itemContentClass</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>itemHeaderClass</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>onitemchange</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>onbeforeitemchange</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
<name>lang</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<description></description>
+ <name>title</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>style</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>styleClass</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>dir</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
<name>onclick</name>
<type>java.lang.String</type>
</attribute>
@@ -334,25 +481,35 @@
<name>onmouseup</name>
<type>java.lang.String</type>
</attribute>
+
+ </tag>
+
+ <tag>
+ <tag-name>accordionItem</tag-name>
+ <component>
+
<component-type>org.richfaces.TogglePanelTitledItem</component-type>
+ <renderer-type>org.richfaces.AccordionItem</renderer-type>
+
+ </component>
<attribute>
<description></description>
- <name>title</name>
- <type>java.lang.String</type>
+ <name>disabled</name>
+ <type>boolean</type>
</attribute>
<attribute>
<description></description>
- <name>style</name>
+ <name>header</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<description></description>
- <name>styleClass</name>
+ <name>name</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<description></description>
- <name>dir</name>
- <type>java.lang.String</type>
+ <name>switchType</name>
+ <type>org.richfaces.component.SwitchType</type>
</attribute>
<attribute>
<description>Long long text</description>
@@ -371,17 +528,61 @@
</attribute>
<attribute>
<description></description>
- <name>name</name>
- <required>true</required>
+ <name>headerClassActive</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<description></description>
- <name>switchType</name>
- <type>org.richfaces.component.SwitchType</type>
+ <name>headerClassDisabled</name>
+ <type>java.lang.String</type>
</attribute>
<attribute>
<description></description>
+ <name>headerClassInactive</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>headerClass</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>headerStyle</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>contentClass</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>onheaderclick</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>onheaderdblclick</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>onheadermousedown</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>onheadermousemove</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>onheadermouseup</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
<name>onenter</name>
<type>java.lang.String</type>
</attribute>
@@ -390,23 +591,68 @@
<name>onleave</name>
<type>java.lang.String</type>
</attribute>
+ <attribute>
+ <description></description>
+ <name>lang</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>title</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>style</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>styleClass</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>dir</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>onclick</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>ondblclick</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>onmousedown</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>onmousemove</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>onmouseout</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>onmouseover</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>onmouseup</name>
+ <type>java.lang.String</type>
+ </attribute>
</tag>
- <tag>
- <tag-name>panel</tag-name>
- <component>
- <component-type>org.richfaces.Panel</component-type>
- <renderer-type>org.richfaces.PanelRenderer</renderer-type>
- </component>
- </tag>
-
- <tag>
- <tag-name>popupPanel</tag-name>
- <component>
- <component-type>org.richfaces.PopupPanel</component-type>
- <renderer-type>org.richfaces.PopupPanelRenderer</renderer-type>
- </component>
- </tag>
</facelet-taglib>
Added:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/Accordion.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/Accordion.js
(rev 0)
+++
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/Accordion.js 2010-08-13
14:12:36 UTC (rev 18621)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.
+ */
+
+(function ($, rf) {
+
+ rf.ui = rf.ui || {};
+
+ rf.ui.Accordion = rf.ui.TogglePanel.extendClass({
+ // class name
+ name:"Accordion",
+
+ /**
+ * @class Accordion
+ * @name Accordion
+ *
+ * @constructor
+ * @param {String} componentId - component id
+ * @param {Hash} options - params
+ * */
+ init : function (componentId, options) {
+ rf.ui.TogglePanel.call(this, componentId, options);
+ this.items = [];
+
+ this.isKeepHeight = options["isKeepHeight"] || false
+ },
+
+ /***************************** Public Methods
****************************************************************/
+
+ getHeight : function (recalculate) {
+ if (recalculate || !this.__height) {
+ this.__height = $(rf.getDomElement(this.id)).outerHeight(true)
+ }
+
+ return this.__height;
+ },
+
+ getInnerHeight : function (recalculate) {
+ if (recalculate || !this.__innerHeight) {
+ this.__innerHeight = $(rf.getDomElement(this.id)).innerHeight(true)
+ }
+
+ return this.__innerHeight;
+ },
+
+ /***************************** Private Methods
********************************************************/
+
+
+ destroy: function () {
+ rf.Event.unbindById(this.id, "." + this.namespace);
+
+ this.$super.destroy.call(this);
+ }
+ });
+})(jQuery, RichFaces);
Added:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/AccordionItem.js
===================================================================
---
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/AccordionItem.js
(rev 0)
+++
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/AccordionItem.js 2010-08-13
14:12:36 UTC (rev 18621)
@@ -0,0 +1,126 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.
+ */
+
+(function ($, rf) {
+
+ rf.ui = rf.ui || {};
+
+ rf.ui.AccordionItem = rf.ui.TogglePanelItem.extendClass({
+ // class name
+ name:"AccordionItem",
+
+ /**
+ * @class AccordionItem
+ * @name AccordionItem
+ *
+ * @constructor
+ * @param {String} componentId - component id
+ * @param {Hash} options - params
+ * */
+ init : function (componentId, options) {
+ rf.ui.TogglePanelItem.call(this, componentId, options);
+ this.index = options["index"];
+ this.getTogglePanel().getItems()[this.index] = this;
+
+ rf.Event.bindById(this.id + ":header", "click",
this.__onHeaderClick, this)
+ },
+
+ /***************************** Public Methods
****************************************************************/
+
+ __onHeaderClick : function (comp) {
+ this.getTogglePanel().switchToItem(this.getName());
+ },
+
+ /**
+ * @return {DOMElement}
+ * */
+ __header : function () {
+ return rf.getDomElement(this.id + ":header");
+ },
+
+ /**
+ * @return {DOMElement}
+ * */
+ __content : function () {
+ return rf.getDomElement(this.id + ":content");
+ },
+
+ /**
+ * @private
+ *
+ * used in TogglePanel
+ * */
+ __enter : function () {
+ var parentPanel = this.getTogglePanel();
+ if (parentPanel.isKeepHeight) {
+ var h = parentPanel.getInnerHeight();
+
+ var items = parentPanel.getItems();
+ for (var i = 0; i < items.length; i++) {
+ h -= items[i].getHeight();
+ }
+
+ $(this.__content()).height(h);
+ }
+
+ this.__content().style.display = "block";
+
+
+ return this.__fireEnter();
+ },
+
+ getHeight : function (recalculate) {
+ if (recalculate || !this.__height) {
+ this.__height = $(rf.getDomElement(this.id)).outerHeight(true)
+ }
+
+ return this.__height;
+ },
+
+ /**
+ * @private
+ *
+ * used in TogglePanel
+ * */
+ __leave : function () {
+ var continueProcess = this.__fireLeave();
+ if (!continueProcess) {
+ return false;
+ }
+
+ this.__content().style.display = "none";
+ return true;
+ },
+
+ /***************************** Private Methods
********************************************************/
+
+
+ destroy: function () {
+ var parent = this.getTogglePanel();
+ delete parent.getItems()[this.index];
+
+ rf.Event.unbindById(this.id, "."+this.namespace);
+
+ this.$super.destroy.call(this);
+ }
+ });
+})(jQuery, RichFaces);
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanel.js
===================================================================
---
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanel.js 2010-08-13
14:10:24 UTC (rev 18620)
+++
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanel.js 2010-08-13
14:12:36 UTC (rev 18621)
@@ -158,7 +158,7 @@
init : function (componentId, options) {
// call constructor of parent class
- this.$super.constructor.call(this, componentId);
+ rf.BaseComponent.call(this, componentId);
this.attachToDom(componentId);
this.options = options;
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanelItem.js
===================================================================
---
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanelItem.js 2010-08-13
14:10:24 UTC (rev 18620)
+++
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanelItem.js 2010-08-13
14:12:36 UTC (rev 18621)
@@ -31,8 +31,8 @@
init : function (componentId, options) {
// call constructor of parent class
- this.$super.constructor.call(this, componentId);
- this.$super.attachToDom.call(this, componentId);
+ rf.BaseComponent.call(this, componentId);
+ this.attachToDom(componentId);
this.options = options;
this.name = this.options.name;
Added:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/accordion.ecss
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/accordion.ecss
(rev 0)
+++
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/accordion.ecss 2010-08-13
14:12:36 UTC (rev 18621)
@@ -0,0 +1,26 @@
+.rf-ac {
+ width: 300px; /*visible width*/
+ border: 1px solid #a6a6a6; /*panelBorderColor*/
+ border-bottom: 0px;
+ background: #FFFFFF; /*generalBackgroundColor*/
+}
+
+.rf-aci-h {
+ border-bottom: 1px solid #a6a6a6; /*panelBorderColor*/
+ background: url(images/bg_header.png) /*from headerGradientColor to
headerBackgroundColor, picture height 20px*/ repeat-x top left #C0D1E7
/*headerBackgroundColor*/;
+ position: relative;
+ padding: 8px 10px 7px 10px;
+ font-weight: bold /*headerWeightFont*/;
+ color: #000000 /*headerTextColor*/;
+ font-family: verdana /*headerFamilyFont*/;
+ font-size: 11px /*headerSizeFont*/;
+ cursor: pointer;
+}
+
+.rf-aci-c {
+ border-bottom: 1px solid #a6a6a6 /*panelBorderColor*/;
+ height: 100px /*visible modal panel height minus header height*/;
+ position: relative;
+ overflow: auto;
+ overflow-x: hidden;
+}
\ No newline at end of file
Modified: trunk/ui/output/ui/src/test/resources/panelTest.xhtml
===================================================================
--- trunk/ui/output/ui/src/test/resources/panelTest.xhtml 2010-08-13 14:10:24 UTC (rev
18620)
+++ trunk/ui/output/ui/src/test/resources/panelTest.xhtml 2010-08-13 14:12:36 UTC (rev
18621)
@@ -5,7 +5,7 @@
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:panel="http://richfaces.org/panels"
+
xmlns:panel="http://richfaces.org/output"
xmlns:rich="http://richfaces.org/rich">
<!--
JBoss, Home of Professional Open Source
Modified: trunk/ui/output/ui/src/test/resources/popupPanelTest.xhtml
===================================================================
--- trunk/ui/output/ui/src/test/resources/popupPanelTest.xhtml 2010-08-13 14:10:24 UTC
(rev 18620)
+++ trunk/ui/output/ui/src/test/resources/popupPanelTest.xhtml 2010-08-13 14:12:36 UTC
(rev 18621)
@@ -5,7 +5,7 @@
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:rich="http://richfaces.org/panels">
+
xmlns:rich="http://richfaces.org/output">
<h:head>
<title>Richfaces ExtendedDataTable Test</title>