[JBoss JIRA] (RF-12860) Overriding 'Array.prototype.remove' causes JS error when rich:accordion is used
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-12860?page=com.atlassian.jira.plugin.s... ]
Brian Leathem resolved RF-12860.
--------------------------------
Assignee: (was: Brian Leathem)
Fix Version/s: (was: 4.3.2)
Resolution: Won't Fix
Thanks for taking the time to look into it!
> Overriding 'Array.prototype.remove' causes JS error when rich:accordion is used
> -------------------------------------------------------------------------------
>
> Key: RF-12860
> URL: https://issues.jboss.org/browse/RF-12860
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-output
> Affects Versions: 4.3.0.Final
> Environment: JBOSS7/JSF2/FirefoxESR10 or Chrome25.0.1
> Reporter: David Lee
> Labels: javascript, rich:accordionItem
> Attachments: richfaces-sanbox.zip
>
>
> Put the rich:accordionItem and rich:extendedDataTable on same page,
> and just click on any column for sort.
> The firebug will show an error:
> items[i].__header is not a function
> [Break On This Error]
> h -= items[i].__header().outerHeight();
> Looks like accordionItem.js line48 been triggered when sort:
> $(document).one("javascriptServiceComplete", function () {
> item.__fitToHeight(item.getTogglePanel());
> });
> And after this happened, my whole thing crashed.
> Now more sortable or click for any action.
> ----
> *from QA:*
> When the following code is insterted to the page:
> {code}
> <script type="text/javascript">
> //<![CDATA[
> Array.prototype.remove = function(s) {
> for (var i = 0; i < this.length; i++) {
> if (s == this[i]) {
> this.splice(i, 1);
> }
> }
> };
> //]]>
> </script>
> {code}
> and rich:accordion is present, clicking on rich:accordionItem causes the following JS error (from firebug):
> {code}
> items[i].__header is not a function
> [Break On This Error]
> h -= items[i].__header().outerHeight();
> {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, 12 months
[JBoss JIRA] (RF-12860) Overriding 'Array.prototype.remove' causes JS error when rich:accordion is used
by David Lee (JIRA)
[ https://issues.jboss.org/browse/RF-12860?page=com.atlassian.jira.plugin.s... ]
David Lee commented on RF-12860:
--------------------------------
Hi, sorry for reply late...
But after think of this problem,
I found no matter how I add the defensive code ... there still with possibility to have exception.
I think for this issue, I should not modify the Array.prototype but use some other extend to solve my own problem
Thanks
> Overriding 'Array.prototype.remove' causes JS error when rich:accordion is used
> -------------------------------------------------------------------------------
>
> Key: RF-12860
> URL: https://issues.jboss.org/browse/RF-12860
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-output
> Affects Versions: 4.3.0.Final
> Environment: JBOSS7/JSF2/FirefoxESR10 or Chrome25.0.1
> Reporter: David Lee
> Assignee: Brian Leathem
> Labels: javascript, rich:accordionItem
> Fix For: 4.3.2
>
> Attachments: richfaces-sanbox.zip
>
>
> Put the rich:accordionItem and rich:extendedDataTable on same page,
> and just click on any column for sort.
> The firebug will show an error:
> items[i].__header is not a function
> [Break On This Error]
> h -= items[i].__header().outerHeight();
> Looks like accordionItem.js line48 been triggered when sort:
> $(document).one("javascriptServiceComplete", function () {
> item.__fitToHeight(item.getTogglePanel());
> });
> And after this happened, my whole thing crashed.
> Now more sortable or click for any action.
> ----
> *from QA:*
> When the following code is insterted to the page:
> {code}
> <script type="text/javascript">
> //<![CDATA[
> Array.prototype.remove = function(s) {
> for (var i = 0; i < this.length; i++) {
> if (s == this[i]) {
> this.splice(i, 1);
> }
> }
> };
> //]]>
> </script>
> {code}
> and rich:accordion is present, clicking on rich:accordionItem causes the following JS error (from firebug):
> {code}
> items[i].__header is not a function
> [Break On This Error]
> h -= items[i].__header().outerHeight();
> {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, 12 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 commented on RF-12845:
--------------------------------
Brian,
thanks for your suggestion. I made several attempts, but couldn't get it to work.
Using "org.richfaces.component.UIMenuItem" as "componentType" is not accepted, since that's not the actual component type (produces "Named Object: org.richfaces.component.UIMenuItem not found.") - the right one should be "org.richfaces.MenuItem" - I suppose...
So I've tried with this setting:
{code:xml}
<composite:interface componentType="org.richfaces.MenuItem">
<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>
{code}
And using it like that:
{code:xml}
<xxx:menuItem menuKey="aaa" menuItem="bbb" label="TestLabel" value="TestValue" />
{code}
However that produces an error when calling the page: "The following attribute(s) are required, but no values have been supplied for them: value, label.". If I add another composite-attribute like "xyz" and assign a value to it, that works - also for the other custom attributes that are defined. So I don't know what's the special handling for "label" and "value".
Just to test it I also set the attributes to optional and hard-coded "label" and "value". That renders the page without error, but also without the menu item...
> 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, waiting_on_user
>
> 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, 12 months
[JBoss JIRA] (RF-12887) Nodes with types that are not listed in <rich:treeNode> are not rendered
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-12887?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-12887:
-------------------------------
Labels: waiting_on_user (was: )
Can you provide the backing bean that does with this sample to more easily enable us to reproduce your behaviour?
https://community.jboss.org/wiki/SubmittingEffectiveIssueReports
> Nodes with types that are not listed in <rich:treeNode> are not rendered
> ------------------------------------------------------------------------
>
> Key: RF-12887
> URL: https://issues.jboss.org/browse/RF-12887
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: component-tree
> Affects Versions: 4.3.0.Final
> Environment: RichFaces 4.3.0.Final and JSF 2.2
> JBoss AS 7.1.1.Final
> Reporter: Sergey Suvorov
> Priority: Minor
> Labels: waiting_on_user
>
> When using attribute "type" of <rich:treeNode> nodes with different types are not rendered. In the following tree only nodes with types "1", "2" and "1_1" will be rendered
> {code}
> <rich:tree id="tree" nodeType="#{item.data.type}" var="item" value="#{backingBean.rootNode}" toggleType="client" selectionType="ajax">
> <rich:treeNode type="1">
> #{item.data.label}
> </rich:treeNode>
> <rich:treeNode type="2">
> #{item.data.label}
> </rich:treeNode>
> <rich:treeNode type="1_1">
> #{item.data.label}
> </rich:treeNode>
> </rich:tree>
> {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
13 years
[JBoss JIRA] (RF-12885) Drag indicator inside popup panel, react to the drop area underneath the popup panel
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-12885?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-12885:
-------------------------------
Workaround Description: (was: Can you provide some sample code to help us reproduce this behaviour?)
Can you provide some sample code to help us reproduce this behaviour?
> Drag indicator inside popup panel, react to the drop area underneath the popup panel
> ------------------------------------------------------------------------------------
>
> Key: RF-12885
> URL: https://issues.jboss.org/browse/RF-12885
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-drag/drop
> Affects Versions: 4.2.3.Final
> Reporter: Thang Pham
> Labels: waiting_on_user
>
> If I have a drop area inside a popup panel, the drag indicator also react to the drop area right underneath the popup panel. I think this should not be the case.
> If the drop area right underneath does not allow type X of drag, It does not allow the drop area inside the
> popup panel to be drop by type X as well.
--
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
13 years
[JBoss JIRA] (RF-12887) Nodes with types that are not listed in <rich:treeNode> are not rendered
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-12887?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-12887:
-------------------------------
Description:
When using attribute "type" of <rich:treeNode> nodes with different types are not rendered. In the following tree only nodes with types "1", "2" and "1_1" will be rendered
{code}
<rich:tree id="tree" nodeType="#{item.data.type}" var="item" value="#{backingBean.rootNode}" toggleType="client" selectionType="ajax">
<rich:treeNode type="1">
#{item.data.label}
</rich:treeNode>
<rich:treeNode type="2">
#{item.data.label}
</rich:treeNode>
<rich:treeNode type="1_1">
#{item.data.label}
</rich:treeNode>
</rich:tree>
{code}
was:
When using attribute "type" of <rich:treeNode> nodes with different types are not rendered. In the following tree only nodes with types "1", "2" and "1_1" will be rendered
<rich:tree id="tree" nodeType="#{item.data.type}" var="item" value="#{backingBean.rootNode}" toggleType="client" selectionType="ajax">
<rich:treeNode type="1">
#{item.data.label}
</rich:treeNode>
<rich:treeNode type="2">
#{item.data.label}
</rich:treeNode>
<rich:treeNode type="1_1">
#{item.data.label}
</rich:treeNode>
</rich:tree>
> Nodes with types that are not listed in <rich:treeNode> are not rendered
> ------------------------------------------------------------------------
>
> Key: RF-12887
> URL: https://issues.jboss.org/browse/RF-12887
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: component-tree
> Affects Versions: 4.3.0.Final
> Environment: RichFaces 4.3.0.Final and JSF 2.2
> JBoss AS 7.1.1.Final
> Reporter: Sergey Suvorov
> Priority: Minor
>
> When using attribute "type" of <rich:treeNode> nodes with different types are not rendered. In the following tree only nodes with types "1", "2" and "1_1" will be rendered
> {code}
> <rich:tree id="tree" nodeType="#{item.data.type}" var="item" value="#{backingBean.rootNode}" toggleType="client" selectionType="ajax">
> <rich:treeNode type="1">
> #{item.data.label}
> </rich:treeNode>
> <rich:treeNode type="2">
> #{item.data.label}
> </rich:treeNode>
> <rich:treeNode type="1_1">
> #{item.data.label}
> </rich:treeNode>
> </rich:tree>
> {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
13 years
[JBoss JIRA] (RF-12885) Drag indicator inside popup panel, react to the drop area underneath the popup panel
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-12885?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-12885:
-------------------------------
Labels: waiting_on_user (was: )
Workaround Description: Can you provide some sample code to help us reproduce this behaviour?
> Drag indicator inside popup panel, react to the drop area underneath the popup panel
> ------------------------------------------------------------------------------------
>
> Key: RF-12885
> URL: https://issues.jboss.org/browse/RF-12885
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-drag/drop
> Affects Versions: 4.2.3.Final
> Reporter: Thang Pham
> Labels: waiting_on_user
>
> If I have a drop area inside a popup panel, the drag indicator also react to the drop area right underneath the popup panel. I think this should not be the case.
> If the drop area right underneath does not allow type X of drag, It does not allow the drop area inside the
> popup panel to be drop by type X as well.
--
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
13 years
[JBoss JIRA] (RF-12885) Drag indicator inside popup panel, react to the drop area underneath the popup panel
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-12885?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-12885:
-------------------------------
Comment: was deleted
(was: If I have a drop area inside a popup panel, the drag indicator also react to the drop area right under-neath the popup panel. I think this should not be the case.
If the drop area right underneath does not allow type X of drag, It does not allow the drop area inside the popup panel to be drop by type X as well. )
> Drag indicator inside popup panel, react to the drop area underneath the popup panel
> ------------------------------------------------------------------------------------
>
> Key: RF-12885
> URL: https://issues.jboss.org/browse/RF-12885
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-drag/drop
> Affects Versions: 4.2.3.Final
> Reporter: Thang Pham
>
> If I have a drop area inside a popup panel, the drag indicator also react to the drop area right underneath the popup panel. I think this should not be the case.
> If the drop area right underneath does not allow type X of drag, It does not allow the drop area inside the
> popup panel to be drop by type X as well.
--
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
13 years
[JBoss JIRA] (RF-12885) Drag indicator inside popup panel, react to the drop area underneath the popup panel
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-12885?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-12885:
-------------------------------
Description:
If I have a drop area inside a popup panel, the drag indicator also react to the drop area right underneath the popup panel. I think this should not be the case.
If the drop area right underneath does not allow type X of drag, It does not allow the drop area inside the
popup panel to be drop by type X as well.
> Drag indicator inside popup panel, react to the drop area underneath the popup panel
> ------------------------------------------------------------------------------------
>
> Key: RF-12885
> URL: https://issues.jboss.org/browse/RF-12885
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-drag/drop
> Affects Versions: 4.2.3.Final
> Reporter: Thang Pham
>
> If I have a drop area inside a popup panel, the drag indicator also react to the drop area right underneath the popup panel. I think this should not be the case.
> If the drop area right underneath does not allow type X of drag, It does not allow the drop area inside the
> popup panel to be drop by type X as well.
--
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
13 years