application. It is best used when building web services that have no GUI and no
application state.
sessionTimeout
. This property defines the session timeout: If the end user is idle and timeout
occurs, the session is invalidated and the server application discarded.
7.4 Creating custom messages
There are three kinds of messages that the wizard creates support for: Info, print and error messages.
These easiest way to use these messages is setting them in
action
or
buttonStateQuery
events such
as:
void this_action(ActionEvent e) {
if (e.getAction().equals("<<")) {
setInfoMessage( User pressed << button! );
e.consume();
}
Alternatively, you can use
setPrintMessage(String message)
or
setErrorMessage(String
message)
methods.
Now the action is consumed and pressing
<<
button will show a HTML page containing the info text.
Most of the error messages are integrated into the server application skeleton: For example, if there are
erroneus fields when trying to save a record, the error message is created automatically by the call method.
7.5 Creating custom confirmation messages
You can create custom confirmation messages by using
ConfirmState
object in an event:
String message = is this ok? ;
boolean yes = true; boolean no = true;
boolean cancel = false; boolean ignore = false;
setConfirmState(new xfij.core.internal.ConfirmState(message,yes,no,cancel,
ignore) {
public void forwardYes() { /* this happens if user presses ok */ }
public void forwardNo() { /* this happens if user presses no */ }
public void forwardCancel() { /* this happens if user presses cancel */}
public void forwardIgnore() { /* this happens if user presses ignore */}
} );
This is most useful in
action
event. Please note that the server application handles most confirmation
queries automatically. These queries can be activated/deactivated from XfijSource components properties
(showMessages and confirmMessages).
7.6 Using e FixIT focus control methods
The e FixIT application wizard includes some focus control logic in the code creates. The useful functions
are:
setDefaultFocusControl(String focusField_name)
. This method is usually called from the
application JSP. It defines the field that receives focus when the form (HTML page) loads.
27
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved