PDA

View Full Version : ondata event fails to fire :


jayakamal
11-05-2004, 08:29 AM
Hi ,
Iam using lps-2.2.
The ondata event of the dataset fails to fire after i call the doRequest() method.

<dataset name="dsMemberSendData" request="false" src="registerMember.jsp" type="http">
</dataset>
<datapointer xpath="dsMemberSendData:/">
<method event="ondata">
debug.write("inside ondata");
</method>
</datapointer>

In the debugger when i test the contents of the dataset i can see that the <result>Success</result>
child node in the dataset dsMemberSendData.

Thanks !
Jayakamal.

antun
11-05-2004, 09:49 AM
The ondata event of the dataset fails to fire after i call the doRequest() method.

The code you posted refers to the ondata event of the datapointer not the dataset.

Dataset's ondata event fires when the server returns a response.

Datapointer's ondata event fires when the data that the datapointer is pointing to changes. In your case, it was pointing to the root of the dataset, not a node or attribute, and I believe that won't trigger an ondata event.

-Antun

jayakamal
11-05-2004, 07:07 PM
Hi Antun,
Thanks for your help.
When i include the ondata event within the dataset

<dataset name="dsMemberSendData" request="false" src="registerMember.jsp" type="http">
<method event="ondata">
debug.write("inside ondata");
</method>
</dataset>

i get the follwong error :

memberregistration.lzx:37:29: element "method" not allowed in this context. Check whether it is spelled correctly, and whether a class with this name exists.

can you post a sample for dataset ondata event.
Jayakamal.

antun
11-08-2004, 08:25 AM
Dataset is special like that - it's the only place you can't write a <method> tag. Instead, dataset has an ondata event handler:

<dataset ondata="debug.write("inside ondata");">

-Antun