Spry data region to display multiple data sources

I'm developing an interactive menu using the Spry and Ajax framework that lists the menu items on the left (in a Spry accordion) to a corresponding image and description on the right. I have the basic functionality working, however, my menu items are broken into sub categories, and I can't seem to get my detail region to display attributes for more than 1 ds.
My current status is here: http://bit.ly/PUG1y
As you can see, my menu is broken into sections; i.e. Tapas, Pizzas, Entrees...etc. The Tapas secion works perfectly, and the Pizza section appears correctly on the left. However, I cannot get the detail region on the right to link to both Tapas and Pizzas. Right now I am trying to use separate XML files for each category, but could see my XML looking like this:
<?xml version="1.0" encoding="UTF-8"?>
<menu>
  <tapas>
       <item>
          <name>Fresh Tilapia Dip</name>
          <title>Fresh Tilapia Dip</title>
          <image>../one0one/images/food/crab_cakes.jpg</image>
          <desc>Mesquite Smoked Fresh Fish w/ Tortilla Chips and Pickled Jalapenos $6.99</desc>
       </item>
       <item>
            <name>Jamaican Jerk Chicken Satay</name>
          <title>Jamaican Jerk Chicken Satay</title>
          <image>../one0one/images/food/satay.jpg</image>
          <desc>Served with Pineapple Chutney w/ 101’s Spicy Tartar. $9.99</desc>
       </item>
    </tapas>
    <pizzas>
       <item>
               <name>Pizza1</name>
               <title>Pizza1</title>
               <image>img.jpg</image>
               <desc>description</desc>
       </item>                     
    </pizzas>
</menu>
I do not know how to set up the Spry regions to get this to work.  This seems like it should be pretty straightforward, but I have not had a lot of experience using Spry. What is the easiest/best practice method to get this to work correctly? Thanks for your help.

I feel your pain... I was JUST running into the same issue and debated on using a similar menu for the restaurant site I did.
Anyhow, here's how you do it. I solved it with this answer here: SOLVED: Multiple Data Sets (renamed)
You can reference the source code here. Data Set Shell with Accordion
The skinny version goes like this: You take your multiple data sets and combine them into one "Shell" using SpryDataSetShell.js
Copy that to your Spry Assets folder and link to it alnog with your Accordian JS files.
<script src="../../includes/SpryDataSetShell.js" type="text/javascript"></script>
create a shell of all your datasets.
var DATASET_2 = new Spry.Data.HTMLDataSet("../link_to_dataset", "Event_Table");
var NEW_DATASET_SHELL = new Spry.Data.DataSetShell(dataMay);
Then substitute your NEW_DATASET_SHELL in your code for the detail on the right
<div spry:detailregion="NEW_DATASET_SHELL" class="YourContainer">
Create an OnClick call in your accordian menu on the left...
<div class="AccordionPanelContent" spry:region="DATASET_1"><p spry:repeat="DATASET_1" spry:setrow="DATASET_1" onclick="NEW_DATASET_SHELL.setInternalDataSet(DATASET_1, true);">{item} {item}</p></div>
Do that for each of your accordian panels... Good Luck. Let me know if you need anything else.

Similar Messages

  • Target Spry RowID on page with Multiple data sets from another page

    Hi all,
    I am trying to target a specific data item, on a page with
    multiple data sets, from a link on another page. (I also have to
    pass the link through Flash, but lets start with the simple
    part...)
    You can take a look at the site in progress here:
    http://www.3andband.com/TestSite/iframeTest3.html
    From the Home page I want to link to specific news or concert
    items on the News page
    I have been trying to get SpryURLUtils to do it but I can't
    seem to get it working.
    Any help would be greatly appreciated.
    Thanks!
    Ben

    did u try if it even passes the row value?? with a simple
    alert? alert(params.row)
    Also maby u need to reorder the scripts to this;
    <script src="../SpryAssets/SpryURLUtils.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/SpryCollapsiblePanel.js"
    type="text/javascript"></script>
    <script src="../SpryAssets/SpryEffects.js"
    type="text/javascript"></script>
    <script src="../SpryAssets/SpryAccordion.js"
    type="text/javascript"></script>
    and your js script
    var params = Spry.Utils.getLocationParamsAsObject();
    var dsConcerts = new
    Spry.Data.XMLDataSet("includes/concerts.xml", "Concerts/concert");
    dsConcerts.setColumnType("image", "image");
    var dsNews = new Spry.Data.XMLDataSet("includes/news.xml",
    "News/item");
    //Set an observer so that when the data is loaded, we update
    the current row to the url param value
    dsNews.addObserver({ onPostLoad: function(ds, type) {
    dsNews.setCurrentRow(params.row); }
    function MM_effectBlind(targetElement, duration, from, to,
    toggle)
    Spry.Effect.DoBlind(targetElement, {duration: duration,
    from: from, to: to, toggle: toggle});
    So url params get loaded before the data

  • How to display multiple data from different table in one table? please help

    Hi
    I got sun java studio creator 2(the separate installation not the one in the net beans)....
    My question is about displaying data that have been taken from the database.... I know how to display data in a table(just click on the table "bind data" )... but my question is that:
    when i want to use a sql statement that taken the data from different table...
    how can i display that data in the table(that will be shown in the web) ??? when i click bind data on the table i can only select one table i can't select more than one....
    Note:
    1) i'm using the rowset for displaying the data in the table, since the sql statement is depending on a condition(i.e. select a from b where c= ? )...
    2) i mean by different table is that( i.e. select a from table1,table2 )..
    thanks in advance...

    Hi,
    937440 wrote:
    Hi every one, this is my first post in this portal. Welcome to the forum!
    Be sure to read the forum FAQ {message:id=9360002}
    I want display the details of emp table.. for that I am using this SQL statement.
    select * from emp where mgr=nvl(:mgr,mgr);
    when I give the input as 7698 it is displaying the corresponding records... and also when I won't give any input then it is displaying all the records except the mgr with null values.
    1)I want to display all the records when I won't give any input including nulls
    2)I want to display all the records who's mgr is null
    Is there any way to incorporate to include all these in a single query..It's a little unclear what you're asking.
    The following query always includes rows where mgr is NULL, and when the bind variable :mgr is NULL, it displays all rows:
    SELECT  *
    FROM     emp
    WHERE     LNNVL (mgr != :mgr)
    ;That is, when :mgr = 7698, it displays 6 rows, and when :mgr is NULL it displays 14 rows (assuming you're using the Oracle-supplied scott.emp table).
    The following query includes rows where mgr is NULL only when the bind variable :mgr is NULL, in which case it displays all rows:
    SELECT     *
    FROM     emp
    WHERE     :mgr     = mgr
    OR       :mgr       IS NULL
    ;When :mgr = 7698, this displays 5 rows, and when :mgr is NULL it displays 14 rows.
    The following query includes rows where mgr is NULL only when the bind variab;e :mgr is NULL, in which case it displays only the rows where mgr is NULL. That is, it treats NULL as a value:
    SELECT     *
    FROM     emp
    WHERE     DECODE ( mgr
                , :mgr, 'OK'
                )     = 'OK'
    ;When :mgr = 7698, this displays 5 rows, and when :mgr is NULL, it displays 1 row.

  • How to count occurences of a certain string in incoming real-time data? Also displaying RTC data. Current VI included

    I use LabView student Express 7 on a Windows XP system.
    Time-frame: we are doing final integrations for our balloon experiment today. We just got told that the press wants to view real-time data, which we haven't programmed for. I need help to get a working VI at the latest by 25.02.2004 before 0800(morning) (GMT+1).
    Note on license
    It is a student balloon flight, and the data will not be used in scientific work, so the I am not breaking any license agreements (I hope).
    Problem synopsis:
    The balloon continually transmits data at 9600baud. The data is a semi-repeating header followed by a constant lenght data-package arranged like this:
    BEXUS[h][m][s]BEXUS[h][m][s]
    [Raw binary data, 7channels*8sub-channels*8bits]
    What the groundstation is doing right now:
    Take all incomming data and save (append) the data to a file without any data-handling. (We figured we would go post-processing).
    What I need to change in less than 24 hours:
    - Add a "package" counter
    - Add a display of the clock data (RTC)
    How I planned to implement the changes:
    -RTC display:
    The RTC data is in BCD format, since that means that if you look at the data as hex numbers, you get the hours and minutes and seconds out in "clear text". That is 12 hours is 0x12hex. I figured that I can do a match pattern BEXUS and pass the "after substring" to another match pattern BEXUS from which I feed the "before substring" to a type-cast VI (casting string to u8) and displaying that, which should give me a display of "123000" for the time 12:30:00... I couldn't get it to work at all when I tried out the supplied "beta" vi.
    - Package counter:
    Counting how many BEXUS that gets detected and dividing by 2. I don't know how to do this. I've looked on the forum (a good thread on the problem: "how do I count the number of *'s in a string") but these use either loops or arrays... and I'm not sure how this works when I'm getting the data in at realtime. I cant make an array and then count it, since then the array would grow fast and possibly interfere with saving of the data??? Saving the data is critical.. without that file we cant do post-processing.
    Since my time is so limited (I'm not even supposed to do the groundstation software but they called on me in the last minute because no-one else had time/wanted too/could do it) I hope that you could make an exception and provide me with working VI's (based on the one I have attached) so that I can show something to the press! (Free comercial for NI!! Since the student version shows the National Instruments water-mark on all VI's!!! Possible TV time!!)
    Thanks!
    PS: even if you are to late (after 25) post anyway!
    Why:
    -I can learn from it
    -the launch might be delayed due to weather conditions
    -others might find it amusing!
    Thanks again!
    Attachments:
    BexusII_groundstation.vi ‏46 KB

    I have a valid example data file attached to this thread.
    If you open BEXTEST.bin in a hex-editor of your choice, you'll see the BEXUS as 42 45 58 55 53 and then the time as 00 28 09 etc.
    I couldn't get Joe Guo's VI to work. It doesn't count packages correctly, and the time is not displayed correctly either.
    The file was saved using a straight save to file VI.
    The data is from actual launching area tests performed a few mintues ago. The time displayed is "On time" e.g. how long the gondola has been powered up.
    I have a spare T-junction, so I can hook into the balloon real-time data as we fly, in case anyone care to see if they can figure out why the latest version of Joe Guo's program is not displaying correctly.
    I will monitor this
    thread during and after flight to see if anyone can make it in time!
    Thanks for the great effort!!
    Attachments:
    bextest.bin ‏53 KB

  • Need inputs how to extract data to BI in multiple Data packets from ECC

    HI Experts,
    would like to know how can i restrict  the data to be fetched in multiple data packets as of now all  the data is coming in to BI in a single data packet....
    I want to get this data in multiple data packets.
    I have checked the infopackage settings  in BI its as similar to any other Infopackage  which is fetching  in multiple data packets.
    Is there any posibility to restrict data with in ECC

    Hussein,
    Thank you for the helpfull information.
    That document gave me lot of information about ANSI extract for BENIFITS.
    Thanks
    Kumar.

  • How to display multiple data range by using variable?

    Hi experts,
         How do I set a variable at EPM add-in for Excel for dynamic display two year's data? just like as below:
    ***User will execute this report from BPC web(work list).
    user input => 2006
    Report display 2006 and 2007 data
    user input => 2008
    Report display 2008 and 2009 data
    I know if we use BPC 7.5 we can config this by Excel formula, How do I set this function on EPM add-in 10.0?
    best regards,
    Evans.

    I think you can effectively do that using EPMOlapmember function...Just follow :-
    2013.TOTAL <----  EPMContextMember(,"TIME","LEVEL = YEAR")
    2012.TOTAL <----  EPMMemberOffset(,C2,-1)
    2013.DEC    <----  LEFT($C$2,4)&".DEC"
    Similarly 2012.DEC  <----  LEFT($D$3,4)&".DEC"
    Projection & Actual are hard coded in Cell F2 and F3 respectively...
    Then you keep the "ACTIVE MEMBER RECOGNITION" as ON...
    Use the OLAP Member function ..as shown in the screen shot for all the 12 months..

  • Displaying multiple data sets on a single chart.

    I am collecting data from 5 identical stations. There is not enough room to display 5 charts on my screen so I have set up a station selection drop down so the user can determine which set of data is displayed.
    My problem is that I don't know the best way to store the data in the background. I need to store something like the last 500 data points for each station.

    Hi;
    LabVIEW automatically allocate memory for your data in the program, which mean that while the program is running you can think that your data can temporarely be stored in the wires of your code
    To see what I mean, check the attached vi. It allows you to select which waveform to display in the chart, which look like it "stays" in the border of the while loop. This is just a "quick & dirty" solution. Because are only 500 points per station, it should not be too much problem.
    Another q&d way to do something similar is by using local variables.
    To store the data indefinively, consider saving it in a spreadsheet-style file.
    Regards;
    Enrique
    www.vartortech.com
    Attachments:
    Select_source.vi ‏48 KB

  • Master data from combination of multiple system source

    Hi All,
    We have a situation wherein we have to load master data from 2 different source systems. For the same Business areas ( Ex. SD, FI, etc). with most probably with same values. Since the master data is overwrite, the last load value will only be available.
    Please help me out in the precautions / design change need to be done in the existing system.
    Regards,
    N P Reddy

    Hi NPR,
    For this the recommended scenario is using Source System Compounding for the InfoObjects. See here for full info:
    http://help.sap.com/saphelp_nw04/helpdata/en/80/1a6399e07211d2acb80000e829fbfe/content.htm
    Hope this helps...

  • SNP Planned order START date should be displayed in DATA VIEW

    Hello Guru's
    I have a very complex requirement. It is as follows
    We are using heuristics and capacity leveling for our requirement. We generally see the planned orders in the SNP view but here additional requirement is that we have to see the start date of the production planned in the date view, ie the client would like to know when the actual production starts and wants to see the quantity produced on the first day in the date view.
    In capacity view,we can observe the resource load which is the start date of the production planned, this load is in percentage now do i related that into quanitity and even if we do related that percentage in quantity then how do i see it the SNP data view plan.

    Hi Sriuppa,
    you can use receipts view /sapapo/rrp4 transaction where you can see receipts. This transactions offers you the selection based on  product,source,target,dates,resource and you will get the list of orders.
    Secondly ,if you right click in the receipts cell,select display details,it will show you order details at the bottom of the data view.
    Please let me know if it helps
    Thanks
    Amit

  • Conversion from date to number & display a date in a textfield

    I Have 2 issues
    The first one:
    I need to extract the hour from a date variable.
    This is the code I already have:
    NUM_TOT := NUM_TEL + to_number('PROGRAMMINGS1.PRG_START','hh24');
    NUM_TOT & NUM_TEL are number variables,
    PROGRAMMINGS1.PRG_START is a Textfiel with a dateformat. There can only be an houre like 24:59:00 entered.
    So in this example I just want the houre and convert it to a number.
    The second:
    I want to make a date from a few numbers & then display it in a texfield.
    This is the code I already have:
    VAR_DATE := NUM_TEL || ':' || NUM_LENGTH || ':00';
    :PROGRAMMINGS.PRG_END := to_date(VAR_DATE,'hh24:mi:ss');
    Between the 2 lines of code i places a message(VAR_DATE) for testing.
    When the program display VAR_DATE then i can see the good date at the bottom of the screen.
    But when I place my variable in the textfield it looks like: 00:00:00. What am I doing wrong?
    Who can help me.
    With regards
    Stefanie

    Verdi wrote:
    Problem: During the conversion (both implicit and explicit conversion with a format mask) I lose the "00" hours and "00" minutes and receive something like this: "10-JAN-13 *12*.00.00.000000000 AM".I don't think you are necessarily losing any information whatsoever. It's probably more of a function of your NLS_TIMESTAMP_FORMAT and NLS_DATE_FORMAT. For example your NLS_DATE_FORMAT could be setup by default for a HH24 (24 hour time) which would report midnight as "00" hours. However, it looks like your NLS_TIMESTAMP_FORMAT is setup with a "HH" format with a meridian indicator which means 12 hours time.
    Your comparisons should be using date/timestamp data types anyways so as long as the input value is converted properly into a date type this shouldn't matter anyways.
    You can see what is actually stored by using the DUMP function:
    SQL> SELECT  DUMP(TO_TIMESTAMP(TO_CHAR(TRUNC(SYSDATE,'DD'),'MM/DD/YYYY HH:MI:SS AM'))) AS TSTAMP
      2  ,       DUMP(TRUNC(SYSDATE,'DD')) AS DT
      3  FROM DUAL
      4  /
    TSTAMP                                                                      DT
    Typ=187 Len=20: 218,7,1,13,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0                  Typ=13 Len=8: 218,7,1,13,0,0,0,0As you can see the TSTAMP and DT store nearly the same values (218,7,1,13), but the TSTAMP has more precision because of fractional seconds.
    HTH!
    Edited by: Centinul on Jan 13, 2010 7:23 AM

  • How to add new data entry and display old data in the same screen in SM30?

    Hi, Experts:
    We need to use SM30 to maintain a table entry. When I click the button of "New Entries", the table screen becomes blank. I can only add new data but not be able to see the old data existing in the table.
    How can I have the new line available for me to add new data at the same time see the data currently existing in the table?
    Thanks,
    Jenny

    Hi, thanks for the reply!
    Just to follow up for what we did to disable the delete function for maintaining table records. We hided the Delete button by adding a "MODULE disable_delete" code in Screen Painter. So now only adding records to the table is allowed.
    Thanks,
    Jenny

  • Multiple data sources with UME

    Hi,
    I want to run several (web) applications on my SAP WebAS. And these applications should have different user stores. That is, one should be a database, one a SAP ABAP System and another should be another ABAP System.
    How can I configure the UME correctly?
    Do I have to configure different data sources? Or do I have to write my own loginmodules?
    And what's the situation if I have WebDynpro Apps? There I cannot use custom loginmodules, can I?
    In the SAP Library it says that "UME can be configured to read and write user-related data from and to multiple data sources".
    http://help.sap.com/saphelp_nw04/helpdata/en/e5/618a3eacd49076e10000000a114084/frameset.htm
    Any hints?
    Best regards,
    Kilian.

    Hi Michael, hi John,
    All these 3 apps are independent, i.e. they have different users no "overlapping" users. We need for every independent, homogeneous group of users an own user store.
    As John stated, we can edit a UME configuration XML file and define multiple data sources in it. However, this is still a server-wide user store.
    Is there no way to assign an application to a user store or a UME data source and not have a server-wide user store?
    And if not where can I get a description of these "initial namespace-attribute-value triples" mentioned in the SAP Library on User-Based Data Partitioning (see http://help.sap.com/saphelp_nw04/helpdata/en/cd/eafc3f8fc2c542e10000000a1550b0/content.htm).
    Many thanks,
    Kilian

  • Multiple Data Columns in one report column

    How do I list multiple columns returned from a select vertically within one report column. For instance, I have three statuses for a project that I want to list, I'd like to list the three statuses within one status column. I remember seeing this somewhere but cannot find it now. Example:
    Status Column
    Budget: Green
    Schedule: Red
    Issues: Yellow

    additionally you could use HTML expressions. When editing your report, click on the column you want to use for displaying multiple data columns. This will take you to the report columns attributes page, there you can type in something like the following into the HTML expression field, referencing other report columns using #COLUMN_NAME# substitutions:
    #BUDGET#
    #SCHEDULE#
    #ISSUES#
    this is assuming your column aliases are named BUDGET, SCHEDULE and ISSUES. You can then just hide the columns that you don't want to see because the data is already shown using the HTML expression.
    Regards,
    Marc

  • SQL Calendar using multiple date columns

    Is there any way to have a Calendar look at more than one date column? I know that it is possible to have the calendar based on a range/interval, but I need to display multiple date columns e.g. Marketing Start Date and Sales Start Date. In the Calendar component it seems possible to only choose one 'Date Column'. Has anyone come across this or know of any workaround?

    Is there any way to have a Calendar look at more than one date column? I know that it is possible to have the calendar based on a range/interval, but I need to display multiple date columns e.g. Marketing Start Date and Sales Start Date. In the Calendar component it seems possible to only choose one 'Date Column'. Has anyone come across this or know of any workaround?

  • Javascript for multiple date fields

    Hi all-
    I have to write javascript for 15 different date fields in a form.
    The requirement here is that we convert all date fields on Page 100 from date pickers (editable date fields) to display-only date fields with two controls for the users to set the date.
    If the field is empty (no date registered yet), there will be a green checkmark(X). When the user clicks this checkmark, the current date is entered into the field.
    If the field is not empty (there is a date already in the system), there will be a red X. When the user click this red X, the date from the date field is removed.
    The javascript I am using here is
    </script>
    <script type="text/javascript">
         function init(){
              var datePickerVal = $v2('P100_TODAYS_DATE');
              if(datePickerVal){
                   $x_Show('ToggleDateR');
                   $x_Hide('ToggleDateG');
              }else{
                   $x_Hide('ToggleDateR');
                   $x_Show('ToggleDateG');
         function toggleDateFunc(pValue){
              var sysDate = $v2('P100_DATE');
              if(pValue == 'R'){
                   $x_Hide('ToggleDateR');
                   $x_Show('ToggleDateG');
                   $x_Value('P100_TODAYS_DATE','');
              }else if(pValue == 'G'){
                   $x_Show('ToggleDateR');
                   $x_Hide('ToggleDateG');
                   $x_Value('P100_TODAYS_DATE',sysDate);
         window.onload = init;
    </script>
    This javascript is working for one date field( 'P100_TODAYS_DATE') but i have 15 different date fields in this page(100) all should have same funtionality. Please help me out how to write a logic to use this function for all the date fields.
    Thanks,(apex 3.2)
    Greenhorn
    Edited by: Greenhorn on Jul 19, 2011 12:30 PM

    Hi,
    You can do the needful by re-using the code if you can give the item names as P8_DATE1, P8_DATE_hh1, P8_DATE2, P8_DATEhh2 etc..So your item name just differs by a sequence.
    Now you write function which will return desired date value taking above items as input. Pass item names to this function, get session state using APEX_UTIL.GET_SESSION_STATE('item_name') API.
    Now modify you code as
    FOR i IN 1..30
    LOOP
    v_date_array[i] = f_get_date('P8_DATE'||i, 'P8_DATEhh'||i);
    END LOOP;
    ....Now you have all date valus in array. Just write one update as follows
    UPDATE  TABLE1
    SET date1 = my_date_array[1], date2 = my_date_array[2]..
    WHERE ....Hope it helps :)
    Cheers,
    Hari

Maybe you are looking for

  • Java.lang.NoSuchMethodException: com.sun.mail.imap.IMAPStore.

    All: I have completed the following: 1. Downloaded the JavaMail 1.4.2 API. 2. From this downloaded API I had extracted the mail.jar file (timestamp 2009-02-26 13:28) to my C:\Program Files\Tomcat 6.0\lib directory 3. Downloaded the jaf-1_0_2-upd2 API

  • Updated to newest iTunes version, now it won't recognize my iPhone.

    Hey everyone. Was just looking for some tips or added feedback for an issue I'm having. I went to do the iOS7 update for my iPhone 4. My iTunes told me that I had to have the "Newest Version of iTunes (11.1.whatever) to update to iOS 7, Do you want t

  • Still the same DSL/Intern​et break-ups

    well according to forum Tonya answered me in a private message..and problem resolved NOT UH okay where? it says problem resolved, I DON'T THINK SO, still losing internet  constantly, the lights on the modem always going off, in fact tried sending thi

  • Bogus web site pops up in FireFox tabs during use

    I recently had some virus problems on my computer. I erased some registry entries, and Trend Micro confirmed that my virus problems were solved. However, shortly afterwards, tabs unexpectedly pop up in my FireFox browser. They all open to the same we

  • Idoc or trfc error

    Hi sap bw'iets can any one describe step-by-step process to sloving IDOC or TRFC ERROR  in production support. thank you. regards, kiran