public void deleteServiceTypeByIdIdx(int ServiceTypeId) { CFSecurityServiceTypePKey pkey = ((ICFAccSchema) schema.getBackingStore()).getFactoryServiceType().newPKey(); pkey.setRequiredServiceTypeId(ServiceTypeId); ICFSecurityServiceTypeObj obj = readServiceType(pkey); if (obj != null) { ICFSecurityServiceTypeEditObj editObj = (ICFSecurityServiceTypeEditObj) obj.getEdit(); boolean editStarted; if (editObj == null) { editObj = (ICFSecurityServiceTypeEditObj) obj.beginEdit(); if (editObj != null) { editStarted = true; } else { editStarted = false; } } else { editStarted = false; } if (editObj != null) { editObj.delete(); if (editStarted) { editObj.endEdit(); } } obj.forget(true); } }
public void actionPerformed(ActionEvent e) { final String S_ProcName = "actionPerformed"; ICFSecurityServiceTypeObj focus = getSwingFocusAsServiceType(); if (focus != null) { ICFInternetServiceTypeEditObj editObj = (ICFInternetServiceTypeEditObj) (focus.getEdit()); if (editObj != null) { setPanelMode(CFJPanel.PanelMode.Update); } else { throw CFLib.getDefaultExceptionFactory() .newUsageException( getClass(), S_ProcName, "Cannot save on object that isn't being edited"); } } try { setClosed(true); } catch (Exception x) { } }
public void actionPerformed(ActionEvent e) { ICFSecurityServiceTypeObj focus = getSwingFocusAsServiceType(); if (focus != null) { ICFInternetServiceTypeEditObj editObj = (ICFInternetServiceTypeEditObj) focus.getEdit(); if (editObj != null) { if (editObj.getIsNew()) { editObj.endEdit(); setSwingFocus(null); setPanelMode(CFJPanel.PanelMode.Unknown); } else { editObj.endEdit(); setPanelMode(CFJPanel.PanelMode.View); } } } try { setClosed(true); } catch (Exception x) { } }