[richfaces-issues] [JBoss JIRA] Commented: (RF-10221) Error when opening a popup panel

Gleb Galkin (JIRA) jira-events at lists.jboss.org
Thu Mar 10 12:55:47 EST 2011


    [ https://issues.jboss.org/browse/RF-10221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587238#comment-12587238 ] 

Gleb Galkin commented on RF-10221:
----------------------------------

James, I've checked these methods once more and they are OK, but I've recognized a possible error in your code: you use RichFaces.ui.PopupPanel.showPopupPanel('foo', {}); call with wrong ID. Let's assume we have the following markup:

<h:form id="form">
<rich:popupPanel id="foo" />
</h:form> 

So, the call should be RichFaces.ui.PopupPanel.showPopupPanel('form:foo', {}); since the ID of the form is attached to the rendered popup panel ID. I would suggest you to use #{rich:component('foo')}.show() instead since the form could be without it's own ID and all the necessary JS code will be generated by RF. 

> Error when opening a popup panel
> --------------------------------
>
>                 Key: RF-10221
>                 URL: https://issues.jboss.org/browse/RF-10221
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-panels-layout-themes
>    Affects Versions: 4.0.0.Milestone5
>         Environment: myfaces 2.0.3, tomcat 6
>            Reporter: James G
>            Assignee: Gleb Galkin
>              Labels: popupPanel
>             Fix For: 4.0.0.Final
>
>
> When I call show or hide for a popup panel I get the following error: "fn is undefined" from firefox.
> I believe the offening code is:  (in popupPanel.js)
>    showPopupPanel : function (id, opts, event) {
>       $(document).ready(richfaces.$(id).show());
>    },
>    hidePopupPanel : function (id, opts, event) {
>       $(document).ready(richfaces.$(id).hide());
>    }
> 		
> It should probably be something more like:
>    showPopupPanel : function (id, opts, event) {
>       $(document).ready( function() { richfaces.$(id).show() } );
>    },
>    hidePopupPanel : function (id, opts, event) {
>       $(document).ready( function(){ richfaces.$(id).hide() } );
>    }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the richfaces-issues mailing list