Yes, that is actually by design, setqueryparams blanks out the
querystring attribute.
I forgot why we made it do that, it does seem confusing now.



On 9/7/07, David Buckler <[EMAIL PROTECTED]> wrote:
> I did reproduce this and it does work.  However in my case I need to
> call setQueryParam/setQueryParams and when you do that it blanks out the
> querystring attribute.  Let me know if you are noticing the same
> behavior.
>
> David
>
> -----Original Message-----
> From: Henry Minsky [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 06, 2007 3:41 PM
> To: David Buckler
> Cc: [email protected]
> Subject: Re: [Laszlo-user] Querystring Dataset Attribute
>
> Are you sure about that? If I run this example
>
>   <dataset name="ds_test" request="false" queuerequests="true"
> type="http"
>            src="https://testing.laszlo.com/test.cfc?method=baz";
> secure="true"
>            />
>
> And then ask for ds_test.querystring in the debugger, I get the
> 'method=baz' string as the value
>
> lzx> ds_test.querystring
> 'method=baz'
>
>
>
> On 9/6/07, David Buckler <[EMAIL PROTECTED]> wrote:
> > In addition when I add "?method=foo" to the src url, where it should
> > parse out and set the querystring, it doesn't behave correctly either.
> >
> > Its almost seems like the setSrc function is being called twice; the
> > first time when it gets parsed correctly and the "?method=foo" gets
> > stripped from the src attribute by:
> >
> >         url.query = null;
> >         this.src = url.toString();
> >
> > then it gets run again and the querystring gets blanked out, just like
> > when you set the querystring attribute like I have.
> >
> > Just a thought.
> > David
> >
> > -----Original Message-----
> > From: Henry Minsky [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, September 06, 2007 3:02 PM
> > To: David Buckler
> > Cc: [email protected]
> > Subject: Re: [Laszlo-user] Querystring Dataset Attribute
> >
> > Yes, that is a bug. I will file a bug report.
> >
> > The setter for the "src" attribute in LzDataset.lzs is nulling out the
> > querystring arg, because it tries to parse it out of the src url.
> >
> > LzDataset.lzs:
> > function setSrc( src ) {
> >     var url = new LzURL(src);
> >     this.querystring = url.query;
> >     url.query = null;
> >     this.src = url.toString();
> >     if ( this.autorequest ){
> >         this.doRequest() ;
> >     }
> > }
> >
> > I guess it ought to check if the user supplied the argument during
> > init. The question is what to do if there is a conflict between the
> > src url and the querystring, like
> >
> > <dataset src="http:foo.php?method=foo" querystring="method=bar"/>
> >
> > I guess a runtime warning would be the right thing to do.
> >
> > The workaround for you would be to call setQueryString manually before
> > making the request.
> >
> >
> >
> >
> >
> > On 9/6/07, David Buckler <[EMAIL PROTECTED]> wrote:
> > >
> > > Thanks for checking this out Henry, here is a test line, obviously
> the
> > > cfc that this points to isn't real.  Also in our situation we add
> > query
> > > parameters with the setQueryParam method. When I watch the HTTP
> > requests
> > > I notice that the querystring parameter is never added but the
> > > parameters that are with setQueryParam are.  I also tested by adding
> > the
> > > method=testme to the end of the src and that didn't work either.
> > > However from what I understand that is just pulled off the end of
> the
> > > src and is stored in the querystring attribute.  Note that other
> > > datasets we are using where we set the method by means of the
> > > setQueryParam work fine.
> > >
> > > David
> > >
> > >
> > > <dataset name="ds_test" request="false" queuerequests="true"
> > type="http"
> > > src="https://testing.laszlo.com/test.cfc"; secure="true"
> > > querystring="method=testme"/>
> > >
> > > -----Original Message-----
> > > From: Henry Minsky [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, September 06, 2007 1:42 PM
> > > To: David Buckler
> > > Cc: [email protected]
> > > Subject: Re: [Laszlo-user] Querystring Dataset Attribute
> > >
> > > You might want to compare the behavior in one of the nightly builds
> of
> > > LPS 4, to see if there is an issue that may have been recently
> fixed,
> > > as well.
> > >
> > >
> > >
> > > On 9/6/07, Henry Minsky <[EMAIL PROTECTED]> wrote:
> > > > Do you have a small test case you can send me?
> > > >
> > > >
> > > >
> > > > On 9/6/07, David Buckler <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > I just installed 4.0.3 and have begun moving my code base from
> > 3.3.3
> > > over to
> > > > > the new version.  I am having an issue with the querystring
> > > attribute in the
> > > > > dataset object.  It appears that Laszlo isn't even paying
> > attention
> > > to it.
> > > > > Has anyone had a similar problem or know anything about this?
> > > >
> > > >
> > > > --
> > > > Henry Minsky
> > > > Software Architect
> > > > [EMAIL PROTECTED]
> > > >
> > >
> > >
> > > --
> > > Henry Minsky
> > > Software Architect
> > > [EMAIL PROTECTED]
> > >
> >
> >
> > --
> > Henry Minsky
> > Software Architect
> > [EMAIL PROTECTED]
> >
>
>
> --
> Henry Minsky
> Software Architect
> [EMAIL PROTECTED]
>


-- 
Henry Minsky
Software Architect
[EMAIL PROTECTED]

Reply via email to