History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-5141
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: P0 P0
Assignee: Henry Minsky
Reporter: André Bargull
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

querytype on dataset broken

Created: 21/Nov/07 03:15 PM   Updated: 29/Nov/07 01:29 PM
Component/s: LFC - Data
Affects Version/s: RingDing (4.1)
Fix Version/s: RingDing (4.1)

Time Tracking:
Not Specified

File Attachments: 1. File LPP-5141.lzx (0.7 kb)


Severity: Major
Fixed in Change#: 7,415
Runtime: N/A
Fix in hand: True


 Description  « Hide
If "querytype" is set as an initial argument, it needs to be in upper case, otherwise requests will be send as "GET" instead of "POST".

Reason: "querytype" does not have its own setter, but a special handling in "LzDataset#construct(..)". But later on the "querytype" field will be set again to the init-arg in "LzNode#construct(..)". And in internal data-classes we compare the "querytype" to the string "POST", which does fail in case "querytype" is "post" (case-sensitive string compare!).

Test: set "querytype" in lowercase or mixed case (i.e. "post"), notice requests are all "GET" (did not test it myself, reported by a user at "http://forum.openlaszlo.org/showthread.php?t=11205")

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
André Bargull - 21/Nov/07 03:18 PM
attached testcase

Henry Minsky - 21/Nov/07 07:04 PM
out for review.

Hmm, there is also a setter in LzDataset for the 'src' attribute, it seems like the code in the construct method which handles the 'src' attribute should be
removed, since it is redundant with what the setter does when applyArgs is called. In that case it
should be declared "var src = null;" in the class declaration.


André Bargull - 22/Nov/07 12:58 PM
I guess the "src"-handling is just a leftover from the old datasource-stuff

LzDataset.lzx - rev. #6244
if ('src' in args && args.src) {
    this.src = args.src;
} else {
    this.src = ('src' in this._dsrc) ? this._dsrc.src : null;
}

André Bargull - 28/Nov/07 12:58 PM
reassigning to Henry, b/c he already sent out a changeset for review

Henry Minsky - 29/Nov/07 01:29 PM
r7415 | hqm | 2007-11-29 16:27:27 -0500 (Thu, 29 Nov 2007) | 31 lines
Changed paths:
   M /openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataset.lzs

Change 20071129-hqm-a by hqm@DADDY_THNKPAD67 on 2007-11-29 16:26:36 EST
    in /cygdrive/c/users/hqm/openlaszlo/trunk/WEB-INF/lps/lfc
    for http://svn.openlaszlo.org/openlaszlo/trunk/WEB-INF/lps/lfc

Summary: clean up of querytype and src setters in lzdataset

New Features:

Bugs Fixed: LPP-5141

Technical Reviewer: andre
QA Reviewer: pbr
Doc Reviewer:

Documentation:

Release Notes:

Details:

There are setters for the 'querytype' and 'src' attributes, so there is no need
to handle them specially in the constructor.


Tests:

test/lfc/data/alldata.lzx
demos/amazon