Dojo Menu.showing

Synopsis

Showing determines whether or not a component is visible. A page element that is not showing has its css display style set to none; it is still a part of the DOM model of the page, but no longer affects the layout of other components.

Uncheck the checkbox to make this widget invisible. A widget that is not showing can still be selected by navigating to that widget in the model tree and clicking it.

Bind to a boolean value You can also bind the "showing" property to any boolean value, for example you can use this to toggle whether a button shows based on whether a datagrid row is selected.

To do this, open the bind dialog for the "showing" property and and select the "advanced" radio button to bring up the advanced binding editor. Now traverse the widget tree to find the datagrid.emptySelection property and bind to that. It will look something like this

datagrid.emptySelection

Note that the simple binding works when you want to the "showing" property to be true when a row is selected in the datagrid. What about setting the showing property to true when the datagrid is not selected?

For this, you need to open the bind dialog for the "showing" property and select the "expression" radio button to bring up the expression editor. In the expression editor, enter something like the following:

!${datagrid.emptySelection}

Use within the javascript editor

this.<UniqueID>.setShowing(true)

Details

No details yet


      Share/Bookmark
© 2010 WaveMaker Software™ All Rights Reserved.