ICEfaces
  1. ICEfaces
  2. ICE-5832

Glimmer bridge submit APIs improvements

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Alpha2
    • Fix Version/s: 2.0-Beta1, 2.0.0
    • Component/s: Bridge
    • Labels:
      None
    • Environment:
      ICEfaces 2.0 bridge
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.)

      Description

      After reviewing the calendar component's use of the various ice.s, ice.se, ice.ser bridge APIs, we've identified the following tweaks/improvements to the bridge functionality:

      1. Add additional argument(s) to the ice.ser() function to enable configuring the phases that are executed. Components using this function will almost always need to customize the phases execution that occurs in the execute=this.

      2. Have the ice.s(), ice.se(), and ice.ser() functions set a standard flag in the parameter map to indicate which submit type has occurred. Components will often need to know what type of submit triggered their execution. Alternatively, if this information can be derived already from some other server-sid estate, provide a convenience method that components can use.

        Activity

        Ken Fyten created issue -
        Ken Fyten made changes -
        Field Original Value New Value
        Salesforce Case []
        Fix Version/s 2.0-Beta [ 10231 ]
        Affects [Documentation (User Guide, Ref. Guide, etc.)]
        Assignee Priority P2
        Assignee Mircea Toma [ mircea.toma ]
        Hide
        Mircea Toma added a comment -

        "1. Add additional argument(s) to the ice.ser() function to enable configuring the phases that are executed. Components using this function will almost always need to customize the phases execution that occurs in the execute=this. "

        How exactly are defined the phases to be executed?! Is it by by configuring partial view processing with 'render' and 'execute' options (with values like @this, @all, @none or some ID) ?

        If the answer to last question is yes, then really we don't need two types of single submit functions. We can then have only one parameterized single submit function.

        Show
        Mircea Toma added a comment - "1. Add additional argument(s) to the ice.ser() function to enable configuring the phases that are executed. Components using this function will almost always need to customize the phases execution that occurs in the execute=this. " How exactly are defined the phases to be executed?! Is it by by configuring partial view processing with 'render' and 'execute' options (with values like @this, @all, @none or some ID) ? If the answer to last question is yes, then really we don't need two types of single submit functions. We can then have only one parameterized single submit function.
        Hide
        Ted Goddard added a comment -

        One goal is to reduce the size of the markup by factoring the parameters into the function itself.

        If components need to customize the execution, we should look at the specific use cases for this to see how many variants there are. It is possible that the parameters do not need to be passed to the client at all and can be stored on the ViewRoot on the server or as attributes on the component.

        Yip, please provide details on what the calendar component requires in terms of JSF lifecycle.

        Show
        Ted Goddard added a comment - One goal is to reduce the size of the markup by factoring the parameters into the function itself. If components need to customize the execution, we should look at the specific use cases for this to see how many variants there are. It is possible that the parameters do not need to be passed to the client at all and can be stored on the ViewRoot on the server or as attributes on the component. Yip, please provide details on what the calendar component requires in terms of JSF lifecycle.
        Hide
        Ted Goddard added a comment -

        Assigning to Yip for additional info on calendar requirements.

        Show
        Ted Goddard added a comment - Assigning to Yip for additional info on calendar requirements.
        Ted Goddard made changes -
        Assignee Mircea Toma [ mircea.toma ] Yip Ng [ yip.ng ]
        Hide
        Ted Goddard added a comment -

        Calendar contains the following code, but this does not need to be configurable through the ice.se() API:

               if (paramMap.get(clientId + "_formatSubmit") != null)

        {            System.out.println("To renderResponse()");            context.renderResponse();        }

        Feature 1. is being deferred. It is now only required to provide the flag set by ice.se() and related functions to indicate which function has been called.

        Show
        Ted Goddard added a comment - Calendar contains the following code, but this does not need to be configurable through the ice.se() API:        if (paramMap.get(clientId + "_formatSubmit") != null) {            System.out.println("To renderResponse()");            context.renderResponse();        } Feature 1. is being deferred. It is now only required to provide the flag set by ice.se() and related functions to indicate which function has been called.
        Ted Goddard made changes -
        Assignee Yip Ng [ yip.ng ] Mircea Toma [ mircea.toma ]
        Hide
        Ted Goddard added a comment -

        It may be desirable to have alternative parameter types for the arguments of ice.se(), such as:

        ice.se(evt, rootid)

        ice.se(evt, rootelement)

        Show
        Ted Goddard added a comment - It may be desirable to have alternative parameter types for the arguments of ice.se(), such as: ice.se(evt, rootid) ice.se(evt, rootelement)
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #21792 Wed Jun 23 15:41:03 MDT 2010 mircea.toma ICE-5832 Mark submit with parameters that describe the submit function type. Send parameter that describes the serialization type. Submit functions can receive optionally an ID in the element argument.
        Files Changed
        Commit graph MODIFY /icefaces/scratchpads/glimmer/core/src/main/javascript/submit.js
        Hide
        Mircea Toma added a comment - - edited

        The submit functions are sending now 'ice.submit.type' parameter to describe the submit function type:

        ice.submit.type=ice.s - full submit:
        ice.submit.type=ice.se - single submit (execute=@this,render=@all)
        ice.submit.type=ice.ser - single submit (execute=@this,render=@this)

        Additionally ''ice.submit.serialization'' parameter is sent to describes the serialization type:

        ice.submit.serialization=form - for ice.s and ice.se/ice.ser when standardFormSerialization is turned on
        ice.submit.serialization=element - for ice.se/ice.ser when standardFormSerialization is turned off

        Also now the submit functions can receive optionally an ID (string) in the element argument.

        Show
        Mircea Toma added a comment - - edited The submit functions are sending now 'ice.submit.type' parameter to describe the submit function type: ice.submit.type=ice.s - full submit: ice.submit.type=ice.se - single submit (execute=@this,render=@all) ice.submit.type=ice.ser - single submit (execute=@this,render=@this) Additionally ''ice.submit.serialization'' parameter is sent to describes the serialization type: ice.submit.serialization=form - for ice.s and ice.se/ice.ser when standardFormSerialization is turned on ice.submit.serialization=element - for ice.se/ice.ser when standardFormSerialization is turned off Also now the submit functions can receive optionally an ID (string) in the element argument.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Ken Fyten added a comment -

        We are going to defer the item below until post-beta to see if we have enough of a requirement from the components to justify it.

        1. Add additional argument(s) to the ice.ser() function to enable configuring the phases that are executed. Components using this function will almost always need to customize the phases execution that occurs in the execute=this.

        Show
        Ken Fyten added a comment - We are going to defer the item below until post-beta to see if we have enough of a requirement from the components to justify it. 1. Add additional argument(s) to the ice.ser() function to enable configuring the phases that are executed. Components using this function will almost always need to customize the phases execution that occurs in the execute=this.
        yip.ng made changes -
        Attachment screenshot-01.png [ 12421 ]
        yip.ng made changes -
        Attachment screenshot-02.png [ 12422 ]
        Hide
        yip.ng added a comment -

        After updating glimmer (checked out, cleaned, rebuilt, several times) and changing the submit call from:

        ice.se(evt, Dom.get(rootId), function(p)

        { p(calValueEl.get("name"), calValueEl.get("value")); }

        );

        to:

        ice.se(evt, rootId);

        The submit is broken again. The date select event just disappears into YUI event handling and nothing happens anymore. Tracked it down to some framework code that's the culprit. See screenshot-01. (Just check singleSubmit and select a date.)

        Revert back to 21788 and everything works fine again. See screenshot-02.

        Show
        yip.ng added a comment - After updating glimmer (checked out, cleaned, rebuilt, several times) and changing the submit call from: ice.se(evt, Dom.get(rootId), function(p) { p(calValueEl.get("name"), calValueEl.get("value")); } ); to: ice.se(evt, rootId); The submit is broken again. The date select event just disappears into YUI event handling and nothing happens anymore. Tracked it down to some framework code that's the culprit. See screenshot-01. (Just check singleSubmit and select a date.) Revert back to 21788 and everything works fine again. See screenshot-02.
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Assignee Priority P2 P1
        Hide
        yip.ng added a comment -

        Changes in calendar component already checked in. Can be used for testing bug.

        Show
        yip.ng added a comment - Changes in calendar component already checked in. Can be used for testing bug.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #21810 Mon Jun 28 07:05:48 MDT 2010 mircea.toma ICE-5832 Transform ID into an element sooner since standardFormSerialization function expects only Element as parameter.
        Files Changed
        Commit graph MODIFY /icefaces/scratchpads/glimmer/core/src/main/javascript/submit.js
        Hide
        Mircea Toma added a comment -

        Ooops, that was an oversight on my part. The standardFormSerialization function used in single submit was receiving the ID (string). The fix transforms the ID (string) into an element sooner so that standardFormSerialization function receives the corresponding element instead.

        Show
        Mircea Toma added a comment - Ooops, that was an oversight on my part. The standardFormSerialization function used in single submit was receiving the ID (string). The fix transforms the ID (string) into an element sooner so that standardFormSerialization function receives the corresponding element instead.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Mircea Toma made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Security Private [ 10001 ]
        Ken Fyten made changes -
        Fix Version/s 2.0.0 [ 10230 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P1

          People

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

            Dates

            • Created:
              Updated:
              Resolved: