-
Notifications
You must be signed in to change notification settings - Fork 17
WApplication
WApplication is the fundamental WComponent of each application. All WComponents in an application are added to WApplication or a descendant of WApplication.
The application's primary UI class should extend WApplication. All other components are then added to this extension of WApplication.
public class MyApp extends WApplication {
// do stuff
}
If the current process is the second or subsequent step of a multi-step process and the first step has not yet been committed to the database then the user should be warned if they invoke a cancel Action such as through WCanceButton or a WMenuItem in the cancel
state. This can be done by setting the WApplication's unsavedChanges
flag:
// assume WApplication application has been instantiated
// to set the unsavedChanges property
application.setUnsavedChanges(true);
// to clear the unsavedChanges property
application.setUnsavedChanges(false);
A WApplication may request that focus is set to a particular component on page load. This is actually done on the component to focus but is submitted to the client on the application. This is set automatically under some conditions.
Default focus is not set directly on an instance of WApplication: the focus request is set by calling .setFocussed()
on the instance of the component to focus. See Setting focus for more information.
WApplication outputs a HTML form element.