ICEmobile
  1. ICEmobile
  2. MOBI-154

Rapid submits in Android container can cause flip switch component state to get out of sync.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1 Final
    • Component/s: None
    • Labels:
      None
    • Environment:
      ICEmobile/Android

      Description

      The strategy of discarding submits when they happen too rapidly is causing issues with the flip switch state, and component state changes, but submit is discarded, so server state never changes. Will investigate queueing submits in the container vs discarding them.

        Activity

        Hide
        Steve Maryka added a comment -

        The discard logic is in the native JS.

        //override primitive submit function
        namespace.submitFunction = function(element, event, options) {
        var source = event ? event.target : element;
        var form = ice.formOf(element);
        if (form.elements['javax.faces.source'])

        { //submit is in progress, but callback not completed by container return; }
        Show
        Steve Maryka added a comment - The discard logic is in the native JS. //override primitive submit function namespace.submitFunction = function(element, event, options) { var source = event ? event.target : element; var form = ice.formOf(element); if (form.elements ['javax.faces.source'] ) { //submit is in progress, but callback not completed by container return; }
        Hide
        Ted Goddard added a comment -

        It might be best to make use of the queue implemented in jsf.js. To take advantage of this, we would need to hook into jsf.js differently.

        Show
        Ted Goddard added a comment - It might be best to make use of the queue implemented in jsf.js. To take advantage of this, we would need to hook into jsf.js differently.
        Hide
        Ted Goddard added a comment -

        Mojarra and MyFaces implement their client-side queue in substantially different ways; further, the Mojarra queue implementation is buried as private methods within the request implementation.

        Therefore, it is likely easiest to implement a queue in the native-interfaces.js or in the native layer.

        Show
        Ted Goddard added a comment - Mojarra and MyFaces implement their client-side queue in substantially different ways; further, the Mojarra queue implementation is buried as private methods within the request implementation. Therefore, it is likely easiest to implement a queue in the native-interfaces.js or in the native layer.
        Hide
        Ted Goddard added a comment -

        At least in the case of android, it looks like it should be possible to queue up "context" instances (which contain IDs and serialized form contents). When handleResponse from the previous event is invoked, the next context could be taken from the queue and submitted.

        Show
        Ted Goddard added a comment - At least in the case of android, it looks like it should be possible to queue up "context" instances (which contain IDs and serialized form contents). When handleResponse from the previous event is invoked, the next context could be taken from the queue and submitted.
        Hide
        Ted Goddard added a comment -

        Is this still observed? (I suspect so, since the queue has not been implemented.)

        Show
        Ted Goddard added a comment - Is this still observed? (I suspect so, since the queue has not been implemented.)
        Hide
        Ted Goddard added a comment - - edited

        Believed to be fixed, so assigning to Steve for verification.

        Show
        Ted Goddard added a comment - - edited Believed to be fixed, so assigning to Steve for verification.
        Hide
        Ted Goddard added a comment - - edited

        Retested on samsung tablet after Greg's discovery of syntax error. The fix still appears valid.

        Show
        Ted Goddard added a comment - - edited Retested on samsung tablet after Greg's discovery of syntax error. The fix still appears valid.

          People

          • Assignee:
            Steve Maryka
            Reporter:
            Steve Maryka
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: