Class SweetDevRia.Menu
Extends
RiaComponent, RiaComponent.
Defined in: Menu.js.
Constructor Attributes | Constructor Name and Description |
---|---|
SweetDevRia.Menu(id)
This is the Menu component class
|
Field Attributes | Field Name and Description |
---|---|
<static> |
SweetDevRia.Menu.HIDE_EVENT
This event type is fired when hide the context menu
|
<static> |
SweetDevRia.Menu.HIDE_ITEM_EVENT
This event type is fired when the item menu is hided
|
<static> |
SweetDevRia.Menu.SHOW_ITEM_EVENT
This event type is fired when the item menu is showed
|
Method Attributes | Method Name and Description |
---|---|
addItem(item)
Add an menuitem to this menu
|
|
This method is called after Hide the context menu To be overriden !!
|
|
afterHideItem(String)
This method is called after hiding an item of the menu To be overriden !!
|
|
afterShowItem(String)
This method is called after showing an item of the menu To be overriden !!
|
|
This method is called before Hide the context menu To be overriden !!
|
|
beforeHideItem(String)
This method is called before hiding an item of the menu To be overriden !!
|
|
beforeShowItem(String)
This method is called before showing an item of the menu To be overriden !!
|
|
getIndex(itemId)
return the index of the item (witch id is itemId) in the menu items array.
|
|
getItem(itemId)
return the item witch id is itemId, in the menu itemsarray.
|
|
<private> |
getItems()
Return the rendering string of subitems
|
<private> |
hasItems()
Test if this menu has sub items
|
hide()
Hide the menu
|
|
<private> |
iconView()
Return the associated html element which contains the image
|
This method is called automatically by the framework at the page load.
|
|
nextItem(itemId)
return the next item of the one witch id is itemId, in the menu items array.
|
|
previousItem(itemId)
return the previous item of the one witch id is itemId, in the menu items array.
|
|
selectItem(doFocus, doUnselectSonAndBrother)
Select a item menu
BE CARREFULL: Here select an item does not valid it.
|
|
selectNextItem(itemId)
Select next item in the parent menu items array.
|
|
selectPreviousItem(itemId)
Select previous item in the parent menu items array.
|
|
unselectItem(doUnselectSonAndBrother)
Unselect a item menu
|
|
<private> |
view()
Return the associated html element
|
Class Detail
SweetDevRia.Menu(id)
This is the Menu component class
- Parameters:
- {String} id
- Identifiant of this Menu
Field Detail
<static>
SweetDevRia.Menu.HIDE_EVENT
This event type is fired when hide the context menu
<static>
SweetDevRia.Menu.HIDE_ITEM_EVENT
This event type is fired when the item menu is hided
<static>
SweetDevRia.Menu.SHOW_ITEM_EVENT
This event type is fired when the item menu is showed
Method Detail
addItem(item)
Add an menuitem to this menu
- Parameters:
- {MenuItem} item
- MenuItem to add
afterHide()
This method is called after Hide the context menu To be overriden !!
afterHideItem(String)
This method is called after hiding an item of the menu To be overriden !!
- Parameters:
- String
- itemId The id of the menu item
afterShowItem(String)
This method is called after showing an item of the menu To be overriden !!
- Parameters:
- String
- itemId The id of the menu item
{boolean}
beforeHide()
This method is called before Hide the context menu To be overriden !!
- Returns:
- True if this method can be called, else false.
{boolean}
beforeHideItem(String)
This method is called before hiding an item of the menu To be overriden !!
- Parameters:
- String
- itemId The id of the menu item
- Returns:
- True if this method can be called, else false.
{boolean}
beforeShowItem(String)
This method is called before showing an item of the menu To be overriden !!
- Parameters:
- String
- itemId The id of the menu item
- Returns:
- True if this method can be called, else false.
getIndex(itemId)
return the index of the item (witch id is itemId) in the menu items array.
- Parameters:
- itemId
- the item id
getItem(itemId)
return the item witch id is itemId, in the menu itemsarray.
- Parameters:
- itemId
- the item id
<private>
{String}
getItems()
Return the rendering string of subitems
- Returns:
- rendering string of subitems
<private>
{boolean}
hasItems()
Test if this menu has sub items
- Returns:
- true if this menu has sub items, else false
hide()
Hide the menu
<private>
{HtmlElement}
iconView()
Return the associated html element which contains the image
- Returns:
- the associated html element which contains the image
initialize()
This method is called automatically by the framework at the page load.
nextItem(itemId)
return the next item of the one witch id is itemId, in the menu items array.
- Parameters:
- itemId
- the item id
previousItem(itemId)
return the previous item of the one witch id is itemId, in the menu items array.
- Parameters:
- itemId
- the item id
selectItem(doFocus, doUnselectSonAndBrother)
Select a item menu
BE CARREFULL: Here select an item does not valid it. To valid it, you have to click on it or press Enter
- Parameters:
- doFocus
- doUnselectSonAndBrother
selectNextItem(itemId)
Select next item in the parent menu items array.
- Parameters:
- itemId
- the item id
selectPreviousItem(itemId)
Select previous item in the parent menu items array.
- Parameters:
- itemId
- the item id
unselectItem(doUnselectSonAndBrother)
Unselect a item menu
- Parameters:
- doUnselectSonAndBrother
<private>
{HtmlElement}
view()
Return the associated html element
- Returns:
- the html element view associated wit this menu