SPRY data_region

Is there any way to populate spry data_region using
oracle/mysql recordset instead of using xml data file? Remember i
am using php to achieve this task.

http://labs.adobe.com/technologies/spry/samples/utils/query2xml.html
Tada ;)

Similar Messages

  • Problem with spry:select not selecting

    I am having trouble getting the spry:select to work on the
    following code. Everything works except for the spry:select. If I
    remove the spry:hover and the spry:sort, then the spry:select will
    work. The only way I can get the spry:select to work is if it is
    the only spry statement in the <td>. Please help.
    NON-WORKING SPRY:SELECT CODE:
    <div spry:region="pv1">
    Records {ds_PageFirstItemNumber}-{ds_PageLastItemNumber} of
    {ds_PageTotalItemCount}
    <table cellpadding="0" cellspacing="0" border="0"
    width="100%">
    <tr>
    <td class="tableheader" style="cursor:pointer;"
    spry:select="tableheaderSel" spry:hover="tableheaderSel"
    spry:sort="airport_code">Airport</td>
    <td class="tableheader" style="cursor:pointer;"
    spry:hover="tableheaderSel" spry:sort="hotel">Hotel</td>
    <td class="tableheader" style="cursor:pointer;"
    spry:hover="tableheaderSel"
    spry:sort="bookings">Bookings</td>
    <td class="tableheader" style="cursor:pointer;"
    spry:hover="tableheaderSel"
    spry:sort="previous_year_bookings">Previous Year</td>
    <td class="tableheader" style="cursor:pointer;"
    spry:hover="tableheaderSel" spry:sort="change">Change</td>
    <td class="tableheader" style="cursor:pointer;"
    spry:hover="tableheaderSel"
    spry:sort="percent_change">%</td>
    </tr>
    <tr spry:repeat="pv1" spry:odd="tablerow1">
    <td class="tablecell"
    spry:content="{airport_code}"></td>
    <td class="tablecell"
    spry:content="{hotel}"></td>
    <td class="tablecell"
    spry:content="{bookings}"></td>
    <td class="tablecell"
    spry:content="{previous_year_bookings}"></td>
    <td class="tablecell"
    spry:content="{change}"></td>
    <td class="tablecell"
    spry:content="{percent_change}"></td>
    </tr>
    </table>
    <p>
    <div style="float:right;">
    <input type="button" value="Next"
    onClick="pv1.nextPage();" />
    <input type="button" value="Last"
    onClick="pv1.lastPage();" />
    </div>
    <div style="float:left;">
    <input type="button" value="First"
    onClick="pv1.firstPage();" />
    <input type="button" value="Prev"
    onClick="pv1.previousPage();" />
    </div>
    </div>

    When you use a spry:sort, you are sorting the data set and
    the entire region is redrawn. This wipes out the spry:select. This
    happens to the select, no matter where it is.
    The way to highlight the currently selected column is a bit
    tedious. You will have to have a spry:if that checked the value of
    {ds_SortColumn}. This means repeating the <TD> for each
    condition.
    It's a sub-optimal solution but we don't have attribute level
    control.
    However, we do have some tools and enhancements coming up
    that should make this easier. But they are not ready yet, so...
    http://labs.adobe.com/technologies/spry/samples/data_region/DataSetMasterDetailSample.html
    has an example of how we use spry:if to conditionally put on
    an attribute.
    Don

  • Spry repeted region: only at filtering

    Hi all:
    I made a typical spry region with a table and an spry:repeat. Also I included a form with a text field and a button for filter. Everything works fine.
    When the user loads the page, all data is shown and that was fine while the XML file has few data. But now I have about 2500 rows and it has no sense to show all the data at first. I'd like that when the user load the page, it shows the page with no data. The data must be shown only when a filter is executed.
    I tried with this:
    <script type="text/javascript">
    var dsMyData = new Spry.Data.XMLDataSet("xml/data.xml ....
    dsMyData.filter(null);
    and it works but..... it takes some time to process... almost the same if all data were shown. Also I tried moving the dataset's declaration  to other parts of the code with no success. Is there a way to make the dataset works only when the user click my search button and  not when the page is loaded?
    Thanks a lot and sorry my english
    PC

    I tend to use XPath to filter larger datasets. On change of the selected item you can change the value of XPath to show that data range.
    Have a look here http://labs.adobe.com/technologies/spry/samples/data_region/XPathFilteringSample.html
    Gramps

  • Hiding Columns in a Spry Region

    Hello All,
    I'm using the SpryDOMUtils.js to hide columns in my SPRY table.  Everything works fine when I load the page except when I add the LoadListener to hide the columns when the page generates:
    function hideColumn(){
         Spry.$$("#second th:nth-child(n+5),#second td:nth-child(n+5)").toggleClassName("hideIt");
         changeText("button2","Hide Detail","Show Detail");
    Spry.Utils.addLoadListener(function(){
         hideColumn();
    After the page loads the columns are hidden like they are supposed to but the show button will not 'show' the columns and the code seems broken.  Sorry I cannot post a link the code as it is on a Intranet.
    I have followed the example on http://labs.adobe.com/technologies/spry/samples/dom_utils/hide_columns.html but maybe it is because it is in a spry region?
    Cheers!
    Kevin

    I'm assuming that by "Spry Table" you meant that you are using a Spry region to generate a table. If so, you need to trigger your code from an onPostUpdate observer instead of triggering it after the page loads. The reason is that even though the page has loaded, the data sets that load your data still might not have completed loading ... so your region may not have been processed until *AFTER* the onload event fired.
    Take a look at this example:
    http://labs.adobe.com/technologies/spry/samples/data_region/RegionObserverSample.html
    --== Kin ==--

  • Spry Data Set - Possible to limit number of records show

    Hi,
    I am totally new to Spry in Dreamweaver.  I tried searching the forums for an answer but I could not find anything on how to limit the number of records shown.
    For example - I have 100 rows of information in my table.  When I do the Spry Data Set and use the Master/Detail page I only want 20 records to show.  Otherwise the page looks very long and odd.  Is it possible to just show the first 20 records and the ability to scroll or link the next 20 and so on?
    If you have a link to a tutorial or more information that would be greatly appreciated.
    Thank you,
    Kathy

    have a look here http://labs.adobe.com/technologies/spry/samples/data_region/SpryPagedViewSample.html

  • Master Detail in an Accordian - Spry

    I am trying to use multiple datasets (1 to populate each
    accordian tab) and those data to be used to populate 1 detail
    region. The accordian tabs work, but the detail region does not
    seem to pull the data and populate correctly.
    Below is the code, any help is glady appreciated. I am really
    new to spry and am a bit confused here.
    Thanks,
    txnskr
    <script type="text/javascript"
    src="includes/xpath.js"></script>
    <script type="text/javascript"
    src="includes/SpryData.js"></script>
    <script type="text/javascript">
    var dsGallery = new Spry.Data.XMLDataSet("photos.xml",
    "gallery/photos/photo");
    </script>
    <script type="text/javascript">
    var dsGallery1 = new Spry.Data.XMLDataSet("photos1.xml",
    "gallery/photos/photo");
    </script>
    <script type="text/javascript">
    var dsGallery2 = new Spry.Data.XMLDataSet("photos2.xml",
    "gallery/photos/photo");
    </script>
    <script src="../SpryAssets/SpryAccordion.js"
    type="text/javascript"></script>
    <link href="../SpryAssets/SpryAccordion.css"
    rel="stylesheet" type="text/css" />
    <link href="../global.css" rel="stylesheet"
    type="text/css" />
    </head>
    <body>
    <div id="apDiv1">
    <div id="Accordion1" class="Accordion" tabindex="0">
    <div class="AccordionPanel">
    <div class="AccordionPanelTab">Co-Chairs</div>
    <div class="AccordionPanelContent"> WWCC Thumb Pics
    <div spry:region="dsGallery" spry:repeat="dsGallery"
    spry:setrow="dsGallery"><table border="0">
    <tr >
    <td >
    <img src="../Images/Pictures/Thumbs/{@thumbpath}"
    class="thumbs"
    onclick="dsGallery.setCurrentRow('{ds_RowID}');"/>
    </td>
    <td>{@desc}</td>
    </tr>
    </table>
    </div>
    </div></div>
    <div class="AccordionPanel">
    <div class="AccordionPanelTab">Committee A</div>
    <div class="AccordionPanelContent">Committee A
    Thumbs<div spry:region="dsGallery1" spry:repeat="dsGallery1"
    spry:setrow="dsGallery1"><table border="0">
    <tr >
    <td >
    <img src="../Images/Pictures/Thumbs/{@thumbpath}"
    class="thumbs"
    onclick="dsGallery1.setCurrentRow('{ds_RowID}');"/>
    </td>
    <td>{@desc}</td>
    </tr>
    </table></div></div></div>
    <div class="AccordionPanel">
    <div class="AccordionPanelTab">Committee B</div>
    <div class="AccordionPanelContent">Committee B Thumbs
    <div spry:region="dsGallery2" spry:repeat="dsGallery2"
    spry:setrow="dsGallery2"><table border="0">
    <tr >
    <td >
    <img src="../Images/Pictures/Thumbs/{@thumbpath}"
    class="thumbs"
    onclick="dsGallery2.setCurrentRow('{ds_RowID}');"/>
    </td>
    <td>{@desc}</td>
    </tr>
    </table></div>
    </div>
    </div>
    </div>
    <div id="apDiv2"><div spry:detailregion="dsGallery
    dsGallery1 dsGallery2">
    <img src="../Images/Pictures/{@path}"
    ><br/>{@desc}
    </div></div></div>
    </div>
    <script type="text/javascript">
    <!--
    var Accordion1 = new Spry.Widget.Accordion("Accordion1");
    //-->
    </script>
    </body>
    </html>

    Hi,
    I couple of things.
    When you say:
    <div spry:detailregion="dsGallery dsGallery1
    dsGallery2"> <img src="../Images/Pictures/{@path}"
    ><br/>
    {@desc} </div>
    </div>
    {@desc} refers to only the first data set listed in the
    detail region; in your case, 'dsGallery'.
    If you want the detail region to refer to other data sets,
    you have to write it like '{dsGallery2::@desc}'
    But you want that detail region {@desc} to refer to any of
    the data sets that you clicked on.
    To do that, we have a Shell Data Set. Rather than explaining,
    the sample shows you how it works:
    http://labs.adobe.com/technologies/spry/samples/data_region/DataSetShell_accordion.html
    Let us know if you have more questions:
    Don

  • Formatted HTML output with Spry regions - is it possible?

    I have recently begun using the XML export extension in
    conjunction with an Access database to output dynamic data into a
    page with a Spry master/detail setup. So far, my simple example is
    going great, but I've run into a snag that I need some help with.
    To explain what I'm doing - it's a simple article page with
    the list of articles on the left with the title and date and the
    article title and full contents on the right hand side. So far it's
    all working very well, updating in real time when I click an
    article title on the left. The problem is the output with this one
    field which stores not only text, but also HTML formatting that is
    generated by a wysiwyg editor used on the article creation side of
    this little app. This HTML formatted content is the article body
    and is stored in a field named the same - "body". With traditional
    ASP, the HTML formatting displays as expected and all is well, but
    with Spry, it doesn't output formatted HTML, but instead shows the
    content and HTML code together as text. How can I get this one
    field ("body") to be output so all the HTML formatting is shown?
    This is my simple page example. Click through and you'll see
    what I mean.
    http://www.shoestodyefor.com/ajax.asp
    Here's the section of code in question regarding the output
    on that right hand panel where the body is displayed for each
    article:
    <div spry:detailregion="ds1">
    {title}<br />
    {entryDate}<br />
    <br />
    {body}
    /div>
    Is it possible to have that {body} section shown so the
    dynamically created HTML code from the wysiwyg editor is displayed
    correctly?

    Steve Skinner wrote:
    > Is it possible to have that {body} section shown so the
    dynamically created
    > HTML code from the wysiwyg editor is displayed
    correctly?
    The version of Spry that ships with Dreamweaver CS3 (Spry
    1.4) doesn't
    support the type of output created by the XML Export
    extension.
    This issue has been corrected in Spry 1.5, but no plans have
    been made
    public for integrating Spry 1.5 into Dreamweaver CS3. You
    would need to
    download Spry 1.5 from
    http://labs.adobe.com/technologies/spry/.
    Details
    of how to hand-code the fix for output from XML Export are
    here:
    http://labs.adobe.com/technologies/spry/samples/data_region/HTMLFragsInXMLSample.html
    David Powers, Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Spry 1.6.1 released

    Hi All,
    As some of you early risers have noticed, we have formally
    released Spry 1.6.1, a dot release for Spry.
    This was mostly done to ensure compatibility with Adobe AIR,
    which was released today
    http://www.adobe.com/products/air/
    In order for Spry to work in AIR, we had to make some
    addition ways of working available to users. You can read about it
    here:
    http://labs.adobe.com/technologies/spry/articles/air/photo_gallery.html
    These changes introduce some cool new ways of coding your
    pages. Check out this new sample:
    http://labs.adobe.com/technologies/spry/samples/data_region/Function_colon.html
    Lots of good bug fixes, the new Rating widget is formally
    released, the Spry Updater for DW was updated.
    Download it and check it out.
    Thanks,
    The Adobe Spry Team

    Donald,
    Have you validated the javascript code to make sure that the
    behavior is the same on both IE7 and Firefox. The Accordion widget
    does not properly open large sets on IE7. See
    http://www.qualite1.com/ContactUs.html
    and select California to see the difference between Firefox and IE.
    Notice how the Javascript causes the focus to jump around on
    IE.

  • Spry.Utils.stringToXMLDoc or a Substitute

    I am looking for a detailed guide for using the
    Spry.Utils.stringToXMLDoc function. I am not having the best of
    luck on finding detailed information on the function and would like
    to learn more about. I would appreciate it if you could please post
    some resources on this function or if there are other ways to get a
    xml string into a XMLDataSet.
    Cheers

    We only have this:
    http://labs.adobe.com/technologies/spry/articles/data_api/apis/utils.html#stringtoxmldoc
    and this:
    http://labs.adobe.com/technologies/spry/samples/data_region/XMLStringSample.html
    --== Kin ==--

  • Will spry show a javascript function from an external page?

    I have two pages
    http://www.autosnetfree.com/clock_buttonajax.php //this page has the spry calling the external page.
    http://www.autosnetfree.com/clock_auction1.php //this page has a countdown clock to a future date
    The buttonajax page has a submit button which updates a database with the current date plus 60 seconds.
    The countdown clock page pulls that future date from the database with a recordset
    The spry on the buttonajax page is
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryHTMLDataSet.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryStackedContainers.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    <!--
    var ds2 = new Spry.Data.HTMLDataSet("clock_auction1.php", "countdowncontainer", {useCache: false, loadInterval: 1000, distinctOnLoad: true});
    //-->
    </script>
    </head>
    <body>
    <div spry:region="ds2" class="StackedContainers">
      <div spry:repeat="ds2" class="RowContainer">
        <div class="RowColumn">{column0}</div>
      </div>
    </div>
    The button updates but the called page with the javascript function does not show?
    thanks for your help,
    -Jim balthrop

    It looks like you need an onPostLoad observer that updates the region similar to what is done here http://labs.adobe.com/technologies/spry/samples/data_region/SharingDataBetweenDataSets.htm l

  • Spry:region - Update

    Hi,
    I'm a beginner in programming with Adobe Spry so I don't know
    if I already understood the Spry concept correctly or if my
    question has already been answered in this forum before.
    I have got an XML file on my web server which contains the
    address data of a single user in the following way:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <adressbook>
    <contact id='1'>
    <name>Person 1</name>
    <company>his company</company>
    </contact>
    </adressbook>
    The xml file is dynamically generated and can be called with
    a GET-parameter "contact" which represents the contact id of the
    contact whose address data should be delivered in the response.
    Now I read something about the Adobe Spry data set concept.
    So I wanted to implement a small address book widget by fetching
    the data of a chosen contact from the server in the following way:
    <script type="text/javascript">
    var contactinfo = null;
    function getcontactinfo(contactid) {
    contactinfo = new
    Spry.Data.XMLDataSet("data.xml.php?contact=" + contactid,
    "/adressbook/contact", { useCache: false });
    </script>
    <div id='names'>
    <a href='javascript:getcontactinfo(1)'>Person
    1</a><br>
    <a href='javascript:getcontactinfo(2)'>Person
    2</a><br>
    </div>
    <div id='info' spry:region="contactinfo">
    <table spry:repeatchildren="contactinfo">
    <tr><td>name:</td><td>{name}</td></tr>
    <tr><td>company:</td><td>{company}</td></tr>
    </table>
    </div>
    My problem is that the spry:region won't be updated after
    requesting new data via Spry.Data.XMLDataSet(). If I leave out the
    getcontactinfo()-function and simply write something like
    var contactinfo = new
    Spry.Data.XMLDataSet("data.xml.php?contact=1",
    "/adressbook/contact", { useCache: false });
    everything works fine. Can anybody help me and could give me
    a hint what I might do wrong.
    Thanks a lot
    André Langer
    P.S.: btw. does anybody know if there's an option in the
    spry:repeatchildren part to implement a similar behaviour like in
    XSL where I could find out the tag names (in Spry the column
    names), see
    <xsl:for-each select="/adressbook/contact/*">
    <tr><td><xsl:value-of
    select="name()"/>:</td><td><xsl:value-of
    select="."/></td></tr>
    </xsl:for-each>

    Hi Ala,
    Look into the setURL and loadData functions.
    http://labs.adobe.com/technologies/spry/articles/data_set_overview/
    You can so something like
    <a onClick="
    contactinfo.setURL('data.xml.php?contact={contactid}');
    contactinfo.loadData();")
    http://labs.adobe.com/technologies/spry/samples/data_region/SetURL.html
    Hope this helps.
    Don

  • Using the Function:: Method for Spry Processing

    i have read the relevant article (
    http://labs.adobe.com/technologies/spry/samples/data_region/Function_colon.html)
    and have successfully managed to format as currency my price data
    in my spry table.
    what syntax do i need to format dates ? and is there a
    general reference i can look at for creating similar finctions ?
    regards

    There isn't a general reference, mainly because there are a
    wide variety of date formats ... but I suppose any sample would be
    better than none.
    In any case, what is your date format in your data, and what
    is the format you want it to look like in the output?
    An example would be:
    function FormattedDate(region, lookupFunc)
    // Get the date column which is in the format "20090120"
    // and format it so it looks like "01/20/2009".
    return
    lookupFunc("{date}").replace(/(\d\d\d\d)(\d\d)(\d\d)/, "$2/$3/$1");
    <div
    spry:region="ds1">{function::FormattedDate}</div>
    --== Kin ==--

  • Sorting a Spry Table

    For a table listing events and fed by an xml file I need to sort the date and time columns. First priority is date, second is time. This is possible in a regular html table, but not an option in spry tables, at least not in CS 3 which I am using.
    It probably needs some change in the JavaScript to do that. Any help with that is greatly appreciated. Thanks.

    Click the column headers here http://labs.adobe.com/technologies/spry/samples/data_region/DataReferences.html and here http://labs.adobe.com/technologies/spry/samples/data_region/SortSample.html
    For a table listing events and fed by an xml file I need to sort the date and time columns. First priority is date, second is time. This is possible in a regular html table, but not an option in spry tables, at least not in CS 3 which I am using.
    Sorting is a built-in Spry function.
    It probably needs some change in the JavaScript to do that.
    Under normal circumstances, it is advisable not to touch the Spry JS files.

  • Spry Tabbed Panel and Master/Detail Page Set interraction

    Hi,
    I have created a feedback form and am using a Spry Tabbed Panel to allow users to review all responses to one question and then all responses to the next question in different tabs, there are 6 tabs in all. In each tab I have created a Master/ Detail Page set - well actually just the Master appears in the tab. This is working fine. I allow up to 20 responses to be shown on each page, after which the user selects First/Previous/Next/Last. When they do this the screen refreshes and the tabbed panel display goes back to the default tab, clicking on the tab previously used correctly displays whichever of First/Previous/Next/Last the user selected. I'd like the display to remain on the user's current tab when they select First/Previous/Next/Last.
    The page in question is here http://www.hollisterairshow.com/feedback-results2.php, then scroll about half way down the page.
    Thanks.
    Tony 

    Hi Tony,
    Have a look here http://labs.adobe.com/technologies/spry/samples/data_region/PagingSample.html and here http://labs.adobe.com/technologies/spry/samples/data_region/SpryPagedViewSample.html
    If you need further assistance, go to the Spry Forum http://forums.adobe.com/community/labs/spry
    I hope this helps.
    Ben

  • Using spry datasets with Googlemaps

    I am using googlemaps with XML as the data source. I want to
    have a spry data grid under my map that shows all of the map
    points. I am already parsing the map point's XML into a javascript
    array. Is it possible to use this array to populate a spry
    datagrid? Most of the examples seem to be using xml or json as the
    datasource but figured since google has parsed it for me that I
    could just use their array as the datasource.

    Hi,
    We have a couple ways of putting data into data sets.
    Check out:
    http://labs.adobe.com/technologies/spry/samples/data_region/DataSetSample.html
    I think that might be what you are looking for...
    Hope this helps,
    Don

Maybe you are looking for

  • Close the open Sales Orders.

    Dear All, We have created Sales Order against FGO Scheme for 76 Pkts and FGO material 3 Pkts, out of that we have despatched 50 Pkts only. Now we want to close open order, but field of order quantity is made gray hence we are unable to update the qua

  • 2005 Mac mini with heavy use

    - should I replace it before buying new software? and what are the signs of disc failure? I think its a 2005 - I probably bought it in 2006 or 07.

  • IDVD templates in Studio Pro

    Hi Is it possible to use iDVD templates in DVDSP. If so how do I get them in there? Many Thanks Adrian

  • Call BSP from BAdI

    Hi all, We are implementing a BAdI and want to launch a browser calling our own BSP (we have developped a new application). Could you please tell me if there is any FM or class which allows this? Thanks in advance Pablo

  • Sending Zip files

    I have created a project, then while still on the ipad clicked the share option, selected email. Read email pop up explanation, one tapped the project i wish to email Tapped email. Email client loads. Tap in address but the Zip file never loads or ne