Go Back   OpenLaszlo Developers Forums > Programming in OpenLaszlo > General OpenLaszlo Programming

General OpenLaszlo Programming Questions and discussions about coding in OpenLaszlo. Please include the release of OpenLaszlo you are developing in.

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-06-2006, 12:09 AM
rcyeager rcyeager is offline
New User
 
Join Date: Dec 2005
Posts: 1,031
rcyeager is on a distinguished road
Question Data pooling w/ paged results

Can anyone provide some guidance as to how to achieve data pooling for my app?

I currently receive XML transactions from a servlet that represent pages of results. I convert the XML string into dataset data, and store these as dataset arrays in my app, to facilitate client-side caching when paging through previously retrieved results.

There aren't many good samples of data pooling. All of them use a single datapath, like this:
Code:
  <view name="all">
    <datapath xpath="phonebook:/contacts/contact" pooling="true"/>
    <view>
      <simplelayout axis="x"/>
      <checkbox width="30" datapath="@checked">
        <method event="onvalue">
          datapath.updateData()
        </method>
        <method name="updateData">
          return this.value
        </method>
        <method name="applyData" args="d">
          setValue(d)
        </method>
      </checkbox>
      <text datapath="@firstName"/>
      <text datapath="@lastName"/>
      <text datapath="@phone"/>
      <text datapath="@email"/>
    </view>
  </view>
See how a single phonebook dataset is used in the sample? For my app, I need to be able to point to various datasets as result pages are selected.

I tried modifying the datapath directly via script using setXPath() on the datapath to point at my various datasets, but that didn't seem to work. The first page of results rendered OK, but nothing appeared when I tried to change the datapath to the next dataset. My concern with this approach is that it would in some way make pooling nonfunctional. Anyone know?

My Plan B is to create a singleton dataset that the datapath will refer to exclusively, then perform the data swapping into and out of the singleton dataset. My theory being that a singular dataset may be required for pooling. The documentation doesn't spell this out one way or another...

Has anyone tried anything like this? I've looked at the base classes to see how they do pooling, but sample code seems to be lacking in this area.

Robert
Reply With Quote
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pooling and XML Node Deletion tof General OpenLaszlo Programming 1 06-24-2006 05:16 AM
Dynamic Data to Dataset nbaig OpenLaszlo Datasets 0 03-22-2006 06:13 AM
"Encrypting" XML data on the wire bjaspan General OpenLaszlo Programming 2 03-10-2006 06:58 AM
Best method for retrieving data dbuchal General OpenLaszlo Programming 1 11-01-2005 06:22 PM
no data in SOAP response mcgaffin General OpenLaszlo Programming 1 12-23-2004 02:17 PM


All times are GMT -8. The time now is 06:45 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.