PDA

View Full Version : Problem with "Data Driven Apps" tutorial


javadog
08-12-2003, 06:24 PM
Hi,

From the following tutorial:

http://www.laszlosystems.com/developers/learn/documentation/tutorials/data_app_8.php

I used the source found at the bottom of that page:

<dataset name="dsSendData" autorequest="false" src="contactmgr.jsp"
type="http">
<method event="ondata">
if ( this.getPointer().getXPath( "result/text()" ) == "success" ) {
Debug.write( "Operation succeeded" );
} else {
Debug.write( "Operation failed" );
}
</method>
</dataset>

and then I get the following error:

database_jdbc.lzx:28:32: element "method" from namespace "http://www.laszlosystems.com/2003/05/lzx" not allowed in this context.

Is this a known issue? If so, any workarounds? I would somehow like to write to the Debug window from the JSP.

Thanks,

j-dog

antun
08-12-2003, 08:59 PM
I think that may be old syntax. Try:


<dataset name="dsSendData" autorequest="false" src="contactmgr.jsp"
type="http" />

<datapointer xpath="dsSendData:/">
<method event="ondata">
if ( this.getXPath( "result/text()" ) == "success" ) {
Debug.write( "Operation succeeded" );
} else {
Debug.write( "Operation failed" );
}
</method>
</datapointer>


Basically you're creating a datapointer to the root node of the dataset, which has an ondata event.

Let me know if that works.

-Antun

javadog
08-13-2003, 11:26 AM
Thanks, Antun. That did the trick.

j-dog