Author: ppitonak(a)redhat.com
Date: 2012-01-12 05:01:52 -0500 (Thu, 12 Jan 2012)
New Revision: 23139
Modified:
modules/tests/metamer/branches/contextMenu/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichContextMenuBean.java
modules/tests/metamer/branches/contextMenu/application/src/main/webapp/components/richContextMenu/simple.xhtml
Log:
context menu sample fixed to work in all templates
Modified:
modules/tests/metamer/branches/contextMenu/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichContextMenuBean.java
===================================================================
---
modules/tests/metamer/branches/contextMenu/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichContextMenuBean.java 2012-01-11
13:51:19 UTC (rev 23138)
+++
modules/tests/metamer/branches/contextMenu/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichContextMenuBean.java 2012-01-12
10:01:52 UTC (rev 23139)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat, Inc., and individual contributors
+ * Copyright 2010-2012, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -50,10 +50,11 @@
public void init() {
log.info("ContextMenu attributes initialized.");
attributes =
Attributes.getComponentAttributesFromFacesConfig(UIContextMenu.class, getClass());
- attributes.setAttribute("attachTo", "form:panelClick");
attributes.setAttribute("disabled", "false");
attributes.setAttribute("rendered", "true");
attributes.setAttribute("hideDelay", "600");
+
+ attributes.remove("attachTo");
}
public Attributes getAttributes() {
Modified:
modules/tests/metamer/branches/contextMenu/application/src/main/webapp/components/richContextMenu/simple.xhtml
===================================================================
---
modules/tests/metamer/branches/contextMenu/application/src/main/webapp/components/richContextMenu/simple.xhtml 2012-01-11
13:51:19 UTC (rev 23138)
+++
modules/tests/metamer/branches/contextMenu/application/src/main/webapp/components/richContextMenu/simple.xhtml 2012-01-12
10:01:52 UTC (rev 23139)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010-2011, Red Hat, Inc. and individual contributors
+Copyright 2010-2012, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -28,6 +28,8 @@
<ui:composition template="/templates/template.xhtml">
+ <ui:param name="componentId" value="panelClick" />
+
<ui:define name="view">
<f:metadata>
<f:viewParam name="templates"
value="#{templateBean.templates}">
@@ -40,8 +42,8 @@
<h:panelGroup layout="block" style="width:500px;
background-color: lightgreen; padding: 15px" id="panelClick">
Righ click here for a contextMenu
</h:panelGroup>
- <rich:contextMenu id="ctxmenu"
-
attachTo="#{richContextMenuBean.attributes['attachTo'].value}"
+ <rich:contextMenu id="ctxMenu"
+ attachTo="#{nestedComponentId}"
dir="#{richContextMenuBean.attributes['dir'].value}"
direction="#{richContextMenuBean.attributes['direction'].value}"
disabled="#{richContextMenuBean.attributes['disabled'].value}"
Show replies by date