|
jACOB 2.7 API Documentation. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectEventHandler
de.tif.jacob.screen.event.GuiEventHandler
de.tif.jacob.screen.event.IGroupMemberEventHandler
de.tif.jacob.screen.event.IActionButtonEventHandler
public abstract class IActionButtonEventHandler
Abstract event handler class for action buttons, i.e search, new, delete and update buttons. Derived implementations of this event handler class have to be used to "hook" application-specific business logic to action buttons.
| Field Summary | |
|---|---|
static java.lang.String |
RCS_ID
The internal revision control system id. |
static java.lang.String |
RCS_REV
The internal revision control system id in short form. |
| Constructor Summary | |
|---|---|
IActionButtonEventHandler()
|
|
| Method Summary | |
|---|---|
abstract boolean |
beforeAction(IClientContext context,
IActionEmitter button)
This event method will be called, if the corresponding button has been pressed. |
void |
onError(IClientContext context,
IGuiElement button,
java.lang.Exception reason)
This event method will be called, if the execution of the action fails by any reason. |
abstract void |
onSuccess(IClientContext context,
IGuiElement button)
This event method will be called, if the action has been successfully executed. |
| Methods inherited from class de.tif.jacob.screen.event.IGroupMemberEventHandler |
|---|
onGroupStatusChanged, onHide, onShow |
| Methods inherited from class de.tif.jacob.screen.event.GuiEventHandler |
|---|
alert, alert, alert |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final transient java.lang.String RCS_ID
public static final transient java.lang.String RCS_REV
| Constructor Detail |
|---|
public IActionButtonEventHandler()
| Method Detail |
|---|
public abstract boolean beforeAction(IClientContext context,
IActionEmitter button)
throws java.lang.Exception
false. Nevertheless, you should inform the user by means of
a proper notification, e.g. create and show a message dialog.
context - The current context of the applicationbutton - The action button (the emitter of the event)
false, if you want to avoid the execution of
the action else return true.
java.lang.Exception
public abstract void onSuccess(IClientContext context,
IGuiElement button)
throws java.lang.Exception
Note for new buttons: You can use this method to initialize or reset GUI
input fields which are connected to a data field after a new record action
has been performed. Nevertheless, you should do this by modifying the data
fields of the selected record instead of modifying the GUI field directly.
The later has no effect, since the application server will update
the GUI fields according to the values of the respective data fields after
this method has been invoked.
Example:
public void onSuccess(IClientContext context, IGuiElement button) throws Exception
{
// clear generated project number which might still be set by previous (template) record
IDataTableRecord currentRecord = context.getSelectedRecord();
currentRecord.setValue(currentRecord.getCurrentTransaction(), "projectnumber", null);
}
instead of
public void onSuccess(IClientContext context, IGuiElement button) throws Exception
{
// clear generated project number which might still be set by previous (template) record
context.getGroup().setInputFieldValue("salesprojectProjectnumber", "");
}
context - The current context of the applicationbutton - The action button (the emitter of the event)
java.lang.Exception - If an exception is thrown,
onError(IClientContext, IGuiElement, Exception) will be
called as well.
public void onError(IClientContext context,
IGuiElement button,
java.lang.Exception reason)
context - The current context of the applicationbutton - The action button (the emitter of the event)reason - The reason why the action has failed
|
jACOB 2.7 API Documentation. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||