Entry
Creating custom GUI CREATE dialogs using NVL only.
Oct 14th, 2004 07:30
Kalu Ral, Rathindra Guha, http://www.consolidate-loan-student.com , http://www.0-apr-credit-card.biz , http://www.clearpathoverseas.com
The current mechanism to create a containee is thru the defination of
an
OerationsDef as below.
com.cpi.jweaver.meta.OperationDef operationDef {
String name create#fmtoPort
String displayName "Custom Port Creation"
}
where fmtoPort is the containee to create.
The problem here is the Create dialog box that appears will require a
value for ALL the fmtoPort attribute, where else, only a subset of
those
attributes need to be populated to create a new instance of fmtoPort.
To circumvent this problem, define the OperationDef as follows:
com.cpi.jweaver.meta.OperationDef operationDef {
String name create#fmtoPortCreate <-- Notice this change.
String displayName "Custom Port Creation"
}
Consequently, create a new NVL file for fmtoPortCreate.nvl, which
represent the new dialog.
Create fmtoPortCreate.nvl.
NVL fmtoPortCreate
com.cpi.jweaver.meta.ClassDef fmtoPortCreate {
String name "fmtoPortCreate" <- Note this difference.
String displayName "Port"
String className "fmtoPort"
String tableName "FMTOPORTTABLE81"
String superClassName fmtoTerminationPoint
String namingAttr "cmbsRelatable::name"
String title "Port"
int width 380
int height 270
// Attribute Entries (excluding RO attributes)
// visible for Create dialog ONLY!!
com.cpi.jweaver.meta.Attribute attribute {
//Attribute Body
}
}
Voila, now when you invoke the operation from within the UI, the
appropriate dialog is created, prompting only for RC (Read Create
attributes) that you specified ONLY.