Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.1
    • Fix Version/s: 1.7.2
    • Component/s: Bridge
    • Labels:
      None
    • Environment:
      ICEfaces

      Description


      Recent work on performance improvements have shown memory consumption with large numbers of similar or identical Strings. In an effort to increase re-use of Strings, some of our JavaScript calls should be examined. For instance:

      <form action="iceSubmit(&#39;j_id56&#39;);"
        - can iceSubmit(this.id) or iceSubmit(form.id) be used?
        - can &#39; be written as '

      <a onclick="document.forms[&#39;iceForm&#39;][&#39;iceForm:_idcl&#39;].value=&#39;iceForm:iceTable:sortByTitle_click&#39;;iceSubmit( document.forms[&#39;iceForm&#39;], this,event); return false;"
        - can we still use iceSubmit(form, this, event) but search for a parent of "this" to find "form"? (Because <a> is not a form control.) iceSubmit could detect that the input control was a commandLink and set the hidden field directly.

      onblur="setFocus(&#39;&#39;);"
        - can this be replaced with "setFocus();"

      iceSubmit(form,this,event);return false;
        - can this be replaced with iceSubmit(form,this,event); or iceSubmitF(form,this,event);

        Issue Links

          Activity

          Ted Goddard created issue -
          Hide
          Ted Goddard added a comment -

          Please comment on the opportunities for re-use of JavaScript expressions. If Strings can be re-used, they can be more effectively pooled on the server.

          Show
          Ted Goddard added a comment - Please comment on the opportunities for re-use of JavaScript expressions. If Strings can be re-used, they can be more effectively pooled on the server.
          Ted Goddard made changes -
          Field Original Value New Value
          Assignee Mircea Toma [ mircea.toma ]
          Hide
          Mircea Toma added a comment -

          I was referring to "iceSubmit could detect that the input control was a commandLink". iceSubmit is already used in few subtle but different ways. Making iceSubmit aware about a specific component would just add another level of complexity to its implementation.
          The commandLink component can be refactored to not use any hidden fields at all. This will also solve some DOM diff problems cause by the hidden fields rendered as direct children of the form.

          Show
          Mircea Toma added a comment - I was referring to "iceSubmit could detect that the input control was a commandLink". iceSubmit is already used in few subtle but different ways. Making iceSubmit aware about a specific component would just add another level of complexity to its implementation. The commandLink component can be refactored to not use any hidden fields at all. This will also solve some DOM diff problems cause by the hidden fields rendered as direct children of the form.
          Hide
          Ted Goddard added a comment -


          It might be interesting to implement the JSF 2.0 commandLink without a hidden field (at the very least, I was thinking that all commandLinks could share a single common field) could you explain the basic idea for the new mechanism? (JSF 2.0 may have a constraint that it should work with JavaScript, but without Ajax – required browser support may extend to browsers without XMLHttpRequest.)

          Show
          Ted Goddard added a comment - It might be interesting to implement the JSF 2.0 commandLink without a hidden field (at the very least, I was thinking that all commandLinks could share a single common field) could you explain the basic idea for the new mechanism? (JSF 2.0 may have a constraint that it should work with JavaScript, but without Ajax – required browser support may extend to browsers without XMLHttpRequest.)
          Hide
          Ted Goddard added a comment -

          Mircea, please comment on the following:

          iceSubmit() return false always.

          iceSubmit(form,this,event) should be iceSubmit(this,event) (obtain form from "this")

          iceSubmit(this,event) detect if "this" is <a> and walk up to obtain the form if this.form is not available

          Show
          Ted Goddard added a comment - Mircea, please comment on the following: iceSubmit() return false always. iceSubmit(form,this,event) should be iceSubmit(this,event) (obtain form from "this") iceSubmit(this,event) detect if "this" is <a> and walk up to obtain the form if this.form is not available
          Hide
          Mircea Toma added a comment -

          " iceSubmit() return false always. "

          That's because the function doesn't return anything. Or maybe it was some historical reason. When I refactored iceSubmit and iceSubmitPartial implementation I kept the behavior intact.

          "iceSubmit(form,this,event) should be iceSubmit(this,event) (obtain form from "this") "

          I agree. But when I did that while refactoring the function there were some components that picked an element outside the form for submission

          "iceSubmit(this,event) detect if "this" is <a> and walk up to obtain the form if this.form is not available "

          There's code in place for doing exactly that. Is just that the components relied on hidden fields every time and anchor <a> was used.

          Show
          Mircea Toma added a comment - " iceSubmit() return false always. " That's because the function doesn't return anything. Or maybe it was some historical reason. When I refactored iceSubmit and iceSubmitPartial implementation I kept the behavior intact. "iceSubmit(form,this,event) should be iceSubmit(this,event) (obtain form from "this") " I agree. But when I did that while refactoring the function there were some components that picked an element outside the form for submission "iceSubmit(this,event) detect if "this" is <a> and walk up to obtain the form if this.form is not available " There's code in place for doing exactly that. Is just that the components relied on hidden fields every time and anchor <a> was used.
          Hide
          Ted Goddard added a comment -

          Could we add the hidden field logic to iceSubmit for commandLink?

          Show
          Ted Goddard added a comment - Could we add the hidden field logic to iceSubmit for commandLink?
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #17374 Wed Aug 20 14:39:59 MDT 2008 mircea.toma ICE-3344 Disable form default behavior.
          Files Changed
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/core/src/com/icesoft/faces/renderkit/dom_html_basic/FormRenderer.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #17375 Wed Aug 20 14:40:23 MDT 2008 mircea.toma ICE-3344 Disable form default behavior.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/renderkit/dom_html_basic/FormRenderer.java
          Ken Fyten made changes -
          Link This issue blocks ICE-3083 [ ICE-3083 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #17448 Tue Aug 26 15:54:26 MDT 2008 mircea.toma ICE-3344 Reduce amount of Javascript wiring for command links.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/renderkit/dom_html_basic/CommandLinkRenderer.java
          Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/renderkit/CommandLinkRenderer.java
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/submit.js
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #17449 Tue Aug 26 16:02:11 MDT 2008 mircea.toma ICE-3344 Reduce amount of Javascript wiring for command links.
          Files Changed
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/bridge/src/submit.js
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/component/src/com/icesoft/faces/component/ext/renderkit/CommandLinkRenderer.java
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/core/src/com/icesoft/faces/renderkit/dom_html_basic/CommandLinkRenderer.java
          Hide
          Mircea Toma added a comment -

          Remove useless form action pseudo-URL.

          Show
          Mircea Toma added a comment - Remove useless form action pseudo-URL.
          Hide
          Mircea Toma added a comment -

          Reduce amount of Javascript wiring for command links.

          Show
          Mircea Toma added a comment - Reduce amount of Javascript wiring for command links.
          Mircea Toma made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Mircea Toma made changes -
          Fix Version/s 1.7.2 [ 10130 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #17470 Fri Aug 29 14:01:53 MDT 2008 mircea.toma ICE-3344 Make event handler return false to cancel default action for anchors.
          Files Changed
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/core/src/com/icesoft/faces/webapp/http/core/MultiViewServer.java
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/bridge/src/submit.js
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/component/src/com/icesoft/faces/component/ext/renderkit/CommandLinkRenderer.java
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/core/src/com/icesoft/faces/renderkit/dom_html_basic/CommandLinkRenderer.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #17471 Fri Aug 29 14:04:48 MDT 2008 mircea.toma ICE-3344 Make event handler return false to cancel default action for anchors.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/renderkit/dom_html_basic/CommandLinkRenderer.java
          Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/renderkit/CommandLinkRenderer.java
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/submit.js
          Ken Fyten made changes -
          Fix Version/s 1.7.2RC1 [ 10140 ]
          Fix Version/s 1.7.2 [ 10130 ]
          Ken Fyten made changes -
          Fix Version/s 1.7.2 [ 10130 ]
          Fix Version/s 1.7.2RC1 [ 10140 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Assignee Mircea Toma [ mircea.toma ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: