This discussion is archived
3 Replies Latest reply: Feb 22, 2013 2:04 PM by Bryan Laipple RSS

ADF Mobile: Property change events from background thread

Bryan Laipple Newbie
Currently Being Moderated
In ADF Mobile, when firing property change events from a background thread I experience unexpected behavior when different source objects have properties that have DC bindings with identical names. For example, my data model contains a list of parent objects each have a collection of children. If both the parent object and child object have a property with the same name (i.e. "age") and that is used as a binding ID, an update of the data can cause an error on the display. I have observed a parent's age displayed while viewing a child during an update and vice versa. This behavior is not seen when the update takes place in the primary request thread nor does it seem to occur if the binding IDs to property names are unique (i.e. property name = "age", parent binding id = "parentAge", child binding id = "childAge"). It seems that ensuring that no two properties have the same name within a hierarchy of objects or manually updating binding IDs in the pageDef.xml files is the way around this behavior.

It appears that there is a loss of context for any of the property change events that get queued in a background thread and when AdfmfJavaUtilities.flushDataChangeEvent() is executed the context/source bean is not properly used to update values bound to the display.

I'm wondering if others have observed this and if so, is this a known issue or should I file a bug with the ADF Mobile team?

I found it difficult to succinctly describe this observation so please ask if more clarification is necessary.

JDev build: JDEVADF_11.1.2.3.0_GENERIC_120914.0223.6276.1
ADF Mobile: 11.1.2.3.39.62.94
  • 1. Re: ADF Mobile: Property change events from background thread
    152708 Newbie
    Currently Being Moderated
    I understand the problem you are describing. Its very common to have attributes with the same name across several objects in a hierarchy. However its not clear to me what you mean by "binding IDs to property names are unique" . IDs have to be unique and DT gives validation errors if they are not. If your binding IDs are unique but not the property names then this looks like a bug in the Data Change Event fwk.
    Please file a bug and let me know the bug number so we can track it.
  • 2. Re: ADF Mobile: Property change events from background thread
    Bryan Laipple Newbie
    Currently Being Moderated
    What I meant to say was that the odd behavior does not occur if the binding IDs to attributes are unique across the different pageDefs.

    The page displaying parent details may have the following binding in its pageDef file:
    <attributeValues IterBinding="parentsIterator" id="age">
    <AttrNames>
    <Item Value="age"/>
    </AttrNames>
    </attributeValues>

    The page displaying a child of the parent may have this:
    <attributeValues IterBinding="childrenIterator" id="age">
    <AttrNames>
    <Item Value="age"/>
    </AttrNames>
    </attributeValues>

    In both cases above the binding id is "age" but if I change it as I've done below, the pages behave as they do when the update is done in the primary request thread.

    page 1:
    <attributeValues IterBinding="parentsIterator" id="parentAge">
    <AttrNames>
    <Item Value="age"/>
    </AttrNames>
    </attributeValues>

    page 2:
    <attributeValues IterBinding="childrenIterator" id="childAge">
    <AttrNames>
    <Item Value="age"/>
    </AttrNames>
    </attributeValues>

    I do believe this is a bug and plan on filing a bug with this information.
  • 3. Re: ADF Mobile: Property change events from background thread
    Bryan Laipple Newbie
    Currently Being Moderated
    Bug 16390408 has been opened to track this.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points