Below is a patch to the LFC for the moment that you could place at the start of your application.

I am not sure when this will make the next nightly build. In fact, if you can test my
patch that would be great.

Place these two functions at the start of your app in a script block, or include them in a library containing the script.

<script>
<![CDATA[
LzLoader.prototype.returnData = function ( loadobj , data ){
    // Check if returnData has already been called on this
    // object. This can happen if a serverless data load timed out in
    // the LFC, but eventually returned something via the
    // LoadVars.sendAndLoad () callback.
    if (loadobj.loaded) {
        if ($debug) {
            Debug.warn("%w.returnData: %w already loaded",
                       this, loadobj);
        }
        return;
    }

    if (loadobj instanceof MovieClip) {
        // Nothing to do
    } else if (loadobj instanceof XMLNode) {

        // Do a fixup to add one extra level of data node to the data,
        // to be compatible with what the DataCompiler produces.
        var ndata = new LzDataElement('resultset');

        // The raw XML response string was stashed here by LzLoadQueue.serverlessOnDataHandler
        // TODO [2005-08-11 ptw] Is there not an issue that there
        // could be multiple requests?
        if (this['rawtext']) {
            ndata.rawtext = this.rawtext;
        }

        if (typeof(data) != 'undefined') {
            if (loadobj.proxied) {
                // proxied req gets back <resultset><body>XML</body><headers/></resultset>
                ndata.setChildNodes([data.childNodes[0].childNodes[0]]);
            } else {
                // SOLO, we get back raw XML only
                ndata.setChildNodes([data]);
            }
        }

        data = "">    } else {
        if ($debug) {
            Debug.error ("%w.returnData: unhandled loadobj %w", this, loadobj);
        }
    }

    // Ok, we have loaded this.  loadFinished changes state of loadobj
    // from loading to loaded.

    // TODO [2005-08-11 ptw] If this were a multi-threaded system, we
    // would have to worry about getLoadMovie trying to reuse the
    // loadobj before we have finished with it.

    // [2005-08-25 ptw] So, we don't want to mark the clip as loaded
    // if this is a persistent connection?  Not sure what that means.
    if ( ! this.doPersist ) LzLoadQueue.loadFinished( loadobj );

    // [2005-08-25 ptw] Is this correct?  Do we really want an aborted
    // request to signal that it timed out?
    if ( ! loadobj.valid ) {
        this.doTimeOut(loadobj);
        return;
    }

    this.lastloadtime = getTimer() - loadobj.loadtime;

    var err;
    if ( data.childNodes[0].nodeName == "error") {
        err = data.childNodes[0].attributes.msg;
    } else if (data.nodeName == "error") {
        err = data.attributes.msg;
    } else if (data == "medialoaderror") {
        err="Media load error";
    }

    if ( err != null ){
        Debug.error( err );
        this.onerror.sendEvent( data );
        return;
    }

    if ( this.queuing ){
        loadobj.data = "">
        while ( this.expectedList.length &&
                this.expectedList[ 0 ].loaded ){
            var tlmc = this.expectedList.shift();
            if ( tlmc.timedout ){
                this.doTimeOut(tlmc);
            } else if( tlmc.data ){
                this.ondata.sendEvent( tlmc.data );
                tlmc.data = "">            }
        }
    } else {
        if ( loadobj.timedout ){
            this.doTimeOut(loadobj);
        } else if( data ){
            this.ondata.sendEvent( data );
        }
    }
}

]]>
</script>




On 6/3/06, jake yang <[EMAIL PROTECTED]> wrote:

Hi,

Thanks for your kindly help. Is it possible to fix it in the next nightly building?

Can we have a quick workaround by just add something in our lzx file? If not, we have to wait until this bug has been fixed in the future building.

 

Jake Yang


From: Henry Minsky [mailto:[EMAIL PROTECTED]]
Sent: 2006
年 6月4 日 4:04
To: jake yang; Jim Grandy
Cc: Laszlo


Subject: Re: [Laszlo-user] FW: Response Header problem in lps3.2

 

I found the problem. It is a regression, it happened when we switched from
using server-side SWF-encoded data to using the Flash parser on the client side, the header data was getting discarded.

I have a fix, not sure what the best way to get this out to the community is.


On 6/3/06, Henry Minsky < [EMAIL PROTECTED]> wrote:

OK I can reproduce the error you're seeing (I had to recompile the servlet classes on my machine for some reason).

I'm taking a look at this now.

On 6/3/06, jake yang < [EMAIL PROTECTED]> wrote:

Hi Henry,

Thanks for your reply. Testcase.zip is the test case you want.

I test it in lps3.1 and lps3.2 with Java 1.5, and I have the screenshot in the zip file which shows the different result.

 

Put the test.lzx in the Server\lps-3.2\my-apps, and the "SimpleServlet" folder in the Server\tomcat-5.0.24\webapps,

Then run the test.lzx with the debug option.

 

Contact me if you have any problem of running this test case. Thanks

 

Jake Yang

 


From: Henry Minsky [mailto:[EMAIL PROTECTED]]
Sent: 2006
年 6月3 日 14:36


To: jake yang
Cc: [email protected]
Subject: Re: [Laszlo-user] FW: Response Header problem in lps3.2

 

Can you send a zip file with a test case with running code for me to try?

On 6/2/06, jake yang < [EMAIL PROTECTED] > wrote:

Isn't anyone who met the same session problem?  How to keep the lps dataset request with the same sessionid which is needed by the tomcat java server?  

getResponseHeader("Set-Cookie");

setHeader("Cookie",SessionID);

these two method did work in lps3.1, but when I use lps3.2, they seem not work at all.

Pls, help me.

Thanks!

 


From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]] On Behalf Of jake yang
Sent: 2006
年 6月2 日 18:08
To: [email protected]
Subject: [Laszlo-user] Response Header problem in lps3.2

 

Hi

The code below works in lps3.1, but it doesn't works in lps3.2 and lps3.3

dataset.getResponseHeader("Set-Cookie");

setHeader("Cookie",SessionID);

 

what should I do if I want to get the same thing in lps3.2 and 3.3?


_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user






--
Henry Minsky
Software Architect
[EMAIL PROTECTED]





--
Henry Minsky
Software Architect
[EMAIL PROTECTED]





--
Henry Minsky
Software Architect
[EMAIL PROTECTED]




--
Henry Minsky
Software Architect
[EMAIL PROTECTED]

_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user

Reply via email to