PDA

View Full Version : Chapter 30. Building Data-Driven Applications


balak
10-29-2004, 12:21 AM
Hi all,


Using the sample codes provided in this chapter, i'm able to send data to server( JSP file ). To enhance the code i added a status text to display the result sent from JSP ( <result>success</result> OR <result>failure</result> ) using the code in last section 7.3 Using a datapointers to check the status.

The problem is i'm not able to receive the JSP response ( success / failure ). I added the datapointer tag immediately after dataset definition tag. The function "ondata" is fired when update button is clicked, but the text for "result/text()" is "null"

Can someone please tell me what's the mistake i'm doing here and help me to resolve it?


Many thanks in advance

Regards
Balakrishnan Ramaswamy

pablo
11-11-2004, 02:27 PM
Can you post your code?

pablo

pablo
11-16-2004, 09:54 PM
Hi Balakrishnan,

Someone else ran into your problem and figured it out. Check out this post for resolution:

http://www.laszlosystems.com/developers/community/forums/showthread.php?s=&threadid=1470

Good luck!
pablo

balak
11-17-2004, 07:47 PM
thanx pablo. Let me test it out and post the results.

pablo
11-17-2004, 09:44 PM
Yes, it'll be good to know either way. Good luck!

balak
12-23-2004, 11:17 PM
Hi pablo,

Yes. Inside the client, i'm able to get response from the server (jsp).

Your code helped to understand the event model.

<datapointer xpath="dsSendData:/*">
<method event="ondata" args="d">
var txt = this.xpathQuery("text()");
var ok = (txt == "success");
if (ok) {
Debug.write("Operation succeeded");
} else {
Debug.write("Operation failed");
}
Debug.write('data:', d.serialize());
Debug.write('ok:', txt);
</method>
</datapointer>


Sorry for late reply. i was deployed in another project. Now, i'm confident with Lazlo and our r&d project is progressing well.

Many Thanks and Regards,
Balak