Loading ...
Sorry, an error occurred while loading the content.

19437Re: Application Style Menu Bar issues

Expand Messages
  • allanbjork
    Oct 10 9:17 AM
    • 0 Attachment
      --- In ydn-javascript@yahoogroups.com, "allanbjork" <abjork@...>
      > Ok, I figured this out.
      > If a call to getItems returned a zero length array, I would need to
      > operate directly on the itemData array. (Is that because the menus
      > were marked lazyLoad:true?)
      > By directly manipulating the itemData array, I could modify my
      > after doing my database queries. (At least adding items, and
      > the disable flag work. Still writing the code to try removing
      > from the menus.)

      Removing items this way does work, but you have to always delete
      the element from itemData, even if getItems followed by a call to
      removeItem works. Otherwise, once removeItem pulls the last menu
      entry off, the menu will get repopulated with the data present in

      YUI devs: could I suggest that a future version of the menu, be
      adjusted so that it when getItems/addItem/removeItem/etc. are called
      it simultaneously adjusts itemData as well? I think that would be
      more logical, and intuitive behaviour to YUI application developers.
      (And would also make my code a lot cleaner. ;-) )
    • Show all 6 messages in this topic