1 16 17 package Raptor.listeners; 18 19 import Jmc.baseGui.*; 20 import Jmc.commonGui.*; 21 import Jmc.baseTools.*; 22 import Jmc.connector.*; 23 24 34 public class createNewFactConf_li implements base_guiListener 35 { 36 public void pcmf_execListener(base_guiObj xParam) throws Exception 37 { 38 base_dialog_if l_br = (base_dialog_if)base_registredObject.pcmf_getObjByName("NewFactConfig_dlg"); 39 String l_cpname = (String )((base_guiObj)base_registredObject.pcmf_getObjByName("NewFactCopyCombo")).pcmf_getValue(); 40 String l_name = (String )((base_guiObj)base_registredObject.pcmf_getObjByName("NewFactName")).pcmf_getValue(); 41 String l_path = (String )((base_guiObj)base_registredObject.pcmf_getObjByName("NewFactPath")).pcmf_getValue(); 42 43 if (l_name != null && l_path != null) 44 { 45 if (base_environment.pcmf_getParameter("environment.xml", l_name, "FACTORY_DEF") != null) 46 { 47 ((base_optionDlg_if)base_registredObject.pcmf_getObjByName("optDlg")).pcmf_showAlert("Can not create an existing configuration"); 48 return; 49 } 50 String l_cpyPath = (String )base_environment.pcmf_getParameter("environment.xml", l_cpname, "FACTORY_DEF"); 51 xml_parameterWriter l_writer = new xml_parameterWriter(); 52 l_writer.pcmf_writeSource(null, l_cpyPath, l_path); 53 base_environment.pcmf_setParameter("environment.xml", "templateKitMap", l_name, "environment.xml"); 54 base_environment.pcmf_addParameterCluster("environment.xml", l_name); 55 base_environment.pcmf_setParameter("environment.xml", l_name, "FACTORY_DEF", l_path); 56 l_writer.pcmf_writeSource(base_environment.pcmf_getParameterGetter(), "environment.xml", "environment.xml"); 57 ((base_comboBox_if)base_registredObject.pcmf_getObjByName("FactConfCombo")).pcmf_addValue(l_name,l_name); 58 } 59 60 l_br.pcmf_hideDialog(); 61 } 62 63 } | Popular Tags |