Nested Data Set

I've got a table like this
ITEM-------------COLOUR
keyboard--------black
keyboard--------white
mouse-----------black
mouse-----------white
In Dreamweaver I am using Tom Muck's Nested Repeat Region so
that the data shows like this
keyboard
black
white
mouse
black
white
Is there a way to bring in this data, using the Spry Tabbed
data? The data is exported using Dreamweaver Export Recordset as
XML. I can bring in the data into Spry but, using the example above
it creates FOUR tabs with one colour, and I obviously require TWO
tabs with two colours in!
I'm pretty new to Spry - although I have done a lot of HTML
tabbed stuff. Any help would be lapped up!
Many thanks
Vanrooj

Hi Marlene,
It isn't working right because you have a bug in your
onchange attribute for your select:
<select id="test"
onChange="ds1.setCurrentRow(this.selectedIndex);">
<option spry:repeat="ds1"
id="{ds_RowID}">{@id}</option>
</select>
setCurrentRow() takes a rowID not a rowNumber. The
"selectedIndex" of the select element is the equivalent of a row
number, so if you want to change the current row by row number then
use setCurrentRowNumber() instead:
<select id="test"
onChange="ds1.setCurrentRowNumber(this.selectedIndex);">
<option spry:repeat="ds1"
id="{ds_RowID}">{@id}</option>
</select>
After you make that change, you will see that things work as
expected.
--== Kin ==--

Similar Messages

  • GetData() from nested data sets

    Hi,
    I've got nested data sets in the form of:
    var ds1 = new Spry.Data.XMLDataSet("products.xml",
    "items/item");
    var dsOptionSets = new Spry.Data.NestedXMLDataSet(ds1,
    "optionsets/optionset");
    var dsOptions = new Spry.Data.NestedXMLDataSet(dsOptionSets,
    "option");
    The application is an e-commerce store and I'm retrofitting
    E-Junkie's form <select> codes to allow the user to select
    "Color" and "Size" by clicking on images pulled from
    items/item/optionsets/optionset/option rather than selecting those
    options from a list. Trouble is, I can't get to the data in the
    nested data set. Help!
    I've tried poking at it thus:
    <img spry:repeat="dsOptions" spry:setrow="dsOptions"
    onclick="var rows = dsOptions.getData(); alert(rows[0].option);"
    spry:if="'{dsOptions::@image}' != 'undefined'"
    src="{dsOptions::@image}" alt="{dsOptions::option}"
    name="{dsOptions::option}" />
    .. but I've yet to get anything but "undefined" from the
    alert. I think it may have something to do with the data sets being
    more complexly nested than I imagine. I'm really looking forward to
    the day when I can refer to Spry data in javascript as easily as I
    can through {spry::tag}s.
    Here's one <item> from my <items>:
    <items>
    <item>
    <id>43522</id>
    <title>Gildan T-Shirts</title>
    <price>16.95</price>
    <images>
    <image description="Gildan T-Shirt in Charcoal
    Grey">images/products/shirts/tshirt_gildan_ss_charcoalgrey.jpg</image>
    </images>
    <optionsets>
    <optionset value="Colors" id="0">
    <option
    image="images/products/shirts/tshirt_gildan_ss_texasorange.jpg">Texas
    Orange</option>
    <option
    image="images/products/shirts/tshirt_gildan_ss_charcoalgrey.jpg">Charcoal</option>
    </optionset>
    <optionset id="1" value="Size">
    <option value="Small"
    image="images/products/sizes/size_s.gif">Small</option>
    <option value="Medium"
    image="images/products/sizes/size_m.gif">Medium</option>
    <option value="Small"
    image="images/products/sizes/size_l.gif">Large</option>
    <option value="Xtra Large"
    image="images/products/sizes/size_xl.gif">Xtra
    Large</option>
    <option value="XXtra Large"
    image="images/products/sizes/size_2x.gif">XXtra
    Large</option>
    </optionset>
    </optionsets>
    </item>
    </items>

    Hi Diana,
    I tried your suggestion of executing ds1.loadData()
    immediately after declaring ds1, but it has not fixed my problem.
    I've changed my image onClick behavior to:
    if (dsOptions.getDataWasLoaded())
    row = dsOptions.getRowCount();
    alert(row);
    On clicking any image, alert shows "0". This tells us that
    dsOptions IS being loaded, right? I'm able to work with the data
    through e.g. {dsOptions::option} tags as always, but for some
    reason I can't get to the data through dsOptions.
    I just tried replacing the onClick behavior above with
    ds1.getRowCount(), and that shows the correct number (6). Then I
    tried with dsOptionSets and got a zero count again.
    FYI, my declaration section is now:
    var ds1 = new Spry.Data.XMLDataSet("products.xml",
    "items/item");
    ds1.loadData(); // theoretically not necessary, but bug in
    this Spry version requires it
    ds1Rows = ds1.getData(true);
    var dsOptionSets = new Spry.Data.NestedXMLDataSet(ds1,
    "optionsets/optionset");
    dsOptionSets.loadData();
    dsOptionSetsRows = dsOptionSets.getData(true);
    var dsOptions = new Spry.Data.NestedXMLDataSet(dsOptionSets,
    "option");
    dsOptions.loadData();
    dsOptionsRows = dsOptions.getData(true);
    I've also just tried replacing the onclick with:
    onclick="if (ds1.getDataWasLoaded()) { ds1Rows=
    ds1.getData(true); dsOptionSetsRows = dsOptionSets.getData(true);
    dsOptionsRows =
    dsOptions.getData(true);alert(dsOptionsRows[0].option);}"
    As before, ds1Rows[0].<property> gives the correct
    result but dsOptionsRows[0].option says "dsOptionsRows[0] has no
    properties".
    Thanks,
    Dylan Oliver

  • Multiple Filtering of Nested Data Set Spry

    Hi,
    I am trying to use multiple filters on a nested data set using Spry but it does not work, no matter how many times I've re-read the code and verified that I'm using the code the right way. What is going on?
    When I use a single non-destructive filter (ie... ds.filter()) on the nested data set, the filter works beautifully. However, when I want to use multiple filters (I use ds.addFilter()), it looks like my filter function (FilterByState) is not being kicked off.
    I linked to the appropriate files, SpryData.js, xpath.js, SpryNestedXMLDataSet.js and SpryDataExtensions.js. These are the latest version, 1.6.1.
    Why will ds.filter work and not ds.addFilter? I haven't written the second filter code yet because this is stopping me from moving forward. Even though, I haven't written that, shouldn't addFilter work too?
    Please help, this is driving me crazy.
    Here is my code:
    <script type="text/javascript">          
         Spry.Utils.addLoadListener(function () {
              if (document.getElementById("stateSelect").selectedIndex != 0) {
                   document.getElementById("stateSelect").selectedIndex = 0;    
              if (document.getElementById("dateSelect").selectedIndex != 0) {
                   document.getElementById("dateSelect").selectedIndex = 0;    
         var dsTopics = new Spry.Data.XMLDataSet("compliance.xml", "compliance/subject", {useCache: false });         
         var dsDocuments = new Spry.Data.NestedXMLDataSet(dsTopics, "doc");
         var dsDates = new Spry.Data.XMLDataSet("compliance.xml", "compliance/subject/doc/date", {useCache: false, subPaths: "@num", distinctOnLoad: true, distinctFieldsOnLoad: ['date'], sortOnLoad: "@num", sortOrderOnLoad:"ascending"});
         dsDates.setColumnType("@num", "number");
         var currentSelection;
         //var FilterByState;
         function showDocuments(currentIndex) {
              dsTopics.setCurrentRowNumber(currentIndex);
              document.getElementById("stateSelect").selectedIndex = 0;
              document.getElementById("dateSelect").selectedIndex = 0;
              dsDocuments.removeAllFilters(true);
         function ToggleFilter(selected, f) {
              chosenState = selected;
              if (selected != "") {
                   alert("something's selected");
                   dsDocuments.addFilter(f, true);
              else {
                   alert("something is NOT selected");
                   dsDocuments.removeFilter(f, true);
              //dsDocuments.applyFilters();
         var chosenState;
         var chosenDate;
         function FilterByState(ds, row, rowNumber) {
              alert("Filtering by state");
              var currentSelection = document.getElementById("stateSelect").options[chosenState];
              if (row["state"].search(currentSelection.value) != -1) {
                   return row;
              else
                   return null;
         function FilterByDate(ds, row, rowNumber) {
              var currentSelectedDate = document.getElementById("dateSelect").options[chosenDate];    
              if (row["date"] == currentSelectedDate)
                   return row;
              else
                   return null;
    </script>
    <div class="articlePage articleContent">
         <h2 class="bodyCopyBold">Compliance Widget</h2>
         <form name="selectForm" action="">
              <div spry:region="dsTopics" id="topicSelector">
                   <label for="topicSelect" class="dataLabel">Topic:</label>
                   <select spry:repeatchildren="dsTopics" class="input" name="topicSelect" id="topicSelect" onchange="showDocuments(this.selectedIndex);">
                        <option spry:if="{ds_RowNumber} == {ds_CurrentRowNumber}" value="{name}" selected="selected">{name}</option>
                        <option spry:if="{ds_RowNumber} != {ds_CurrentRowNumber}" value="{name}">{name}</option>
                   </select>
              </div>
              <label for="stateSelect" class="dataLabel">State:</label>
              <select class="input" name="stateSelect" id="stateSelect" onchange="ToggleFilter(this.selectedIndex, FilterByState);">
                   <option value="" selected="selected">Please Select</option>
                   <option value="All States">All States</option>
                   <option value="AL">Alabama</option>
                   <option value="AK">Alaska</option>
                   <option value="AZ">Arizona</option>
                   <option value="AR">Arkansas</option>
                   <option value="CA">California</option>
                   <option value="CO">Colorado</option>
                   <option value="CT">Connecticut</option>
                   <option value="DE">Delaware</option>
                   <option value="DC">District of Columbia</option>
                   <option value="FL">Florida</option>
                   <option value="GA">Georgia</option>
                   <option value="HI">Hawaii</option>
                   <option value="ID">Idaho</option>
                   <option value="IL">Illinois</option>
                   <option value="IN">Indiana</option>
                   <option value="IA">Iowa</option>
                   <option value="KS">Kansas</option>
                   <option value="KY">Kentucky</option>
                   <option value="LA">Louisiana</option>
                   <option value="ME">Maine</option>
                   <option value="MD">Maryland</option>
                   <option value="MA">Massachusetts</option>
                   <option value="MI">Michigan</option>
                   <option value="MN">Minnesota</option>
                   <option value="MS">Mississippi</option>
                   <option value="MO">Missouri</option>
                   <option value="MT">Montana</option>
                   <option value="NE">Nebraska</option>
                   <option value="NV">Nevada</option>
                   <option value="NH">New Hampshire</option>
                   <option value="NJ">New Jersey</option>
                   <option value="NM">New Mexico</option>
                   <option value="NY">New York</option>
                   <option value="NC">North Carolina</option>
                   <option value="ND">North Dakota</option>
                   <option value="OH">Ohio</option>
                   <option value="OK">Oklahoma</option>
                   <option value="OR">Oregon</option>
                   <option value="PA">Pennsylvania</option>
                   <option value="RI">Rhode Island</option>
                   <option value="SC">South Carolina</option>
                   <option value="SD">South Dakota</option>
                   <option value="TN">Tennessee</option>
                   <option value="TX">Texas</option>
                   <option value="UT">Utah</option>
                   <option value="VT">Vermont</option>
                   <option value="VA">Virginia</option>
                   <option value="WA">Washington</option>
                   <option value="WV">West Virginia</option>
                   <option value="WI">Wisconsin</option>
                   <option value="WY">Wyoming</option>
              </select>
              <div spry:region="dsDates" id="dateSelector">
                   <label for="dateSelect" class="dataLabel">Date:</label>
                   <select class="input" name="dateSelect" id="dateSelect">
                        <option value="" selected="selected">Please Select</option>
                        <option spry:repeat="dsDates" value="{date}">{date}</option>
                   </select>
              </div>         
              <div class="spacer10"></div>
              <div id="documentListing" class="bodyCopy">
                   <ul spry:region="dsDocuments" spry:detailregion="dsTopics" class="list2">
                        <li spry:repeat="dsDocuments">{title}</li>
                   </ul>
              </div>
         </form>
    Here is the xml:
    <?xml version="1.0"?>
    <compliance>
         <subject>
              <name>Agent Termination</name>
              <doc id="91000038">
                   <title>Reminder: Agent Contract Termination Notification</title>
                   <date num="200907">July 2009</date>
                   <state>OR</state>
              </doc>
              <doc id="91000031">
                   <title>Reminder: Agent Contract Termination Notification 2</title>
                   <date num="200807">July 2008</date>
                   <state>OR</state>
              </doc>
              <doc id="91000031">
                   <title>Reminder: Agent Contract Termination Notification 2</title>
                   <date num="201001">January 2010</date>
                   <state>OR</state>
              </doc>
         </subject>
         <subject>    
              <name>Agent Training</name>
              <doc id="91000034">
                   <title>Oregon Agent Retraining</title>
                   <date num="200908">August 2009</date>
                   <state>OR</state>
              </doc>
              <doc id="91000060">
                   <title>Multi-State Corrective Action Plan - Training Courses – BLN Changes</title>
                   <date num="200902">February 2009</date>
                   <state>All States</state>
              </doc>
              <doc id="91000062">
                   <title>Required Training – Change for California Agents</title>
                   <date num="200902">February 2009</date>
                   <state>CA</state>
              </doc>
              <doc id="91000065">
                   <title>Required Training - BCLIC Agents</title>
                   <date num="200902">February 2009</date>
                   <state>NY</state>
              </doc>
              <doc id="91000071">
                   <title>Multi-State Corrective Action Plan - Training Courses – BLN Changes</title>
                   <date num="200901">January 2009</date>
                   <state>All States</state>
              </doc>
              <doc id="91000074">
                   <title>Multi-State Corrective Action Plan - Training Courses – BLN Changes 2</title>
                   <date num="200910">October 2009</date>
                   <state>All States</state>
              </doc>
         </subject>
         <subject>
              <name>Agents Licenses</name>
              <doc id="91000064">
                   <title>Georgia Agent Consent Orders</title>
                   <date num="200902">February 2009</date>
                   <state>GA</state>
              </doc>
              <doc id="91000066">
                   <title>New York State Correction Law</title>
                   <date num="200902">February 2009</date>
                   <state>NY</state>
              </doc>
         </subject>
         <subject>
              <name>DNC</name>
              <doc id="91000063">
                   <title>States Prohibit Unsolicited Calls</title>
                   <date num="200902">February 2009</date>
                   <state>AL, LA, RI, UT</state>
              </doc>
         </subject>
         <subject>
              <name>LTC Partnership</name>
              <doc id="91000056">
                   <title>Alabama Long Term Care and Long Term Care Partnership Compliance</title>
                   <date num="200903">March 2009</date>
                   <state>AL</state>
              </doc>
         </subject>
    </compliance>
    Thanks

    Hi Marlene,
    It isn't working right because you have a bug in your
    onchange attribute for your select:
    <select id="test"
    onChange="ds1.setCurrentRow(this.selectedIndex);">
    <option spry:repeat="ds1"
    id="{ds_RowID}">{@id}</option>
    </select>
    setCurrentRow() takes a rowID not a rowNumber. The
    "selectedIndex" of the select element is the equivalent of a row
    number, so if you want to change the current row by row number then
    use setCurrentRowNumber() instead:
    <select id="test"
    onChange="ds1.setCurrentRowNumber(this.selectedIndex);">
    <option spry:repeat="ds1"
    id="{ds_RowID}">{@id}</option>
    </select>
    After you make that change, you will see that things work as
    expected.
    --== Kin ==--

  • Menu Bar using Nested Data Sets?

    Hi all,
    I was wondering if anyone has succesfully implimented a menu
    bar widget using a dataset? I would like to control menu items by
    changing items on the database. Is this possible? I think this may
    be possible with nested data sets but I'm not sure.
    Thanks in advance
    Nelson

    Hi, I know you're not a baby sitter, but would you be willing
    to give me a little guidence as to how you came up with this? Your
    sample seems to work exactly the way I want it.
    Here's what I've done so far... correct me if I'm way off. I
    have a db with 2 tables (menu1 and menu2).
    menu1 = id, title, url, target (this was going to be the top
    level menu items)
    menu2 = id,menu1_id, title, url, target (this was going to be
    the sub menu items)
    I then created a menu_data page where I do two recordsets to
    pickup the items from both tables. I then used the extension
    "Export Record Set as XML" on that page for each of the recordsets.
    S now I have my xml data.
    Now I create a menu page where I try to bring in that data
    into my menu bar. Was I really far off? Can you do a little hand
    holding here? I'm kinda new to this stuff.
    Thanks so much for the help!!!
    Nelson

  • How to define a column as html in a nested data set

    http://www.nmprc.state.nm.us/bailbonds2.htm
    If you click on Terms and definitions, and then click on any
    of the collapsible panels you can see that the html code is still
    showing. I got "name" and "desc" defined right, but despite many
    trials, I have yet to figure out how to define the column "answer"
    as html.

    ok, I tried it with the non-minimized files and it did the
    same thing, though I was able to fix it by adding
    {entityEncodeStrings: false });
    var ds1 = new Spry.Data.NestedXMLDataSet(dsAgents,
    "faqblock/agents", {entityEncodeStrings: false });
    it is now a working page
    http://www.nmprc.state.nm.us/bailbonds.htm
    you can see it with the packed files as bailbonds2 (the link
    in the originating post)
    I learn as I go, and thanks to the wonderful Spry team, I
    don't have too many bumps on the head...*smile* you guys are
    great...from the spry product, to the documentation, to the
    samples, and demos, I have never enjoyed using a product more. I
    recommend it to everyone :)

  • Nested XML data set

    Hi there,
    I have a problem with displaying some nested XML data. I've
    tried quite a lot of different approachey to this, but just can't
    get it working properly. So here's the deal:
    I have an XML file (which is dynamically created from a
    servlet) of the form:
    <variations>
    <variation>
    <name>...</name>
    <...>...</...>
    <links>
    <link>
    <type>...</type>
    <name>...</name>
    </link>
    </links>
    </variation>
    </variations>
    On my webpage, I use a Spry tabbed panel with one tab for
    each of the 'variation's in the XML file. Within the tabs I have
    (many) form fields dynamically filled with the values from the XML
    and that all works fine, but I also want to display a table with
    one row corresponding to each 'link'... and that just won't work...
    My latest approach looks something like this:
    <head>
    <script type="text/javascript">
    <!--
    var dsVariations = new
    Spry.Data.XMLDataSet("Servlet?id=1&cmd=getVariations",
    "variations/variation");
    var dsLinks = new
    Spry.Data.XMLDataSet("Servlet?id=0&cmd=getLinks",
    "links/link");
    //-->
    </script>
    </head>
    <body>
    <div id="TabbedPanels1" spry:region="dsVariations">
    <div id="TP1" class="TabbedPanels">
    <ul class="TabbedPanelsTabGroup">
    <li spry:repeat="dsVariations" class="TabbedPanelsTab"
    tabindex="0">{dsVariations::name}</li>
    </ul>
    <div class="TabbedPanelsContentGroup">
    <div spry:repeat="dsVariations"
    class="TabbedPanelsContent">
    // a lot of form stuff
    <table border="1">
    <script type="text/javascript">
    dsLinks.setURL("Servlet?id={dsVariations::id}&cmd=getLinks");
    dsLinks.loadData();
    </script>
    <tr spry:repeat="dsLinks">
    <td>{dsLinks::type}</td>
    <td>{dsLinks::name}</td>
    </tr>
    </tr>
    </table>
    </div>
    </div>
    </body>
    In this, the Servlet call with cmd=getVariations returns the
    whole XML stated above, while the cmd=getLinks will only get the
    corresponding part (everything between <links> and
    </links>).
    The error message I get for this is: processTokens() failed
    to get a data set context!.
    I previously tried to use a NestedXMLDataSet, but couldn't
    get that working either... I'm really kind of stuck by now and
    would appreciate any help.
    Thanks,
    Florian
    PS Thanks a lot for creating Spry: It's great!

    Thanks for your reply, Cristian.
    I'm afraid I couldn't do that since it would cause the whole
    region to be reloaded constantly (because it's being updated each
    time I do the setURL / loadData)... in fact, I tried this before
    and it didn't work.
    But, in fact, I figured that the fact that I could not get it
    running using a NestedXMLDataSet (as I would generally prefer), did
    not actually come down to a problem in the page source code, but
    actually to a problem with the very XML itself:
    I tried to recreate the simple nested data set example (
    http://labs.adobe.com/technologies/spry/samples/data_region/NestedDataSample.html)
    and basically used the same code and an almost identical XML
    structure... yet it doesn't work. The contents of dsFeatures just
    won't be displayed and when I'm inspecting the contents of
    dsFeatures (using Firebug) it shows me that the dataset is empty. I
    just don't get why it works for your example, but not for my
    modified version... I can't see any crucial difference :-s.
    To simplify the problem I deleted most tags from the XML and
    saved it in a static document "variations.xml":
    <variations>
    <variation>
    <name>Var 1</name>
    <features>
    <feature>none</feature>
    <feature>feat1</feature>
    <feature>feat2</feature>
    </features>
    </variation>
    <variation>
    <name>Var 2</name>
    <features>
    <feature>none</feature>
    </features>
    </variation>
    </variations>
    The source of the test page would be:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml"
    xmlns:spry="
    http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Nested Data Sample</title>
    <script language="JavaScript" type="text/javascript"
    src="SpryAssets/xpath.js"></script>
    <script language="JavaScript" type="text/javascript"
    src="SpryAssets/SpryData.js"></script>
    <script language="JavaScript" type="text/javascript"
    src="SpryAssets/SpryNestedXMLDataSet.js"></script>
    <script type="text/javascript">
    var dsVariations = new Spry.Data.XMLDataSet("variations.xml",
    "/variations/variation");
    var dsFeatures = new Spry.Data.NestedXMLDataSet(dsVariations,
    "features/feature");
    </script>
    </head>
    <body>
    <table border="1">
    <tr>
    <th width="30%"
    onclick="dsVariations.sort('name');">dsVariations</th>
    <th width="30%"
    onclick="dsFeatures.sort('link')">dsFeatures</th>
    <th width="30%">dsVariations + dsFeatures</th>
    </tr>
    <tr>
    <td valign="top"><div
    spry:region="dsVariations">
    <ul>
    <li spry:repeat="dsVariations" spry:select="select"
    spry:hover="hover" spry:setrow="dsVariations"> {name}
    </li>
    </ul>
    </div></td>
    <td valign="top"><div spry:region="dsFeatures">
    <ul>
    <li spry:repeat="dsFeatures"> {dsFeatures::feature}
    </li>
    </ul>
    </div></td>
    <td valign="top"><div spry:region="dsVariations
    dsFeatures">
    <ul>
    <li spry:repeat="dsVariations"> {dsVariations::name}
    <ul>
    <li
    spry:repeat="dsFeatures">{dsFeatures::feature}</li>
    </ul>
    </li>
    </ul>
    </div></td>
    </tr>
    </table>
    </body>
    Evidently, I'm missing some essential simple point here...
    Thanks,

  • Spry Dataset and Nested Data

    i've 1 xml file, with basicly 3 columns: city, artist, artist
    description.
    i want to show cities and when a city clicked, show the
    artists in that city, and when artist is clicked show artist
    description as details.
    i've tryed everything, but the best i can do... see below.
    any help would be highly appreciated!!!
    erik
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    <title>Untitled Document</title>
    <script language="JavaScript" type="text/javascript"
    src="SpryAssets/xpath.js"></script>
    <script language="JavaScript" type="text/javascript"
    src="SpryAssets/SpryData.js"></script>
    <script language="JavaScript" type="text/javascript"
    src="SpryAssets/SpryNestedXMLDataSet.js"></script>
    <script type="text/javascript">
    // Setup a parent data set:
    // Setup a couple of nested data sets:
    var ds1 = new Spry.Data.XMLDataSet("buitenplaatsen.xml",
    "root/dataroot/buitenplaatsen", { useCache: false });
    var ds2 = new Spry.Data.NestedXMLDataSet(ds1,
    "omschrijving_kunstenaar");
    var ds3 = new Spry.Data.NestedXMLDataSet(ds1,
    "buitenplaats");
    var ds4 = new Spry.Data.NestedXMLDataSet(ds1,
    "naam_kunstenaar");
    </script>
    <div class="liveSample">
    <table width="100%" border="1">
    <tr>
    <th>Buitenplaats</th>
    <th>Kunstenaar</th>
    <th>Omschrijving</th>
    </tr>
    <tr>
    <td valign="top" width="20%" spry:region="ds3">
    <ul>
    <li spry:repeat="ds3" spry:setrow="ds3"
    spry:select="selected"
    spry:hover="hover">{buitenplaats}</li>
    </ul>
    </td>
    <td valign="top" width="20%" spry:region="ds1">
    <ul>
    <li spry:repeat="ds1" spry:setrow="ds1"
    spry:select="selected"
    spry:hover="hover">{naam_kunstenaar}</li>
    </ul>
    </td>
    <td valign="top" width="60%" spry:region="ds2">
    <ul>
    <li
    spry:repeat="ds2">{omschrijving_kunstenaar}</li>
    </ul>
    </td>
    </tr>
    </table>
    </div>
    <body>
    </body>
    </html>

    Hi,
    hereby url:
    http://www.eenlintvollust.nl/test/test_datasets.html
    http://www.eenlintvollust.nl/test/buitenplaatsen.xml
    i want that in the left column i can select the distinct
    city(buitenplaats), than the middel column shows the
    artists(kunstenaar) and when clicked on artist,
    detail(omschrijving) shows up. Thanx for any help!!!

  • Nested Left Outer Join : Data Set

    Hi All
    I am bit confused about data set used by Nested Left outer join.
    Can anyone help me.
    Here is sample data:
    Tables (Name, 3 Column each, total rows and matched rows if any):
         Table 1          
         A     B     C
         Total 20 Rows          
         Table 2          
         A     D     E
         Total 50 Rows and 10 Matching on      2.A = 1.A     
         Table 3          
         D     M     N
         Total 15 Rows and 15 Matching on 3.D = 2.D     
         Table 4          
         M     X     Y
         Total 20 Rows and 10 Matching on 4.M = 3.M     
    Sql
    select *
    From Table 1
    Left Outer Join on Table 2 on
                   2.A = 1.A
    -- Data set 1 will contain 20 Rows (10 matching and 10 non matching)
    Left Outer Join on Table 3 on
                   3.D = 2.D
    -- What will be data set? 20 Rows of Data set 1 or 15 Matching Rows?
    Left Outer Join on Table 4 on
                   4.M = 3.M
    -- What will be data set? X Rows of Data set 2 or 10 Matching Rows?
    Please have a look and clear my understanding.

    SeshuGiri wrote:
    I have two tables defined (below). Emp table has data and there is no data in Emp_Type table yet! Right now it is empty.
    I want to write a query that returns data from both the tables even though there is no data in Emp_type table. I am using left outer join but it returning nothing. Anyone can help?
    select *
    from emp e
    left outer join emp_Type t
    on e.empid = t.empid
    WHERE t.type_id = 1
    and t.end_date is null;
    The join is including all rows from emp, just like you want.
    The WHERE clause is discarding all of those rows. Since all the columns from emp_type (alias t) are NULL, the condition "t.type_id = 1" in the WHERE clause is never true.
    Perhaps you meant to include all those conditions in the join conditions, like this:
    select *
      from emp e
      left outer join emp_Type t
        on e.empid = t.empid
       and t.type_id = 1
       and t.end_date is null;Edited by: Frank Kulash on Jan 30, 2012 3:56 PM

  • Data Sets - Is there a way to put two fields in the same row?

    I am working on my first Spry Data Set (in Dreamweaver CS4) which, if I can get it figured out, will eventually be used as a calendar on a client's web site. You can see the beginning of the project here:
    http://www.rieradesignco.com/calendarlist_spry.html
    My question is, can I put two or more fields on one row? Specifically, I would like the part that looks like this...
    3
    [WED]
    Fusion
    ... to look like this:
    3   [WED]   Fusion
    I tried simply moving the fields (in Design View) so that they looked like they would be in the same row, but as you can see, that didn't do the trick. (You can see what I did here, in the highlighted part of the screenshot:  http://www.rieradesignco.com/spryquestion.jpg). I also tried nesting a table within the table on my html data document that contained the three fields I needed - it worked okay, but that just makes the table more difficult to work with. I don't want to simply type the three items into one field, because it will be a long list and they all need to line up perfectly.
    Is there another way to do it?

    Change the following line to include the red coloured parts
    <div class="MasterColumn" spry:repeat="ds4" spry:setrow="ds4" spry:hover="MasterColumnHover" spry:select="MasterColumnSelected">
      <span>{Dsp_#}</span><span>{Dsp_WkDay}</span><span>{Dsp_Event}</span>
    </div>
    The add the following style rule to your document:
    .MasterColumn span {
        display: inline-block;
    I hope this helps.
    Ben

  • Spry Accordian and 2 data Sets

    I have created a nested accordian with 2 data sets feeding a
    detail region. It works on my machine, but after I uploaded
    everything, including the spry js and css files, it still just
    shows the {data} markers on the live version. Does anyone know
    where the error is? I've tried reuploading it all but it still is
    the same.
    Here is the link:
    http://clubs.wharton.upenn.edu/winterwk/Subs/students09W.html
    Thanks!

    you are missing
    SpryData.js, SpryShell.js, xpath.js in your includes
    folder.

  • Nesting Data table Components

    Hi ,
    I am having a problem using the new data table component in SJSC 2 EA2. I need to have data table nested inside the colum of a outer datatable. I assign the sourcedata propertiy of the first table to a ObjectArrayData Provider. Then i set one of the columns in the table to group panel and add another data table(Nested ) into it. It shows up fine inthe designer. The Object in the parent tables row has a getter for an array of another classes objects. The problem is if i set the source data property of the nested table using #{currentRow.value['']} to the name of the array object return by the parent object we get a property not found exception when running. Is there any referances as to how to nest data table compoenents in Java Studio Creator 2 EA2
    Thanks
    kusan

    Hi,
    Please post queries related to SJSC 2 EA2 at:
    https://feedbackprograms.sun.com/login.html
    Cheers
    Giri

  • IE 7 throws a no data set error

    IE 7 is throwing the following error.
    spry:region or spry:detailregion attribute has no data set!
    Firefox does not. Anybody know why this is caused. I have
    checked the xml returned in IE and it does parse it correctly.
    Thanks
    Kevin

    Just curious have you guys figured out what the deal was with
    this?
    You should also check to see if you have nested regions. We
    currently don't support nested regions, and folks sometimes see
    this error when they have one.
    --== Kin ==--

  • [svn:bz-trunk] 18928: fixing the sample service-config. xml for max-object-nest-level setting

    Revision: 18928
    Revision: 18928
    Author:   [email protected]
    Date:     2010-12-01 14:16:56 -0800 (Wed, 01 Dec 2010)
    Log Message:
    fixing the sample service-config.xml for max-object-nest-level setting
    Modified Paths:
        blazeds/trunk/resources/config/services-config.xml

    you have your driver jar in Tomcat\common\lib?
    if so, check your classpath, it could be that.

  • Failed to retrieve data set for spry

    I created a spry data set on a blank html page and had no
    problems. However, when I followed the same steps on an existing
    website I get a large box in live view saying "Failed to retrieve
    data set (ds2) for spry:repeat". I tried to create the spry set
    inside a div which was inside a div that was inside a table. Could
    nesting be the problem?

    Its because you have a JavaScript error on your page.
    in your iframe..
    var this_week_wed = new
    Spry.Data.XMLDataSet("../../Data/this_week2.xml",
    "thisweek/day[name='Wednesday']/items/item"{distinctOnLoad:true});
    it needs a , after your "/items/item"
    var this_week_wed = new
    Spry.Data.XMLDataSet("../../Data/this_week2.xml",
    "thisweek/day[name='Wednesday']/items/item",{distinctOnLoad:true});

  • Problem with nested data not displaying

    I have created a dataset with a filter as follows:
    var dsCustomer = new
    Spry.Data.XMLDataSet("../xml/orderstatus111307.xml",
    "company/customers/custid",{useCache:false,loadInterval:9000});
    dsCustomer.setColumnType("daterun", "date");
    var myFilterFunc = function(dataSet, row, rowNumber)
    if (row['ds_RowID'] == 1)
    return row;
    return null;
    dsCustomer.filterData(myFilterFunc);
    and then created a nested dataset as follows:
    var dsOrderList = new Spry.Data.NestedXMLDataSet(dsCustomer,
    "orders");
    dsOrderList.setColumnType("duedate", "date");
    My repeat is set in a table as follows:
    <div id="OrderTable" spry:region="dsOrderList
    dsCustomer">
    <table cellspacing="0">
    <tr>
    <th spry:sort="orderno">Orderno</th>
    <th spry:sort="purchaseorder">Purchaseorder</th>
    <th spry:sort="duedate">Duedate</th>
    </tr>
    <tr spry:repeat="dsOrderList" spry:setrow="dsOrderList"
    spry:even="tdAlt" spry:hover="tdOver" spry:select="tdSelect">
    <td class="tdLeft">{orderno}</td>
    <td>{purchaseorder}</td>
    <td>{duedate}</td>
    </tr>
    </table>
    </div>
    For some reason I get the following error when I view it in a
    browser:
    Failed to retrieve data set (dsOrderList) for spry:repeat
    You can see the page here:
    http://apps.esc-online.com/mickelectric2/249000/index.html
    I am using Spry 1.6

    quote:
    Originally posted by:
    mokean
    Hi V1 Fusion...
    I am having the same problem. (Failed to retrieve data set
    (dsOrphans) for spry:repeat)
    What do you mean by; include SpryNestedXMLDataSet.js and u
    would be ready to go ;)
    I am creating a website for an orphanage in Africa.
    Thanks.
    He forgot to include the SpryNestedXMLDataSet.js in the
    header of the page, thats why it wasn't working.
    Do you have url where i can see your issue?

Maybe you are looking for