You are herePojoPanels and Dialogs

PojoPanels and Dialogs


By luano - Posted on 21 October 2008

PojoPanels can now be nested within dialogs using Aria's PojoDialog class. For example:>/p>

 

EditAccountDetails accDetailsDialog = (EditAccountDetails)PojoDialog.createDialog(
    EditAccountDetails.class,
    PojoDialog.READ_ACTION, 
    "pojo/currentAccountDTO", 
    "Account details" );

accDetailsDialog.setLogo( "hands.gif" );
accDetailsDialog.setViewFile( "views/accounts" );
accDetailsDialog.showDialog( this );

int status = Dialog.getLastReturnValue();
if ( status == Dialog.OK_CLICKED ) { 
  ...
}

 

The view file is a collection of presentation attributes. Using a view allows the same POJOs to be presented in different ways for, say, different users or different situations.

Create a dialog from the Generic PojoDialog

The above creates a dialog for the pojo, nesting a panel within the dialog and providing some basic CRUD operation support. The dialog uses a PojoDialogTemplate.xml file so that the appearance of the dialog can be fine tuned for individual applications.