[richfaces-issues] [JBoss JIRA] (RF-11763) javascript error : item is undefined on nested tabPanel with switchType='ajax'

Jean ANDRE (JIRA) jira-events at lists.jboss.org
Wed Mar 14 17:02:47 EDT 2012


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

Jean ANDRE edited comment on RF-11763 at 3/14/12 5:01 PM:
----------------------------------------------------------

It is clear that there is an undefined object which is bring back to the list of items but I cannot answer why. So, here is the smallest application that we can offer you to help in debugging the case. You can probably also use the this application for the bug RF-11985.
Thank you very much.


*Note 1:* I've reduce the application to only 4 xhmtl files. The index page, the search, the list and the detailed view. All the xhtml have been reduced to their minimum content.

*Note 2:* It is clear that there is a problem of resources downloading. To see the case, use an a4j:command button inside the file searchClient.xhtml and a4j:commandLink into listClient instead of JSF tag. I've left the attribute render for easy change.

I've also removed the lib from the WEB-INF/lib for a smaller zip. Lbraries are:
 - annotations-4.2.0.Final
 - commons-lang-2.4
 - commons-logging-1.1.1
 - cssparser-0.9.6
 - guava-11.0.1
 - hibernate-validator-4.2.0.Final
 - javax.faces.jar
 - log4j-1.2.16
 - org.springframework.asm-3.0.6.RELEASE
 - org.springframework.beans-3.0.6.RELEASE
 - org.springframework.context-3.0.6.RELEASE
 - org.springframework.core-3.0.6.RELEASE
 - org.springframework.expression-3.0.6.RELEASE
 - org.springframework.web-3.0.6.RELEASE
 - richfaces-components-api-4.2.0.Final
 - richfaces-components-ui-4.2.0.Final
 - richfaces-core-api-4.2.0.Final
 - richfaces-core-impl-4.2.0.Final
 - sac-1.3
 - slf4j-api-1.6.1
 - slf4j-log4j12-1.6.1

Please, let me know if your are able to reproduce the bug with the application sent.
Sincerely,

                
      was (Author: jorelia64):
    It is clear that there is an undefined object which is bring back to the list of items but I cannot answer why. So, here is the smallest application that we can offer you to help in debugging the case. You can probably also use the this application for the bug RF-11985.
Thank you very much.


*Note 1:* I've reduce the application to only 4 xhmtl file. The index page, the search, the list and the detailed view. All the xhtml have been reduced to the minimum content.

*Note 2:* It is clear that there is problem of resource downloading. To see the case, use an a4j:command button inside the file searchClient.xhtml and a4j:commandLink into listClient instead of JSF tag. I've left the attribute render for easy change.

I've also removed the lib from the WEB-INF/lib for a smaller zip. Lbraries are:
 - annotations-4.2.0.Final
 - commons-lang-2.4
 - commons-logging-1.1.1
 - cssparser-0.9.6
 - guava-11.0.1
 - hibernate-validator-4.2.0.Final
 - javax.faces.jar
 - log4j-1.2.16
 - org.springframework.asm-3.0.6.RELEASE
 - org.springframework.beans-3.0.6.RELEASE
 - org.springframework.context-3.0.6.RELEASE
 - org.springframework.core-3.0.6.RELEASE
 - org.springframework.expression-3.0.6.RELEASE
 - org.springframework.web-3.0.6.RELEASE
 - richfaces-components-api-4.2.0.Final
 - richfaces-components-ui-4.2.0.Final
 - richfaces-core-api-4.2.0.Final
 - richfaces-core-impl-4.2.0.Final
 - sac-1.3
 - slf4j-api-1.6.1
 - slf4j-log4j12-1.6.1

Please, let me know if your are able to reproduce the bug with the application sent.
Sincerely,

                  
> javascript error : item is undefined on nested tabPanel with switchType='ajax'
> ------------------------------------------------------------------------------
>
>                 Key: RF-11763
>                 URL: https://issues.jboss.org/browse/RF-11763
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 4.1.0.CR1
>         Environment: Websphere 8 - RAD 8 - JSF Mojorra 2.1.4 - Spring 3.0.6 Final - Use @Inject @Named @SessionScoped as annotations - Firefox 7.0.1 - Windows 7 (6.1 sp1) - AspectJ 1.6.12 / AJDT 
>            Reporter: Jean ANDRE
>            Priority: Blocker
>             Fix For: 4.Future
>
>         Attachments: RF-11763Web.zip, RF-11763_ScreenShot.png, RF-11763_ScreenShot_malformedXML.png, RF-11763_ScreenShot_malformedXML.xml, RF-11763_ScreenShot_Undefined.png, screenshot-1.jpg
>
>
> See also RF-11750 for the context.
> Briefly, we have nested tabPanel - The firs tabPanel is made of static and dynamic tabPanel. One tabPanel contains the search form. When the user performs a search and for each search we open a new tab that contains the result list. When the user click on an item, we update the tab with the detailed information.
> The detailed information is made of 6 tabs - There are like a subtabs from the parent tabs. When we set the switchType to 'client' the tab performs well. But as we want that the same tab serves as form to edit and view the detailed information, we want to refresh the tab to display the inputText instead of the outputText. This is the edit mode.
> Then, we need to refresh the tab and we decided to pass in ajax switchType for theses subTab. Owener, switching to the 'ajax' triggers a javascript error that blocks the UI. None tab is selectable, user cannot switch from a tab to another tab. Moreover we failed to refresh the tab but the reason is still unknown.
> Javascript error is :
> {code}
> item is undefined - [Stopper sur une erreur] if (!item.disabled && item.getName() === itemName) { 
> toggle...chfaces (ligne 363)
> http://localhost:12000/crm/javax.faces.resource/togglePanel.js.jsf?ln=org.richfaces
> {code}
> The involved code is (where >>>> is):
> {code}
> /**
> * @private
> * */
> __getItemIndex : function (itemName) {
> var item;
> for (var i = 0; i < this.items.length; i++) {
>   item = this.items[i];
> >>>>>> if (!item.disabled && item.getName() === itemName) {
> return i;
> }
> }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the richfaces-issues mailing list