Setting Widget State in Master


#1

I’m using a master to show a left menu for a web application.

For purposes of maintainability, I want to keep the main functionality in several separate Axure pages, rather than a single page with a single dynamic navigation function.

The menu has up to two levels;

  1. the Level 1 menu tiles either open pages, or
  2. open a Level 2 submenu (a dynamic panel within the master) with tiles that open pages on click.

Now: OnClick of a Level 1 tile that loads a page, I want to set the tile to a “Selected” state. That’s working just fine.

OnClick of a Level 2 tile, I want to set both the Level 2 and parent Level 1 tile to “Selected”.

So here’s the problem.

Everything works fine - until the user clicks on a Level 2 menu item on Page A that opens Page B. On Page B, I want to load the menu to the state in which it’d appear in the app - with the associated Level 1 and Level 2 menus selected.

And I can not get the Level 1 tile to load as set to Selected.

I’ve tried:

  • OnPageLoad, firing the OnClick for the Level 1 and Level 2 controls
  • OnPageLoad, setting the Level 1 and Level 2 controls to “Selected” (and opening the dynamic panel with the Level 2 tiles in them)
  • Sacrificing a goat

And I can not get the Level 1 tiles to load selected.

This seems like it should be simpler - but do I have to raise the Click or Select events in the master so pages can use them? (I’ve never used raised events, so this’ll be a new one).

I COULD send out an RP if needed, although I’ll have to greek it up.

Thanks in advance.

(Before anyone asks - the Level 1 tiles are in their own selection group; each group of Level 2 tiles has its own Selection Group.)


#2

It might be best if you could upload an .rp file.

Realize that your Master will be set to its default state, layout, etc. each time a page loads, regardless of which page or what happened on previous pages. To track the states of your menus across pages, you will need to use a global variable or two. You can use the Selected event of your menu items to set the value of global variable(s). Then, in the Page Loaded event of the Master, set up conditions to test the value of the global variable(s) and set the menu states and selections accordingly.


#3

Yeah, the more I think about it the more I realize it’s going to involve 2-3 global variables.

I"m going to see if I can do this without having to sanitize an RP - but I may just do that.

Thanks!


closed #4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.