Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.1
    • Component/s: Bridge
    • Labels:
      None
    • Environment:
      Liferay 6.0

      Description

      Running the test case provided by the user (forum) shows that when the navigation button is clicked, there is a JS error. From Firebug:

          detect(parents(element), function (e) {return e.configuration;}) is null

          [Break On This Error] return detect(parents(element), function(e) {
          forum?...=normal (line 34)

      The test case needs to be deployed in Liferay portal.

        Activity

        Hide
        Mircea Toma added a comment - - edited

        The error occurs when one of the callbacks is trying to process the form elements found in the DOM update. During processing the bridge configuration is read from the form's parent node. The code fails because one of the processed form found in the DOM update is not actually rendered by JSF, the form is missing the parent having with the configuration attached.

        The fix changed 'findUpdatedForms' function to return only the forms rendered by JSF components thus making sure that the process forms will have the configuration set on the parent nodes.

        Show
        Mircea Toma added a comment - - edited The error occurs when one of the callbacks is trying to process the form elements found in the DOM update. During processing the bridge configuration is read from the form's parent node. The code fails because one of the processed form found in the DOM update is not actually rendered by JSF, the form is missing the parent having with the configuration attached. The fix changed 'findUpdatedForms' function to return only the forms rendered by JSF components thus making sure that the process forms will have the configuration set on the parent nodes.
        Hide
        Alexey Trotsenko added a comment -

        after fixing error is:
        'value' - is null or not an object (javascript error)

        Show
        Alexey Trotsenko added a comment - after fixing error is: 'value' - is null or not an object (javascript error)
        Hide
        Neil Griffin added a comment -

        I just tested this with the ICEfaces 2.0 trunk (versioned as 2.0.1 in icefaces/maven2/icefaces.pom) with the latest trunk of the PortletFaces Bridge (versioned as 2.0.0-BETA4) with Mojarra 2.1 and I'm getting the following JavaScript error:

        form[form.id] is undefined

        Show
        Neil Griffin added a comment - I just tested this with the ICEfaces 2.0 trunk (versioned as 2.0.1 in icefaces/maven2/icefaces.pom) with the latest trunk of the PortletFaces Bridge (versioned as 2.0.0-BETA4) with Mojarra 2.1 and I'm getting the following JavaScript error: form [form.id] is undefined
        Hide
        Neil Griffin added a comment -

        Demo portlet attached. Error occurs when all form fields are filled out and the Submit button is clicked.

        Show
        Neil Griffin added a comment - Demo portlet attached. Error occurs when all form fields are filled out and the Submit button is clicked.
        Hide
        Mircea Toma added a comment -

        Added test to verify the existence of form ID before checking the existence of the form element with the same name as the ID.

        Show
        Mircea Toma added a comment - Added test to verify the existence of form ID before checking the existence of the form element with the same name as the ID.
        Hide
        Neil Griffin added a comment -

        Hi Mircea – I did an svn update to svn revision 24000 and tried this again, but am still getting a JavaScript error at line 2174 in FireFox:

        form[form.id] is undefined
        [Break On This Error] (form.id && form.id == form[form.id].value);

        Thanks in advance,

        Neil

        Show
        Neil Griffin added a comment - Hi Mircea – I did an svn update to svn revision 24000 and tried this again, but am still getting a JavaScript error at line 2174 in FireFox: form [form.id] is undefined [Break On This Error] (form.id && form.id == form [form.id] .value); Thanks in advance, Neil
        Hide
        Mircea Toma added a comment -

        Sorry Neil about this. The test seemed so benign.

        The fix checks the existence of the form element with the same name as the form ID before reading its 'value' property.

        Show
        Mircea Toma added a comment - Sorry Neil about this. The test seemed so benign. The fix checks the existence of the form element with the same name as the form ID before reading its 'value' property.
        Hide
        Neil Griffin added a comment -

        Verified as fixed – thanks Mircea!

        BTW – The ICEfaces forum reference talks about, that after the navigation takes place, all of the Liferay menus, etc. disappear. Now that you fixed this issue, I just reproduced that problem – it's a servlet dependency in Mojarra where jsf.js replaces swaps out the entire <body>...</body> when it sees a javax.faces.ViewState DOM replacement in the partial update. This is something that will probably get fixed in JSF 2.2 but we'll have to hack around it in the bridge here: http://jira.portletfaces.org/browse/BRIDGE-74

        Show
        Neil Griffin added a comment - Verified as fixed – thanks Mircea! BTW – The ICEfaces forum reference talks about, that after the navigation takes place, all of the Liferay menus, etc. disappear. Now that you fixed this issue, I just reproduced that problem – it's a servlet dependency in Mojarra where jsf.js replaces swaps out the entire <body>...</body> when it sees a javax.faces.ViewState DOM replacement in the partial update. This is something that will probably get fixed in JSF 2.2 but we'll have to hack around it in the bridge here: http://jira.portletfaces.org/browse/BRIDGE-74
        Hide
        Neil Griffin added a comment -

        Update: I just closed BRIDGE-74 because I realized the Liferay Menus disappearing is a problem with ICEfaces. See http://jira.icefaces.org/browse/ICE-6610

        Show
        Neil Griffin added a comment - Update: I just closed BRIDGE-74 because I realized the Liferay Menus disappearing is a problem with ICEfaces. See http://jira.icefaces.org/browse/ICE-6610
        Hide
        Kito Mann added a comment -

        Are you sure this is fixed? I'm getting this problem 2.01-SNAPSHOT (built from the trunk) using ICEfaces 2.02 with the bundled implementation of Mojarra and Liferay 6.0 EE SP1. I wasn't getting it before I upgraded, though.

        Show
        Kito Mann added a comment - Are you sure this is fixed? I'm getting this problem 2.01-SNAPSHOT (built from the trunk) using ICEfaces 2.02 with the bundled implementation of Mojarra and Liferay 6.0 EE SP1. I wasn't getting it before I upgraded, though.
        Hide
        Timmy Ziesenhenne added a comment -

        Getting the the error: detect(parents(element), function (e)

        {return e.configuration;}

        ) is null
        when using the <ice:dataPaginator/>

        Show
        Timmy Ziesenhenne added a comment - Getting the the error: detect(parents(element), function (e) {return e.configuration;} ) is null when using the <ice:dataPaginator/>

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Mircea Toma
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: