faqts : Computers : Management Systems : TCSI : Catalant : GUI Development

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

5 of 9 people (56%) answered Yes
Recently 1 of 4 people (25%) answered Yes

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.