Menus, NestedXMLDataSet and detailregion

www.nurseryabingercommon.org
is using a simple xml dataset for proof of concept (see below) and
SpryNestedXMLDataSet.js - version 0.4 - Spry Pre-Release 1.6.
Testing is being performed with IE7
www.nurseryabingercommon.org
is based on the Adobe nested XML dataset and menubar example with
the addition of the selection updating a detailregion. The results
of selecting items from the sub-menus are anomalous. An example
problem is after opening the page, a selection of 'Item 2.B' from
the sub-menu causes the detailregion to display 'content 2.A'
instead of 'content 2.B' (the correct association). If then 'Item
2.B' is reselected the correct result is obtained ('content 2.B' is
displayed), but then further selections on the other menus provide
incorrect updates of the detailregion.
I've tried tracking through the row requests through the code
to obtain the result, but I don't have enough background knowledge
of the code's design concepts to properly understand the processing
path and then to be able to generate a solution.
Any ideas or help is gratefully appreciated.
Thanks
Nigel
<?xml version="1.0" encoding="utf-8"?>
<events>
<event>
<heading><![CDATA[<strong>heading
1</strong>]]></heading>
<items>
<content ><![CDATA[<strong>content
1</strong>]]></content>
</items>
</event>
<event>
<heading>heading 2</heading>
<items>
<item >item 2.A</item>
<content >content 2.A</content>
</items>
<items>
<item >item 2.B</item>
<content >content 2.B</content>
</items>
</event>
<event>
<heading>heading 3</heading>
<items>
<item >item 3.a</item>
<content >content 3.A</content>
</items>
<items>
<item >item 3.b</item>
<content >content 3.B</content>
</items>
<items>
<item >item 3.c</item>
<content >content 3.C</content>
</items>
<items>
<item >item 3.d</item>
<content >content 3.D</content>
</items>
</event>
</events>

With further investigation I found the following problem:
When the request for the submenu is made, the new rowID is
initially stored into dsItems.currentDS (dsItems is the
Spry.Data.NestedXMLDataSet object), but then the processing calls
the NestedXMLDataSet function onCurrentRowchanged which nulls the
currentDS and currentDSAncestor and therefore the update
information is lost and the last times value of the rowID is
eventually used. I've made some (ugly) changes to
SpryNestedXMLDataSet.js to overcome this and which are specific to
support the functionality I need. The changes are:
Spry.Data.NestedXMLDataSet = function(parentDataSet, xpath,
options)
this.parentDataSet = parentDataSet;
this.xpath = xpath;
this.nestedDataSets = [];
this.nestedDataSetsHash = {};
this.currentDS = null;
this.currentDSAncestor = null;
this.options = options;
this.ignoreOnDataChanged = false;
this.entityEncodeStrings = parentDataSet ?
parentDataSet.entityEncodeStrings : true;
Spry.Data.DataSet.call(this, options);
parentDataSet.addObserver(this);
this.bufferedNewCurRowID = 0; // added to maintain a record
of a new request
Spry.Data.NestedXMLDataSet.prototype.getNestedDataSetForParentRow
= function(parentRow)
// Return the internal nested data set associated with the
parent's
// specified row object.
var xmlNode = parentRow.ds_XMLNode;
if (xmlNode && this.nestedDataSets)
// Before we go through all of the trouble of looking up the
data set
// we want, check to see if it is already our current data
set!
if (this.currentDSAncestor && this.currentDSAncestor
== xmlNode)
// Retrieve the buffered new row ID
this.currentDS.curRowID = this.bufferedNewCurRowID;
this.bufferedNewCurRowID = 0;
return this.currentDS;
Spry.Data.NestedXMLDataSet.prototype.setCurrentRow =
function(rowID)
if (this.currentDS)
// Buffer the request, as this.currentDS may be destroyed
this.bufferedNewCurRowID = rowID;
return this.currentDS.setCurrentRow(rowID);
The HTML file was modified to complete the reset -
from:
<li spry:repeat="dsNursery" spry:setrow="dsNursery">
<a class="MenuBarItemSubmenu" href="#"
spry:if="{dsItems::ds_RowCount} > 1">{heading}</a>
<a href="#" spry:if="{dsItems::ds_RowCount} ==
1">{heading}</a>
to:
<li spry:repeat="dsNursery" spry:setrow="dsNursery">
<a class="MenuBarItemSubmenu" href="#"
spry:if="{dsItems::ds_RowCount} > 1"
onclick="dsItems.bufferedNewCurRowID = 0;">{heading}</a>
<a href="#" spry:if="{dsItems::ds_RowCount} == 1"
onclick="dsItems.bufferedNewCurRowID =
0;">{heading}</a>

Similar Messages

  • Sql query to list menus, submenus and function-names for all resp

    Hi,
    Please let me know one single sql query to list all the menus, submenus and user-function-names attached for all responsibilities
    Thanks...

    Hi,
    See the following threads.
    How to find All The Responsibilities with a specific Menu
    How to find All The Responsibilities with a specific Menu
    SQL query
    SQL query
    Regards,
    Hussein

  • Responsive Mobile Menus: Open and close on browser, but not in mobile?

    I have two responsive jquery menus I am working with. In the desktop browser they both look and operate fine (full screen and mobile size), but when that same responsive page with menu is viewed on an actual phone (Android and iphone), the menus both: SHOW FULLY OPENED WITH ALL PARENT AND CHILDREN?
    I believe I installed everyting properly (especially since it resizes and works perfect in a normal desk browser) -Dropsdown and Contracts back.
    Does anyone have any experience with this issue (Responsive menus works fine in a desktop browser, but shows completely opened, and will not drop or contract when viewed on an actual mobile phone, like Android or iphone?), and if so any guidance?
    Thanks very much

    Wow, you save me alot of time and headaches. You really know alot and are very helpful and taught me alot. Thank you for helping me, this is my first site I am still trying to build/get up, after years of on-off trying / learning/ abandoning (for other pursuits). This site is really important for me, and would mean alot for me to finally follow through on building.
    Do you know if this forums allows (or do you ever) add friends/contacts so you can message each other? I am somewhat a 'newbie', so I understand if problem, I would not bug/bother you, just curious and fully understand if not. (or do you ever contact via email, website, or other)?
    Also re: Vanilla Testing: I always test all my stuff on a blank HTML page with only the Boilerplate and JS that Dreamweaver provides. I don't know if I have the capability to fully do in something like notepad? Will this method (Boiler, JS, and blank HTML) suffice--No other Scripts--Not even my stylesheet?
    What do you think about this menu. Features seem good, has the most sales, good developer and support?
    http://themes.pixelworkshop.fr/?theme=MegaMenuCompleteSet

  • After the recent update the entire browser, including menus, icons, and everything on the web page, are too small. Fonts are smaller, pics are smaller, zoom settings will not remain universal. Minimum font size will make text readable, but all pics are to

    The new update has screwed up my browser settings, I cannot get them fixed and Im pissed because my computer is an eye-sore to read until this is fixed! EVERYTHING in the browser is smaller, fonts, menus, icons, web page content, pictures, tables, etc. I have set the minimum font in the settings and the text is just to a point where it is easily readable at the maximum size setting, but all the menus and icons are still tiny and hard to read. The last version I had installed worked fine with no add-ons needed. Everything fit the screen fine and was easily readable without modification. I want this version off my PC and I want the last version I had back on but I dont know what version it was!!!!!!! ARARGGGG
    In fact, this stupid troubleshooting window that I am in filling out this form doesnt fit the page right at all, and edges of the text are cut off, so Im not even sure what some of these boxes are asking for!!

    See [[Toolbars and page content appear too large after upgrading to Firefox 3]]
    *Try to adjust the DPI setting, see http://kb.mozillazine.org/layout.css.dpi
    *Try to set the pref layout.css.devPixelsPerPx to 2 on the about:config page.
    To open the ''about:config'' page, type '''about:config''' in the location (address) bar and press the Enter key, just like you type the url of a website to open a website.
    If you see a warning then you can confirm that you want to access that page.
    If you need to increase (or decrease) the font size on websites then look at:
    Default FullZoom Level - https://addons.mozilla.org/firefox/addon/6965
    NoSquint - https://addons.mozilla.org/firefox/addon/2592

  • Moving Menus (video) and custom buttons

    Hi guys,
    A very simple one I am sure but still can't find the right way to do it!
    I have a video BG for my menu, that I have created in After Effects.
    I am trying to add custom shaped buttons W alpha channels to the video BG.
    I have tried to import tga's with Alpha followed multiple posts on the forum, but still haven't been able to do it (And I've been compositing with alpha channels for years)
    To the logical person, I would just drag my graphic shape with it's alpha over my background as a button and set it up for highlights using the inspector; for some reason, when I do that, weird results happen.
    Where am I going wrong?
    ThanX a lot
    JM
    PS- I have to get these menus done by tomorrow morning!
    ThanX

    Any update?
    According to the product page, Adobe Reader is "the only PDF file viewer that can open and interact with all types of PDF content, including forms and multimedia".
    However Adobe Reader on the Android STILL does not support interactive PDFs.

  • Mouse Right Click Menus flash and are hard to read

    I am using Windows 7, and on FF 14.0.1.
    Basically, I am having the exact same issue as is described here:
    https://support.mozilla.org/en-US/questions/753329?as=aaq
    When I right click on menus, or when I go to the Firefox menu, the menu is bordered, but it is transparent. If I click on the location where a menu option is, that option is enabled (open new tab, etc). Or if I use the shortcut key, that also works.
    But it's a big pain.

    Do you use a custom theme or any add-ons that customize menus?
    This was helpful to some users in the other thread: did you try disabling graphics hardware acceleration? Since this feature was added to Firefox, it has gradually improved, but there still are a few glitches.
    You usually need to restart Firefox in order for this to take effect, so save all work first (e.g., mail you are composing, online documents you're editing, etc.).
    orange Firefox button ''or'' classic Tools menu > Options > Advanced
    On the "General" mini-tab, uncheck the box for "Use hardware acceleration when available"
    If you restart Firefox, is the issue resolved?

  • Menus popping and keeping me from clicking/Safari wants login all the time

    I bought this iMac in Jan. I suffered through viruses and hacking with four XP's. I bought a Mac so as to never be in that **** again. Well I've been reading sysprofile logs and watching the records of apps I've never used. Today I saw fax verifications when I've never sent nor received one. My folders and files change all the time. For example, right now my desktop is covered in all the logs I saved and filed in my documents files. When I open them, presto magic, the info I saved has changed to something else. Sometimes as many as 30 files pop open one by one on the desktop while iTunes plays the song Crazy. I am not making this up. Since I am new to iMac I didn't even recognize that someone had used Grab to put a picture of "share folders" with a "start" button in the middle of my desktop and it cannot be deleted. I know you think it's because I'm a novice, but, believe me, I got enough ed with those XP's to work for Microsoft. I called Apple and told them that I either need a white hat hacker or a priest to fix this baby. I mean I don't even know how to begin to tell someone over the phone all the things this crazy machine does. But for now, since I am trying to continue my online biz, I only ask that someone please, for the love of God, tell me 1) how to stop the pop-up menus that keep me from clicking anywhere--the menus don't even make sense or even remotely apply to what I'm doing. It's a pointer fight at every click. I have gone over sys prefs a hundred times. And, 2) how to keep Safari from popping a menu down every few minutes asking for a new kind of named login no matter how I change the keychain. Yes, everything is locked up tight. No one shares or has access to my computer, and yet Big Bang is saying "Goodnight" to me and I've never played it or even knew I had it. I read a lot of pages in this forum and read a lot of familiar sounding stuff. I feel so overwhelmed, disappointed and depressed. Thank you.
    iMac   Mac OS X (10.4.9)   I'm sorry this is long. I feel desperate because you should see the notebooks I already have.

    Andropov14-
    Try unplugging your WiFi router for a few seconds.
    Fred

  • Possible to script palette menus Save and Load Curves?

    Is it possible to script CS4 Photoshop's palette menus? Specifically, the "Save Curves Preset ..." and "Load Curves Preset" ... of the Adjustments Palette.
    I have 600 images, some of which have layer>new adjustment layer>curves applied.
    I want to save the curves using the image name. Later, I want to be able to load the appropriate curve.
    E.g., for image001.tif, the curve would be image001.acv
    (I already have a loop set up to iterate through the files and get the file names.)

    Thank you.
    I got both scripts working without JS or AS errors, but, when trying to load .acv files generated by the second script, CS4 Photoshop gave an error:
    "Could not load the curves because the file is not compatible with this version of Photoshop"
    (The loading script works fine when loading .acv files created directly from Photoshop.)
    The only change I made to your Save Curves code was:
    FROM: var myACV = new File('~/desktop/myCurve.acv')
    TO: var myACV = new File(file);
    and made the code a function:
    saveCurves(file)
    YOUR CODE HERE
    so that I could incorporate it into the Applescript.
    Maybe that was naive (I'm not very knowledgeable about JS).
    Here are the scripts I'm using:
    SAVE CURVES:
    set gammaFolder to "/Users/me/Desktop/myproject/gamma/"
    tell application "Finder"
              set TheFolder to choose folder
              set FileList to every file of entire contents of TheFolder as alias list
    end tell
    repeat with theFile in FileList
              set thefilename to theFile as string
              set text item delimiters to ":"
              set thefilename to last text item of thefilename --remove path
              set text item delimiters to "."
              set thefilename to first text item of thefilename --remove extension
              tell application "Adobe Photoshop CS4"
      activate
      open theFile
                        tell current document
                                  if exists layer "Curves 1" then
                                            set current layer to layer "Curves 1"
                                            do javascript "saveCurves('" & gammaFolder & thefilename & ".acv');
    function saveCurves(file) {
    -- SAVE CURVES JAVASCRIPT HERE
    };" --show debugger on runtime error
                                  end if
                        end tell
              end tell
    end repeat
    LOAD CURVES:
    set gammaFolder to "/Users/me/Desktop/myproject/gamma/"
    tell application "Finder"
              set TheFolder to choose folder
              set FileList to every file of entire contents of TheFolder as alias list
    end tell
    repeat with theFile in FileList
              set thefilename to theFile as string
              set text item delimiters to ":"
              set thefilename to last text item of thefilename --remove path
              set text item delimiters to "."
              set thefilename to first text item of thefilename --remove extension
              set acvFile to gammaFolder & thefilename & ".acv"
              tell application "Finder" to set acvExists to exists my POSIX file acvFile
              if acvExists then
                        tell application "Adobe Photoshop CS4"
      activate
      open theFile
                                  tell current document
                                            if not (exists layer "Curves 1") then
                                                      do action "Create Curve Layer" from "MyActions"
                                            end if
                                            set current layer to layer "Curves 1"
                                            do javascript "loadCurves('" & gammaFolder & thefilename & ".acv');
    function loadCurves(file) {
    -- LOAD CURVES JAVASCRIPT HERE
    };" --show debugger on runtime error
                                  end tell
                        end tell
              end if
    end repeat

  • CS6 Photoshop menus, palettes and UI is blurry

    hi,
    this issue may have already been brought up but i have not been able to find an answer.
    i just installed CS6 photoshop to retina macbook pro and the menus and palettes (the text) are all blurry. any photos i open in photoshop also appear blurry. can someone please help?
    thanks,
    judy

    yes, that was the first thing I did. The maker says he's never seen that issue before and claims that something on my system is conflicting. I checked the Kwik 2 forums, and did a bit of googling and have seen no mention of this issue. Also, the fact that it actually does load and run normally when I log in as a different (newly created) user, further validates his response that it is something specific to my system/user.
    What I'd ideally like to know is, how would I go about troubleshooting this?
    I saw a few Photoshop troubleshoot pages by Adobe, but none have helped. Doesn't PS create a log? Can I start it in "debug" mode for troubleshooting? I've found no documentation on advanced troubleshooting. I did find this in my csxs2-PHXS.log file:
    ERROR EvalScript: Failed to evaluate script for engine <swfpanelengine-Kwik 2-1>
    Not sure what that means or what to do about that.
    Any advanced help?

  • In some sites there are two menus competing and you cannot use the bottom menu

    I have been using The Shopping Channel for years but since I loaded Firefox I cannot open some areas of this website (and other sites). Menus seem to be competing with each other. There is a regular menu below and a bold new menu on top. If I need to look for customer service it is blocked by this bold menu on top.
    I have written to them several times but they claim the problem is at my end.

    If you have increased the minimum font size then try the default setting "none" as a high value can cause issues like you described.
    *Tools > Options > Content : Fonts & Colors > Advanced > Minimum Font Size (none)
    *Tools > Options > Content : Fonts & Colors > Advanced > [X] "Allow pages to choose their own fonts, instead of my selections above"
    Reset the page zoom on pages that cause problems: <b>View > Zoom > Reset</b> (Ctrl+0 (zero); Cmd+0 on Mac)
    *http://kb.mozillazine.org/Zoom_text_of_web_pages
    You can use an extension to set a default font size and page zoom on web pages:
    *Default FullZoom Level: https://addons.mozilla.org/firefox/addon/default-fullzoom-level/
    *NoSquint: https://addons.mozilla.org/firefox/addon/nosquint/

  • How It Was Fixed (Possible Software Bug Not Hardware): Getting the iMac Screen/Menus Garbled and/or Yellow Circle Before Getting Into Finder Issues?

    Hi. Possible fix done to my late- 2009 iMac's screen/graphics issue that may work God willing, hopefully for most [In my case it sometimes had that yellow circle that appears before it goes to the Finder but mostly it was a messed up desktop and menus (unreadable mostly) after months, prayers and weeks of fixing it; recommended to be read entirely first coz' it's a bit complicated (like a lot of subplots). If uncomfortable to try coz' it involved a GPU stress test, contact your authorized Apple service center for their advice]. I had an iMac (late 2009) screen garbling a few hours ago (was weeks ago when it resurfaced until it got worse that it's at every boot on Mavericks):
    †        I booted to Snow Leopard USB external (my back-up OS) drive then run the first    person shooter at redeclipse.net. I set everything to max, including the display, resolution and graphics setting with fullscreen and v-sync on. I then refreshed it which brought it back to normal (I then tested it's stability with GPUTest 0.7 with Furmark for 15 minutes). * if the display options have been set to max before, bring it back to the default then refresh and then max it again Possibly any games that's has the graphic settings (or more advanced) of Red Eclipse could work (other free ones are Xonotic and Open Arena which are based on Quake 1 or 3s engine I believe).
    Optional but not recommended (have warrantied if that's still available or have it repaired at authorized service centers):
    If that doesn't work, review articles and videos on how to open an Intel iMac and get an iPhone/iPad/another way to get to the 'net ready for research (I opened mine very carefully on the right side with a cutter with blade extended far prying it carefully then I inserted a flat end, sturdy plastic used for mixing epoxy then removed the cutter carefully to let the plastic mixing tool do the prying) to see if the cable connected to the logicboard which is on top of, is connected (mine was detached but I'm not sure if the adjusting and tilting of the screen overtime for 2 & 1/2 years, detached it) then do † above again.
    It could to be a software problem, a possible Apple ATI driver bug that takes overtime to surface (2 1/2 years it resurfaced because this started in my case after upgrading to Lion when Apple coded things mostly from the ground up. Snow Leopard didn't have this problem). 
    Thank you for your time. Have a great upcoming sunday mass/great upcoming weekend. I hope this helps.
    God bless, Rev. 21:4, Matt. 16:18

    Does an external display also act in a similar manner as the internal one?
    Some earlier Intel-based iMacs had graphic processor card issues; not sure what
    the symptoms of the majority of them were, but some had odd patterns, others
    went black, and some would range from OK to totally unusable. Among others.
    So there is a chance the graphic processor may be going out; or just the circuitry
    that controls the backlight. An inverter may be weak or other circuit to the display
    could be wearing out.
    http://www.apple.com/retail/geniusbar/
    If you have access to an Apple Store with Genius bar, they can perform some kinds
    of diagnostic tests there even though the computer is out-of-warranty; that may be
    of help to narrow down the cause of the symptoms you've noticed. They may not be
    able to repair it, however, at an Apple Store; as it is rather old by today's standard.
    An Apple Authorized Service Provider could do repairs and testing on older models
    the Apple Store's Genius and other may not be set up to handle due to vintage.
    Find an Apple Authorized Service Provider
    Visit an Apple Retail Store
    There is a country locator page to help find either of the above in regions outside
    of the US & Canada, not sure how the above links would work; and it appears my
    bookmarks to the country locator page may not be accessible now to post here.
    You may be able to get an idea about what kinds of parts support the display
    function by name by looking into an iFixit.com repair guide for your iMac series.
    Hopefully the parts supporting the display are the reason it is dimming down, as
    a graphic processor failure likely would exhibit other behaviors than just dimming.
    PS: I see you've added content to your thread after I'd started working on this
    & the answer likely is a hardware repair; professional testing is worth the time
    and you seem to have at least one other thread on the same topic....
    Good luck & happy computing!
    edited 2x

  • NestedXMLDataSet and Javascript

    I am trying to pass the values of a nested XML data set off
    to a JavaScript function, but I cannot figure out how the format
    would work for the life of me. This is what I am currently trying
    to do.
    var modules = new Spry.Data.XMLDataSet("testData2.xml",
    "form/module");
    var formFields = new Spry.Data.NestedXMLDataSet(modules,
    "field");
    <div spry:region="modules formFields">
    <div spry:repeat="modules">
    <div>{modules::name}</div>
    <div spry:repeat="formFields" id={modules::id}>
    <script type="text/javascript">
    <!--
    window.setTimeout('testFunction(formFields:title,formFields:type)',
    500);
    //-->
    </script>
    </div>
    </div>
    </div>
    Does anyone know an easy way to pass the Spry variable stuff
    into the javascript?
    Alternatively, I was trying to get the dataset into
    javascript by running a var formFieldsData = formFields.getData();,
    but I only get the first set of data, repeated over and over. It
    doesn't seem to want to step through the other iterations of the
    nexted XML dataset.

    Spry doesnt change the scripts that are in the region, it
    just calls them when the region updates it.
    Also, did u try to loop through the nested data that got
    returned by the getData?

  • All drop down menus opens and hides emmideately on ubuntu 14 with touch screen display

    Hi!
    On ubuntu 14 with ViewSonic TD2340 touch monitor ("Advanced Silicon S.A CoolTouch(TM) System" touch panel) all drop down menus in firefox (in other system applications drop down menus works fine) opens and hides emmideately (I can't select any element in it).
    I can't use special system function "Click on Focus", because it is just like double click - drop down menus shows with delay, but it is not real to work in ubuntu - I always have 2 clicks instead 1.

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Mail Won't Open (but menus work and email still being received)

    Hi there,
    I am a leopard (10.5.1) user on a mac book pro 17. No major problems since install until the other day when mail refuses to open up (from dock or via applications). I can access all the menus, see the mail count in the dock and even open a new mail from the menu bar from there but just can't see what my inbox is doing as it won't open up in a screen. It bounces but just won't open up.
    Email is clearly working as its receiving and i can see these if i access via library files.
    Has any one heard of this problem? Have checked the forum and can't see the exact problem there. Do i need to re-install mail? If so, how?
    Many thanks,
    Ben

    thanks very much pascal - appreciate the help.
    i think i'll have to do a custom install from disk. is there anything i need to do/be aware of with the mail folder before i do the install? should i leave it in homefolder/library (once i've backed it up that is)?
    will the new mail app just `talk` to the old mail folder once installed?
    just want to avoid any probs and getting myself into further tangles once i do this.
    thanks very much,
    ben

  • How do I view the Horizontal Scrolling bar and status bar at the bottom of the screen. I can only see the top menus, toolbars and vertical scroll bar?

    Before the most recent upgrade, the bottom horizontal scrolling bar and status bar appeared on my screen. Now since upgrading, I cannot see the. Anyone ideas how to restore them?

    If you haven't already, you could force-quit Quicktime by using the menu option from the desktop (finder) and choose Quicktime.
    Not sure what you have frozen on the screen, be it a failed movie, or some unusual screen shot. If you can find by date (created) you may be able to look for .mov or quicktime suffix name or other video file content to delete it.
    And you may have to restart your computer and perhaps run repair disk permissions from Disk Utility's first aid on the hard disk drive in your computer.
    Not sure if all that would help now, but it is something a few days late...!
    Good luck & happy computing!

Maybe you are looking for