ICEfaces
  1. ICEfaces
  2. ICE-4616

ICEfaces 2.0: compat auctionMonitor rendering and interactivity

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Alpha3
    • Fix Version/s: 2.0-Alpha2, 2.0.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      ICEfaces

      Description


      ICEfaces 2.0 compat/auctionMonitor does not render correctly and it is not interactive.
      1. table-element-update_ie-fix.patch
        2 kB
        Mircea Toma
      2. table-element-update.improved.patch
        2 kB
        Mircea Toma
      3. table-element-update.patch
        0.8 kB
        Mircea Toma

        Issue Links

          Activity

          Hide
          Ted Goddard added a comment -

          First step is just to investigate the problem. Note that this application serves as a test case for users porting existing ICEfaces 1.8 applications to ICEfaces 2.0, so we should prefer fixes in icefaces-compat to application changes.

          Show
          Ted Goddard added a comment - First step is just to investigate the problem. Note that this application serves as a test case for users porting existing ICEfaces 1.8 applications to ICEfaces 2.0, so we should prefer fixes in icefaces-compat to application changes.
          Hide
          Mircea Toma added a comment -

          Add /icefaces/* servlet mapping for FacesServlet.

          Show
          Mircea Toma added a comment - Add /icefaces/* servlet mapping for FacesServlet.
          Hide
          Mircea Toma added a comment -

          Replace vanilla 'head' and 'body' tags with their corresponding h:* components. They are needed for resource injection.

          Show
          Mircea Toma added a comment - Replace vanilla 'head' and 'body' tags with their corresponding h:* components. They are needed for resource injection.
          Hide
          Mircea Toma added a comment -

          Reference jsf.js resource.

          Show
          Mircea Toma added a comment - Reference jsf.js resource.
          Hide
          Mircea Toma added a comment - - edited

          Move beans in ICEfaces non-standard request scope into session scope. Thus same bean instances will be used between Ajax requests.

          Show
          Mircea Toma added a comment - - edited Move beans in ICEfaces non-standard request scope into session scope. Thus same bean instances will be used between Ajax requests.
          Hide
          Mircea Toma added a comment -

          Serialize also the element that triggered the submit so that ice:* components can identify themselves.

          Show
          Mircea Toma added a comment - Serialize also the element that triggered the submit so that ice:* components can identify themselves.
          Hide
          Mircea Toma added a comment -

          Patch Mojarra JSF-RI Javascript code so that table elements like TD and TH are updated properly. See table-element-update.patch file.

          Show
          Mircea Toma added a comment - Patch Mojarra JSF-RI Javascript code so that table elements like TD and TH are updated properly. See table-element-update.patch file.
          Hide
          Mircea Toma added a comment -

          Clicking repeatedly on "Bid" button and then "x" button makes the application to run out of memory pretty fast (about 10 clicks).

          Show
          Mircea Toma added a comment - Clicking repeatedly on "Bid" button and then "x" button makes the application to run out of memory pretty fast (about 10 clicks).
          Hide
          Ted Goddard added a comment -

          Table update patch reported to javaserverfaces issue tracker:

          https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1187

          Show
          Ted Goddard added a comment - Table update patch reported to javaserverfaces issue tracker: https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1187
          Hide
          Ted Goddard added a comment -

          The main problem with the appearance of the application involves the use of the <center> tag, but is not due to the <center> tag per se.

          When the panelGrid is used:

          <ice:panelGrid columns="5" >
          <center>
          <ice:commandLink action="#

          {AuctionBean.sortByTitle}" />
          </center>
          ...

          the behavior is different with ICEfaces 1.8 and JSF 2.0 (we may have encountered the same problem with a Facelets version of this page). The ICEfaces JSP parser parses the XML and represents the <center> tag as a single component. JSF 2.0, on the other hand, finds three components: "<center>", <ice:commandLink>, and "<center/>" causing the rendering of the panelGrid to be very different. The same problem would be encountered if any nested markup was used within the panelGrid. To repair the page, the individual cells of the panelGrid must be actual JSF components, such as panelGroup. The replacement markup is as follows:

          <ice:panelGrid columns="5" >
          <ice:panleGroup><center>
          <ice:commandLink action="#{AuctionBean.sortByTitle}

          " />
          </center></ice:panelGroup>
          ...

          Show
          Ted Goddard added a comment - The main problem with the appearance of the application involves the use of the <center> tag, but is not due to the <center> tag per se. When the panelGrid is used: <ice:panelGrid columns="5" > <center> <ice:commandLink action="# {AuctionBean.sortByTitle}" /> </center> ... the behavior is different with ICEfaces 1.8 and JSF 2.0 (we may have encountered the same problem with a Facelets version of this page). The ICEfaces JSP parser parses the XML and represents the <center> tag as a single component. JSF 2.0, on the other hand, finds three components: "<center>", <ice:commandLink>, and "<center/>" causing the rendering of the panelGrid to be very different. The same problem would be encountered if any nested markup was used within the panelGrid. To repair the page, the individual cells of the panelGrid must be actual JSF components, such as panelGroup. The replacement markup is as follows: <ice:panelGrid columns="5" > <ice:panleGroup><center> <ice:commandLink action="#{AuctionBean.sortByTitle} " /> </center></ice:panelGroup> ...
          Hide
          Mircea Toma added a comment -

          Move session bound beans in 'view' scope.

          Show
          Mircea Toma added a comment - Move session bound beans in 'view' scope.
          Hide
          Mircea Toma added a comment -

          Improved patch that works properly for all table child elements.

          Show
          Mircea Toma added a comment - Improved patch that works properly for all table child elements.
          Hide
          Ted Goddard added a comment -

          Which browsers? Let's refine the patch a bit before we send it to Sun again – they've already applied the previous one. For instance, perhaps we can factor out parent.replaceChild().

          Why trim spaces? Perhaps that should be done on the server (not necessarily a choice for us here, since this is in the reference implementation.)

          Show
          Ted Goddard added a comment - Which browsers? Let's refine the patch a bit before we send it to Sun again – they've already applied the previous one. For instance, perhaps we can factor out parent.replaceChild(). Why trim spaces? Perhaps that should be done on the server (not necessarily a choice for us here, since this is in the reference implementation.)
          Hide
          Ted Goddard added a comment -

          compat/auctionMonitor starts working for me if I make a change like the following:

          Index: compat/components/src/main/resources/META-INF/resources/icesubmit.js
          ===================================================================
          — compat/components/src/main/resources/META-INF/resources/icesubmit.js (revision 19044)
          +++ compat/components/src/main/resources/META-INF/resources/icesubmit.js (working copy)
          @@ -14,7 +14,7 @@
          return false;
          }
          }

          • ice.submitForm(evt, form || formOf(component));
            + ice.submitEvent(evt, component, form || formOf(component));
            return false;
            }

          Mircea, perhaps you have a local change of this nature that is not checked in? commandButton does not work if it is not the "component" submitting the form (the current code submits the form anonymously).

          Show
          Ted Goddard added a comment - compat/auctionMonitor starts working for me if I make a change like the following: Index: compat/components/src/main/resources/META-INF/resources/icesubmit.js =================================================================== — compat/components/src/main/resources/META-INF/resources/icesubmit.js (revision 19044) +++ compat/components/src/main/resources/META-INF/resources/icesubmit.js (working copy) @@ -14,7 +14,7 @@ return false; } } ice.submitForm(evt, form || formOf(component)); + ice.submitEvent(evt, component, form || formOf(component)); return false; } Mircea, perhaps you have a local change of this nature that is not checked in? commandButton does not work if it is not the "component" submitting the form (the current code submits the form anonymously).
          Hide
          Mircea Toma added a comment -

          You're right I missed to commit icesubmit.js changes. The fix is committed now.

          Show
          Mircea Toma added a comment - You're right I missed to commit icesubmit.js changes. The fix is committed now.
          Hide
          Mircea Toma added a comment -

          > Which browsers?

          Firefox, for sure.

          > Let's refine the patch a bit before we send it to Sun again – they've already applied the
          > previous one. For instance, perhaps we can factor out parent.replaceChild().

          The patch is almost similar with what we have in Trunk. With the first patch I completely forgot about the fact that browser are inserting intermediate elements. When I went back to Trunk code I remembered why I had to do the "while" loop.

          Show
          Mircea Toma added a comment - > Which browsers? Firefox, for sure. > Let's refine the patch a bit before we send it to Sun again – they've already applied the > previous one. For instance, perhaps we can factor out parent.replaceChild(). The patch is almost similar with what we have in Trunk. With the first patch I completely forgot about the fact that browser are inserting intermediate elements. When I went back to Trunk code I remembered why I had to do the "while" loop.
          Hide
          Mircea Toma added a comment -

          OutOfMemoryError is gone since the state saving was fixed. See https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1142 .

          Show
          Mircea Toma added a comment - OutOfMemoryError is gone since the state saving was fixed. See https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1142 .
          Hide
          Mircea Toma added a comment -

          Fix table element update in IE. IE creates the "table" element only if "table" tag is part of the innerHTML markup. Also reverted the search in the array of table element names, native arrays are not indexed by cell values. See patch file: table-element-update_ie-fix.patch

          Show
          Mircea Toma added a comment - Fix table element update in IE. IE creates the "table" element only if "table" tag is part of the innerHTML markup. Also reverted the search in the array of table element names, native arrays are not indexed by cell values. See patch file: table-element-update_ie-fix.patch

            People

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

              Dates

              • Created:
                Updated:
                Resolved: