Nested XML dataset: can't see items

Hi,
I'm a newbie and started using Spry 1.5 because it looks
promising and helps me avoid getting into javascript for the
moment. My XML data looks like
<lanternsandsconces>
<lantern>
<name>1</name>
<size>
<description>Standard 1</description>
</size>
<size>
<description>Standard 2</description>
</size>
</lantern>
<lantern>
<name>2</name>
<size>
<description>Standard 1</description>
</size>
</lantern>
</lanternsandsconces>
I am trying to access the data using Nested XML datasets. I
tried to mimic your example on
http://labs.adobe.com/technologies/spry/samples/data_region/NestedXMLDataSample.html
with my XML data. Here's my html:
<script src="../SpryAssets/xpath.js"
type="text/javascript"></script>
<script src="../SpryAssets/SpryData.js"
type="text/javascript"></script>
<script src="../SpryAssets/SpryXMLNestedDataSet.js"
type="text/javascript"></script>
<script type="text/javascript">
var dsTest = new
Spry.Data.XMLDataSet("../XML/productsnested1.xml","lanternsandsconces/lantern");
var dsTestNest = new Spry.Data.NestedXMLDataSet(dsTest,
"size");
</script>
<div>
<table class="dataTable">
<tr>
<th>lantern</th>
<th>sizes</th>
</tr>
<tr>
<td spry:region="dsTest">
<ul spry:repeatchildren="dsTest" spry:choose="">
<li spry:when="{ds_CurrentRowNumber} == {ds_RowNumber}"
spry:setrow="dsTest" spry:select="select" spry:hover="hover"
spry:selected="">{dsTest::name}</li>
<li spry:default="" spry:setrow="dsTest"
spry:select="select"
spry:hover="hover">{dsTest::name}</li>
</ul>
</td>
<td spry:region="dsTestNest">
<ul spry:repeatchildren="dsTestNest">
<li>{dsTestNest::description}</li>
</ul>
</td>
</tr>
</table>
</div>
I would appreciate any help on getting this to work .... As
you can see it is almost a straight copy and paste from the
example. I have the proper scripts copied into the SpryAssets
directory.
Cheers,
Huub

Ah,
excellent. That indeed works. For future reference: this line
I actually copied from
http://livedocs.adobe.com/en_US/Spry/SDG/help.html?content=WSC0DC5D76-B6F1-41ae-9E59-586A1 19AA7C5.html
that's where the bug originated. At
http://labs.adobe.com/technologies/spry/samples/data_region/NestedXMLDataSample.html
it is correct.
thanks a bunch, JV.
Cheers,
Huub

Similar Messages

  • 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!

  • TS2972 In the new itunes, I can't see "items not in my library" using home sharing

    In new itunes, I can't see "items not in my library" using home sharing

    Yup, the new itunes is worthless unless every song you have is in your itunes library as well. (unless you buy every song from itunes this is simply impossible)  Apparently Apple threw away the feature in an effort to force everyone to purchase their media through itunes.  This is probably the worst idea about the new Itunes, the only way to go back is to restore your computer to a time before you downloaded the new version, otherwise wait and hope the next version in a year or so will have it.

  • How to allow user defined in list item to see item using only Designer. Approver set in list item can't see items they are to approve.

    SharePoint 2010 and Designer 2010.
    We have a list of items that users enter information into. Only the user who enters the data can see the item. It's confidential stuff. 
    One field is the name of the person who will approve this record.
    Workflow sends approver an email and sets a task to approve the item. 
    Problem is that the user set as approver cannot see the item. 
    We can't have a list of approvers - as all staff can potentially be approvers.
    We can't allow anyone other than the person who created the item and the person that is set as approver in a field to have access. 
    I am not a programmer, but a user of SharePoint Designer 2010. 
    (I did think we had this sorted by sending an email containing all the list item fields, but this task still requires permissions). 

    Hi ,
    I understand that after you grant user permission on current item ,the user still cannot approve the workflow task .This is because the user doesn't have approve permission in the Tasks list .You only grant the user permission on current item in current
    list ,so he can approve the item by clicking the Approve/Reject in the edit control block .
    Your workflow is correct ,now you need to grant the users Approve (a permission level) permission in the Tasks list settings .In this way ,the users can finish the tasks .
    Thanks
    Entan Ming
    TechNet Community Support

  • User can't see items to add to worksheet

    Hello!
    I have a problem with some user who does not see any items from business area when trying to create workbook in Discoverer Dekstop.
    Environment:
    OD:XP Prof SP2
    DB: Oracle XE 10.2.0.1.0 Production
    Desktop Clinet 10.1.2.48.18
    EUL Library 10.1.2.48.18
    EUL 5.1.1.0.0.0
    The testing scenario was:
    created a user in Oracle XE and 4 tables imported in this schema, create joins, indexes... Created 5 users with select granted on this tables. Each user has his own EUL and all can work with no problems except one user. This particular user log into Discoverer Administrator and creates an EUL and Business area. But when the user logs into D.Desktop and tries to create a Workbook, at setp 2 of the Create Workbook wizard there are no items to add to the Worksheet. All the users have the exactly the same clients, privileges and were created in the same way. All off them can work normally in D.Administrator. Any ideas why this user can't see any items from BusinessArea?
    Thanks for Your help, Peter

    Hi Peter
    You might get better luck if you post questions about Discoverer into the Discoverer forum: Discoverer where I am one of the principal answerers of questions.
    With regards to this particular issue it sounds as though the user does not have the correct EUL setup inside Desktop.
    To check and fix, use this workflow:
    1. Log on to Discoverer Desktop
    2. When prompted whether to create or open a workbook, click the Cancel button
    3. From the toolbar, select Tools | Options
    4. Click the EUL tab - it is the last one so you will need to scroll across
    5. Look at the value for Default EUL
    6. If it is not the one the user created, use thr drop-down to select the right one
    7. Click the OK button
    8. From the toolbar, select File | Connect to Database and reconnect
    9. The user should be able to see the items now
    When an EUL is created you have the option of creating a public or a private EUL. If any user creates a public EUL then all users will have access to that EUL but not to the business areas and items in that EUL, not at least until the owner grants access. New connections to Desktop will pick up a default EUL which will be one of the public EULs, and not always the EUL just created by the user on that machine.
    Could this be the case with you?
    I hope this helps
    Best wishes
    Michael Armstrong-Smith
    URL: http://learndiscoverer.com
    Blog: http://learndiscoverer.blogspot.com

  • Spry xml datasets can't recognise images

    Been trying all day to load a spry xml dataset with image
    information into a table using the wizard. problem is, you can't
    tell the wizard that the data in one of the columns is the path to
    an image, so it sees it as a string and just sticks the path in the
    table. I tried putting it in as html rather than string but really
    I am firing into the dark here!
    What have I missed?

    thanks for the reply. I found the issue in the path string,
    along with having to edit the html tag directly, which I wasn't
    expecting, being used to DW doing it all for me! I found a lot of
    the answer here:
    http://www.csupomona.edu/~llsoe/42101/css/sprytables.htm
    At least it stopped me being scared of html!

  • Updated uwl.collaboration.xml but can't see any change

    Hello,
    at the UWL configuration there are 3 xml files which can be modified in order to modify the User view.
    I have followed the instructions at this PDF in order to modify the collaboration view:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/how to configure the universal worklist.pdf
    I have uploaded new uwl.collaboration.xml xml with medium priority by the name uwl.collaboration_test.xml and cleared the UWL cache (even restarted the server) but I don't see that the modification is taking place.
    Has anyone got a chance to deal with these xmls? Should I do something more in order to commit my costumized xml to the User's view?
    Roy

    Hi Roy,
    I remember there are several (I think 3) "My Tasks" iViews in the portal (search portal content).
    I don't know the exact difference between them, but I remember that only one of them was influenced by the changes to the xml configuration files.
    Therefore, I suggest to check whether your changes influenced one of the other iViews.
    Other than that, the instructions in the PDF you mentioned should work. I don't remember any other modification needed that wasn't described in the document.
    Hope that helps,
    Yoav.

  • Can not see Item on DO

    Please help me how to configure this case?
    Sales have created SO with 7 items, WH create DO for this but it show 6 items and 01 item can not show. See the pics ad attached.
    SO show 7 items.
    DO show 6 Items.
    Thank you.

    Hi,
    In your second screenshot, system is ging a message in green to check the notes in the log. can your check and let know the details of the log.
    Regards,

  • Can't see items on my desktop, do not appear

    Hey everyone. I am really concerned because any items that appear on my desktop do not show up to me, and I can only find them through finder. This worries me as well as random things that are showing up on my desktop, random blank files. Does anyone have any ideas about this? I have not downloaded anything unusual recently and the only downloads have come from my school website for classes and my e-mail from people I know. Has anyone else ever had this problem?

    Welcome To Discussions pinkchaos12!
    Before anyone can attempt to assist you, you will have to post some information about your Mac's system specifications.
    For example,
    Exactly which model of Mac.
    Which version of OS X.
    The size of the Hard Drive, and amount of space available.
    The amount of RAM installed, original and added.
    Are you the Admin of the Mac?
    And anything else you can think of.
    "...any items that appear on my desktop do not show up to me..."
    If they appear on the Desktop, they are showing up, so I don't understand this statement. Please clarify.
    "...I can only find them through finder..."
    When you find them, where ae they located?
    "...random blank files...
    Do the files have names, and are you able to do a Get Info for them?
    ali b

  • IPhoto can't see items added to Aperture since Lion update

    lots of Lion issues so the actually issue may be much deeper...but.  since i udpated to Lion, Iphoto doesn't recognize any photos, folders or projects added to Aperture since the date i upgraded to Lion.  I'm talking about the "show aperture library" option.  any ideas?  thanks in advance.

    the only app i know of to view the aperture library is when i sync my iphone in itunes.  and surprise, under the photo syncing tab, it is the same issue.  i see my entire aperture library, but none of the photo or projects i've added to aperture since the date of my lion update.  is lion storing photos in a new location possibly?  thanks

  • Nested XML and attributes

    Hi all,
    Not sure if this is me doing things wrong, or a bug.
    XML:
    <schedules>
    <entry>
    <groupTitle group="test">Nice Test
    Title</groupTitle>
    <type>testtype</type>
    <items qty="2">
    <item>number 1</item>
    <item>number 2</item>
    </items>
    </entry>
    </schedules>
    I have two datasets:
    ds1 = new...XMLDataSet ("data/data.xml", "schedules/entry");
    ds2 = new...NestedXMLDataSet(ds1, "items/item");
    Everything seems to work fine except for accessing the @qty
    attribute for items. From reading the docs on datasets, I should be
    able to access that using {ds2::@qty} I believe ?
    If I add a @qty attribute to <entry> as a test, I can
    access that via {ds1::@qty}, or if I change ds2's XPath to just
    "items" then I can access it through {ds2::@qty} ... but then
    repeat on ds2 doesnt step through the child items.
    Am I doing something wrong or is there a bug accessing
    attributes on nested xml datasets ?
    Thanks in advance as always!
    Regards
    Dave

    Hi Dave,
    to access the @qty attribute, you don't need to create a
    nested data set. You can add a sub -path for the XML data set.
    The code should look like this:
    var ds1 = new Spry.Data.XMLDataSet("test.xml",
    "/schedules/entry", {subPaths: "items"});
    <div spry:region="ds1">
    <ul spry:repeat="ds1">
    <li>{items/@qty}</li>
    </ul>
    </div>
    Diana

  • How can I see my iCloud content?

    How can I see my iCloud content?

    You can't see items contained in an iCloud backup, you can only restore it to your device.  (The apps are actually redownloaded from the App store when you restore that backup.)
    Did you restore her iCloud backup to her new phone?

  • 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:)

  • Create xml file with nested internla table or with header & item tables

    Hi I have a requirement like, I need to create an xml file for header and item details. For 1 header there may be multiple line items.
    I did search in forums some where I came to know that we can use XSL:IF to achieve this. but I could not able to do this.
    I tried with using nested internal tables also but now luck.
    can anybody please suggest how can we create xml for header and item detials.
    <xsl:transform version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:sap="http://www.sap.com/sapxsl"
      xmlns:asx="http://www.sap.com/abapxml"
      exclude-result-prefixes="asx"
    >
    <xsl:template match="/">
      <OrbisomRequest>
        <xsl:attribute name="Version">
          <xsl:value-of select="11.1"/>
        </xsl:attribute>
        <xsl:attribute name="IssuerID">
          <xsl:value-of select="1"/>
        </xsl:attribute>
        <xsl:for-each select="asx:abap[1]/asx:values[1]/T_FINAL[1]/*">
    <CreateApprovedPurchaseRequest
           RerquestID="{VBLNR}"
           CommonName="User1"
           Amount="{WRBTR}"
           Comment="TestComment"
           CurrencyCode="978"
           PurchaseType="All"
           SupplierName="All"
           VCardAlias="PurchaseCard"
           ValidFrom="1M"
           CurrencyType="B">
                    <CDFs>
                      <Invoice> <xsl:value-of select="BELNR"/> </Invoice>
                      <Amount> <xsl:value-of select="WRBTR"/> </Amount>
                    </CDFs>
          </CreateApprovedPurchaseRequest>
        </xsl:for-each>
      </OrbisomRequest>
    </xsl:template>
    </xsl:transform>
    here belnr and wrbtr will be my item details. for each payment document I can have multiple invoices. in CDF I need to display the invoices for that particular payment document.
    what conditions can I put there before CDFs to make the item internal table to loop based on header internal table.
    Regards,
    Ranganadh.

    Looks like you have already created the transformation "Z_ID"
    Take a look at the following thread, it answers many of the questions you have asked:
    [ABAP data to XML conv with UTF-8 encoding and custom namespace|Re: ABAP data to XML conv with UTF-8 encoding and custom namespace;
    Che

  • Can't see conflicts item in iSync menu

    Hello,
    I am using OS X in Swedish, which probably means I will not use the exact English terms in my question - apologies!
    I have a Nokia N73 which I have been syncronizing with iCal, using bluetooth/iSync 3.0.2. Now changes I make to the phone calender aren't transferred when I sync. I can't understand why, but wonder if it has something to do with the principles for resolving conflicts between the two. I am now trying to view the "conflicts" item in iSync, but can't find it. The "show status" box is checked, but I still can't see a "conflicts" menu item. What am I doing wrong? Any suggestions? This is soooo frustrating, any help would be greatly appreciated!
    Many thanks,
    Helena

    This is for PE4, so things might be slightly different in other versions. In the main tab area, make sure you are in Edit. Then below, click on the Project tab. Your Assets will display there. Exactly how they display will depend on your display settings. If it has been Imported, it should appear there.
    Now, with Menus with Motion Backgrounds, remember that there is a 30 sec. max limit to the Duration of a Menu in PE (do not know if it was bumped up in PE7). When I create a Motion Background AV, I do so on a Sequence in PrPro2. PE does not have Sequences (kind of like mini-Projects), so if I were using PE, I'd do a separate Project and would edit my Motion Background to fit, then Export as a DV-AVI Type II, for Import into my Project. With PrPro and Encore (my authoring program), there is a 40 Duration limit, and that is what I do. I also Export my Audio as an elemental stream, rather than use a muxed AV file, and Export these separately, then Import them separately into Encore. Now, I do not know if PE automatically truncates the Duration of the Motion Background Asset to 30 sec., of if one needs to do this separately. Steve, or Robert can fill in that blank for you. However, my method should work fine, but might include an extra step, if PE does the trimming automatically.
    Now, if you are using an AV Asset from the Template list, you will probably have to Import that separately, as I do not think that PE uses the .EM format, that links Menus (.PSD's) and other Assets for Motion Backgrounds (.WMV, .MPEG, .MOV, or other). Again, one of the PE experts can tell you about that.
    Good luck,
    Hunt

Maybe you are looking for