Adempiere 3.5.2a

org.adempiere.webui.panel
Class InfoPanel

java.lang.Object
  extended by org.zkoss.zk.ui.AbstractComponent
      extended by org.zkoss.zk.ui.HtmlBasedComponent
          extended by org.zkoss.zul.impl.XulElement
              extended by org.zkoss.zul.Window
                  extended by org.adempiere.webui.component.Window
                      extended by org.adempiere.webui.panel.InfoPanel
All Implemented Interfaces:
Serializable, Cloneable, WTableModelListener, Component, EventListener, IdSpace, ComponentCtrl
Direct Known Subclasses:
InfoAssetPanel, InfoAssignmentPanel, InfoBPartnerPanel, InfoCashLinePanel, InfoGeneralPanel, InfoInOutPanel, InfoInvoicePanel, InfoOrderPanel, InfoPaymentPanel, InfoProductPanel

public abstract class InfoPanel
extends Window
implements EventListener, WTableModelListener

Search Information and return selection - Base Class. Based on Info written by Jorg Janke

Author:
Sendy Yagambrum
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.zkoss.zul.Window
Window.ExtraCtrl
 
Field Summary
protected  ConfirmPanel confirmPanel
           
protected  WListbox contentPanel
           
protected  CLogger log
          Logger
protected  String p_keyColumn
          Key Column Name
protected  ColumnInfo[] p_layout
          Layout of Grid
protected  boolean p_loadedOK
          Loading success indicator
protected  boolean p_multipleSelection
          Enable more than one selection
protected  String p_tableName
          Table Name
protected  String p_whereClause
          Initial WHERE Clause
protected  int p_WindowNo
          Master (owning) Window
protected  WStatusBar statusBar
           
 
Fields inherited from class org.adempiere.webui.component.Window
MODE_EMBEDDED, MODE_MODAL, MODE_OVERLAPPED, MODE_POPUP
 
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
RS_NO_DISPLAY, RS_NO_HEIGHT, RS_NO_WIDTH
 
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
 
Constructor Summary
protected InfoPanel(int WindowNo, String tableName, String keyColumn, boolean multipleSelection, String whereClause)
          Detail Constructor
 
Method Summary
 void addValueChangeListener(ValueChangeListener listener)
           
static InfoPanel create(int WindowNo, String tableName, String keyColumn, String value, boolean multiSelection, String whereClause)
           
 void dispose(boolean ok)
          Dispose and save Selection
protected  void executeQuery()
          Execute Query
 void fireValueChange(ValueChangeEvent event)
           
protected  int getAD_Window_ID(String tableName, boolean isSOTrx)
          Get Zoom Window
 Vector<String> getColumnHeader(ColumnInfo[] p_layout)
           
 String[] getEvents()
           
 Object getSelectedKey()
          Get (first) selected Key
 Object[] getSelectedKeys()
          Get selected Keys
protected  Integer getSelectedRowKey()
          Get the key of currently selected row
 String getSelectedSQL()
          Get where clause for (first) selected key
 boolean isCancelled()
          Is cancelled?
 boolean loadedOK()
          Loaded correctly
 void onEvent(Event event)
           
protected  void prepareTable(ColumnInfo[] layout, String from, String where, String orderBy)
           
protected  void renderItems()
           
protected  void saveSelection()
          Save Selection - Called by dispose
 void setStatusDB(String text)
          Set Status DB
 void setStatusLine(String text, boolean error)
          Set Status Line
static void showAsset(int WindowNo)
          Show Asset Info (non modal)
static void showAssignment(int WindowNo, String value)
          Show Assignment Info (non modal)
static void showBPartner(int WindowNo)
          Show BPartner Info (non modal)
static void showCashLine(int WindowNo, String value)
          Show Cash Line Info (non modal)
static void showInOut(int WindowNo, String value)
          Show Shipment Info (non modal)
static void showInvoice(int WindowNo, String value)
          Show Invoice Info (non modal)
static void showOrder(int WindowNo, String value)
          Show Order Info (non modal)
static void showPayment(int WindowNo, String value)
          Show Payment Info (non modal)
static void showProduct(int WindowNo)
          Show Product Info (non modal)
 void zoom()
           
 
Methods inherited from class org.zkoss.zul.Window
clone, doEmbedded, doHighlighted, doModal, doOverlapped, doPopup, getBorder, getCaption, getContentSclass, getContentStyle, getDefaultActionOnShow, getMode, getOuterAttrs, getPosition, getRealStyle, getSclass, getTitle, getTitleSclass, inEmbedded, inHighlighted, inModal, inOverlapped, inPopup, insertBefore, isClosable, isSizable, newExtraCtrl, onChildRemoved, onClose, onModal, setBorder, setClosable, setContentSclass, setContentStyle, setDefaultActionOnShow, setDraggable, setMode, setMode, setPage, setParent, setPosition, setSclass, setSizable, setTitle, setVisible
 
Methods inherited from class org.zkoss.zul.impl.XulElement
getAction, getActionAttrs, getAllOnClickAttrs, getContext, getCtrlKeys, getInnerAttrs, getPopup, getTooltip, setAction, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip
 
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
focus, getAllOnClickAttrs, getDraggable, getDroppable, getHeight, getLeft, getRealSclass, getRealStyleFlags, getStyle, getTooltiptext, getTop, getWidth, getZIndex, setClass, setDroppable, setFocus, setHeight, setLeft, setStyle, setTooltiptext, setTop, setWidth, setZIndex
 
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addEventHandler, addEventListener, addForward, addForward, addForward, addForward, addMoved, addSharedAnnotationMap, addSharedEventHandlerMap, appendAsapAttr, appendAsapAttr, appendChild, applyProperties, containsVariable, detach, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttributes, getAttributes, getChildren, getCommand, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getExtraCtrl, getFellow, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getMoldURI, getNamespace, getNextSibling, getPage, getParent, getPreviousSibling, getPropagatee, getRoot, getSpaceOwner, getUuid, getVariable, invalidate, isAsapRequired, isChildable, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onDrawNewChild, onPageAttached, onPageDetached, onWrongValue, redraw, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, response, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setComponentDefinition, setId, setMold, setPageBefore, setVariable, smartUpdate, smartUpdate, smartUpdate, smartUpdateDeferred, smartUpdateValues, toString, unsetVariable
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.adempiere.webui.event.WTableModelListener
tableChanged
 
Methods inherited from interface org.zkoss.zk.ui.IdSpace
getFellow, getFellowIfAny, getFellows
 

Field Detail

confirmPanel

protected ConfirmPanel confirmPanel

p_WindowNo

protected int p_WindowNo
Master (owning) Window


p_tableName

protected String p_tableName
Table Name


p_keyColumn

protected String p_keyColumn
Key Column Name


p_multipleSelection

protected boolean p_multipleSelection
Enable more than one selection


p_whereClause

protected String p_whereClause
Initial WHERE Clause


statusBar

protected WStatusBar statusBar

p_layout

protected ColumnInfo[] p_layout
Layout of Grid


p_loadedOK

protected boolean p_loadedOK
Loading success indicator


log

protected CLogger log
Logger


contentPanel

protected WListbox contentPanel
Constructor Detail

InfoPanel

protected InfoPanel(int WindowNo,
                    String tableName,
                    String keyColumn,
                    boolean multipleSelection,
                    String whereClause)
Detail Constructor

Parameters:
WindowNo - WindowNo
tableName - tableName
keyColumn - keyColumn
whereClause - whereClause
Method Detail

create

public static InfoPanel create(int WindowNo,
                               String tableName,
                               String keyColumn,
                               String value,
                               boolean multiSelection,
                               String whereClause)

showBPartner

public static void showBPartner(int WindowNo)
Show BPartner Info (non modal)

Parameters:
WindowNo - window no

showAsset

public static void showAsset(int WindowNo)
Show Asset Info (non modal)

Parameters:
frame - Parent Frame
WindowNo - window no

showProduct

public static void showProduct(int WindowNo)
Show Product Info (non modal)

Parameters:
frame - Parent Frame
WindowNo - window no

showOrder

public static void showOrder(int WindowNo,
                             String value)
Show Order Info (non modal)

Parameters:
frame - Parent Frame
WindowNo - window no
value - query value

showInvoice

public static void showInvoice(int WindowNo,
                               String value)
Show Invoice Info (non modal)

Parameters:
frame - Parent Frame
WindowNo - window no
value - query value

showInOut

public static void showInOut(int WindowNo,
                             String value)
Show Shipment Info (non modal)

Parameters:
frame - Parent Frame
WindowNo - window no
value - query value

showPayment

public static void showPayment(int WindowNo,
                               String value)
Show Payment Info (non modal)

Parameters:
frame - Parent Frame
WindowNo - window no
value - query value

showCashLine

public static void showCashLine(int WindowNo,
                                String value)
Show Cash Line Info (non modal)

Parameters:
frame - Parent Frame
WindowNo - window no
value - query value

showAssignment

public static void showAssignment(int WindowNo,
                                  String value)
Show Assignment Info (non modal)

Parameters:
frame - Parent Frame
WindowNo - window no
value - query value

loadedOK

public boolean loadedOK()
Loaded correctly

Returns:
true if loaded OK

setStatusLine

public void setStatusLine(String text,
                          boolean error)
Set Status Line

Parameters:
text - text
error - error

setStatusDB

public void setStatusDB(String text)
Set Status DB

Parameters:
text - text

prepareTable

protected void prepareTable(ColumnInfo[] layout,
                            String from,
                            String where,
                            String orderBy)

executeQuery

protected void executeQuery()
Execute Query


renderItems

protected void renderItems()

getColumnHeader

public Vector<String> getColumnHeader(ColumnInfo[] p_layout)

saveSelection

protected void saveSelection()
Save Selection - Called by dispose


getSelectedRowKey

protected Integer getSelectedRowKey()
Get the key of currently selected row

Returns:
selected key

getSelectedKeys

public Object[] getSelectedKeys()
Get selected Keys

Returns:
selected keys (Integers)

getSelectedKey

public Object getSelectedKey()
Get (first) selected Key

Returns:
selected key

isCancelled

public boolean isCancelled()
Is cancelled? - if pressed Cancel = true - if pressed OK or window closed = false

Returns:
true if cancelled

getSelectedSQL

public String getSelectedSQL()
Get where clause for (first) selected key

Returns:
WHERE Clause

getEvents

public String[] getEvents()

getAD_Window_ID

protected int getAD_Window_ID(String tableName,
                              boolean isSOTrx)
Get Zoom Window

Parameters:
tableName - table name
isSOTrx - sales trx
Returns:
AD_Window_ID

onEvent

public void onEvent(Event event)
Specified by:
onEvent in interface EventListener

zoom

public void zoom()

addValueChangeListener

public void addValueChangeListener(ValueChangeListener listener)

fireValueChange

public void fireValueChange(ValueChangeEvent event)

dispose

public void dispose(boolean ok)
Dispose and save Selection

Parameters:
ok - OK pressed

Adempiere 3.5.2a

Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.