Compiere 3.1

org.compiere.intf
Interface WindowImplIntf

All Known Implementing Classes:
SampleWindowImpl

public interface WindowImplIntf

This is the interface to implement when you want to create a custom Form for the web UI.

Note that the class that implements this interface needs to have a constructor accepting the parameters (int windowNO, Ctx serverCtx, WindowCtx windowCtx, UWindowID uid), since this is the constructor that the class loading system will look for using the Java reflection API.

Once the class is created, the fully qualified Java class name needs to be specified in AD_Form.WebClassname for the appropriate record.

Author:
gwu

Method Summary
 WindowVO.ClientWindowType getClientWindowType()
          Implement this method to indicate the type of client-side UI that should be used to render this window.
 ArrayList<ComponentImplIntf> getComponents()
           
 Box getLayout()
          Implement this method to return a custom layout for the components.
 String getName()
          Implement this method to return the translated name for the window.
 ChangeVO processCallback(String sender)
          This method allows the WindowImplIntf to handle callbacks from the client.
 void validateResponse(ResponseVO responseVO)
          This method provides a mechanism for the server-side code to signal errors or warnings to the client upon the initial loading of the window.
 

Method Detail

getComponents

ArrayList<ComponentImplIntf> getComponents()
Returns:
The list of ComponentImplIntf objects that handle the data retrieval for each component in the window.

processCallback

ChangeVO processCallback(String sender)
This method allows the WindowImplIntf to handle callbacks from the client. By default, the fields that are buttons or have FieldVO.isImpactsValue = true will automatically trigger a callback to this method to allow server-side processing, e.g. dynamically changing the window layout, or perform database operations.

Parameters:
sender - The name of the field that initiated the callback.
Returns:
The ChangeVO indicating the types of changes that should be reflected in the client UI, e.g. changed field values, message pop-ups, new window layouts, etc.

getName

String getName()
Implement this method to return the translated name for the window. The language should be identified via the Ctx object passed in through the constructor.

Returns:
The translated name of the window, or null to not display the name.

validateResponse

void validateResponse(ResponseVO responseVO)
This method provides a mechanism for the server-side code to signal errors or warnings to the client upon the initial loading of the window. This is done by calling ResponseVO.addError() or ResponseVO.addWarning() if error conditions are detected. Note that if you want to use this method for validation during processCallback(), you need to call this method explicitly yourself.

Parameters:
responseVO - The ResponseVO object that will be passed back to the client.

getLayout

Box getLayout()
Implement this method to return a custom layout for the components. Note that this layout mechanism is currently only supported for client window type of GENERIC_STACK.

Returns:
The layout specified using the Box model, or null to use the default layout.

getClientWindowType

WindowVO.ClientWindowType getClientWindowType()
Implement this method to indicate the type of client-side UI that should be used to render this window. Only GENERIC_STACK is officially supported for 3rd party custom windows in this release.

Returns:
The client window type, or null to use the default.

Compiere 3.1

Compiere® is a registered trademark of ComPiere, Inc. ©2004-2008 HumanFlash.com All rights reserved.