Package org.adempiere.webui.apps
Class DocumentSearchController
java.lang.Object
org.adempiere.webui.apps.DocumentSearchController
- All Implemented Interfaces:
org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
public class DocumentSearchController
extends Object
implements org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
- Author:
- hengsin
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classValue class to hold search result -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreate(org.zkoss.zk.ui.Component parent) Createlayoutfor search resultvoidonEvent(org.zkoss.zk.ui.event.Event event) booleanonOk(org.zkoss.zul.Textbox textbox) FindDocumentSearchController.SearchResultlink fromlayoutthat matches text from textbox.protected StringrenderSearchResult(String matchString, String windowName, DocumentSearchController.SearchResult result) Render search result that doesn't use AD_Message_ID formattingvoidEchoON_SEARCH_DOCUMENTS_EVENTwith value as event data.Select and returnDocumentSearchController.SearchResultthat comes after the current selectedDocumentSearchController.SearchResultlink inlayout.Select and returnDocumentSearchController.SearchResultthat comes before the current selectedDocumentSearchController.SearchResultlink inlayout.
-
Constructor Details
-
DocumentSearchController
public DocumentSearchController()default constructor
-
-
Method Details
-
create
public void create(org.zkoss.zk.ui.Component parent) Createlayoutfor search result- Parameters:
parent-
-
search
EchoON_SEARCH_DOCUMENTS_EVENTwith value as event data.- Parameters:
value-
-
renderSearchResult
protected String renderSearchResult(String matchString, String windowName, DocumentSearchController.SearchResult result) Render search result that doesn't use AD_Message_ID formatting- Parameters:
matchString-windowName-result-- Returns:
- window name
-
onEvent
- Specified by:
onEventin interfaceorg.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>- Throws:
Exception
-
onOk
public boolean onOk(org.zkoss.zul.Textbox textbox) FindDocumentSearchController.SearchResultlink fromlayoutthat matches text from textbox.
CalldoZoom(SearchResult)if a match is found.- Parameters:
textbox-- Returns:
- true if a match is found
-
selectPrior
Select and returnDocumentSearchController.SearchResultthat comes before the current selectedDocumentSearchController.SearchResultlink inlayout. -
selectNext
Select and returnDocumentSearchController.SearchResultthat comes after the current selectedDocumentSearchController.SearchResultlink inlayout.
-