Filtering a list with an XML dataset in Spry 1.6.1?

I have a typical XML data file.  I know how to load it, create a dataset, and then a master-detail display.
However, what I need to do is create form items that will FILTER the master set as the user clicks options.
For example, if the list is countries of the world, and the default is to show them all, there could be checkboxes and/or select menus that allow the user to choose countries only in Asia, or only monarchies, etc.
I can't find any examples of how to do this sort of thing.  Are there any?

That's very helpful, thanks.  What I am stuck on now is I am trying to "parameterize" my filter function, so I can pass the string to filter by from the checkbox to une function instead of having a filter function for each.
for example this works to find all items where the color is red:
var myFF = function(dataSet, row, rowNumber)
          if (row["color"].search('red') != -1)
                    return row;
          return null;
function ToggleFilter(enable, f)
          if (enable)
           ds1.addFilter(f, true);
          else
          ds1.removeFilter(f, true);
<label>Red: <input name="red1" type="checkbox" value="" onclick="ToggleFilter(this.checked, myFF);" /></label>
I would rather have the function be for ANY color, and specify the color on the checkbox, such as this:
<label>Red: <input name="red2" type="checkbox" value="" onclick="ToggleFilter(this.checked, myFF, 'red');" /></label>
So that I can easily have checkboxes 'red' 'green' etc.  However I must not be doing it right since if I modify the ToggleFilter function to expect the third parameter, and add the parameter to the ds1.addFilter(f, true) the whole thing fails.

Similar Messages

  • Dynamicaly Filtering a list with a custom column

    In my site pages library I added two columns.  A customer name column (Dell, Apple, HP, ...) and a page type column ( Client Page, Project Page).  If I were to go to a Dell client page I want to have a list of pages with the view of Dell pages
    that are also a Project Page.     The problem that I am having is that I can not get the view to use the dynamic filter. 

    You will have to create a list with URL for all pages and clients align to the page. Then use below cascading dropdown
    http://spservices.codeplex.com/wikipage?title=%24%28%29.SPServices.SPCascadeDropdowns
    http://spcascade.codeplex.com/

  • XML Dataset whit spry:if works in IE8 but not in IE6,IE7 and IE9

    Hello,
    I have bigs problem with my site created using SPRY framework and the filters functions.
    My pages works properly in IE8, Safari, firefox, chrome, ecc but not in IE6 and IE7.
    In IE9 works only in "compatibility mode"
    This page is an example:
    http://www.digidevice.com/P_IT/IT-Prodotti01.html
    in the browser ok there is a list of items, in the other that don't works there is only a void rectangle.
    In this page one example with code depured by formatting:
    http://www.digidevice.com/P_IT/IT-Prodotti01_PROVADATASET2.html
    Thanks in advance

    Hi, i have a similar problem..
    These URL returns a XML:
    1) http://www.bolsadesantiago.com/intradayServlet?symbol=IPSA
    2) http://www.valorfuturo.com/contenidos_vf/proyectos/clientes/penta/titularnoticias.asp
    I use a CS4 and both works in preview, but only first works over internet (IE7).
    I suspect that 2° has a problem of syntax XML, but work with jQuery.

  • Problem with a XML DataSet

    hi everyone
    i have a problem with a E4X file, , i get the information
    from a webservice, and the i get the information what i need,
    Everything from here, but i put the E4X in a textArea,
    Instead to print the <> of the XML it print me &lt; and
    &gt;
    I don't know why happen this, because i get the code form a
    example, and this example works Perfectly...
    I hope someone can help me, if you know some think about this
    problem

    Hi Victor,
    I believe the problem is the changes the xml file has once they are merged.
    Try adding the line to save the newly merge xml to disk and then try setting the Report to the new xml file:
    C#: ds.WriteXml("c:
    sc.xml", XmlWriteMode.WriteSchema);
    Also, it's not recommended to use more than one xml file, if you must then use a subreport for each. CR tends to try to link all field to each other and can consume a lot of memory.
    Thank you
    Don

  • How to populate list component via xml file?

    There is a TextArea component that should show the name and
    the description of the item selected in the list component. But I
    dont know how to populate list with external XML and what should be
    the coding in flash as well as what should be written in the XML.
    Please help.

    Here's an xml file listing a couple of brother comedy teams:
    <?xml version="1.0" encoding="UTF-8"?>
    <team>
    <brothers>
    <Marx>
    <name>Groucho</name>
    <name>Chico</name>
    <name>Harpo</name>
    <name>Zeppo</name>
    <name>Gummo</name>
    </Marx>
    <Howard>
    <name>Moe</name>
    <name>Curly</name>
    <name>Shemp</name>
    </Howard>
    </brothers>
    </team>
    Open a new .fla and save it in the same folder as the .xml
    file. Place a List Component on the Stage and name it (in this
    case, "comicTeams_list"). In the first frame write the following
    ActionScript:
    //create XML object and load external xml file
    var broList:XML = new XML();
    broList.ignoreWhite = true;
    broList.onLoad = processList; // this is a function that will
    be written below
    broList.load("populateList.xml");
    function processList(success:Boolean):Void{
    if(success){
    loadList();
    }else{
    trace("Load failure");
    function loadList():Void{
    var broName:String;
    var listEntries =
    broList.firstChild.childNodes[0].childNodes[0].childNodes.length;
    for(var i:Number = 0;i<listEntries;i++){
    broName =
    broList.firstChild.childNodes[0].childNodes[0].childNodes
    .childNodes[0].nodeValue;
    trace(broName);
    comicTeams_list.addItem(broName);
    //to make something happen when you click on a name in the
    List, create a Listener and function
    var broListListener:Object = new Object();
    broListListener.change = someAction; //"someAction" is a
    function to be written shortly
    //add the Listener to the List
    comicTeams_list.addEventListener("change", broListListener);
    function someAction(evtObj:Object):Void{
    var pickedBrother:String = evtObj.target.selectedItem.label;
    //write actions here, referencing pickedBrother variable
    The names of the Marx Brothers will appear in the box.
    This is written in AS2. When you post a question, it's a good
    idea include which version of ActionScript you're using.

  • Spry XML dataset + PHP problem

    I have installed Dreamweaver CS3 and created a simple page
    that receives a XML dataset from a PHP page. I was not able to
    display any data in either FF or IE (just got a blank page). I then
    downloaded the 1.5 pre-release and discovered the Data Set Explorer
    which worked well in FF but doesn't do anything in IE. Then I
    copied SpryData.js and xpath.js to my sites' SpryAssets directory,
    overwriting the 1.4 files and my simple page worked in FF,
    but still NOT in IE6/7. I then uploaded the pages to a
    remote server and tested on another PC, but it still doesn't work.
    If I replace the php file with a XML dataset it works on both FF
    and IE. Can someone please look at the
    test page and tell me what
    I am missing? The PHP page that feeds the XML can be viewed
    here

    Thanks for the reply Kin, I also had an idea that it might be
    the headers. When I copied the example from
    here
    the
    header('Content-type:
    text/xml'); line was commented out by mistake! Thanks for
    your help, it's working now!

  • Compound filtering xslt list view web part with _dopostback using javascript/jquery

    Hello,
    I am filtering list view web part as same as the below post,
    http://dcsharepointchick.blogspot.in/2013/05/filter-sharepoint-list-with-partial-postback.html
    here I need to filter the web part with some another condition . I am trying to write another condition in filter attribute of _doPostback(), but it doesn't work.
    Please let me know is there any alternative to achieve compound filtering.
    Regards,
    Balakrishna M.

    Hi Balakrishna,
    According to your description, my understanding is that you want to filter the list view web part with more than one filters.
    I recommend to use the OOB Choice Filter web part to achieve this goal.
    Edit the page where the list view web part exists and then add the Choice Filter web parts to the page based on your need.
    More reference:
    http://office.microsoft.com/en-in/sharepoint-server-help/connect-a-filter-web-part-to-a-list-view-web-part-HA101785233.aspx#_Toc296943684
    Or you use the List Filter Plus Web Part to get the function.
    http://www.kwizcom.com/sharepoint-add-ons/sharepoint-list-filter-plus/overview/
    Here is the link to download the web part:
    http://www.kwizcom.com/sharepoint-add-ons/sharepoint-list-filter-plus/download/
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Publishing a list with specifics views anf filters for all the users to see it.

    Hi i was working on the item level permissions of a list which are accessed by all users.
    I have applied the item level permissions for specific users having specific records to work with.
    Now, there are situations when we need to show all the users all the data but in read only mode.
    How do i work on the report so that the user can actually only see the data.
    The Admin will pick the list with a specific view and apply filters and then expose it for other end users to view.
    How do i achive that?

    Hello,
    How did you set item level permission? I mean,  list "advanced settings" OR manually edit the items permission by breaking the permission.
    If you have broken the permission and user doesn't have permission on  items then there is no way to show item to users. You must provide at least read access to view the item.
    In you case, you can give contributor right to everyone on all items (by inherit parent permission) then go to list settings page-->advanced settings-->then set item level permission as shown in pic:
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How to show an entry with specific ID from spry xml dataset?

    I have a spry xml dataset, can I show only one record
    specified by, say, unique ID?

    yeah, I first posted this one, then found out that my other
    message was replied:)

  • AddFilter for an AND filter not working properly with my XML

    I am following the examples from the Multiple Filters Sample pages to build a page that will filter some data based upon grade levels.
    http://indianawea.org/resources/outreachtest.asp
    This page is calling the XML file located here:
    http://indianawea.org/datasets/resourcesXML.asp
    You will notice some weird things right away if you do a simple filter for K-3 Grade Levels. It will find some of the K-3 but not all of them. In addition, when I add another filter (7-8) it doesnt seem to be additive at all but doing an OR filter. The K3 and 7-8 together should only have two results (World Monitoring Day and Survival Guide).
    I wonder if it has to do with my XML file struture.The grade levels are stored in a comma delimited string in the database and I pull them out, put them in an array and then loop through the array, creating XML markers for them. This was patterned after the donut example on the Spry page. I am not sure I am doing that correctly because the tags have the same names.
    Any help on this is greatly appreciated. And yes, I am working on this on Easter afternoon!
    Jon

    Thanks for the response Gramps.
    http://indianawea.org/datasets/resourcesXML.asp
    That is my XML. I have added IDs to the keywordBreakout and gradeLevelBreakout
    Looking at this code by Adobe, my XML seems to be in form now with theirs.
    http://labs.adobe.com/technologies/spry/data/donuts.xml
    In that example they are using there filter to search all toppings if I see that correct, and they have multiple topping nodes with ids. I am trying the same thing. Even with the ID's I am not getting accurate filters.
    I have a data field in the database that contains the gradeLevels. It is called gradeLevels in the XML. I thought I would need to parse that out and put them in their own nodes, each grade level at a time, so that the filter can accurate find one when checked. Same for keywords. I could leave them in there comma demlinited list and do a contains instead of an = search with the SPRY filter but I feel that wouldnt be as accurate in case there are keywords that are close in names. I guess I am stumped as to what my next move might be. I'd love some more help gramps!
    Jon
    NOTE: Even trying this to the gradeLevel node not broken out yields poor results
    function ffK3(ds, row, index){ return (row.gradeLevel.match("K-3")) ? row : null; }. It is like it is ignoring certain nodes. The Water Source Book's gradeLevels don't come up in any filter.

  • Filtering sharepoint list data using report parameters

    We are using xml to pull data from a custom sharepoint list into sql 2005. We have set a parameter that allows the user to filter the data by surname, however when the user tries to filter the list the drop down box brings up a list of every record, so there are duplicate entries for each surname.
    Is there a way of filtering this so that there is only one instance of the users surname instead of it showing all the records?
    Any help would be much appreciated.  

    Hi,
    Please see the below url
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/c43f25ab-aa3c-4586-85a1-1b89c3b21b12/how-to-filter-a-sharepoint-list-with-report-parameters?forum=sqlreportingservices
    Solution is define here.
    Hasan Jamal Siddiqui(MCTS,MCPD,ITIL@V3),Sharepoint and EPM Consultant,TCS
    |
    | Twitter

  • The style 'dropShadowVisible' is only supported by type 'mx.controls.List' with the themes(s) 'spark

    I'm still plagued by these warnings in my Flex project:-
    The style 'dropShadowVisible' is only supported by type 'mx.controls.List' with the themes(s) 'spark'
    Clicking on the warnings doesn't take me to the code.
    The project started as SDK3.5.  I've made it into an SDK4.0 project.  It uses old Halo components throughout.  I've chosen a Halo theme.
    I can get rid of these warnings if I "Use Flex 3 compatibility mode".  BUT, If I use that mode, I get also Run Time Errors - so I decided against this compatibility, and just edited the styling, deprecated syntax, and a few issues to make the app work.
    I tried the solution someone suggested editing the flex-config.xml file, but it didn't work for me.
    The application begins...
    <mx:Application
    xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:mx="library://ns.adobe.com/flex/mx"
    xmlns:s="library://ns.adobe.com/flex/spark"
    (I've obviously tried clean).

    Yes, very irritating. "Only a warning" isn't the whole story, it's more than just an annoyance, it can potentially make all warnings useless.
    Imagine cases where you have multiple warnings (often FB warnings turn up for EACH component resulting in many repeats, design mode is particularly bad with this).  Having a ton of warnings that "aren't really warnings" obscures REAL warnings that we'd want to do something about (and makes errors harder to notice at first--you're so used to always seeing lines under the problems tab that you don't always notice a new error that just popped up).  In the worst case scenario a valid warning that would have prevented a bug is missed and something goes to QA or production that should have been caught at compile time...
    This wouldn't be nearly as annoying if we had some decent way of filtering these warnings from the problems tab. The current filter isn't good enough and only seems to allow you to filter out one message due to the way it works, but sometimes we see more than one type of "bogus" warning.
    Voted and added to comments.  I wonder if there's a feature request out there to improve warning filter capabilities?  I also wonder why nobody complained about this before, it seems pretty easily visible.  Is it the norm for people to just always ignore warnings?  This isn't a good practice, warnings tend to exist for a reason.
    (Btw, this is part of my reasoning for the claim that Halo seems to have become a "second class citizen" component set - hopefully Adobe can do something about this.)

  • Populate a drop down list with data from Excel and fill in a text field, based on drop down selectio

    Hi!
    I have a problem with a PDF form: There's a drop down list that I populate with Excel data that I've put in an XML file through an XSD file -- no problem here. The drop down list has a data binding to the XML file, so that a choice in the drop down list can be associated with an object in the XML file. So, when I make a choice in the drop down list, a corresponding object value is fetched from the XML file and put in a text field on the form.
    How to do this is described by Stefan Cameron here:
    http://forms.stefcameron.com/2006/07/29/dynamic-properties/
    There's a snag, though, and to describe it more clearly:
    The XML file contains three types of objects: role, role number, and role cost center. Of these I use the first and the third, i.e. the role and the role cost center. The drop down list contains the roles, and when I select a role, the corresponding cost center is filled out in the text field. So far, so good!
    But -- if the cost center has the same value for two or more roles, all of these roles "bounce back" into the drop down list, that is, they are all selected in the drop down list. How many of these you can see depend on the height of the drop down list -- if it's low you'll only see the first one.
    If I modify Stefan Cameron's data in his example I get the same behavior, so the problem seems to have to do with how XML data are fetched.
    I'm sure there's a workaround, but I can't find it! I've spent many hours browsing the web without finding anyone with a similar problem.
    Any suggestions appreciated!

    Although your issue is far beyond mine, I was hoping you can help me out.....
    I need to create a drop down list of names which I wish to somehow link to an Excel spreadsheet.
    Please let me know the steps I need to do.  I've tried several things, but nothing seems to work and I'm not sure what I am doing wrong.
    Thank you

  • How can I create a XMP List with multiple selection

    Hello,
    I try to build my own XMP custom panel. Herefore I need a couple of lists with the possibility for multiple selections (e.g. the choice for one language or multiple languages).
    But how is it possible to integrate a list into a panel? There is no XMPList inside the custom folder. I have experimented with the standard mx:list and an array collection for data binding into the list. But how can I write the user selection into an XMP field? Example: In the List the user choose three languages (DE, EN, FR). Is it possible to collect the choice into a string and to write the result into an XMP standard field (e.g. dc:description)?
    A further question is, if it's possible to use the "HTTPService" to bind an external xml-file with the languages and other informations into the panel or is it only possible to work with an array collection inside the code?
    Here is my code:
    <?xml version="1.0" encoding="utf-8"?>
    <fi:XMPForm
              xmlns:mx="http://www.adobe.com/2006/mxml"
              xmlns:fi="com.adobe.xmp.components.*" width="100%" height="100%"
              xmlns:Iptc4xmpCore ="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/"
              label="XMP-Custom Panel"
              initialize="ds.send()"
              >
         <!-- Each namespace prefix that is used within an xmpPath-attribute,
               MUST BE registered at the top of EACH panel where it is referenced -->
         <fi:XMPNamespaces>
              <fi:XMPNamespace prefix="dc" value="http://purl.org/dc/elements/1.1/"/>
         </fi:XMPNamespaces>
         <fi:XMPForm>
              <mx:HBox width="100%" height="26" verticalAlign="middle">
                   <mx:HRule width="50%"/>
                   <mx:Label text="Allgemeine Metadaten" fontSize="12" fontWeight="bold"/>
                   <fi:XMPSeparator width="50%"/>
              </mx:HBox>
              <fi:XMPFormItem
                        label="Titel"
                        labelTooltip="$$$/xmp/sdk/custompanels/Test/TitleToolTip=Dateiname" fontSize="11" width="100%">
                   <fi:XMPTextInput xmpPath="dc:title" xmpType="Localized" width="100%"/>
              </fi:XMPFormItem>
              <fi:XMPFormItem
                        label="Titel"
                        labelTooltip="$$$/xmp/sdk/custompanels/Test/TitleToolTip=Dateiname" fontSize="11" width="100%">
                   <fi:XMPTextInput xmpPath="dc:title" xmpType="Localized" width="100%"/>
              </fi:XMPFormItem>
              <fi:XMPFormItem
                        label="Druckkennzeichen"
                        labelTooltip="$$$/xmp/sdk/custompanels/Test/TitleToolTip=Dateiname" fontSize="11" width="100%">
                   <fi:XMPTextInput xmpPath="dc:title" xmpType="Localized" width="100%"/>
              </fi:XMPFormItem>
              <fi:XMPFormItem
                        label="Verfasser"
                        labelTooltip="$$$/xmp/sdk/custompanels/Test/TitleToolTip=Erzeuger des Dokumentes" fontSize="11" width="100%">
                   <fi:XMPComboBox xmpPath="dc:creator" width="100%"/>
              </fi:XMPFormItem>
              <fi:XMPFormItem
                        label="Versionsnummer"
                        labelTooltip="$$$/xmp/sdk/custompanels/Test/TitleToolTip=Dateiname" fontSize="11" width="100%">
                   <fi:XMPComboBox xmpPath="dc:creator" width="100%"/>
              </fi:XMPFormItem>
              <mx:HBox width="100%" height="26" verticalAlign="middle">
                   <mx:HRule width="50%"/>
                   <mx:Label text="Enthaltene Sprachen" fontSize="12" fontWeight="bold"/>
                   <fi:XMPSeparator width="50%"/>
              </mx:HBox>
              <!-- Beginn der Auswahl-Liste für die Sprachen -->
                 <mx:Script>
            <![CDATA[
                import flash.events.MouseEvent;
                import mx.controls.Alert;
                import mx.collections.ArrayCollection;
                private const NL:String = "\r";
                // A data provider created by using ActionScript
                [Bindable]
                private var subscriptions:ArrayCollection =
                    new ArrayCollection
                            {data:0, label:"Deutsch"},
                            {data:1, label:"Englisch"},
                            {data:2, label:"Französisch"},
                            {data:3, label:"Italienisch"}
                [Bindable]
                private var market:ArrayCollection =
                    new ArrayCollection
                            {data:0, label:"(Bitte Marktversion auswählen)"},
                            {data:1, label:"Marktversion Deutsch (M_DE)"},
                            {data:2, label:"Marktversion Englisch (M_EN)"},
                            {data:3, label:"Marktversion Frankreich (M_FR)"},
                            {data:4, label:"Marktversion Italien (M_IT)"}
                [Bindable]
                private var documenttyp:ArrayCollection =
                    new ArrayCollection
                            {data:0, label:"(Bitte Dokumenttyp auswählen)"},
                                  {data:1, label:"Gebrauchsanweisung"},
                            {data:2, label:"Ersatzteilkatalog"},
                            {data:3, label:"Service-Anleitung"},
                            {data:4, label:"Etikett"}
            ]]>
        </mx:Script>
                    <fi:XMPFormItem label="Sprachauswahl" width="100%">
                    <mx:List
                        id="userSubscriptions" rowCount="4"
                        allowMultipleSelection="true" width="100%"
                        dataProvider="{subscriptions}"
                    />
                </fi:XMPFormItem>
                    <mx:Text text="* Mehrfachauswahl möglich." fontWeight="normal" fontSize="10"/>
                <!-- Ende der Liste für die Auswahl von Sprachen -->
              <fi:XMPFormItem
                        label="Marktvariante"
                        labelTooltip="$$$/xmp/sdk/custompanels/Test/TitleToolTip=Dateiname" fontSize="11" width="100%">
                   <fi:XMPComboBox xmpPath="dc:creator" width="100%" dataProvider="{market}"/>
              </fi:XMPFormItem>
              <fi:XMPFormItem
                        label="Dokumenttyp"
                        labelTooltip="$$$/xmp/sdk/custompanels/Test/TitleToolTip=Dateiname" fontSize="11" width="100%">
                   <fi:XMPComboBox xmpPath="dc:creator" width="100%" dataProvider="{documenttyp}"/>
              </fi:XMPFormItem>
              <fi:XMPFormItem
                        label="Stichworte"
                        labelTooltip="$$$/xmp/sdk/custompanels/Test/TitleToolTip=Erzeuger des Dokumentes" fontSize="11" width="100%">
                   <fi:XMPTextArea/>
              </fi:XMPFormItem>
              <mx:HBox width="100%" height="26" verticalAlign="middle">
                   <mx:HRule width="50%"/>
                   <mx:Label text="Metadaten Photoshop" fontSize="12" fontWeight="bold"/>
                   <fi:XMPSeparator width="50%"/>
              </mx:HBox>
              <fi:XMPFormItem
                        label="Originalname FA"
                        labelTooltip="$$$/xmp/sdk/custompanels/Test/TitleToolTip=Dateiname" fontSize="11" width="100%" id="PS1">
                   <fi:XMPTextInput xmpPath="dc:title" xmpType="Localized" width="100%"/>
              </fi:XMPFormItem>
              <fi:XMPFormItem
                        label="Fotoauftragsnummer"
                        labelTooltip="$$$/xmp/sdk/custompanels/Test/TitleToolTip=Dateiname" fontSize="11" width="100%" id="PS2">
                   <fi:XMPTextInput xmpPath="dc:title" xmpType="Localized" width="100%"/>
              </fi:XMPFormItem>
              <fi:XMPFormItem
                        label="Interne Anmerkungen"
                        labelTooltip="$$$/xmp/sdk/custompanels/Test/TitleToolTip=Erzeuger des Dokumentes" fontSize="11" width="100%" id="PS3">
                   <fi:XMPTextArea/>
              </fi:XMPFormItem>
              <mx:Text text="* hier steht eine kleine Erläuterung" fontWeight="normal" fontSize="10"/>
         </fi:XMPForm>
    </fi:XMPForm>
    Any suggestions?
    Thank you in advance.
    Markus

    Hi Markus,
    the FileInfo SDK does not offer a ready-made list component allowing for multi-selection.
    So you would need to implement one using the FileInfo SDK API. Your component "XMPList" would inherit from mx:list and would need to implement the XMPRead and XMPWrite events and talk to the XMP using the IXMPAccess interface within those event handlers.
    Please have a look at the Programmer's Guide, section "XMP Flex components" and at the API description available in "docs" for further guidanc.
    Hope this helps
    Kind Regards
    Jörg
    Adobe XMP

  • Spry Menu Using Nested XML Dataset (Spry 1.6)

    I have a vertical menu with a few items. One of which is
    labeled Products which has submenus. I want to have that submenu
    read from a Nested XML dataset. Using a single dataset for one
    level in a menu is easy enough, but the subenu will have submenus.
    Example Menu:
    Home
    Company
    Products
    |-- Product 1
    |-- Item 1
    |-- Item 2
    |-- Item 3
    |-- Product 2
    |-- Item 1
    |-- Item 2
    |-- Product 3
    |-- Item 1
    |-- Item 2
    |-- Item 3
    |-- Item 4
    |-- Product 4
    |-- Item 1
    |-- Item 2
    |-- Product 5
    I have been looking for an easy way to use the Spry Nested
    XML Dataset to create the Product/Item menu. The number of Products
    may vary as well as the number of Items in each Product submenu
    (also, some Products may not have Items).
    I already have an ASP page that creates the XML data from a
    database.
    Schema follows (XSD ):
    <?xml version="1.0" encoding="utf-8"?>
    <xsd:schema xmlns:xsd="
    http://www.w3.org/2001/XMLSchema">
    <xsd:element name="products">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="product_type"
    maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="type_name" maxOccurs="1"
    type="xsd:string"/>
    <xsd:element name="type_url" maxOccurs="1"
    type="xsd:anyURI"/>
    <xsd:element name="product_name"
    maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="item_name" maxOccurs="1"
    type="xsd:string"/>
    <xsd:element name="item_url" maxOccurs="1"
    type="xsd:anyURI"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    I have been programming for 17 years but am new to Spry. If
    this cannot be done easily with the Spry framework, I'll probably
    wind up splitting the XML data into 2 files (Products and Items)
    then writing a nested loop and call each by row, but then I have to
    find out how Spry Datasets reference XML data. Figuring out how to
    call rows from the XML data shouldn't be so bad, but this method
    just seems like such a hassle for something that should be easy.
    Pseudocode follows:
    j=1
    i=1 to TotalNumberProducts
    display Product i from Products
    ItemsExist=true
    While ItemsExist
    if j > TotalNumberItems | Item j is not for Product then
    ItemsExist=false
    else
    display Item j from Items
    j++
    Wend
    Next
    Thanks in advance for any help or direction!

    That's exactly what I'm trying to do. However, I implemented
    that code and the submenus won't appear. I suspect the submenus
    aren't finding the field names from the Nested XML Dataset. The
    first level of Product menus work great (this is a submenu of the
    overall menu) and correctly identify products that do not have
    submenus, so I know it's picking up the number of records in the
    Nested Dataset correctly - it just won't display the data in the
    next level of menu.
    variable and script declarations:
    <script src="SpryAssets/SpryMenuBar.js"
    type="text/javascript"></script>
    <script src="SpryAssets/xpath.js"
    type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js"
    type="text/javascript"></script>
    <script src="SpryAssets/SpryNestedXMLDataSet.js"
    type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarVertical.css"
    rel="stylesheet" type="text/css">
    <script type="text/javascript">
    <!--
    var productMenuData = new
    Spry.Data.XMLDataSet("products.asp", "products/product_type");
    var productMenuDataItems = new
    Spry.Data.NestedXMLDataSet(productMenuData, "product_name");
    //-->
    </script>
    Code for menus:
    <ul id="NavMenu" class="MenuBarVertical">
    <li><a
    href="index.html">Home</a></li>
    <li><a
    href="company.html">Company</a></li>
    <li><a href="franco_giberti.html">Franco
    Giberti</a></li>
    <li><a class="MenuBarItemSubmenu"
    href="products.asp">Products</a>
    <ul spry:region="productMenuData
    productMenuDataItems">
    <li spry:repeat="productMenuData"><a
    class="MenuBarItemSubmenu" href="{type_url}"
    spry:if="{productMenuDataItems::ds_RowCount} !=
    0">{type_name}</a> <a href="{type_url}"
    spry:if="{productMenuDataItems::ds_RowCount} ==
    0">{type_name}</a>
    <ul spry:if="{productMenuDataItems::ds_RowCount} !=
    0">
    <li spry:repeat="productMenuDataItems"><a
    href="{productMenuDataItems::item_url}">{productMenuDataItems::item_name}</a></li>
    </ul>
    </li>
    </ul>
    </li>
    <li><a href="contact.html">Contact Us</a>
    <!-- end #sidebar1 -->
    </li>
    </ul>
    XML:
    <products
    xsi:noNameSpaceSchemaLocation="products.xsd">

    <product_type>
    <type_name>Pasta Sauce</type_name>
    <type_url>pt_2.asp</type_url>

    <product_name>
    <item_name>Putenesca</item_name>
    <item_url>pn_3.asp</item_url>
    </product_name>

    <product_name>
    <item_name>Arrabiata</item_name>
    <item_url>pn_4.asp</item_url>
    </product_name>

    <product_name>
    <item_name>Pesto</item_name>
    <item_url>pn_5.asp</item_url>
    </product_name>

    <product_name>
    <item_name>Basil and Tomato</item_name>
    <item_url>pn_6.asp</item_url>
    </product_name>

    <product_name>
    <item_name>Bolognese</item_name>
    <item_url>pn_7.asp</item_url>
    </product_name>

    <product_name>
    <item_name>Carboniera</item_name>
    <item_url>pn_8.asp</item_url>
    </product_name>
    </product_type>
    +
    <product_type>
    <type_name>Organic Olive Oil</type_name>
    <type_url>pt_3.asp</type_url>

    <product_name>
    <item_name>Original</item_name>
    <item_url>pn_9.asp</item_url>
    </product_name>

    <product_name>
    <item_name>Basil</item_name>
    <item_url>pn_10.asp</item_url>
    </product_name>

    <product_name>
    <item_name>Herbs</item_name>
    <item_url>pn_11.asp</item_url>
    </product_name>

    <product_name>
    <item_name>Sun Dried Tomato</item_name>
    <item_url>pn_12.asp</item_url>
    </product_name>
    </product_type>
    +
    <product_type>
    <type_name>Organic Spreads</type_name>
    <type_url>pt_4.asp</type_url>

    <product_name>
    <item_name>Putenesca</item_name>
    <item_url>pn_13.asp</item_url>
    </product_name>

    <product_name>
    <item_name>Arrabiata</item_name>
    <item_url>pn_14.asp</item_url>
    </product_name>

    <product_name>
    <item_name>Pesto</item_name>
    <item_url>pn_15.asp</item_url>
    </product_name>

    <product_name>
    <item_name>Basil and Tomato</item_name>
    <item_url>pn_16.asp</item_url>
    </product_name>

    <product_name>
    <item_name>Bolognese</item_name>
    <item_url>pn_17.asp</item_url>
    </product_name>

    <product_name>
    <item_name>Carboniera</item_name>
    <item_url>pn_18.asp</item_url>
    </product_name>
    </product_type>
    +
    <product_type>
    <type_name>Organic Grilled Vegetables</type_name>
    <type_url>pt_5.asp</type_url>

    <product_name>
    <item_name>Putenesca</item_name>
    <item_url>pn_19.asp</item_url>
    </product_name>

    <product_name>
    <item_name>Arrabiata</item_name>
    <item_url>pn_20.asp</item_url>
    </product_name>

    <product_name>
    <item_name>Pesto</item_name>
    <item_url>pn_21.asp</item_url>
    </product_name>

    <product_name>
    <item_name>Basil and Tomato</item_name>
    <item_url>pn_22.asp</item_url>
    </product_name>

    <product_name>
    <item_name>Bolognese</item_name>
    <item_url>pn_23.asp</item_url>
    </product_name>

    <product_name>
    <item_name>Carboniera</item_name>
    <item_url>pn_24.asp</item_url>
    </product_name>
    </product_type>

    <product_type>
    <type_name>Truffle Products</type_name>
    <type_url>pt_6.asp</type_url>
    </product_type>
    </products>
    Any further guidance would be very much appreciated!

Maybe you are looking for

  • Importing itunes into final cut express

    I just bought an IMAC with Final Cut Express to do all my video editing of my kids activities. I used Pinnacle Studio on my old PC prior to this but it finally gave out. I downloaded some music CD's I had into itunes and then tried importing the musi

  • How can I convert this small pl/sql block in a single query?

    Hello, I need to have a single SQL query which gives the same output as the following piece of code, which uses a cursor to iterate on the rows in order to get the informations I need: declare cursor c(p varchar2) is select context_id, id, parent_id

  • Can not update apple tv 2 error 3194 can anybody help?

    i am trying to update my apple tv 2 through so many methods and pcs i keep on receiving 3194 erro can any body help

  • Getting DVD footage into Final Cut X?

    Hi, I am an actor who has just got Final Cut X and want to edit my showreel on it. I have various dvds of my work. Could anyone please suggest the best way to convert the dvd and get them into Final Cut please? All the best, Anna

  • HTTP 404 THE REQUESTED RESOURCE IS NOT AVAILABLE

    HELP ME PLEASE !!!! I HAVE AN APPLICATION THAT USES 3 PAGES: INDEX.HTML , MOTOR.JSP AND MOTOR2.JSP. THE LOGIC OF APPLICATION IS: FIRST STEP THE FIRST STEP IS SHOWING PAGE INDEX.HTML THERE IS THE FOLLOWING CODE IN THIS PAGE: <FORM ACTION="DIRECT"> SEC