Hi,
As per my knowledge, LS kernel does the job of maintaining the count of subscription, un-subscription. If I subscribe to the same item twice in my Flex client I am getting weird values.
The same piece of code as my previous post:
private function extractFieldValue(evt:NonVisualItemUpdateEvent,field:*):String {
var value:String;
if (evt.isFieldChanged(field)) {
value = evt.getFieldValue(field);
trace("Field : " + field + " Changed to : " + value);
if(field == "updateType"){
trace(describeType(value));
}
} else {
value = evt.getOldFieldValue(field);
trace("Field : " + field + " Did not Change, old value : " + value)
}
return value;
}
The server is sending string value "1" as updateType always. Its hard coded.
But, when i subscribe it twice, I am getting the following result as output:
Field : updateType Changed to : 1
<type name="String" base="Object" isDynamic="false" isFinal="true" isStatic="false">
<extendsClass type="Object"/>
<constructor>
<parameter index="1" type="*" optional="true"/>
</constructor>
<accessor name="length" access="readonly" type="int" declaredBy="String"/>
</type>
Field : updateType Changed to : [object Object]
<type name="String" base="Object" isDynamic="false" isFinal="true" isStatic="false">
<extendsClass type="Object"/>
<constructor>
<parameter index="1" type="*" optional="true"/>
</constructor>
<accessor name="length" access="readonly" type="int" declaredBy="String"/>
</type>
From where am I getting [object Object]? The type is string itself. My adapter is not writing anything else than "1".