[JBoss JIRA] (RF-12850) Popup panel: button's label is invisible in IE10
by Pavol Pitonak (JIRA)
Pavol Pitonak created RF-12850:
----------------------------------
Summary: Popup panel: button's label is invisible in IE10
Key: RF-12850
URL: https://issues.jboss.org/browse/RF-12850
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: component-panels-layout-themes
Affects Versions: 4.3.1, 4.3.0.Final
Environment: RichFaces 4.3.2-SNAPSHOT
EAP 6.0.1, Tomcat 6.0.32, Tomcat 7.0.35
Mojarra 2.1.7, 2.1.17, MyFaces 2.1.10
Internet Explorer 9, 10
Reporter: Pavol Pitonak
{code:xml}
<rich:popupPanel id="panel" show="true" header="xxx">
<h:commandButton id="button" value="Submit" />
</rich:popupPanel>
{code}
If a page with code snippet above is opened in IE9/IE10, the label "Submit" of button is not displayed until mouse over event.
Since it appears in all JSF implementations and on all runtime containers and works in browsers different from IE, it looks like a bug in IE interpretation of CSS classes.
Sample works fine when header of popup panel is not displayed (i.e. header attribute isn't set and no facet is defined).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 11 months
[JBoss JIRA] (RF-12849) Showcase - update readme - remove obsolete, add new
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/RF-12849?page=com.atlassian.jira.plugin.s... ]
Juraj Húska commented on RF-12849:
----------------------------------
Hey Brian,
please let me know if I can continue with this one. Any other comments what to add ?
> Showcase - update readme - remove obsolete, add new
> ---------------------------------------------------
>
> Key: RF-12849
> URL: https://issues.jboss.org/browse/RF-12849
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: doc, showcase
> Affects Versions: 4.3.1
> Reporter: Juraj Húska
>
> After rewriting showcase readme to markdown syntax I would update it for example with following:
> * reference to showcase online demo
> * remove publishing to GAE and put there publishing to Openshift instead
> * I would create small clickable TOC in the top of the page
> * remove deploying on JBoss AS 6 and maybe add deploying on EAP 6 (it is now available to download)
> * Mention JBDS as an option
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 11 months
[JBoss JIRA] (RF-12849) Showcase - update readme - remove obsolete, add new
by Juraj Húska (JIRA)
Juraj Húska created RF-12849:
--------------------------------
Summary: Showcase - update readme - remove obsolete, add new
Key: RF-12849
URL: https://issues.jboss.org/browse/RF-12849
Project: RichFaces
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: doc, showcase
Affects Versions: 4.3.1
Reporter: Juraj Húska
After rewriting showcase readme to markdown syntax I would update it for example with following:
* reference to showcase online demo
* remove publishing to GAE and put there publishing to Openshift instead
* I would create small clickable TOC in the top of the page
* remove deploying on JBoss AS 6 and maybe add deploying on EAP 6 (it is now available to download)
* Mention JBDS as an option
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 11 months
[JBoss JIRA] (RF-12848) Error "source is not defined" after richfaces-jsf-event.js merge
by Torben Greiser (JIRA)
Torben Greiser created RF-12848:
-----------------------------------
Summary: Error "source is not defined" after richfaces-jsf-event.js merge
Key: RF-12848
URL: https://issues.jboss.org/browse/RF-12848
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: core
Affects Versions: 4.3.1
Reporter: Torben Greiser
Commit 9255380d626227d909bbcd59ea3bc604966ea5bb breaks the following jsf.ajax.request:
{code}
jsf.ajax.request("MyContainer:MySelectionForm", "valueChange", {});
{code}
In <a4j:log/> the following error is displayed:
{code}
richfaces.queue: ajax submit error: source is not defined
{code}
After inspecting richfaces.js I located the cause of the error:
{code}
var getFormElement = function(sourceElement) {
if ($(sourceElement).is('form')) {
return source;
} else {
return $('form').has(sourceElement).get(0);
}
};
{code}
First if-statement evaluates to true, returning source, which itself is not defined:
{code}
ReferenceError: source is not defined
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 11 months
[JBoss JIRA] (RF-12845) rich:menuItem does not work as composite component
by Michael B (JIRA)
[ https://issues.jboss.org/browse/RF-12845?page=com.atlassian.jira.plugin.s... ]
Michael B updated RF-12845:
---------------------------
Description:
When creating a composite component that contains a rich:menuItem, the menu item is not showing. => Client side error while identifying the menu items parent via css-selector.
{code:xml|title:menuItem.xhtml}
<?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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:rich="http://richfaces.org/rich"
xmlns:composite="http://java.sun.com/jsf/composite">
<composite:interface>
<composite:attribute name="icon" type="java.lang.String" required="false" />
<composite:attribute name="label" type="java.lang.String" required="true" />
<composite:attribute name="menuItem" type="java.lang.String" required="true" />
<composite:attribute name="menuKey" type="java.lang.String" required="true" />
<composite:attribute name="value" type="java.lang.String" required="true" />
</composite:interface>
<composite:implementation>
<rich:menuItem label="#{cc.attrs.label}" icon="#{cc.attrs.icon}" action="#{menuController.menuItemClicked}" rendered="#{menuController.isMenuItemAccessible( cc.attrs.menuKey, cc.attrs.menuItem )}">
<f:param name="selectedItem" value="#{cc.attrs.value}" />
</rich:menuItem>
</composite:implementation>
</html>
{code}
Including the resulting composite component in a rich:dropDownMenu like
{code:xml}
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:xxx="http://java.sun.com/jsf/composite/xxx">
<rich:toolbar>
<rich:dropDownMenu>
<f:facet name="label">
<h:outputText value="Test" />
</f:facet>
<xxx:menuItem label="Item 1" value="item1" menuKey="aaa" menuItem="bbb" />
</rich:dropDownMenu>
</rich:toolbar>
</ui:composition>
{code}
... reproduces the problem. Writing the rich:menuItem directly inside the rich:dropDownMenu works. Also wrapping the composite component with rich:menuGroup works. Only the direct child option fails.
See example for comparison - item 2 and 3 are working, while item 1 is not:
{code:xml}
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:xxx="http://java.sun.com/jsf/composite/xxx">
<rich:toolbar>
<rich:dropDownMenu>
<f:facet name="label">
<h:outputText value="Test" />
</f:facet>
<xxx:menuItem label="Item 1" value="item1" menuKey="aaa" menuItem="bbb" />
<rich:menuItem label="Item 2" action="#{menuController.menuItemClicked}" rendered="#{menuController.isMenuItemAccessible( 'aaa', 'bbb' )}">
<f:param name="selectedItem" value="item2" />
</rich:menuItem>
<rich:menuGroup label="Group">
<xxx:menuItem label="Item 3" value="item3" menuKey="aaa" menuItem="bbb" />
</rich:menuGroup>
</rich:dropDownMenu>
</rich:toolbar>
</ui:composition>
{code}
On a side not: just found out, that the problem might come from the rich:dropDownMenu only allowing for direct children of type rich:menuGroup or rich:menuItem, while a composite component always adds another UIPanel to wrap itself. So if I understand the concept correctly, one would have to write a custom component class that is a menu item and also implements NamingContainer and add it as 'componentType' to the interface. Kinda beats the purpose of being able to easily create an extended markup for components that are expected as direct children though.
was:
When creating a composite component that contains a rich:menuItem, the menu item is not showing. => Client side error while identifying the menu items parent via css-selector.
{code:xml|title:menuItem.xhtml}
<?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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:rich="http://richfaces.org/rich"
xmlns:composite="http://java.sun.com/jsf/composite">
<composite:interface>
<composite:attribute name="icon" type="java.lang.String" required="false" />
<composite:attribute name="label" type="java.lang.String" required="true" />
<composite:attribute name="menuItem" type="java.lang.String" required="true" />
<composite:attribute name="menuKey" type="java.lang.String" required="true" />
<composite:attribute name="value" type="java.lang.String" required="true" />
</composite:interface>
<composite:implementation>
<rich:menuItem label="#{cc.attrs.label}" icon="#{cc.attrs.icon}" action="#{menuController.menuItemClicked}" rendered="#{menuController.isMenuItemAccessible( cc.attrs.menuKey, cc.attrs.menuItem )}">
<f:param name="selectedItem" value="#{cc.attrs.value}" />
</rich:menuItem>
</composite:implementation>
</html>
{code}
Including the resulting composite component in a rich:dropDownMenu like
{code:xml}
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:xxx="http://java.sun.com/jsf/composite/xxx">
<rich:toolbar>
<rich:dropDownMenu>
<f:facet name="label">
<h:outputText value="Test" />
</f:facet>
<xxx:menuItem label="Item 1" value="item1" menuKey="aaa" menuItem="bbb" />
</rich:dropDownMenu>
</rich:toolbar>
</ui:composition>
{code}
... reproduces the problem. Writing the rich:menuItem directly inside the rich:dropDownMenu works. Also wrapping the composite component with rich:menuGroup works. Only the direct child option fails.
See example for comparison - item 2 and 3 are working, while item 1 is not:
{code:xml}
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:xxx="http://java.sun.com/jsf/composite/xxx">
<rich:toolbar>
<rich:dropDownMenu>
<f:facet name="label">
<h:outputText value="Test" />
</f:facet>
<xxx:menuItem label="Item 1" value="item1" menuKey="aaa" menuItem="bbb" />
<rich:menuItem label="Item 2" action="#{menuController.menuItemClicked}" rendered="#{menuController.isMenuItemAccessible( 'aaa', 'bbb' )}">
<f:param name="selectedItem" value="item2" />
</rich:menuItem>
<rich:menuGroup label="Group">
<xxx:menuItem label="Item 3" value="item3" menuKey="aaa" menuItem="bbb" />
</rich:menuGroup>
</rich:dropDownMenu>
</rich:toolbar>
</ui:composition>
{code}
On a side not: just found out, that the problem might come from the rich:dropDownMenu only allowing for direct children of type rich:menuGroup or rich:menuItem, while a composite component always adds another UIPanel to wrap itself. So if I understand the concept correctly, one would have to write a custom component class that is a menu item and also implements NamingContainer and add it as 'componentType' to the interface. Kind of beats the purpose of being able to easily create an extended markup for components that are expected as direct children though.
> rich:menuItem does not work as composite component
> --------------------------------------------------
>
> Key: RF-12845
> URL: https://issues.jboss.org/browse/RF-12845
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-menu
> Affects Versions: 4.3.1
> Environment: Win7 x64, Java 6 x64, Tomcat 7.0.30 x64, RF 4.3.1, IE8 + FF19.0.2
> Reporter: Michael B
> Priority: Minor
> Labels: richfaces
>
> When creating a composite component that contains a rich:menuItem, the menu item is not showing. => Client side error while identifying the menu items parent via css-selector.
> {code:xml|title:menuItem.xhtml}
> <?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:h="http://java.sun.com/jsf/html"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:rich="http://richfaces.org/rich"
> xmlns:composite="http://java.sun.com/jsf/composite">
>
> <composite:interface>
> <composite:attribute name="icon" type="java.lang.String" required="false" />
> <composite:attribute name="label" type="java.lang.String" required="true" />
> <composite:attribute name="menuItem" type="java.lang.String" required="true" />
> <composite:attribute name="menuKey" type="java.lang.String" required="true" />
> <composite:attribute name="value" type="java.lang.String" required="true" />
> </composite:interface>
>
> <composite:implementation>
> <rich:menuItem label="#{cc.attrs.label}" icon="#{cc.attrs.icon}" action="#{menuController.menuItemClicked}" rendered="#{menuController.isMenuItemAccessible( cc.attrs.menuKey, cc.attrs.menuItem )}">
> <f:param name="selectedItem" value="#{cc.attrs.value}" />
> </rich:menuItem>
> </composite:implementation>
>
> </html>
> {code}
> Including the resulting composite component in a rich:dropDownMenu like
> {code:xml}
> <ui:composition xmlns="http://www.w3.org/1999/xhtml"
> xmlns:ui="http://java.sun.com/jsf/facelets"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:a4j="http://richfaces.org/a4j"
> xmlns:rich="http://richfaces.org/rich"
> xmlns:xxx="http://java.sun.com/jsf/composite/xxx">
>
> <rich:toolbar>
> <rich:dropDownMenu>
> <f:facet name="label">
> <h:outputText value="Test" />
> </f:facet>
> <xxx:menuItem label="Item 1" value="item1" menuKey="aaa" menuItem="bbb" />
> </rich:dropDownMenu>
> </rich:toolbar>
>
> </ui:composition>
> {code}
> ... reproduces the problem. Writing the rich:menuItem directly inside the rich:dropDownMenu works. Also wrapping the composite component with rich:menuGroup works. Only the direct child option fails.
> See example for comparison - item 2 and 3 are working, while item 1 is not:
> {code:xml}
> <ui:composition xmlns="http://www.w3.org/1999/xhtml"
> xmlns:ui="http://java.sun.com/jsf/facelets"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:a4j="http://richfaces.org/a4j"
> xmlns:rich="http://richfaces.org/rich"
> xmlns:xxx="http://java.sun.com/jsf/composite/xxx">
>
> <rich:toolbar>
> <rich:dropDownMenu>
> <f:facet name="label">
> <h:outputText value="Test" />
> </f:facet>
> <xxx:menuItem label="Item 1" value="item1" menuKey="aaa" menuItem="bbb" />
> <rich:menuItem label="Item 2" action="#{menuController.menuItemClicked}" rendered="#{menuController.isMenuItemAccessible( 'aaa', 'bbb' )}">
> <f:param name="selectedItem" value="item2" />
> </rich:menuItem>
> <rich:menuGroup label="Group">
> <xxx:menuItem label="Item 3" value="item3" menuKey="aaa" menuItem="bbb" />
> </rich:menuGroup>
> </rich:dropDownMenu>
> </rich:toolbar>
>
> </ui:composition>
> {code}
> On a side not: just found out, that the problem might come from the rich:dropDownMenu only allowing for direct children of type rich:menuGroup or rich:menuItem, while a composite component always adds another UIPanel to wrap itself. So if I understand the concept correctly, one would have to write a custom component class that is a menu item and also implements NamingContainer and add it as 'componentType' to the interface. Kinda beats the purpose of being able to easily create an extended markup for components that are expected as direct children though.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 11 months
[JBoss JIRA] (RF-12845) rich:menuItem does not work as composite component
by Michael B (JIRA)
[ https://issues.jboss.org/browse/RF-12845?page=com.atlassian.jira.plugin.s... ]
Michael B updated RF-12845:
---------------------------
Priority: Minor (was: Major)
Description:
When creating a composite component that contains a rich:menuItem, the menu item is not showing. => Client side error while identifying the menu items parent via css-selector.
{code:xml|title:menuItem.xhtml}
<?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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:rich="http://richfaces.org/rich"
xmlns:composite="http://java.sun.com/jsf/composite">
<composite:interface>
<composite:attribute name="icon" type="java.lang.String" required="false" />
<composite:attribute name="label" type="java.lang.String" required="true" />
<composite:attribute name="menuItem" type="java.lang.String" required="true" />
<composite:attribute name="menuKey" type="java.lang.String" required="true" />
<composite:attribute name="value" type="java.lang.String" required="true" />
</composite:interface>
<composite:implementation>
<rich:menuItem label="#{cc.attrs.label}" icon="#{cc.attrs.icon}" action="#{menuController.menuItemClicked}" rendered="#{menuController.isMenuItemAccessible( cc.attrs.menuKey, cc.attrs.menuItem )}">
<f:param name="selectedItem" value="#{cc.attrs.value}" />
</rich:menuItem>
</composite:implementation>
</html>
{code}
Including the resulting composite component in a rich:dropDownMenu like
{code:xml}
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:xxx="http://java.sun.com/jsf/composite/xxx">
<rich:toolbar>
<rich:dropDownMenu>
<f:facet name="label">
<h:outputText value="Test" />
</f:facet>
<xxx:menuItem label="Item 1" value="item1" menuKey="aaa" menuItem="bbb" />
</rich:dropDownMenu>
</rich:toolbar>
</ui:composition>
{code}
... reproduces the problem. Writing the rich:menuItem directly inside the rich:dropDownMenu works. Also wrapping the composite component with rich:menuGroup works. Only the direct child option fails.
See example for comparison - item 2 and 3 are working, while item 1 is not:
{code:xml}
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:xxx="http://java.sun.com/jsf/composite/xxx">
<rich:toolbar>
<rich:dropDownMenu>
<f:facet name="label">
<h:outputText value="Test" />
</f:facet>
<xxx:menuItem label="Item 1" value="item1" menuKey="aaa" menuItem="bbb" />
<rich:menuItem label="Item 2" action="#{menuController.menuItemClicked}" rendered="#{menuController.isMenuItemAccessible( 'aaa', 'bbb' )}">
<f:param name="selectedItem" value="item2" />
</rich:menuItem>
<rich:menuGroup label="Group">
<xxx:menuItem label="Item 3" value="item3" menuKey="aaa" menuItem="bbb" />
</rich:menuGroup>
</rich:dropDownMenu>
</rich:toolbar>
</ui:composition>
{code}
On a side not: just found out, that the problem might come from the rich:dropDownMenu only allowing for direct children of type rich:menuGroup or rich:menuItem, while a composite component always adds another UIPanel to wrap itself. So if I understand the concept correctly, one would have to write a custom component class that is a menu item and also implements NamingContainer and add it as 'componentType' to the interface. Kind of beats the purpose of being able to easily create an extended markup for components that are expected as direct children though.
was:
When creating a composite component that contains a rich:menuItem, the menu item is not showing. => Client side error while identifying the menu items parent via css-selector.
{code:xml|title:menuItem.xhtml}
<?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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:rich="http://richfaces.org/rich"
xmlns:composite="http://java.sun.com/jsf/composite">
<composite:interface>
<composite:attribute name="icon" type="java.lang.String" required="false" />
<composite:attribute name="label" type="java.lang.String" required="true" />
<composite:attribute name="menuItem" type="java.lang.String" required="true" />
<composite:attribute name="menuKey" type="java.lang.String" required="true" />
<composite:attribute name="value" type="java.lang.String" required="true" />
</composite:interface>
<composite:implementation>
<rich:menuItem label="#{cc.attrs.label}" icon="#{cc.attrs.icon}" action="#{menuController.menuItemClicked}" rendered="#{menuController.isMenuItemAccessible( cc.attrs.menuKey, cc.attrs.menuItem )}">
<f:param name="selectedItem" value="#{cc.attrs.value}" />
</rich:menuItem>
</composite:implementation>
</html>
{code}
Including the resulting composite component in a rich:dropDownMenu like
{code:xml}
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:xxx="http://java.sun.com/jsf/composite/xxx">
<rich:toolbar>
<rich:dropDownMenu>
<f:facet name="label">
<h:outputText value="Test" />
</f:facet>
<xxx:menuItem label="Item 1" value="item1" menuKey="aaa" menuItem="bbb" />
</rich:dropDownMenu>
</rich:toolbar>
</ui:composition>
{code}
... reproduces the problem. Writing the rich:menuItem directly inside the rich:dropDownMenu works. Also wrapping the composite component with rich:menuGroup works. Only the direct child option fails.
See example for comparison - item 2 and 3 are working, while item 1 is not:
{code:xml}
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:xxx="http://java.sun.com/jsf/composite/xxx">
<rich:toolbar>
<rich:dropDownMenu>
<f:facet name="label">
<h:outputText value="Test" />
</f:facet>
<xxx:menuItem label="Item 1" value="item1" menuKey="aaa" menuItem="bbb" />
<rich:menuItem label="Item 2" action="#{menuController.menuItemClicked}" rendered="#{menuController.isMenuItemAccessible( 'aaa', 'bbb' )}">
<f:param name="selectedItem" value="item2" />
</rich:menuItem>
<rich:menuGroup label="Group">
<xxx:menuItem label="Item 3" value="item3" menuKey="aaa" menuItem="bbb" />
</rich:menuGroup>
</rich:dropDownMenu>
</rich:toolbar>
</ui:composition>
{code}
> rich:menuItem does not work as composite component
> --------------------------------------------------
>
> Key: RF-12845
> URL: https://issues.jboss.org/browse/RF-12845
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-menu
> Affects Versions: 4.3.1
> Environment: Win7 x64, Java 6 x64, Tomcat 7.0.30 x64, RF 4.3.1, IE8 + FF19.0.2
> Reporter: Michael B
> Priority: Minor
> Labels: richfaces
>
> When creating a composite component that contains a rich:menuItem, the menu item is not showing. => Client side error while identifying the menu items parent via css-selector.
> {code:xml|title:menuItem.xhtml}
> <?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:h="http://java.sun.com/jsf/html"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:rich="http://richfaces.org/rich"
> xmlns:composite="http://java.sun.com/jsf/composite">
>
> <composite:interface>
> <composite:attribute name="icon" type="java.lang.String" required="false" />
> <composite:attribute name="label" type="java.lang.String" required="true" />
> <composite:attribute name="menuItem" type="java.lang.String" required="true" />
> <composite:attribute name="menuKey" type="java.lang.String" required="true" />
> <composite:attribute name="value" type="java.lang.String" required="true" />
> </composite:interface>
>
> <composite:implementation>
> <rich:menuItem label="#{cc.attrs.label}" icon="#{cc.attrs.icon}" action="#{menuController.menuItemClicked}" rendered="#{menuController.isMenuItemAccessible( cc.attrs.menuKey, cc.attrs.menuItem )}">
> <f:param name="selectedItem" value="#{cc.attrs.value}" />
> </rich:menuItem>
> </composite:implementation>
>
> </html>
> {code}
> Including the resulting composite component in a rich:dropDownMenu like
> {code:xml}
> <ui:composition xmlns="http://www.w3.org/1999/xhtml"
> xmlns:ui="http://java.sun.com/jsf/facelets"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:a4j="http://richfaces.org/a4j"
> xmlns:rich="http://richfaces.org/rich"
> xmlns:xxx="http://java.sun.com/jsf/composite/xxx">
>
> <rich:toolbar>
> <rich:dropDownMenu>
> <f:facet name="label">
> <h:outputText value="Test" />
> </f:facet>
> <xxx:menuItem label="Item 1" value="item1" menuKey="aaa" menuItem="bbb" />
> </rich:dropDownMenu>
> </rich:toolbar>
>
> </ui:composition>
> {code}
> ... reproduces the problem. Writing the rich:menuItem directly inside the rich:dropDownMenu works. Also wrapping the composite component with rich:menuGroup works. Only the direct child option fails.
> See example for comparison - item 2 and 3 are working, while item 1 is not:
> {code:xml}
> <ui:composition xmlns="http://www.w3.org/1999/xhtml"
> xmlns:ui="http://java.sun.com/jsf/facelets"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:a4j="http://richfaces.org/a4j"
> xmlns:rich="http://richfaces.org/rich"
> xmlns:xxx="http://java.sun.com/jsf/composite/xxx">
>
> <rich:toolbar>
> <rich:dropDownMenu>
> <f:facet name="label">
> <h:outputText value="Test" />
> </f:facet>
> <xxx:menuItem label="Item 1" value="item1" menuKey="aaa" menuItem="bbb" />
> <rich:menuItem label="Item 2" action="#{menuController.menuItemClicked}" rendered="#{menuController.isMenuItemAccessible( 'aaa', 'bbb' )}">
> <f:param name="selectedItem" value="item2" />
> </rich:menuItem>
> <rich:menuGroup label="Group">
> <xxx:menuItem label="Item 3" value="item3" menuKey="aaa" menuItem="bbb" />
> </rich:menuGroup>
> </rich:dropDownMenu>
> </rich:toolbar>
>
> </ui:composition>
> {code}
> On a side not: just found out, that the problem might come from the rich:dropDownMenu only allowing for direct children of type rich:menuGroup or rich:menuItem, while a composite component always adds another UIPanel to wrap itself. So if I understand the concept correctly, one would have to write a custom component class that is a menu item and also implements NamingContainer and add it as 'componentType' to the interface. Kind of beats the purpose of being able to easily create an extended markup for components that are expected as direct children though.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 11 months