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

        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.
        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.
        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)
        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.
        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.
        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.
        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.
        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.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: