public void loadData(boolean forceReload) { ICFFreeSwitchSchemaObj schemaObj = swingSchema.getSchema(); if ((containingCluster == null) || forceReload) { CFSecurityAuthorization auth = schemaObj.getAuthorization(); long containingClusterId = auth.getSecClusterId(); containingCluster = schemaObj.getClusterTableObj().readClusterByIdIdx(containingClusterId); } if ((listOfTenant == null) || forceReload) { arrayOfTenant = null; listOfTenant = schemaObj .getTenantTableObj() .readTenantByClusterIdx(containingCluster.getRequiredId(), swingIsInitializing); if (listOfTenant != null) { Object objArray[] = listOfTenant.toArray(); if (objArray != null) { int len = objArray.length; arrayOfTenant = new ICFSecurityTenantObj[len]; for (int i = 0; i < len; i++) { arrayOfTenant[i] = (ICFSecurityTenantObj) objArray[i]; } Arrays.sort(arrayOfTenant, compareTenantByQualName); } } } }
public void actionPerformed(ActionEvent e) { final String S_ProcName = "actionPerformed"; Container cont; JDesktopPane desktop; ICFDbTestSchemaObj schemaObj = swingSchema.getSchema(); ICFSecurityTSecGroupObj focus = getSwingFocusAsTSecGroup(); ICFSecurityTSecGroupEditObj editObj = (ICFSecurityTSecGroupEditObj) focus.getEdit(); if (editObj != null) { focus = editObj; } ICFDbTestTenantObj referencedObj = (ICFDbTestTenantObj) focus.getRequiredContainerTenant(swingIsInitializing); java.util.List<ICFSecurityTenantObj> listOfTenant = null; CFSecurityAuthorization auth = schemaObj.getAuthorization(); long containingClusterId = auth.getSecClusterId(); listOfTenant = schemaObj.getTenantTableObj().readTenantByClusterIdx(containingClusterId); if (listOfTenant == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 0, "listOfTenant"); } Collection<ICFSecurityTenantObj> cltn = listOfTenant; JInternalFrame frame = swingSchema .getTenantFactory() .newPickerJInternalFrame( referencedObj, null, cltn, new CallbackTSecGroupTenantChosen()); ((ICFDbTestSwingTenantJPanelCommon) frame).setPanelMode(CFJPanel.PanelMode.View); cont = getParent(); while ((cont != null) && (!(cont instanceof JInternalFrame))) { cont = cont.getParent(); } if (cont != null) { JInternalFrame myInternalFrame = (JInternalFrame) cont; myInternalFrame.getDesktopPane().add(frame); frame.setVisible(true); frame.show(); } }