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

Key: LPP-3894
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: P1 P1
Assignee: Unassigned
Reporter: Antun Karlovac
Votes: 0
Watchers: 0
Operations

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

Relative HTTP paths no longer work for datasets

Created: 18/Apr/07 04:56 PM   Updated: 09/May/07 12:30 PM
Component/s: LFC - Data
Affects Version/s: 4.0.0
Fix Version/s: 4.0.2, Legals

Time Tracking:
Not Specified

File Attachments: 1. File relpath.tgz (2 kb)


Severity: Critical
Fixed in Change#: 4,798
Runtime: N/A
Fix in hand: False


 Description  « Hide
It seems that data-binding breaks when using relative HTTP paths in a dataset (in 4.0). e.g.

<dataset src="../data/data.xml" type="http" request="true" name="ds" />

See the attached example. Oddly, it looks like the data is actually present in the dataset (try calling serialize()). But the replicated views are not created.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Henry Minsky - 19/Apr/07 09:00 AM
I see the bug (lack of replication, but dataset does load). However it also doesn't seem to work even if the URL is absolute. So it seems
like it's not related to the relative URL.

I'm looking into why replication isn't firing.



Henry Minsky - 19/Apr/07 09:04 AM
   Using "datapath" attribute does work, but using the datapath child element doesn't.



 <view name="container" x="10" y="10">
        <simplelayout axis="y" spacing="2" />
        <selectionmanager name="selman" />

        <contact name="row" datapath="ds:/addressbook/contacts/person">
<!--
            <datapath xpath="ds:/addressbook/contacts/person">
            </datapath>

-->

Henry Minsky - 19/Apr/07 09:14 AM
BTW, the example doesn't replicate in 3.4 either when the <datapath> element is used

Henry Minsky - 23/Apr/07 09:19 AM
OK, the thing that is causing this bug is the definition of the <contact> class,

It declares an explicitly empty datapath
    <class name="contact" datapath=""
         ...


which seems to be overriding the datapath child element in the example
      <contact name="row">
        <datapath xpath="ds:/addressbook/contacts/person"/>
      </contact>

Removing that empty datapath example fixes this.

I am going to mark this as an invalid bug, although I will add a warning
to the debugger if it finds both a datapath attribute and a datapath child tag on a view.


Henry Minsky - 23/Apr/07 09:22 AM
Actually, the system should have just overridden the class definition's datapath
attribute with the instance's child datapath tag attribute. So this is a bug.
I'm working on it...

Antun Karlovac - 23/Apr/07 09:26 AM
I was just about to comment on *exactly* what you said, when I saw yours. So I'm just seconding it.

One thing I noticed in 4.0 is that you don't seem to need to declare datapaths on views you intend to data-bind at run-time. In 3.x, you were obliged to enter an empty datapath (or an empty datapath node) on the tag, if you intended to set its datapath later (using, say datapath.setAttribute("p", somedp)). This seems to have changed now.

Henry Minsky - 27/Apr/07 02:42 PM
We put in a fix which allows the datapath element in an instance to override any datapath
attribute from a class definition


Mamye Kratt - 09/May/07 12:30 PM
(branches/4.0 build 4951)
Fixed.