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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
create
(org.zkoss.zk.ui.Component parent) CallrefreshModel()
and layout UI.void
onEvent
(org.zkoss.zk.ui.event.Event event) boolean
onOk
(org.zkoss.zul.Textbox textbox) Handle ON_OK eventvoid
onSearchEcho
(String value) HandleON_SEARCH_ECHO_EVENT
event.void
Populatemodel
fromtree
void
EchoON_SEARCH_ECHO_EVENT
to initial search with value.Select ListItem that comes after the current selected ListItem.Select ListItem that comes before the current selected ListItem.void
Set text to highlightvoid
If 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()Populatemodel
fromtree
-
create
public void create(org.zkoss.zk.ui.Component parent) CallrefreshModel()
and layout UI.- Parameters:
parent
-
-
onEvent
- Specified by:
onEvent
in interfaceorg.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
- Throws:
Exception
-
search
EchoON_SEARCH_ECHO_EVENT
to initial search with value.- Parameters:
value
-
-
onSearchEcho
HandleON_SEARCH_ECHO_EVENT
event.- 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
-
-