Package org.adempiere.webui.apps
Class MenuSearchController
java.lang.Object
org.adempiere.webui.apps.MenuSearchController
- All Implemented Interfaces:
org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
public class MenuSearchController
extends Object
implements org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
Controller for search on AD_Menu records.
- Author:
- hengsin
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreate(org.zkoss.zk.ui.Component parent) CallrefreshModel()and layout UI.voidonEvent(org.zkoss.zk.ui.event.Event event) booleanonOk(org.zkoss.zul.Textbox textbox) Handle ON_OK eventvoidonSearchEcho(String value) HandleON_SEARCH_ECHO_EVENTevent.voidPopulatemodelfromtreevoidEchoON_SEARCH_ECHO_EVENTto initial search with value.Select ListItem that comes after the current selected ListItem.Select ListItem that comes before the current selected ListItem.voidSet text to highlightvoidIf there are changes in the recent menu items for user, reload and update menu items model
-
Field Details
-
M_TREE_NODE_ATTR
Component attribute to hold reference ofMTreeNode- See Also:
-
-
Constructor Details
-
MenuSearchController
public MenuSearchController(org.zkoss.zul.Tree tree) - Parameters:
tree- usually the tree instance fromMenuTreePanel
-
-
Method Details
-
updateRecentItems
public void updateRecentItems()If there are changes in the recent menu items for user, reload and update menu items model -
refreshModel
public void refreshModel()Populatemodelfromtree -
create
public void create(org.zkoss.zk.ui.Component parent) CallrefreshModel()and layout UI.- Parameters:
parent-
-
onEvent
- Specified by:
onEventin interfaceorg.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>- Throws:
Exception
-
search
EchoON_SEARCH_ECHO_EVENTto initial search with value.- Parameters:
value-
-
onSearchEcho
HandleON_SEARCH_ECHO_EVENTevent.- Parameters:
value-
-
selectPrior
Select ListItem that comes before the current selected ListItem.- Returns:
- new selected
MenuItem
-
selectNext
Select ListItem that comes after the current selected ListItem.- Returns:
- new selected
MenuItem
-
onOk
public boolean onOk(org.zkoss.zul.Textbox textbox) Handle ON_OK event- Parameters:
textbox-- Returns:
- true if there's partial or exact match for textbox value
-
setHighlightText
Set text to highlight- Parameters:
s-
-