7.1.2 ButtonStateQuery event
This event occurs when the application JSP file calls methods
isButtonEnabled
or
getButtonState
.
getButtonState
, which works just like
isButtonEnabled
but returns string value DISABLED if the
button is disabled. For example:
demoLabTestBean.isButtonEnabled("80001","Edit")
returns true, if button
Edit
is enabled. This checking can be intercepted by adding a
ButtonStateQuery
event to the server application object (just like previous
action
event):
void this_buttonStateQuery(ButtonEvent e) {
if (e.getButton().equals("Edit")) {
e.setState(false);
e.consume();
}
}
This code prevents
Edit
button from being enabled ever. Note that on some platforms (Netscape
browsers, mostly) the DISABLED tag does not seem to function and thus the button is not disabled.
7.1.3 Connection status events
Three kinds of events are fired depending on the change of the server application status:
connected
is fired when the server application is connected to a FileMan database.
connection_failed
is fired when the server application tried to connect to a FileMan database, but
failed.
disconnected
is fired when the server application is disconnected from a FileMan database.
7.1.4 Parse event
Parse event occurs when a data holder object is being parsed into HTML INPUT element. Custom
information, such as JavaScript can be added to the element during the event. For example, for a usual text
field (represented by TextHolder), the event could look like:
void this_parse(ParserEvent e) {
if (e.getSource() instanceof xfij.holder.TextHolder)
e.setText(e.getText() + " READONLY");
}
Now every text holder is marked as READONLY on the HTML form. Please note that in the event the
getText()
method returns something like:
getSource()
method returns the holder object that is being parsed.
25
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