Package org.adempiere.webui.info
Class RelatedInfoWindow
java.lang.Object
org.adempiere.webui.info.RelatedInfoWindow
- All Implemented Interfaces:
org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>,org.zkoss.zul.ext.Sortable<Object>
public class RelatedInfoWindow
extends Object
implements org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>, org.zkoss.zul.ext.Sortable<Object>
Related info window implementation (AD_InfoRelated)
- Author:
- hengsin
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected CLoggerprotected intprotected org.zkoss.zul.Paging -
Constructor Summary
ConstructorsConstructorDescriptionRelatedInfoWindow(EmbedWinInfo info, InfoWindow infoWindow, org.zkoss.zul.Paging embeddedPaging, String infoSqlCount, ColumnInfo[] layoutEmbedded, Map<String, WEditor> editorMap) -
Method Summary
Modifier and TypeMethodDescriptionprotected intprotected intgetSortDirection(Comparator<Object> cmpr) voidonEvent(org.zkoss.zk.ui.event.Event event) voidRefresh info windowvoidsort(Comparator<Object> cmpr, boolean ascending) protected voidAfter query from database, validate paging.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.zkoss.zul.ext.Sortable
sort
-
Field Details
-
paging
protected org.zkoss.zul.Paging paging -
editorMap
-
log
-
numPagePreLoad
protected int numPagePreLoad -
isHasNextPage
protected boolean isHasNextPage
-
-
Constructor Details
-
RelatedInfoWindow
public RelatedInfoWindow(EmbedWinInfo info, InfoWindow infoWindow, org.zkoss.zul.Paging embeddedPaging, String infoSqlCount, ColumnInfo[] layoutEmbedded, Map<String, WEditor> editorMap) - Parameters:
info-infoWindow-embeddedPaging-infoSqlCount-layoutEmbedded-editorMap-
-
-
Method Details
-
refresh
Refresh info window- Parameters:
id- id from parent info window
-
onEvent
- Specified by:
onEventin interfaceorg.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>- Throws:
Exception
-
getCacheStart
protected int getCacheStart()- Returns:
- the cacheStart index
-
getCacheEnd
protected int getCacheEnd()- Returns:
- the cacheEnd index
-
sort
- Specified by:
sortin interfaceorg.zkoss.zul.ext.Sortable<Object>
-
getSortDirection
- Specified by:
getSortDirectionin interfaceorg.zkoss.zul.ext.Sortable<Object>
-
validateEndPage
protected void validateEndPage()After query from database, validate paging.
If end page included in cache, calculate record total.
If current page is out of cache (no record is query), process query count to detect end page
-