JBoss Rich Faces SVN: r20567 - in trunk/ui: iteration/ui/src/main/java/org/richfaces/component and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-12-14 14:44:26 -0500 (Tue, 14 Dec 2010)
New Revision: 20567
Modified:
trunk/ui/common/ui/src/main/java/org/richfaces/component/UIDataAdaptor.java
trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTree.java
Log:
https://issues.jboss.org/browse/RF-9993
Modified: trunk/ui/common/ui/src/main/java/org/richfaces/component/UIDataAdaptor.java
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/component/UIDataAdaptor.java 2010-12-14 18:07:01 UTC (rev 20566)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/component/UIDataAdaptor.java 2010-12-14 19:44:26 UTC (rev 20567)
@@ -246,10 +246,6 @@
private Object rowKey = null;
- private boolean rowDataIsSet = false;
-
- private Object rowData;
-
private String clientId;
private Object originalVarValue;
@@ -371,34 +367,6 @@
return rowKey;
}
- private void setRowKeyAndData(FacesContext facesContext, Object rowKey, boolean localRowDataAvailable, Object localRowData) {
- this.saveChildState(facesContext);
-
- this.rowKey = rowKey;
-
- if (localRowDataAvailable) {
- this.rowData = localRowData;
- this.rowDataIsSet = (rowKey != null);
- } else {
- this.rowData = null;
- this.rowDataIsSet = false;
-
- getExtendedDataModel().setRowKey(rowKey);
- }
-
- this.clientId = null;
-
- boolean rowSelected = (rowKey != null) && isRowAvailable();
-
- setupVariable(facesContext, rowSelected);
-
- this.restoreChildState(facesContext);
- }
-
- protected void setRowKeyAndData(FacesContext facesContext, Object rowKey, Object localRowData) {
- setRowKeyAndData(facesContext, rowKey, true, localRowData);
- }
-
/**
* Setup current row by key. Perform same functionality as
* {@link javax.faces.component.UIData#setRowIndex(int)}, but for key object - it may be not only
@@ -647,15 +615,11 @@
}
public Object getRowData() {
- if (rowDataIsSet) {
- return rowData;
- }
-
return getExtendedDataModel().getRowData();
}
public boolean isRowAvailable() {
- return rowDataIsSet || getExtendedDataModel().isRowAvailable();
+ return getExtendedDataModel().isRowAvailable();
}
/**
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTree.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTree.java 2010-12-14 18:07:01 UTC (rev 20566)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTree.java 2010-12-14 19:44:26 UTC (rev 20567)
@@ -141,6 +141,8 @@
private transient TreeRange treeRange;
+ private transient UIComponent currentComponent = this;
+
public AbstractTree() {
setKeepSaved(true);
setRendererType("org.richfaces.TreeRenderer");
@@ -261,13 +263,13 @@
return Iterators.filter(children, new MatchingTreeNodePredicate(nodeType));
}
- protected UIComponent getCurrentComponent() {
+ protected void setupCurrentComponent() {
ExtendedDataModel<?> dataModel = getExtendedDataModel();
if (dataModel instanceof DeclarativeTreeModel) {
- return ((DeclarativeTreeModel) dataModel).getCurrentComponent();
+ currentComponent = ((DeclarativeTreeModel) dataModel).getCurrentComponent();
+ } else {
+ currentComponent = this;
}
-
- return this;
}
private boolean isDefaultTreeNode(AbstractTreeNode node) {
@@ -279,7 +281,7 @@
String nodeType = getNodeType();
- Iterator<UIComponent> nodesItr = findMatchingTreeNodeComponent(nodeType, getCurrentComponent());
+ Iterator<UIComponent> nodesItr = findMatchingTreeNodeComponent(nodeType, currentComponent);
boolean hasOnlyDefaultNodes = true;
while (nodesItr.hasNext()) {
@@ -593,5 +595,11 @@
getTreeDataModel().restoreFromSnapshot(tuple);
setRowKey(context, tuple.getRowKey());
}
+
+ @Override
+ protected void restoreChildState(FacesContext facesContext) {
+ setupCurrentComponent();
+ super.restoreChildState(facesContext);
+ }
}
14 years, 1 month
JBoss Rich Faces SVN: r20566 - in modules/tests/metamer/trunk/application/src/main: webapp/components and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-12-14 13:07:01 -0500 (Tue, 14 Dec 2010)
New Revision: 20566
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMenuItemBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuItem/
modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuItem/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuItem/simple.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
Log:
https://issues.jboss.org/browse/RFPL-958
* added sample for rich:menuItem
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-12-14 17:44:21 UTC (rev 20565)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-12-14 18:07:01 UTC (rev 20566)
@@ -36,6 +36,7 @@
import javax.faces.bean.SessionScoped;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
+import javax.faces.event.AjaxBehaviorEvent;
import javax.faces.event.ValueChangeEvent;
import javax.faces.model.SelectItem;
import javax.servlet.http.HttpSession;
@@ -138,6 +139,7 @@
components.put("richJQuery", "Rich jQuery");
components.put("richList", "Rich List");
components.put("richMenuGroup", "Rich Menu Group");
+ components.put("richMenuItem", "Rich Menu Item");
components.put("richPanel", "Rich Panel");
components.put("richPanelMenu", "Rich Panel Menu");
components.put("richPopupPanel", "Rich Popup Panel");
@@ -380,6 +382,16 @@
}
/**
+ * An action listener that does nothing.
+ *
+ * @param event
+ * an event representing the activation of a user interface component (not used)
+ */
+ public void actionListener(AjaxBehaviorEvent event) {
+ logToPage("* action listener invoked");
+ }
+
+ /**
* An item change listener that logs to the page old and new value.
*
* @param event
@@ -396,6 +408,6 @@
* an event representing the activation of a user interface component
*/
public void valueChangeListener(ValueChangeEvent event) {
- RichBean.logToPage("* value changed: " + event.getOldValue() + " -> " + event.getNewValue());
+ logToPage("* value changed: " + event.getOldValue() + " -> " + event.getNewValue());
}
}
Added: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMenuItemBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMenuItemBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMenuItemBean.java 2010-12-14 18:07:01 UTC (rev 20566)
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean;
+
+import java.io.Serializable;
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+import org.richfaces.component.UIMenuItem;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:menuItem.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richMenuItemBean")
+@ViewScoped
+public class RichMenuItemBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getUIComponentAttributes(UIMenuItem.class, getClass(), false);
+
+ attributes.setAttribute("icon", "/resources/images/icons/create_doc.gif");
+ attributes.setAttribute("label", "New");
+ attributes.setAttribute("mode", "ajax");
+ attributes.setAttribute("rendered", true);
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+}
Property changes on: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMenuItemBean.java
___________________________________________________________________
Name: svn:keywords
+ Revision
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuItem/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuItem/list.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuItem/list.xhtml 2010-12-14 18:07:01 UTC (rev 20566)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:metamer="http://java.sun.com/jsf/composite/metamer">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+
+ <ui:composition template="/templates/list.xhtml">
+
+ <ui:define name="pageTitle">Rich Menu Item</ui:define>
+
+ <ui:define name="links">
+
+ <metamer:testPageLink id="simple" outcome="simple" value="Simple">
+ Simple page containing a drop down menu with several <b>rich:menuItem</b>s and inputs for all attributes.
+ </metamer:testPageLink>
+
+ </ui:define>
+
+ </ui:composition>
+
+</html>
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuItem/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuItem/simple.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuItem/simple.xhtml 2010-12-14 18:07:01 UTC (rev 20566)
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:metamer="http://java.sun.com/jsf/composite/metamer" xmlns:rich="http://richfaces.org/rich"
+ xmlns:h="http://java.sun.com/jsf/html">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="templates" value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ <style type="text/css">
+ .pic {
+ margin-bottom: -4px;
+ margin-right: 2px;
+ }
+
+ .search .rf-ddm-itm-sel {
+ background-color: transparent;
+ background-image:none;
+ border-color: transparent;
+ cursor: default;
+ }
+ </style>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ </ui:define>
+
+ <ui:define name="component">
+ <rich:toolbar id="toolbar" height="26px">
+ <rich:dropDownMenu id="menu1" mode="ajax">
+ <f:facet name="label">
+ <h:panelGroup>
+ <h:graphicImage library="images/icons" name="copy.gif" styleClass="pic" />
+ <h:outputText value="File" />
+ </h:panelGroup>
+ </f:facet>
+
+ <rich:menuItem id="menuItem"
+ action="#{richBean.dummyAction}"
+ actionListener="#{richBean.dummyActionListener}"
+ data="#{richMenuItemBean.attributes['data'].value}"
+ dir="#{richMenuItemBean.attributes['dir'].value}"
+ disabled="#{richMenuItemBean.attributes['disabled'].value}"
+ execute="#{richMenuItemBean.attributes['execute'].value}"
+ icon="#{richMenuItemBean.attributes['icon'].value}"
+ iconDisabled="#{richMenuItemBean.attributes['iconDisabled'].value}"
+ immediate="#{richMenuItemBean.attributes['immediate'].value}"
+ label="#{richMenuItemBean.attributes['label'].value}"
+ lang="#{richMenuItemBean.attributes['lang'].value}"
+ limitRender="#{richMenuItemBean.attributes['limitRender'].value}"
+ mode="#{richMenuItemBean.attributes['mode'].value}"
+ onbeforedomupdate="#{richMenuItemBean.attributes['onbeforedomupdate'].value}"
+ onbegin="#{richMenuItemBean.attributes['onbegin'].value}"
+ onclick="#{richMenuItemBean.attributes['onclick'].value}"
+ oncomplete="#{richMenuItemBean.attributes['oncomplete'].value}"
+ ondblclick="#{richMenuItemBean.attributes['ondblclick'].value}"
+ onkeydown="#{richMenuItemBean.attributes['onkeydown'].value}"
+ onkeypress="#{richMenuItemBean.attributes['onkeypress'].value}"
+ onkeyup="#{richMenuItemBean.attributes['onkeyup'].value}"
+ onmousedown="#{richMenuItemBean.attributes['onmousedown'].value}"
+ onmousemove="#{richMenuItemBean.attributes['onmousemove'].value}"
+ onmouseout="#{richMenuItemBean.attributes['onmouseout'].value}"
+ onmouseover="#{richMenuItemBean.attributes['onmouseover'].value}"
+ onmouseup="#{richMenuItemBean.attributes['onmouseup'].value}"
+ render="#{richMenuItemBean.attributes['render'].value}"
+ rendered="#{richMenuItemBean.attributes['rendered'].value}"
+ status="#{richMenuItemBean.attributes['status'].value}"
+ style="#{richMenuItemBean.attributes['style'].value}"
+ styleClass="#{richMenuItemBean.attributes['styleClass'].value}"
+ title="#{richMenuItemBean.attributes['title'].value}"
+ value="#{richMenuItemBean.attributes['value'].value}"
+ />
+
+ <rich:menuItem label="Open" icon="/resources/images/icons/open.gif" />
+
+ <rich:menuGroup label="Open Recent..." disabled="true">
+ <rich:menuItem label="Save" icon="/resources/images/icons/save.gif" />
+ <rich:menuItem label="Save All">
+ <f:facet name="icon">
+ <h:graphicImage library="images/icons" name="save_all.gif" />
+ </f:facet>
+ </rich:menuItem>
+ </rich:menuGroup>
+
+ <rich:menuSeparator id="menuSeparator11" />
+
+ <rich:menuGroup id="menuGroup" label="Save As...">
+ <rich:menuItem label="Save" icon="/resources/images/icons/save.gif" />
+ <rich:menuItem label="Save All" >
+ <f:facet name="icon">
+ <h:graphicImage library="images/icons" name="save_all.gif" />
+ </f:facet>
+ </rich:menuItem>
+ <rich:menuItem label="Send Online" icon="/resources/images/icons/save.gif" disabled="true" />
+ </rich:menuGroup>
+
+ <rich:menuItem label="Print" disabled="true"/>
+
+ <rich:menuItem label="Close" />
+
+ <rich:menuSeparator id="menuSeparator12" />
+
+ <rich:menuItem label="Exit" />
+
+ </rich:dropDownMenu>
+
+ </rich:toolbar>
+
+ <br /><br />
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ Settings for the first menu item:
+ <metamer:attributes value="#{richMenuItemBean.attributes}" id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
14 years, 1 month
JBoss Rich Faces SVN: r20565 - in modules/tests/metamer/trunk/application/src/main/webapp/components: richTab and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-12-14 12:44:21 -0500 (Tue, 14 Dec 2010)
New Revision: 20565
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/simple.xhtml
Log:
* attributes cleaned up
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml 2010-12-14 16:53:19 UTC (rev 20564)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml 2010-12-14 17:44:21 UTC (rev 20565)
@@ -159,7 +159,7 @@
verticalOffset="#{richCalendarBean.attributes['verticalOffset'].value}"
zindex="#{richCalendarBean.attributes['zindex'].value}"
>
- <a4j:ajax event="change" render="output, requestTime" limitRender="#{true}"/>
+ <a4j:ajax event="change" render="output, phasesPanel" limitRender="#{true}"/>
</rich:calendar>
</div>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/simple.xhtml 2010-12-14 16:53:19 UTC (rev 20564)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/simple.xhtml 2010-12-14 17:44:21 UTC (rev 20565)
@@ -42,9 +42,7 @@
<rich:tabPanel id="tabPanel">
<rich:tab id="tab1"
- active="#{richTabBean.attributes['active'].value}"
contentClass="#{richTabBean.attributes['contentClass'].value}"
- converter="#{richTabBean.attributes['converter'].value}"
dir="#{richTabBean.attributes['dir'].value}"
disabled="#{richTabBean.attributes['disabled'].value}"
header="#{richTabBean.attributes['header'].value}"
@@ -54,7 +52,6 @@
headerClassInactive="#{richTabBean.attributes['headerClassInactive'].value}"
headerStyle="#{richTabBean.attributes['headerStyle'].value}"
lang="#{richTabBean.attributes['lang'].value}"
- localValue="#{richTabBean.attributes['localValue'].value}"
name="#{richTabBean.attributes['name'].value}"
onclick="#{richTabBean.attributes['onclick'].value}"
ondblclick="#{richTabBean.attributes['ondblclick'].value}"
@@ -74,9 +71,7 @@
style="#{richTabBean.attributes['style'].value}"
styleClass="#{richTabBean.attributes['styleClass'].value}"
switchType="#{richTabBean.attributes['switchType'].value}"
- tabPanel="#{richTabBean.attributes['tabPanel'].value}"
title="#{richTabBean.attributes['title'].value}"
- value="#{richTabBean.attributes['value'].value}"
>
content of tab 1
</rich:tab>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/simple.xhtml 2010-12-14 16:53:19 UTC (rev 20564)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/simple.xhtml 2010-12-14 17:44:21 UTC (rev 20565)
@@ -2,7 +2,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
- xmlns:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j">
+ xmlns:rich="http://richfaces.org/rich" >
<!--
JBoss, Home of Professional Open Source
@@ -48,15 +48,11 @@
dir="#{richTabPanelBean.attributes['dir'].value}"
disableImplicitRender="#{richTabPanelBean.attributes['disableImplicitRender'].value}"
execute="#{richTabPanelBean.attributes['execute'].value}"
- firstItem="#{richTabPanelBean.attributes['firstItem'].value}"
headerAlignment="#{richTabPanelBean.attributes['headerAlignment'].value}"
headerPosition="#{richTabPanelBean.attributes['headerPosition'].value}"
immediate="#{richTabPanelBean.attributes['immediate'].value}"
- itemByIndex="#{richTabPanelBean.attributes['itemByIndex'].value}"
itemChangeListener="#{richBean.itemChangeListener}"
lang="#{richTabPanelBean.attributes['lang'].value}"
- lastItem="#{richTabPanelBean.attributes['lastItem'].value}"
- nextItem="#{richTabPanelBean.attributes['nextItem'].value}"
onbeforeitemchange="#{richTabPanelBean.attributes['onbeforeitemchange'].value}"
onclick="#{richTabPanelBean.attributes['onclick'].value}"
ondblclick="#{richTabPanelBean.attributes['ondblclick'].value}"
@@ -66,25 +62,13 @@
onmouseout="#{richTabPanelBean.attributes['onmouseout'].value}"
onmouseover="#{richTabPanelBean.attributes['onmouseover'].value}"
onmouseup="#{richTabPanelBean.attributes['onmouseup'].value}"
- prevItem="#{richTabPanelBean.attributes['prevItem'].value}"
render="#{richTabPanelBean.attributes['render'].value}"
rendered="#{richTabPanelBean.attributes['rendered'].value}"
- renderedItems="#{richTabPanelBean.attributes['renderedItems'].value}"
- required="#{richTabPanelBean.attributes['required'].value}"
status="#{richTabPanelBean.attributes['status'].value}"
style="#{richTabPanelBean.attributes['style'].value}"
styleClass="#{richTabPanelBean.attributes['styleClass'].value}"
- submittedActiveItem="#{richTabPanelBean.attributes['submittedActiveItem'].value}"
- submittedValue="#{richTabPanelBean.attributes['submittedValue'].value}"
switchType="#{richTabPanelBean.attributes['switchType'].value}"
tabContentClass="#{richTabPanelBean.attributes['tabContentClass'].value}"
- tabHeaderClass="#{richTabPanelBean.attributes['tabHeaderClass'].value}"
- tabHeaderClassActive="#{richTabPanelBean.attributes['tabHeaderClassActive'].value}"
- tabHeaderClassDisabled="#{richTabPanelBean.attributes['tabHeaderClassDisabled'].value}"
- tabHeaderClassInactive="#{richTabPanelBean.attributes['tabHeaderClassInactive'].value}"
- title="#{richTabPanelBean.attributes['title'].value}"
- valid="#{richTabPanelBean.attributes['valid'].value}"
- value="#{richTabPanelBean.attributes['value'].value}"
>
<rich:tab id="tab1" name="tab1" header="tab1 header">
14 years, 1 month
JBoss Rich Faces SVN: r20564 - trunk/ui/misc/ui/src/main/java/org/richfaces/component/behavior.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-12-14 11:53:19 -0500 (Tue, 14 Dec 2010)
New Revision: 20564
Modified:
trunk/ui/misc/ui/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java
Log:
RF-9938
Modified: trunk/ui/misc/ui/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java
===================================================================
--- trunk/ui/misc/ui/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java 2010-12-14 16:43:00 UTC (rev 20563)
+++ trunk/ui/misc/ui/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java 2010-12-14 16:53:19 UTC (rev 20564)
@@ -28,6 +28,7 @@
import javax.faces.component.UIComponent;
import org.ajax4jsf.component.behavior.ClientBehavior;
+import org.richfaces.cdk.annotations.Attribute;
import org.richfaces.cdk.annotations.JsfBehavior;
import org.richfaces.cdk.annotations.Tag;
import org.richfaces.cdk.annotations.TagType;
@@ -58,6 +59,7 @@
return children;
}
+ @Attribute
public String getEvent() {
return (String) getStateHelper().eval(PropertyKeys.event);
}
@@ -66,6 +68,7 @@
getStateHelper().eval(PropertyKeys.event, eventName);
}
+ @Attribute
public String getTarget() {
return (String) getStateHelper().eval(PropertyKeys.target);
}
@@ -74,6 +77,7 @@
getStateHelper().put(PropertyKeys.target, target);
}
+ @Attribute
public String getSelector() {
return (String) getStateHelper().eval(PropertyKeys.selector);
}
@@ -82,6 +86,7 @@
getStateHelper().put(PropertyKeys.selector, selector);
}
+ @Attribute
public String getOperation() {
return (String) getStateHelper().eval(PropertyKeys.operation);
}
14 years, 1 month
JBoss Rich Faces SVN: r20563 - trunk/ui/core/ui/src/main/java/org/ajax4jsf/component/behavior.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-12-14 11:43:00 -0500 (Tue, 14 Dec 2010)
New Revision: 20563
Modified:
trunk/ui/core/ui/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java
Log:
RF-9952, add listener to the taglib
Modified: trunk/ui/core/ui/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java
===================================================================
--- trunk/ui/core/ui/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java 2010-12-14 16:40:34 UTC (rev 20562)
+++ trunk/ui/core/ui/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java 2010-12-14 16:43:00 UTC (rev 20563)
@@ -36,17 +36,20 @@
import java.util.Set;
import javax.el.ExpressionFactory;
+import javax.el.MethodExpression;
import javax.el.ValueExpression;
import javax.faces.FacesException;
import javax.faces.component.behavior.ClientBehaviorHint;
import javax.faces.context.FacesContext;
import javax.faces.event.AbortProcessingException;
+import javax.faces.event.AjaxBehaviorEvent;
import javax.faces.event.AjaxBehaviorListener;
import javax.faces.event.BehaviorEvent;
import org.ajax4jsf.component.AjaxClientBehavior;
import org.richfaces.cdk.annotations.Attribute;
import org.richfaces.cdk.annotations.JsfBehavior;
+import org.richfaces.cdk.annotations.Signature;
import org.richfaces.cdk.annotations.Tag;
import org.richfaces.cdk.annotations.TagType;
import org.richfaces.renderkit.util.CoreAjaxRendererUtils;
@@ -79,6 +82,10 @@
private Set<String> render;
+ @SuppressWarnings("unused")
+ @Attribute(generate = false, signature = @Signature(returnType = Void.class, parameters = AjaxBehaviorEvent.class))
+ private MethodExpression listener;
+
@Override
public void setLiteralAttribute(String name, Object value) {
14 years, 1 month
JBoss Rich Faces SVN: r20562 - trunk/ui/output/ui/src/main/java/org/richfaces/component/behavior.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-12-14 11:40:34 -0500 (Tue, 14 Dec 2010)
New Revision: 20562
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/behavior/ToggleControl.java
Log:
fix possible ClassCastException
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/behavior/ToggleControl.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/behavior/ToggleControl.java 2010-12-14 16:36:59 UTC (rev 20561)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/behavior/ToggleControl.java 2010-12-14 16:40:34 UTC (rev 20562)
@@ -22,6 +22,7 @@
package org.richfaces.component.behavior;
+import javax.el.ExpressionFactory;
import javax.faces.FacesException;
import javax.faces.component.UIComponent;
import javax.faces.component.behavior.ClientBehaviorContext;
@@ -137,7 +138,8 @@
} else if (compare(PropertyKeys.targetPanel, name)) {
setTargetPanel((String) value);
} else if (compare(PropertyKeys.disableDefault, name)) {
- setDisableDefault((Boolean)value);
+ ExpressionFactory expFactory = getFacesContext().getApplication().getExpressionFactory();
+ setDisableDefault((Boolean)expFactory.coerceToType(value, Boolean.class));
}
}
}
14 years, 1 month
JBoss Rich Faces SVN: r20561 - in trunk/ui/misc/ui/src/main: java/org/richfaces/component and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-12-14 11:36:59 -0500 (Tue, 14 Dec 2010)
New Revision: 20561
Removed:
trunk/ui/misc/ui/src/main/config/
trunk/ui/misc/ui/src/main/resources/META-INF/cc.taglib.xml
Modified:
trunk/ui/misc/ui/src/main/java/org/richfaces/component/UIHashParameter.java
trunk/ui/misc/ui/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java
Log:
RF-9940, remove unnecessary faces-config.xml, cc.taglib.xml
Modified: trunk/ui/misc/ui/src/main/java/org/richfaces/component/UIHashParameter.java
===================================================================
--- trunk/ui/misc/ui/src/main/java/org/richfaces/component/UIHashParameter.java 2010-12-14 15:58:51 UTC (rev 20560)
+++ trunk/ui/misc/ui/src/main/java/org/richfaces/component/UIHashParameter.java 2010-12-14 16:36:59 UTC (rev 20561)
@@ -31,10 +31,20 @@
import javax.faces.component.UIComponentBase;
import javax.faces.component.UIParameter;
+import org.richfaces.cdk.annotations.Attribute;
+import org.richfaces.cdk.annotations.JsfComponent;
+import org.richfaces.cdk.annotations.Tag;
+
/**
* @author Anton Belevich
*
*/
+
+@JsfComponent(
+ type = UIHashParameter.COMPONENT_TYPE,
+ family = UIHashParameter.COMPONENT_FAMILY,
+ tag = @Tag(name = "hashParam", handler="javax.faces.view.facelets.ComponentHandler")
+)
public class UIHashParameter extends UIComponentBase {
public static final String COMPONENT_TYPE = "org.richfaces.HashParameter";
@@ -50,6 +60,7 @@
setRendererType(null);
}
+ @Attribute
public String getName() {
return (String) getStateHelper().eval(PropertyKeys.name);
}
@@ -57,7 +68,8 @@
public void setName(String name) {
getStateHelper().put(PropertyKeys.name, name);
}
-
+
+ @Attribute
public Map<String, Object> getValue() {
List<UIComponent> children = getChildren();
Map<String, Object> parameters = new HashMap<String, Object>();
Modified: trunk/ui/misc/ui/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java
===================================================================
--- trunk/ui/misc/ui/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java 2010-12-14 15:58:51 UTC (rev 20560)
+++ trunk/ui/misc/ui/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java 2010-12-14 16:36:59 UTC (rev 20561)
@@ -36,7 +36,11 @@
* @author Anton Belevich
*
*/
-@JsfBehavior(id = "org.richfaces.behavior.ComponentControlBehavior", tag = @Tag(name = "componentControl", handler = "org.richfaces.taglib.ComponentControlHandler", type = TagType.Facelets))
+@JsfBehavior(
+ id = "org.richfaces.behavior.ComponentControlBehavior",
+ tag = @Tag(name = "componentControl",
+ handler = "org.richfaces.taglib.ComponentControlHandler", type = TagType.Facelets)
+)
public class ComponentControlBehavior extends ClientBehavior {
public static final String BEHAVIOR_ID = "org.richfaces.behavior.ComponentControlBehavior";
Deleted: trunk/ui/misc/ui/src/main/resources/META-INF/cc.taglib.xml
===================================================================
--- trunk/ui/misc/ui/src/main/resources/META-INF/cc.taglib.xml 2010-12-14 15:58:51 UTC (rev 20560)
+++ trunk/ui/misc/ui/src/main/resources/META-INF/cc.taglib.xml 2010-12-14 16:36:59 UTC (rev 20561)
@@ -1,16 +0,0 @@
-<?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="cc">
- <namespace>http://richfaces.org/componentControl</namespace>
- <tag>
- <tag-name>hashParam</tag-name>
- <component>
- <component-type>org.richfaces.HashParameter</component-type>
- <handler-class>javax.faces.view.facelets.ComponentHandler</handler-class>
- </component>
-
- </tag>
-</facelet-taglib>
\ No newline at end of file
14 years, 1 month
JBoss Rich Faces SVN: r20560 - trunk/ui/output/ui/src/main/resources/META-INF.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2010-12-14 10:58:51 -0500 (Tue, 14 Dec 2010)
New Revision: 20560
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml
Log:
RF-9893: Toggle panel: activeItem cannot be changed dynamically
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-12-14 15:45:43 UTC (rev 20559)
+++ trunk/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml 2010-12-14 15:58:51 UTC (rev 20560)
@@ -182,144 +182,6 @@
</attribute>
</tag>
<tag>
- <tag-name>accordionItem</tag-name>
- <component>
- <component-type>org.richfaces.AccordionItem</component-type>
- <renderer-type>org.richfaces.AccordionItem</renderer-type>
- </component>
- <attribute>
- <name>disabled</name>
- <type>boolean</type>
- </attribute>
- <attribute>
- <name>header</name>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>name</name>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>switchType</name>
- <type>org.richfaces.component.SwitchType</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>
- <name>headerClassActive</name>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>headerClassDisabled</name>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>headerClassInactive</name>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>headerClass</name>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>headerStyle</name>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>contentClass</name>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>onheaderclick</name>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>onheaderdblclick</name>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>onheadermousedown</name>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>onheadermousemove</name>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>onheadermouseup</name>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>onenter</name>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>onleave</name>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>lang</name>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>title</name>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>style</name>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>styleClass</name>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>dir</name>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>onclick</name>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>ondblclick</name>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>onmousedown</name>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>onmousemove</name>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>onmouseout</name>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>onmouseover</name>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>onmouseup</name>
- <type>java.lang.String</type>
- </attribute>
- </tag>
- <tag>
<tag-name>tab</tag-name>
<component>
<component-type>org.richfaces.TabPanelItem</component-type>
14 years, 1 month
JBoss Rich Faces SVN: r20559 - trunk/ui/iteration/ui/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-12-14 10:45:43 -0500 (Tue, 14 Dec 2010)
New Revision: 20559
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractExtendedDataTable.java
Log:
RF-9904
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractExtendedDataTable.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractExtendedDataTable.java 2010-12-14 15:45:15 UTC (rev 20558)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractExtendedDataTable.java 2010-12-14 15:45:43 UTC (rev 20559)
@@ -78,10 +78,10 @@
public abstract int getFrozenColumns();
@Attribute(events=@EventName(value="selectionchange", defaultEvent=true))
- public abstract String getSelectionchange();
+ public abstract String getOnselectionchange();
@Attribute(events=@EventName("beforeselectionchange"))
- public abstract String getBeforeselectionchange();
+ public abstract String getOnbeforeselectionchange();
public String resolveClientId(FacesContext facesContext, UIComponent contextComponent, String metaComponentId) {
if (SCROLL.equals(metaComponentId)) {
14 years, 1 month
JBoss Rich Faces SVN: r20558 - trunk/ui/output/ui/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2010-12-14 10:45:15 -0500 (Tue, 14 Dec 2010)
New Revision: 20558
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanel.java
Log:
RF-9893: Toggle panel: activeItem cannot be changed dynamically
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-12-14 15:16:23 UTC (rev 20557)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanel.java 2010-12-14 15:45:15 UTC (rev 20558)
@@ -264,6 +264,7 @@
popComponentFromEL(context);
+ executeValidate(context);
try {
updateModel(context);
} catch (RuntimeException e) {
@@ -271,7 +272,6 @@
throw e;
}
- executeValidate(context);
if (!isValid()) {
context.renderResponse();
}
@@ -302,7 +302,7 @@
return;
}
- ValueExpression ve = getValueExpression("activeItem");
+ ValueExpression ve = getValueExpression("value");
if (ve == null) {
return;
}
@@ -543,6 +543,14 @@
// ------------------------------------------------ Properties
+
+ @Override
+ public void setValue(Object value) {
+ super.setValue(value);
+
+ setLocalValueSet(true);
+ }
+
public String getActiveItem() {
return (String) getValue();
}
14 years, 1 month