Skip navigation
Currently Being Moderated

Multiple spry:selects on Multiple Datasets

Aug 11, 2012 6:01 AM

Tags: #regions #spry:select

Hi,

 

I have a main xmldataset A from which 2 other datasets B and C are populated via A datasets' A.getDocument() and are thus dependencies of A

 

 

dataset A has its own spry:region with a spry:select

B and C share a spry:region also with respective spry:select

 

thus

 

<ul spry:region="A"><li spry:repeat... spry:select="class">....</ul>

<ul spry:region="B C"><li spry:repeat="B" spry:select="class"><ul><li spry:repeat="C" spry:select="class"></li>.....

 

When I first only had A's region the spry:select worked fine

 

but when I added B only B's spry:select worked and then when I added C only C worked

 

How do I get all region spry:select to STAY selected on each's own currentRow()?

 

 

P.S. what is spry:selected and can someone elaborate on the documentations definition of Spry:Selectgroup?

 
Replies
  • Currently Being Moderated
    Aug 12, 2012 3:15 PM   in reply to icecappacino

    To get a personalised solution to your problem, please upload the site and supply the URL.

     

    In the meantime have a look here http://labs.adobe.com/technologies/spry/articles/data_api/apis/dataset .html and here http://labs.adobe.com/technologies/spry/articles/data_set_overview/

     

    Gramps

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 13, 2012 6:50 AM   in reply to icecappacino

    Sorry, the XML data file is empty, hence cannot see what you are trying to do.

     

    You may like to have a look here http://labs.adobe.com/technologies/spry/demos/rssreader/index.html

     

    Gramps

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 13, 2012 11:13 AM   in reply to icecappacino

    I get the following error message

    Fatal error:  Class 'DatePeriod' not found in /home2/.../xml.php on line 22

    Gramps

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 13, 2012 8:27 AM   in reply to icecappacino

    Sorry, the only way to remove the offending line is to report the message. See 'Report' on the right side of the message. Because it is my message, I do not have the 'Report' feature.

     

    Gramps

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 15, 2012 7:36 AM   in reply to icecappacino

    Please have a look at the following

    <!doctype html>
    <html>
    <head>
      <meta charset="utf-8">
      <title>Untitled Document</title>
      <style>
            .MasterDetail {
                font: 100% Verdana, Geneva, sans-serif;
                margin: 2px;
            }
            .MasterDetail .MasterContainer {
                background-color: #EAEAEA;
                border: 1px solid gray;
                width: 35%;
                float: left;
                height: 400px;
                overflow: auto;
            }
            .MasterDetail .MasterColumn {
                font-size: 75%;
                background-color: #CCCCCC;
                padding:5px;
                cursor:pointer;
            }
            .MasterDetail .MasterColumnHover {
                background-color: #EAEAEA;
            }
            .MasterDetail .MasterColumnSelected {
                background-color:#848484;
                color: white;
            }
            .MasterDetail .DetailContainer {
                border: 1px solid gray;
                padding:10px;
                width: 60%;
                float: right;
                overflow: auto;
            }
            .MasterDetail .DetailColumn {
                margin-bottom: 1px;
            }
      </style>
    </head>
    
    <body>
      <div class="MasterDetail">
        <div spry:region="dsItem" class="MasterContainer">
          <div class="MasterColumn" spry:repeat="dsItem" spry:setrow="dsItem" spry:hover="MasterColumnHover" spry:select="MasterColumnSelected">{day}</div>
        </div>
        <div spry:detailregion="dsItem" class="DetailContainer">
          <div class="DetailColumn">{title}</div>
          <div class="DetailColumn">{description}</div>
          <div class="DetailColumn">{link}</div>
          <div class="DetailColumn">{category}</div>
          <div class="DetailColumn">{category/@domain}</div>
          <div class="DetailColumn">{comments}</div>
          <div class="DetailColumn">{pubDate}</div>
          <div class="DetailColumn">{timestamp}</div>
          <div class="DetailColumn">{guid}</div>
          <div class="DetailColumn">{fbid}</div>
          <div class="DetailColumn">{fbid/@colour}</div>
        </div>
        <br style="clear:both" />
      </div>
      <script src="SpryAssets/xpath.js"></script>
      <script src="SpryAssets/SpryData.js"></script>
      <script>
        var dsItem = new Spry.Data.XMLDataSet("package/xml.php", "rss/channel/item");
      </script>
    </body>
    </html>

     

    The master container contains the date. It does not matter how you want to format the date as long as it has a spry:setrow. This will determine the row to show in the spry:detailregion.

     

    Gramps

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points