Author: Alex.Kolonitsky
Date: 2010-12-03 05:02:10 -0500 (Fri, 03 Dec 2010)
New Revision: 20329
Modified:
trunk/examples/output-demo/src/main/webapp/qunit/panelMenu.xhtml
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java
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/panelMenu.ecss
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-expanded.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuItem.xmlunit.xml
Log:
RF-9317 - panelMenu components
none icon
and action for PanelMenuItem and PanelMenuGroup
Modified: trunk/examples/output-demo/src/main/webapp/qunit/panelMenu.xhtml
===================================================================
--- trunk/examples/output-demo/src/main/webapp/qunit/panelMenu.xhtml 2010-12-03 09:36:22
UTC (rev 20328)
+++ trunk/examples/output-demo/src/main/webapp/qunit/panelMenu.xhtml 2010-12-03 10:02:10
UTC (rev 20329)
@@ -61,7 +61,6 @@
topItemDisableIconLeft="disc"
topGroupDisableIconLeft="disc"
itemChangeListener="#{modalPanel.itemChangeEventListener}"
- action="#{modalPanel.action}"
<pn:panelMenuGroup label="Group 1">
@@ -78,7 +77,7 @@
label="Group 2.2"
iconLeftCollapsed="chevron"
iconLeftExpanded="chevronDown">
- <pn:panelMenuItem label="Item 2.2.1" />
+ <pn:panelMenuItem label="Item 2.2.1"
action="#{modalPanel.action}"/>
<pn:panelMenuItem label="Item 2.2.2"
name="myFavariteIten" />
<pn:panelMenuItem label="Item 2.2.3"/>
</pn:panelMenuGroup>
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java 2010-12-03
09:36:22 UTC (rev 20328)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java 2010-12-03
10:02:10 UTC (rev 20329)
@@ -76,10 +76,10 @@
String compClientId = component.getClientId(context);
String clientId = requestMap.get(compClientId);
if (clientId != null && clientId.equals(compClientId)) {
- new ActionEvent(component).queue();
AbstractPanelMenuItem panelItem = panelMenu.getItem(newValue);
if (panelItem != null) {
+ new ActionEvent(panelItem).queue();
context.getPartialViewContext().getRenderIds().add(panelItem.getClientId(context));
//TODO nick - this should be done on encode, not on decode
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-12-03 09:36:22
UTC (rev 20328)
+++ trunk/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml 2010-12-03 10:02:10
UTC (rev 20329)
@@ -9,14 +9,14 @@
<behavior-id>org.richfaces.component.behavior.ToggleControl</behavior-id>
<behavior-class>org.richfaces.component.behavior.ToggleControl</behavior-class>
</behavior>
-
- <component>
+
+ <component>
<component-type>org.richfaces.ToolBar</component-type>
<component-class>org.richfaces.component.UIToolBar</component-class>
<property>
<description>
- A mutable Map of the attributes associated with
- this component, keyed by attribute name.
+ A mutable Map of the attributes associated with
+ this component, keyed by attribute name.
</description>
<display-name>Attributes Map</display-name>
<icon/>
@@ -1524,6 +1524,18 @@
<component-type>org.richfaces.PanelMenuItem</component-type>
<component-class>org.richfaces.component.html.HtmlPanelMenuItem</component-class>
<property>
+ <property-name>action</property-name>
+ <property-class>javax.faces.el.MethodBinding</property-class>
+ </property>
+ <property>
+ <property-name>actionExpression</property-name>
+ <property-class>javax.el.MethodExpression</property-class>
+ </property>
+ <property>
+ <property-name>actionListener</property-name>
+ <property-class>javax.faces.el.MethodBinding</property-class>
+ </property>
+ <property>
<description></description>
<property-name>icon</property-name>
<property-class>java.lang.String</property-class>
@@ -1584,6 +1596,18 @@
<component-type>org.richfaces.PanelMenuGroup</component-type>
<component-class>org.richfaces.component.html.HtmlPanelMenuGroup</component-class>
<property>
+ <property-name>action</property-name>
+ <property-class>javax.faces.el.MethodBinding</property-class>
+ </property>
+ <property>
+ <property-name>actionExpression</property-name>
+ <property-class>javax.el.MethodExpression</property-class>
+ </property>
+ <property>
+ <property-name>actionListener</property-name>
+ <property-class>javax.faces.el.MethodBinding</property-class>
+ </property>
+ <property>
<description></description>
<property-name>expanded</property-name>
<property-class>boolean</property-class>
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-03 09:36:22 UTC
(rev 20328)
+++ trunk/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml 2010-12-03 10:02:10 UTC
(rev 20329)
@@ -6,7 +6,7 @@
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>
<tag-name>toolBar</tag-name>
<component>
<component-type>org.richfaces.ToolBar</component-type>
@@ -160,8 +160,8 @@
<type>boolean</type>
</attribute>
</tag>
-
-
+
+
<tag>
<tag-name>toggleControl</tag-name>
<behavior>
@@ -213,6 +213,27 @@
<renderer-type>org.richfaces.PanelMenuItem</renderer-type>
</component>
<attribute>
+ <description>MethodExpression representing the application action to
invoke when this component is activated by the user. The expression must evaluate to a
public method that takes no parameters, and returns an Object (the toString() of which is
called to derive the logical outcome) which is passed to the NavigationHandler for this
application.</description>
+ <display-name>Application Action</display-name>
+ <icon/>
+ <name>action</name>
+ <type>javax.faces.el.MethodBinding</type>
+ </attribute>
+ <attribute>
+ <description>MethodExpression representing the application action to
invoke when this component is activated by the user. The expression must evaluate to a
public method that takes no parameters, and returns an Object (the toString() of which is
called to derive the logical outcome) which is passed to the NavigationHandler for this
application.</description>
+ <display-name>Application Action</display-name>
+ <icon/>
+ <name>actionExpression</name>
+ <type>javax.el.MethodExpression</type>
+ </attribute>
+ <attribute>
+ <description><p> MethodExpression representing an action
listener method that will be notified when this component is activated by the user. The
expression must evaluate to a public method that takes an ActionEvent parameter, with a
return type of void, <span class="changed_added_2_0">or to a
public method that takes no arguments with a return type of void. In the latter case, the
method has no way of easily knowing where the event came from, but this can be useful in
cases where a notification is needed that "some action
happened".</span> </p></description>
+ <display-name>Action Listener</display-name>
+ <icon/>
+ <name>actionListener</name>
+ <type>javax.faces.el.MethodBinding</type>
+ </attribute>
+ <attribute>
<description></description>
<name>icon</name>
<type>java.lang.String</type>
@@ -392,6 +413,27 @@
</component>
<attribute>
+ <description>MethodExpression representing the application action to
invoke when this component is activated by the user. The expression must evaluate to a
public method that takes no parameters, and returns an Object (the toString() of which is
called to derive the logical outcome) which is passed to the NavigationHandler for this
application.</description>
+ <display-name>Application Action</display-name>
+ <icon/>
+ <name>action</name>
+ <type>javax.faces.el.MethodBinding</type>
+ </attribute>
+ <attribute>
+ <description>MethodExpression representing the application action to
invoke when this component is activated by the user. The expression must evaluate to a
public method that takes no parameters, and returns an Object (the toString() of which is
called to derive the logical outcome) which is passed to the NavigationHandler for this
application.</description>
+ <display-name>Application Action</display-name>
+ <icon/>
+ <name>actionExpression</name>
+ <type>javax.el.MethodExpression</type>
+ </attribute>
+ <attribute>
+ <description><p> MethodExpression representing an action
listener method that will be notified when this component is activated by the user. The
expression must evaluate to a public method that takes an ActionEvent parameter, with a
return type of void, <span class="changed_added_2_0">or to a
public method that takes no arguments with a return type of void. In the latter case, the
method has no way of easily knowing where the event came from, but this can be useful in
cases where a notification is needed that "some action
happened".</span> </p></description>
+ <display-name>Action Listener</display-name>
+ <icon/>
+ <name>actionListener</name>
+ <type>javax.faces.el.MethodBinding</type>
+ </attribute>
+ <attribute>
<description></description>
<name>expanded</name>
<type>boolean</type>
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.ecss
===================================================================
---
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.ecss 2010-12-03
09:36:22 UTC (rev 20328)
+++
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.ecss 2010-12-03
10:02:10 UTC (rev 20329)
@@ -279,6 +279,7 @@
.rf-pm-chevron-up { width: 16px; height: 16px; background-image:
"url(#{resource['org.richfaces.images:ChevronUp.png']})" }
.rf-pm-disc { width: 16px; height: 16px; background-image:
"url(#{resource['org.richfaces.images:Disc.png']})" }
.rf-pm-grid { width: 16px; height: 16px; background-image:
"url(#{resource['org.richfaces.images:Grid.png']})" }
+.rf-pm-none { width: 16px; height: 16px; }
.rf-pm-spacer { width: 16px; height: 16px; background-image:
"url(#{resource['org.richfaces.images:Spacer.png']})" }
.rf-pm-triangle { width: 16px; height: 16px; background-image:
"url(#{resource['org.richfaces.images:Triangle.png']})" }
.rf-pm-triangle-down { width: 16px; height: 16px; background-image:
"url(#{resource['org.richfaces.images:TriangleDown.png']})" }
Modified:
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-expanded.xmlunit.xml
===================================================================
---
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-expanded.xmlunit.xml 2010-12-03
09:36:22 UTC (rev 20328)
+++
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-expanded.xmlunit.xml 2010-12-03
10:02:10 UTC (rev 20329)
@@ -5,13 +5,13 @@
<tbody>
<tr>
<td class="rf-pm-gr-ico">
- <div class="rf-pm-ico-colps rf-pm-grid"
style="display:none"></div>
- <div class="rf-pm-ico-exp rf-pm-grid"
style="display:block"></div>
+ <div class="rf-pm-ico-colps rf-pm-none"
style="display:none"></div>
+ <div class="rf-pm-ico-exp rf-pm-none"
style="display:block"></div>
</td>
<td class="rf-pm-gr-lbl">Group Label</td>
<td class="rf-pm-gr-exp-ico">
- <div class="rf-pm-ico-colps rf-pm-grid"
style="display:none"></div>
- <div class="rf-pm-ico-exp rf-pm-grid"
style="display:block"></div>
+ <div class="rf-pm-ico-colps rf-pm-none"
style="display:none"></div>
+ <div class="rf-pm-ico-exp rf-pm-none"
style="display:block"></div>
</td>
</tr>
</tbody>
Modified:
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xmlunit.xml
===================================================================
---
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xmlunit.xml 2010-12-03
09:36:22 UTC (rev 20328)
+++
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xmlunit.xml 2010-12-03
10:02:10 UTC (rev 20329)
@@ -5,13 +5,13 @@
<tbody>
<tr>
<td class="rf-pm-top-gr-ico">
- <div class="rf-pm-ico-colps rf-pm-grid"
style="display:none"></div>
- <div class="rf-pm-ico-exp rf-pm-grid"
style="display:block"></div>
+ <div class="rf-pm-ico-colps rf-pm-none"
style="display:none"></div>
+ <div class="rf-pm-ico-exp rf-pm-none"
style="display:block"></div>
</td>
<td class="rf-pm-top-gr-lbl">Group Label</td>
<td class="rf-pm-top-gr-exp-ico">
- <div class="rf-pm-ico-colps rf-pm-grid"
style="display:none"></div>
- <div class="rf-pm-ico-exp rf-pm-grid"
style="display:block"></div>
+ <div class="rf-pm-ico-colps rf-pm-none"
style="display:none"></div>
+ <div class="rf-pm-ico-exp rf-pm-none"
style="display:block"></div>
</td>
</tr>
</tbody>
Modified:
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup.xmlunit.xml
===================================================================
---
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup.xmlunit.xml 2010-12-03
09:36:22 UTC (rev 20328)
+++
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup.xmlunit.xml 2010-12-03
10:02:10 UTC (rev 20329)
@@ -5,13 +5,13 @@
<tbody>
<tr>
<td class="rf-pm-gr-ico">
- <div class="rf-pm-ico-colps rf-pm-grid"
style="display:block"></div>
- <div class="rf-pm-ico-exp rf-pm-grid"
style="display:none"></div>
+ <div class="rf-pm-ico-colps rf-pm-none"
style="display:block"></div>
+ <div class="rf-pm-ico-exp rf-pm-none"
style="display:none"></div>
</td>
<td class="rf-pm-gr-lbl">panelMenuGroup</td>
<td class="rf-pm-gr-exp-ico">
- <div class="rf-pm-ico-colps rf-pm-grid"
style="display:block"></div>
- <div class="rf-pm-ico-exp rf-pm-grid"
style="display:none"></div>
+ <div class="rf-pm-ico-colps rf-pm-none"
style="display:block"></div>
+ <div class="rf-pm-ico-exp rf-pm-none"
style="display:none"></div>
</td>
</tr>
</tbody>
Modified:
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuItem.xmlunit.xml
===================================================================
---
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuItem.xmlunit.xml 2010-12-03
09:36:22 UTC (rev 20328)
+++
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuItem.xmlunit.xml 2010-12-03
10:02:10 UTC (rev 20329)
@@ -2,9 +2,9 @@
<table class="rf-pm-itm-gr">
<tbody>
<tr>
- <td class="rf-pm-itm-ico rf-pm-grid"></td>
+ <td class="rf-pm-itm-ico rf-pm-none"></td>
<td class="rf-pm-itm-lbl">panelMenuItem</td>
- <td class="rf-pm-itm-exp-ico rf-pm-grid"></td>
+ <td class="rf-pm-itm-exp-ico rf-pm-none"></td>
</tr>
</tbody>
</table>