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

Key: LPP-3882
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: P1 P1
Assignee: Henry Minsky
Reporter: Antun Karlovac
Votes: 0
Watchers: 1
Operations

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

Databinding to xpathQuery broken in 4.0

Created: 15/Apr/07 07:27 PM   Updated: 27/Sep/07 08:56 AM
Component/s: LFC - Data
Affects Version/s: 4.0.0
Fix Version/s: RingDing (4.1)

Time Tracking:
Not Specified

File Attachments: 1. File databindingissue.tgz (0.5 kb)


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


 Description  « Hide
Constraining to xpathQuery() on a datapointer worked in 3.x and is broken in 4.0. See attached example. Note that if you use an embedded dataset (instead of loading data over HTTP), it works (even in 4.0).



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Frisco Del Rosario - 17/Apr/07 04:58 PM
Everything Antun said is true. (My tests also included binding to a datapath.)

<canvas debug="true">
<debug y="150"/>
<include href="lzunit"/>
<simplelayout axis="y" spacing="20"/>

<!-- tests with embedded dataset were OK

<dataset name="ds">
<slideshow>
    <metainformation>
        <title>Refresher (Lab)</title>
        <subtitle>Contacts Error Dialog</subtitle>
        <classname>Building OpenLaszlo Applications</classname>
        <summary>
            Build a custom error alert dialog box.
        </summary>
    </metainformation>
</slideshow>
</dataset>

-->

<dataset name="ds" src="samplexml.xml" type="http" request="true" trimwhitespace="true" />
<datapointer name="dp" xpath="ds:/slideshow/metainformation" />
<text id="testQuery" fontsize="24" width="500" bgcolor="yellow" text="${dp.xpathQuery('title/text()')}" />
<text id="testDatapath" fontsize="24" width="500" bgcolor="aqua" datapath="ds:/slideshow[1]/metainformation[1]/subtitle[1]/text()"/>

<TestSuite>
<TestCase>
<method name="testXPathQuerying">
assertEquals("Refresher (Lab)", testQuery.text);
assertEquals("Contacts Error Dialog", testDatapath.text);
</method>
</TestCase>
</TestSuite>

</canvas>

Henry Minsky - 01/May/07 12:18 PM
in review by ptw

Frisco Del Rosario - 02/May/07 01:22 PM
Was this checked in? The bind to the xpathQuery is still running red.

Henry Minsky - 02/May/07 02:09 PM
I checked it in yesterday, maybe the nightly build hasn't built if you're using that...
revision 4860 was the change it was done in.

Please tell me if it's still broken..

When I ran this test with my fix, the databound text shows up with a yellow background.

Sebastian Wagner - 04/May/07 02:43 AM
Test Case:
<?xml version="1.0" encoding="UTF-8" ?>
<canvas debug="true" width="950" >
    <include href="lz/tree.lzx" />

    <dataset name="mydata" />

    <tree datapath="mydata:/basket" open="$path{'@isopen'}"
          text="$path{'@name'}" multiselect="true">
        <tree id="xxx" datapath="*" text="$path{'@name'}"
isleaf="$path{'@isleaf'}" />
    </tree>

</canvas>

=> runtime Flash swf8 with debugger results in 100% CPU and no more
interaction

is this related with this task?