Limiting Items Displayed in Spry Repeat Lists, Tables, Etc.

Is it possible to limit the items shown in Spry repeat
region? For example say I have 20 items in a list and only want to
display the first three items, not the entire list. If so how is
that done?

Hey Oscar,
Glad that works for you.
Kin and I were thinking that {ds_RowNumber} might be better
for that particular looping, but you get the idea.
http://labs.adobe.com/technologies/spry/articles/data_set_overview/index.html
That was our first overview doc and it was definitive at the
time. We no longer update it but it's a good intro to Spry.
You can find the built in data references in that doc,
granted almost at the very bottom.
The API doc
http://labs.adobe.com/technologies/spry/articles/data_api/index.html
is a good start but we still have a lot to add to it. I have
plans for it for sure.
We are doing a big push for 1.6 towards progressive
enhancement, unobtrusive js and things like that.
Expect docs and samples and some cool utilities to come out
this summer and for 1.6.
And we won't charge for it, but we also won't return any
cash-laden envelopes... ;)
Let us know how to improve any part of Spry.
Thanks,
Don

Similar Messages

  • ADDT Dependent Dropdown SB with Spry Repeat Lists

    Hi,
    I first want to say that this forum is fantastic and full of very bright folks willing to help us not so bright types.
    Next, of course, I have a problem. I'm using spry repeat lists as dropdowns in a form. There are 3 that need to be dependent on each other. I had been using the ADDT dependent dropdown SB and it works great for normal selects. It doesn't seem to work at all on spry repeat lists. I was hoping these two would play nicely together, and maybe they do and there's some trick to this.
    If the ADDT SB's don't work with Spry repeat lists, maybe there's a way to do this using javascript?
    Thanks in advance for any help,
    Tony Galfano

    Hi Gunter,
    Thanks for the help. I've decided, based on your accurate assessment of the work involved in getting all this to work with spry, to ditch that and just refresh the damn page after all new entries are made. I appreciate your help, probably saved me many hours.
    I do have a wierd issue with the ADDT editaqble dropdown behavior. I actually use this one a lot and it always works well. I have one dropdown that only showsw the first 2 characters of the contents. A swcreenshot is avaiable here: http://www.zenwebguru.com/editabledropdown.jpg
    All of the other editable dropdowns on the page, and the site, work fine, but this one is shruken for some reason. I'm wondering if there is a size limitation in the css or the js that can't handle larger records? The largest field in the table contains the value:
    "Flat Guarantee; Purchaser to provide one Fender Amplifier (see rider for list of amps) at no cost to Artist."
    This really shouldn't present a problem, but maybe it's something else?
    Thanks, as always for your great help.
    Tony

  • Adding a Counter to Spry Repeat List

    Hi, this might seem like a relatively simple problem but after spending some time, I haven't yet arrived at an appropriate solution.
    1. I have spry repeat list.
    2. I want add a counter (required by a javascript function nested within the repeat list).
    I have tried ds2.getCurrentRowID and that failed.
    One simple way of thinking of the problem is: how would you modify a spry repeat list to display each row, numbered 1 through n down the left-hand column?
                <tr spry:repeat="ds2" spry:odd="evenRowVenue" spry:even="oddRowVenue" spry:hover="hoverVenue" onClick="MM_callJS('GEvent.trigger(venue_list[INCREMENTING COUNTER HERE],\'click\');')">
                  <td align="left"><a href="venue_show.php?vid={@vid}">{@name}</a></td>
                  <td align="left">{@street1}</td>
                  <td align="left">{@city_suburb}</td>
                  <td align="left">{@state}</td>
                  <td align="left">{@country}</td>
                  <td align="left">{@rating}</td>
                </tr>

    secondliver wrote:
    Hi, this might seem like a relatively simple problem but after spending some time, I haven't yet arrived at an appropriate solution.
    1. I have spry repeat list.
    2. I want add a counter (required by a javascript function nested within the repeat list).
    I have tried ds2.getCurrentRowID and that failed.
    One simple way of thinking of the problem is: how would you modify a spry repeat list to display each row, numbered 1 through n down the left-hand column?
                <tr spry:repeat="ds2" spry:odd="evenRowVenue" spry:even="oddRowVenue" spry:hover="hoverVenue" onClick="MM_callJS('GEvent.trigger(venue_list[INCREMENTING COUNTER HERE],\'click\');')">
                  <td align="left"><a href="venue_show.php?vid={@vid}">{@name}</a></td>
                  <td align="left">{@street1}</td>
                  <td align="left">{@city_suburb}</td>
                  <td align="left">{@state}</td>
                  <td align="left">{@country}</td>
                  <td align="left">{@rating}</td>
                </tr>
    {ds_RowNumber} is what you are looking for.
    So in you case:
    onClick="MM_callJS('GEvent.trigger(venue_list[{ds_RowNumber}],\'click\');')">

  • Spry repeat list break DW insert transaction?

    Hi,
    Does anyone know if spry repeat lists are recognized by DW as input devices? I added a few to a form, which uses the builtin DW insert record wizard, and they don't show up with the other controls in the server behavior list and they break the transaction (red ! on the insert transaction).
    Are there configuration issues? Or are these widgets only for search and display forms?
    Thanks for any help,
    Tony

    Hi Tony,
    I´m sure that the SPRY repeat lists you´re creating would need some heavy modification in order to become "regular" ADDT dropdown menus -- what they would need at least, is some embedded string comparison (aka PHP´s "strcmp" function) for displaying an existing column value as "SELECTED", like ADDT´s menus do:
    ...and I don´t think your Spry lists provide this for each list option.
    and they don't show up with the other controls in the server behavior list
    it seems as if those lists have one or more required elements missing which DW needs to accept them as valid "control". You can actually check the differences by opening an other ADDT form containing a valid control and taking a look at the HTML/PHP code of that list -- what does it have what your Spry list doesn´t ?
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Spry Repeat List does not appear in Google Chrome 28

    Spry repeat list works in IE8 and Firefox 22.  However in Google Chrome 28 no data appears (data is blank).  This is the code:
    <div>
                  <p><span class="headline">events</span></p>
                  <div spry:region="Events">
                    <dl spry:repeatchildren="Events">
                      <dt>{date}</dt>
                      <dd>{title}</dd>
            </dl>
          </div>
                  <p> </p>
                  <p><span class="headline"><br />
                  </span></p>
                </div>
    This is what appears in IE8 and Firefox:
    events
    May 10,2012
    Pre-Memorial Day Sale
    May 28, 2012
    Big Memorial Day Sale
    May 31, 2012
    Big After-Memorial Day Sale

    This is the code:
    <!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=UTF-8" />
              <title>OrganicUtopia Home Page</title>
        <style type="text/css">
        </style>
        <link href="styles.css" rel="stylesheet" type="text/css" />
              <style type="text/css">
              .headline {          color: #88B036;
              font-weight: bold;
              font-size: 18px;
              margin-bottom: -2px;
        </style>
              <link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
              <link href="SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css" />
              <link href="SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" />
              <script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
              <script src="SpryAssets/SpryAccordion.js" type="text/javascript"></script>
              <script src="SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script>
              <script src="SpryAssets/xpath.js" type="text/javascript"></script>
              <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
              <script type="text/javascript">
    var Events = new Spry.Data.XMLDataSet("data/events.xml", "calendar/event");
        </script>
              </head>
    <body>
    <div id="container">
      <div id="GlobalNav">Site Map | Login</div>
      <div id="header"><img src="images/ou_logo.gif" width="210" height="41" /></div>
      <div id="nav">{Menu Bar Here}</div>
      <div id="main">
        <p class="headline">welcome to organic utopia </p>
        <p> </p>
        <div id="TabbedPanels1" class="TabbedPanels">
          <ul class="TabbedPanelsTabGroup">
            <li class="TabbedPanelsTab" tabindex="0">What's New</li>
            <li class="TabbedPanelsTab" tabindex="0">Features</li>
            <li class="TabbedPanelsTab" tabindex="0">Customer Testimonials</li>
    </ul>
          <div class="TabbedPanelsContentGroup">
            <div class="TabbedPanelsContent">
              <p><span class="headline">Shop in the green! </span></p>
              <p><img src="images/recycle_bag.gif" alt="Recycle Bag" width="81" height="101" hspace="10" vspace="5" align="left" />We have added recyclable shopping bags, which eliminate the need for the age-old question &quot;paper or plastic?&quot;. These bags are tough, stylish, and eco-friendly! Pick from 2 sizes with the OU logo!</p>
              <p></p>
            </div>
            <div class="TabbedPanelsContent">
              <p><span class="headline">Featured stuff! </span></p>
              <p><img src="images/couch.gif" alt="Couch" width="107" height="73" hspace="5" vspace="5" align="left" />A whole new line of green living products has just hit the shelves! Try our new recyclable office furniture - imagine a couch that dissolves on its own back into Mother Earth! We also have a whole new line of natural cosmetics made from the finest ingredients that are gentle on your skin!</p>
            </div>
            <div class="TabbedPanelsContent">
              <p><span class="headline">Our loyal customers...</span></p>
              <p>&quot;organic Utopia is the place to shop - i wouldn't buy my stuff anywhere else...EVER!&quot; <br />
                - Jeff A., Boston, MA</p>
              <p>&quot;The best place for healthy, organic and green living..everything from food to furniture, all in one place!&quot; -  Fred G., Long Beach, NY </p>
            </div>
    </div>
        </div>
        <p> </p>
        <p> </p>
        <p> </p>
        <h1 > </h1>
      </div>
      <div id="sidebar">
    <div>
      <div id="Accordion1" class="Accordion" tabindex="0">
        <div class="AccordionPanel">
          <div class="AccordionPanelTab">Food Products</div>
          <div class="AccordionPanelContent">Dried Fruits &amp; Vegetables<br />
    Snacks<br />
    Beverages<br />
    Heat and Serve<br />
    Cereals</div>
        </div>
        <div class="AccordionPanel">
          <div class="AccordionPanelTab">Clothing</div>
          <div class="AccordionPanelContent">Bags<br />
    Accessories<br />
    Shoes<br />
    Fake Leather Goods</div>
        </div>
        <div class="AccordionPanel">
          <div class="AccordionPanelTab">Home Products</div>
          <div class="AccordionPanelContent">Candles<br />
    Pillows<br />
    Storage<br />
    Knick Knacks</div>
        </div>
    <div class="AccordionPanel">
      <div class="AccordionPanelTab">Lifestyle</div>
          <div class="AccordionPanelContent">Music &amp; DVDs<br />
    Decorations &amp; Wall Hangings</div>
      </div>
      </div>
    </div>
                <div>
              <p><span class="headline">events</span></p>
              <div spry:region="Events">
                <dl spry:repeatchildren="Events">
                  <dt>{date}</dt>
                  <dd>{title}</dd>
                </dl>
              </div>
              <p> </p>
              <p><span class="headline"><br />
                </span></p>
            </div>
            <div>
              <div id="CollapsiblePanel1" class="CollapsiblePanel">
                <div class="CollapsiblePanelTab" tabindex="0">Contact Us</div>
                <div class="CollapsiblePanelContent">Enter your email address to receive specials, event notifications and more!<br />
                  <label>
                    <input name="emailaddr" type="text" id="emailaddr" size="20" />
                    <br />
                    <input type="submit" name="button" id="button" value="Submit" />
                  </label>
                </span></div>
              </div>
            </div>
            <div></div>
          </div>
          <div id="footer">All content copyright of OrganicUtopia</div>
        </div>
        <script type="text/javascript">
    var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
    var Accordion1 = new Spry.Widget.Accordion("Accordion1");
    var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1", {contentIsOpen:false});
    </script>
    </body>
    </html>

  • Limiting items displayed in a region (902)

    I want to limit the number of items displayed in an item region in Portal 902 so that a next and previous button to appear (like they did for categories and perspective portlets in 309) so that the full list can be navigated through without having a massive scrollable HTML page displayed.
    I thought this was going to be a feature in 902, but I cannot seem to find it.
    Cheers,
    John

    I don't remember hearing that this was going to be a feature for item regions.
    You can use the custom search portlet to autoquery a list of items. Set the maximum number of items in the result list, and the portlet will pageinate the overflow.

  • Item Display one in Repeating frame

    I have a repeating frame in this frame 3 items which are repeating 3 times Now is that possible that repeating frame repeat these item only one time.
    Like when we use form there is a item property --> RECORD -> "No of Item Displayed" = 1

    hello
    i think u get 3 times data in ur query so report display 3 times that data.
    So u have to write unique in ur query.
    ok Enjoyyyy

  • How to repeat a table etc.

    Hello,
    I would like to know if there is any way in BI Publisher to repeat a table for a given number of times in the layout. The only information i got is the variable that tells me how many times i should repeat that table. IF conditional formatting is not an option because most likely the variable will be over 100.
    Thank you.

    Have a look at this.
    http://winrichman.blogspot.com/2008/04/long-time-no-see-to-this-blog.html
    http://winrichman.blogspot.com/search/label/Bip%20looping

  • Adding an image to .xml for a spry repeating list or data set

    How do I code my .xml so that as well as the text the spry displays an image for each entry? Do I need to create a seperate gallery rather than draw from my root images folder?

    Have a look here
    http://www.coremediadesign.co.uk/learn_web_design/free_web_design_tutorials/tutorial/spry_ image_gallery_adobe.html

  • Filter spry table from repeater list

    Using Dreamweaver, I am looking to find out how to link a
    spry repeat list (Select Drop-Down) to a Spry table.
    I have created a repeat list (Select Drop-Down) using a
    distinct filter on a field in my XML data base :
    The XML database is:
    var ds2 = new
    Spry.Data.XMLDataSet("Data/NetballDatafeed190401.xml",
    "NetballList/NetballProducts/SubType",{sortOnLoad:"SubType",sortOrderOnLoad:"as
    cending",distinctOnLoad:true});
    The drop down list is created by
    <div spry:region="ds2">
    <select name="select" spry:repeatchildren="ds2">
    <option value="{SubType}">{SubType}</option>
    </select>
    </div>
    I have a table which I want to show only the values on the
    table where the subType that matches the value from the select
    list.
    This data is populated by:
    var ds1 = new
    Spry.Data.XMLDataSet("Data/NetballDatafeed190401.xml",
    "NetballList/NetballProducts",{sortOnLoad:"ProductPrice",sortOr
    derOnLoad:"ascending"});
    and is created by
    div spry:region="ds1">
    <table>
    <tr>
    <th>ProductName</th>
    <th>ProductPrice</th>
    <th>ImageURL</th>
    <th>SubType</th>
    </tr>
    <tr spry:repeat="ds1">
    <td>{ProductName}</td>
    <td>{ProductPrice}</td>
    <td><img src="{ImageURL}"/></td>
    <td>{SubType}</td>
    </tr>
    </table>
    </div>
    I believe that I need to create a spry:Choose statement in
    the drop down list which runs a function that filters the DS1 XML
    data.
    I beleive that The function need to look like
    var myFilterFunc = function(dataSet, row, rowNumber)
    some funtion here that filters ds1 on {SubType}.......
    I will then need to run ds1.filter(myFilterFunc);
    Any pointers or examples most welcome.

    to do the the spry:if="'statement" needs to be in the
    <tr> rows you want to filter on

  • How to Display Repeat List In Spry Tab Content

    Hello,
    I am new to Spry. I thought I could just create an XML
    dataset, Insert a Spry Tabbed Panel, and then insert a Spry repeat
    list inside the Tabbed Content area of the Tabbed Panel. It is not
    working at all for me. Is this doable at all? If so, how?
    Thanks!

    hi,
    i have created an example in http://apex.oracle.com/pls/apex/f?p=44310:1:3623155419174978:::::
    username/password: demo/demo
    check, it may help you:)
    *please mark the thread answered if it done:)
    regards
    Little Foot

  • How to limit the number of items in a KPI Status list web part?

    How to limit the number of items in a KPI Status list web part? There is no paging option for Business Category Status list or any limit can be made by changing the Item limit in default view unlike other SharePoint List web parts. So How to achieve it?
    Kindly help.
    Regards,
    ZA
    zzzSharePoint

    Hi,
    According your post, I know you would like to set the item display limit in Status List web part.
    In the web part, the number of items to display is based on the view which you selected when configuring the web part. The default view for status list is status list view.
    However, I am not able to limit the items’ display number of the status list view. After changing the items limit, the list item displayed would not match the number specified by Item Limit. Thus, it is not possible to limit the number
    of items in the Status list web part.
    It could be a potential issue in SharePoint 2010.
    We will log this issue to our suggestion box. As after the submission, we may not have any time guarantee when the fix may be released, but it may come out on next cumulative update.
    Appreciate your time and efforts.
    Thanks.
    Tracy Cai
    TechNet Community Support

  • Reset the Spry Validation List after sending

    <!-- I ADDED THIS FUNTION TO RESET THE FORM
    function afterSend(){
       document.getElementById("From:").value="";
       document.getElementById("email:").value="";
       document.getElementById("Subject:").value="";
       document.getElementById("Message:").value="";
       document.getElementById("JumpMenu:").value="";
       //document.Emailform.reset();
    //-->
    The "JumpMenu" item is the Spry Validation List I want to reset after Submit.
    Here is the listmenu
    <select name="Province" id="Province">
            <option selected="selected">Select a Province</option>
            <option value="British Columbia">British Columbia</option>
            <option value="Manitoba">Manitoba</option>
            <option value="Ontario">Ontario</option>
          </select>
    The Bold one is the Default selection I want to reset to.
    Any help would be greatly appreciated.
    Regards,
    WBell

    function afterSend(){
       document.getElementById("From:").value="";
       document.getElementById("email:").value="";
       document.getElementById("Subject:").value="";
       document.getElementById("Message:").value="";
       document.getElementById("Province").value="";
       //document.Emailform.reset();
    Gramps

  • Spry:repeat display data in multiple rows/columns

    I know how to use spry:repeat to display data in table rows,
    one item per row.
    Is there a way to tell spry to display data in a grid of x
    rows by y columns?
    I'm trying to maximize the page's real estate. Here is the
    page
    http://www.jannah.com/mp3/browse.html
    Click on "Artist/Scholar" in "STEP1" section. "STEP2" section
    gets filled with a list. I'm trying to display that list in 3
    columns and as many rows as needed. How do I do that?
    While I'm at it, I also can't figure out why the spry:select
    is not working for "STEP2" section; I need to click twice on the
    same item to get it highlighted. the other spry selects on the page
    work ok. Can someone take a look.
    Greatly appreciated.

    You can't use Spry with tables to do this, but if you're up
    to using a div based layout/presentation, it is possible. Check out
    the Zuggest sample:
    http://labs.adobe.com/technologies/spry/samples/data_region/ZuggestSample.html
    It uses floated divs to get the same effect. The nice thing
    about using divs, is that more columns dynamically appear as the
    horizontal real-estate is expanded.
    --== Kin ==--

  • Spry select list code to wire it to html data table SET column?

    I am making a page based on Figure 15-14, Pg 878, in David Power's book, "Dw CS4 with CSS, Ajax and PHP. I have two separate html data tables hidden in the page, one for the specialties drop down select list and the other for the teachers master/detail regions. These are populated with php and working well. The spry select list and master/detail regions are working great except for one issue. The column in my html data table that is being filtered ("Specialty" in my code = 'Category' in the book's example code) is a SET column (with possible value of 1, 2, 3, 4, and/or 5). Clicking on the drop down menu brings up the records with a single value beautifully. The result for records with multiple values is a spry error "Invalid row number: 0". After four different versionings and methods of messing with this, I still haven't a clue. Please help me with how to rewire the Spry select list code so that it will read the records that have multiple items in that column. I have included the code below.
    var data_set_teachers = new Spry.Data.HTMLDataSet(null, "teacher_data");
    data_set_teachers.gallery = '1';
    function chooseSet(dataSet, row, rowNumber)
    if (row["Specialty"] == data_set_teachers.gallery) {
       return row;
    return null;
    data_set_teachers.filter(chooseSet);
    function changeSet(set)
    data_set_teachers.gallery = set;
    data_set_teachers.filter(chooseSet);
    data_set_teachers.setCurrentRowNumber(0);
    var rows = data_set_teachers.getData();
    for (var i = 0; i < rows.length; i++) {
       if (rows[i]["Specialty"] == set) {
         data_set_teachers.setCurrentRowNumber(i);
         break;
    var data_set_specialties = new Spry.Data.HTMLDataSet(null, "specialty_data");

    Well I'll be damned!
    What's done in the sample app is, of course, the intuitively obvious choice and is exactly what I started out trying to do the first time round.
    But as I mentioned before, when I first tried it (yes: I'm pretty sure I set the "for" attribute on the inlineMessage components), I got the non-unique component id exception for the inlineMessage component(s) after adding the second (but not the first) row to the page.
    Anyway, after dragging my inlineMessages to the exact same position as those in the AppModel example, now things work fine (except I think I'd like a line break before the message and to change the row/column styles so the values and messages line up properly...the look is rather ugly in the AppModel example when there are validation messages displayed).
    Not sure, but I'm thinking maybe there was an issue with where the inline message markup was placed, my first time through, relative to the data table value bound component and the column header facet?
    I was using the application view drag 'n drop feature the first time round and dragged the inlineMessage component to the spot just below the data table value bound component and hence just above the column header facet. In the AppModel example, OTOH, the inline messages are placed just after the column header facet.
    Of course, I will now try to duplicate the original exception.
    If I can (and it is an issue with placement), I will post back some sort of bug report or RFE. Otherwise, I'll post back declaring what a bone head I've been...;-)
    Anyway, thanks for the quick response, v.
    Campbell

Maybe you are looking for