/**
 * output package name
 */
package com.kingdee.eas.custom.compensation.client;

import org.apache.log4j.*;

import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.border.*;
import javax.swing.BorderFactory;
import javax.swing.event.*;
import javax.swing.KeyStroke;

import com.kingdee.bos.ctrl.swing.*;
import com.kingdee.bos.ctrl.kdf.table.*;
import com.kingdee.bos.ctrl.kdf.data.event.*;
import com.kingdee.bos.dao.*;
import com.kingdee.bos.dao.query.*;
import com.kingdee.bos.metadata.*;
import com.kingdee.bos.metadata.entity.*;
import com.kingdee.bos.ui.face.*;
import com.kingdee.bos.ui.util.ResourceBundleHelper;
import com.kingdee.bos.util.BOSUuid;
import com.kingdee.bos.service.ServiceContext;
import com.kingdee.jdbc.rowset.IRowSet;
import com.kingdee.util.enums.EnumUtils;
import com.kingdee.bos.ui.face.UIRuleUtil;
import com.kingdee.bos.ctrl.swing.event.*;
import com.kingdee.bos.ctrl.kdf.table.event.*;
import com.kingdee.bos.ctrl.extendcontrols.*;
import com.kingdee.bos.ctrl.kdf.util.render.*;
import com.kingdee.bos.ui.face.IItemAction;
import com.kingdee.eas.framework.batchHandler.RequestContext;
import com.kingdee.bos.ui.util.IUIActionPostman;
import com.kingdee.bos.appframework.client.servicebinding.ActionProxyFactory;
import com.kingdee.bos.appframework.uistatemanage.ActionStateConst;
import com.kingdee.bos.appframework.validator.ValidateHelper;
import com.kingdee.bos.appframework.uip.UINavigator;


/**
 * output class name
 */
public abstract class AbstractSubmitShemeTemplateEditUI extends com.kingdee.eas.framework.client.EditUI
{
    private static final Logger logger = CoreUIObject.getLogger(AbstractSubmitShemeTemplateEditUI.class);
    protected com.kingdee.bos.ctrl.swing.KDLabelContainer kDLabelContainer1;
    protected com.kingdee.bos.ctrl.swing.KDLabelContainer kDLabelContainer2;
    protected com.kingdee.bos.ctrl.swing.KDLabelContainer kDLabelContainer3;
    protected com.kingdee.bos.ctrl.swing.KDLabelContainer kDLabelContainer4;
    protected com.kingdee.bos.ctrl.swing.KDLabelContainer contcalSubmitScheme;
    protected com.kingdee.bos.ctrl.kdf.table.KDTable kdtEntry;
	protected com.kingdee.eas.framework.client.multiDetail.DetailPanel kdtEntry_detailPanel = null;
    protected com.kingdee.bos.ctrl.swing.KDLabelContainer contstate;
    protected com.kingdee.bos.ctrl.swing.KDLabelContainer conthrOrgUnit;
    protected com.kingdee.bos.ctrl.swing.KDLabelContainer contselectItemCol;
    protected com.kingdee.bos.ctrl.swing.KDLabelContainer contbillProperties;
    protected com.kingdee.bos.ctrl.swing.KDLabelContainer contentryProperties;
    protected com.kingdee.bos.ctrl.swing.KDLabelContainer contschemeItems;
    protected com.kingdee.bos.ctrl.swing.KDTextField txtNumber;
    protected com.kingdee.bos.ctrl.extendcontrols.KDBizMultiLangBox txtName;
    protected com.kingdee.bos.ctrl.swing.KDTextField txtSimpleName;
    protected com.kingdee.bos.ctrl.extendcontrols.KDBizMultiLangBox txtDescription;
    protected com.kingdee.bos.ctrl.extendcontrols.KDBizPromptBox prmtcalSubmitScheme;
    protected com.kingdee.bos.ctrl.swing.KDComboBox state;
    protected com.kingdee.bos.ctrl.extendcontrols.KDBizPromptBox prmthrOrgUnit;
    protected com.kingdee.bos.ctrl.swing.KDScrollPane scrollPaneselectItemCol;
    protected com.kingdee.bos.ctrl.swing.KDTextArea txtselectItemCol;
    protected com.kingdee.bos.ctrl.swing.KDScrollPane scrollPanebillProperties;
    protected com.kingdee.bos.ctrl.swing.KDTextArea txtbillProperties;
    protected com.kingdee.bos.ctrl.swing.KDScrollPane scrollPaneentryProperties;
    protected com.kingdee.bos.ctrl.swing.KDTextArea txtentryProperties;
    protected com.kingdee.bos.ctrl.swing.KDScrollPane scrollPaneschemeItems;
    protected com.kingdee.bos.ctrl.swing.KDTextArea txtschemeItems;
    protected com.kingdee.eas.custom.compensation.SubmitShemeTemplateInfo editData = null;
    /**
     * output class constructor
     */
    public AbstractSubmitShemeTemplateEditUI() throws Exception
    {
        super();
        this.defaultObjectName = "editData";
        jbInit();
        
        initUIP();
    }

    /**
     * output jbInit method
     */
    private void jbInit() throws Exception
    {
        this.resHelper = new ResourceBundleHelper(AbstractSubmitShemeTemplateEditUI.class.getName());
        this.setUITitle(resHelper.getString("this.title"));
        this.kDLabelContainer1 = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
        this.kDLabelContainer2 = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
        this.kDLabelContainer3 = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
        this.kDLabelContainer4 = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
        this.contcalSubmitScheme = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
        this.kdtEntry = new com.kingdee.bos.ctrl.kdf.table.KDTable();
        this.contstate = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
        this.conthrOrgUnit = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
        this.contselectItemCol = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
        this.contbillProperties = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
        this.contentryProperties = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
        this.contschemeItems = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
        this.txtNumber = new com.kingdee.bos.ctrl.swing.KDTextField();
        this.txtName = new com.kingdee.bos.ctrl.extendcontrols.KDBizMultiLangBox();
        this.txtSimpleName = new com.kingdee.bos.ctrl.swing.KDTextField();
        this.txtDescription = new com.kingdee.bos.ctrl.extendcontrols.KDBizMultiLangBox();
        this.prmtcalSubmitScheme = new com.kingdee.bos.ctrl.extendcontrols.KDBizPromptBox();
        this.state = new com.kingdee.bos.ctrl.swing.KDComboBox();
        this.prmthrOrgUnit = new com.kingdee.bos.ctrl.extendcontrols.KDBizPromptBox();
        this.scrollPaneselectItemCol = new com.kingdee.bos.ctrl.swing.KDScrollPane();
        this.txtselectItemCol = new com.kingdee.bos.ctrl.swing.KDTextArea();
        this.scrollPanebillProperties = new com.kingdee.bos.ctrl.swing.KDScrollPane();
        this.txtbillProperties = new com.kingdee.bos.ctrl.swing.KDTextArea();
        this.scrollPaneentryProperties = new com.kingdee.bos.ctrl.swing.KDScrollPane();
        this.txtentryProperties = new com.kingdee.bos.ctrl.swing.KDTextArea();
        this.scrollPaneschemeItems = new com.kingdee.bos.ctrl.swing.KDScrollPane();
        this.txtschemeItems = new com.kingdee.bos.ctrl.swing.KDTextArea();
        this.kDLabelContainer1.setName("kDLabelContainer1");
        this.kDLabelContainer2.setName("kDLabelContainer2");
        this.kDLabelContainer3.setName("kDLabelContainer3");
        this.kDLabelContainer4.setName("kDLabelContainer4");
        this.contcalSubmitScheme.setName("contcalSubmitScheme");
        this.kdtEntry.setName("kdtEntry");
        this.contstate.setName("contstate");
        this.conthrOrgUnit.setName("conthrOrgUnit");
        this.contselectItemCol.setName("contselectItemCol");
        this.contbillProperties.setName("contbillProperties");
        this.contentryProperties.setName("contentryProperties");
        this.contschemeItems.setName("contschemeItems");
        this.txtNumber.setName("txtNumber");
        this.txtName.setName("txtName");
        this.txtSimpleName.setName("txtSimpleName");
        this.txtDescription.setName("txtDescription");
        this.prmtcalSubmitScheme.setName("prmtcalSubmitScheme");
        this.state.setName("state");
        this.prmthrOrgUnit.setName("prmthrOrgUnit");
        this.scrollPaneselectItemCol.setName("scrollPaneselectItemCol");
        this.txtselectItemCol.setName("txtselectItemCol");
        this.scrollPanebillProperties.setName("scrollPanebillProperties");
        this.txtbillProperties.setName("txtbillProperties");
        this.scrollPaneentryProperties.setName("scrollPaneentryProperties");
        this.txtentryProperties.setName("txtentryProperties");
        this.scrollPaneschemeItems.setName("scrollPaneschemeItems");
        this.txtschemeItems.setName("txtschemeItems");
        // CoreUI		
        this.btnPrint.setVisible(false);		
        this.btnPrintPreview.setVisible(false);		
        this.menuItemPrint.setVisible(false);		
        this.menuItemPrintPreview.setVisible(false);
        // kDLabelContainer1		
        this.kDLabelContainer1.setBoundLabelText(resHelper.getString("kDLabelContainer1.boundLabelText"));		
        this.kDLabelContainer1.setBoundLabelLength(100);		
        this.kDLabelContainer1.setBoundLabelUnderline(true);
        // kDLabelContainer2		
        this.kDLabelContainer2.setBoundLabelText(resHelper.getString("kDLabelContainer2.boundLabelText"));		
        this.kDLabelContainer2.setBoundLabelLength(100);		
        this.kDLabelContainer2.setBoundLabelUnderline(true);
        // kDLabelContainer3		
        this.kDLabelContainer3.setBoundLabelText(resHelper.getString("kDLabelContainer3.boundLabelText"));		
        this.kDLabelContainer3.setBoundLabelLength(100);		
        this.kDLabelContainer3.setBoundLabelUnderline(true);
        // kDLabelContainer4		
        this.kDLabelContainer4.setBoundLabelText(resHelper.getString("kDLabelContainer4.boundLabelText"));		
        this.kDLabelContainer4.setBoundLabelLength(100);		
        this.kDLabelContainer4.setBoundLabelUnderline(true);		
        this.kDLabelContainer4.setBoundLabelAlignment(7);		
        this.kDLabelContainer4.setVisible(true);
        // contcalSubmitScheme		
        this.contcalSubmitScheme.setBoundLabelText(resHelper.getString("contcalSubmitScheme.boundLabelText"));		
        this.contcalSubmitScheme.setBoundLabelLength(100);		
        this.contcalSubmitScheme.setBoundLabelUnderline(true);		
        this.contcalSubmitScheme.setVisible(true);
        // kdtEntry
		String kdtEntryStrXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><DocRoot xmlns:c=\"http://www.kingdee.com/Common\" xmlns:f=\"http://www.kingdee.com/Form\" xmlns:t=\"http://www.kingdee.com/Table\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.kingdee.com/KDF KDFSchema.xsd\" version=\"0.0\"><Styles><c:Style id=\"sCol0\"><c:NumberFormat>&amp;int</c:NumberFormat></c:Style></Styles><Table id=\"KDTable\"><t:Sheet name=\"sheet1\"><t:Table t:selectMode=\"15\" t:mergeMode=\"0\" t:dataRequestMode=\"0\" t:pageRowCount=\"100\"><t:ColumnGroup><t:Column t:key=\"seq\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" t:styleID=\"sCol0\" /><t:Column t:key=\"column\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" /><t:Column t:key=\"alias\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" /><t:Column t:key=\"templateField\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" /><t:Column t:key=\"state\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" /><t:Column t:key=\"sorttype\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" /></t:ColumnGroup><t:Head><t:Row t:name=\"header\" t:height=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\"><t:Cell>$Resource{seq}</t:Cell><t:Cell>$Resource{column}</t:Cell><t:Cell>$Resource{alias}</t:Cell><t:Cell>$Resource{templateField}</t:Cell><t:Cell>$Resource{state}</t:Cell><t:Cell>$Resource{sorttype}</t:Cell></t:Row></t:Head></t:Table><t:SheetOptions><t:MergeBlocks><t:Head /></t:MergeBlocks></t:SheetOptions></t:Sheet></Table></DocRoot>";
		
        this.kdtEntry.setFormatXml(resHelper.translateString("kdtEntry",kdtEntryStrXML));

                this.kdtEntry.putBindContents("editData",new String[] {"seq","column","alias","templateField","state","sorttype"});


        this.kdtEntry.checkParsed();
        KDFormattedTextField kdtEntry_seq_TextField = new KDFormattedTextField();
        kdtEntry_seq_TextField.setName("kdtEntry_seq_TextField");
        kdtEntry_seq_TextField.setVisible(true);
        kdtEntry_seq_TextField.setEditable(true);
        kdtEntry_seq_TextField.setHorizontalAlignment(2);
        kdtEntry_seq_TextField.setDataType(0);
        KDTDefaultCellEditor kdtEntry_seq_CellEditor = new KDTDefaultCellEditor(kdtEntry_seq_TextField);
        this.kdtEntry.getColumn("seq").setEditor(kdtEntry_seq_CellEditor);
        KDTextField kdtEntry_column_TextField = new KDTextField();
        kdtEntry_column_TextField.setName("kdtEntry_column_TextField");
        kdtEntry_column_TextField.setMaxLength(100);
        KDTDefaultCellEditor kdtEntry_column_CellEditor = new KDTDefaultCellEditor(kdtEntry_column_TextField);
        this.kdtEntry.getColumn("column").setEditor(kdtEntry_column_CellEditor);
        KDTextField kdtEntry_alias_TextField = new KDTextField();
        kdtEntry_alias_TextField.setName("kdtEntry_alias_TextField");
        kdtEntry_alias_TextField.setMaxLength(100);
        KDTDefaultCellEditor kdtEntry_alias_CellEditor = new KDTDefaultCellEditor(kdtEntry_alias_TextField);
        this.kdtEntry.getColumn("alias").setEditor(kdtEntry_alias_CellEditor);
        KDTextField kdtEntry_templateField_TextField = new KDTextField();
        kdtEntry_templateField_TextField.setName("kdtEntry_templateField_TextField");
        kdtEntry_templateField_TextField.setMaxLength(100);
        KDTDefaultCellEditor kdtEntry_templateField_CellEditor = new KDTDefaultCellEditor(kdtEntry_templateField_TextField);
        this.kdtEntry.getColumn("templateField").setEditor(kdtEntry_templateField_CellEditor);
        KDComboBox kdtEntry_state_ComboBox = new KDComboBox();
        kdtEntry_state_ComboBox.setName("kdtEntry_state_ComboBox");
        kdtEntry_state_ComboBox.setVisible(true);
        kdtEntry_state_ComboBox.addItems(EnumUtils.getEnumList("com.kingdee.shr.base.syssetting.BaseItemStateEnum").toArray());
        KDTDefaultCellEditor kdtEntry_state_CellEditor = new KDTDefaultCellEditor(kdtEntry_state_ComboBox);
        this.kdtEntry.getColumn("state").setEditor(kdtEntry_state_CellEditor);
        KDTextField kdtEntry_sorttype_TextField = new KDTextField();
        kdtEntry_sorttype_TextField.setName("kdtEntry_sorttype_TextField");
        kdtEntry_sorttype_TextField.setMaxLength(100);
        KDTDefaultCellEditor kdtEntry_sorttype_CellEditor = new KDTDefaultCellEditor(kdtEntry_sorttype_TextField);
        this.kdtEntry.getColumn("sorttype").setEditor(kdtEntry_sorttype_CellEditor);
        // contstate		
        this.contstate.setBoundLabelText(resHelper.getString("contstate.boundLabelText"));		
        this.contstate.setBoundLabelLength(100);		
        this.contstate.setBoundLabelUnderline(true);		
        this.contstate.setVisible(true);
        // conthrOrgUnit		
        this.conthrOrgUnit.setBoundLabelText(resHelper.getString("conthrOrgUnit.boundLabelText"));		
        this.conthrOrgUnit.setBoundLabelLength(100);		
        this.conthrOrgUnit.setBoundLabelUnderline(true);		
        this.conthrOrgUnit.setVisible(true);
        // contselectItemCol		
        this.contselectItemCol.setBoundLabelText(resHelper.getString("contselectItemCol.boundLabelText"));		
        this.contselectItemCol.setBoundLabelLength(100);		
        this.contselectItemCol.setBoundLabelUnderline(true);		
        this.contselectItemCol.setVisible(true);
        // contbillProperties		
        this.contbillProperties.setBoundLabelText(resHelper.getString("contbillProperties.boundLabelText"));		
        this.contbillProperties.setBoundLabelLength(100);		
        this.contbillProperties.setBoundLabelUnderline(true);		
        this.contbillProperties.setVisible(true);
        // contentryProperties		
        this.contentryProperties.setBoundLabelText(resHelper.getString("contentryProperties.boundLabelText"));		
        this.contentryProperties.setBoundLabelLength(100);		
        this.contentryProperties.setBoundLabelUnderline(true);		
        this.contentryProperties.setVisible(true);
        // contschemeItems		
        this.contschemeItems.setBoundLabelText(resHelper.getString("contschemeItems.boundLabelText"));		
        this.contschemeItems.setBoundLabelLength(100);		
        this.contschemeItems.setBoundLabelUnderline(true);		
        this.contschemeItems.setVisible(true);
        // txtNumber		
        this.txtNumber.setMaxLength(80);
        // txtName
        // txtSimpleName		
        this.txtSimpleName.setMaxLength(80);
        // txtDescription
        // prmtcalSubmitScheme		
        this.prmtcalSubmitScheme.setQueryInfo("com.kingdee.eas.hr.org.app.PositionHRListQuery");		
        this.prmtcalSubmitScheme.setEditable(true);		
        this.prmtcalSubmitScheme.setDisplayFormat("$effectDate$");		
        this.prmtcalSubmitScheme.setEditFormat("$number$");		
        this.prmtcalSubmitScheme.setCommitFormat("$number$");		
        this.prmtcalSubmitScheme.setRequired(false);
        // state		
        this.state.addItems(EnumUtils.getEnumList("com.kingdee.eas.fm.fs.SendAcctStatusEnum").toArray());		
        this.state.setRequired(false);
        // prmthrOrgUnit		
        this.prmthrOrgUnit.setQueryInfo("com.kingdee.eas.basedata.org.app.HROrgUnitQuery");		
        this.prmthrOrgUnit.setEditable(true);		
        this.prmthrOrgUnit.setDisplayFormat("$isSealUp$");		
        this.prmthrOrgUnit.setEditFormat("$number$");		
        this.prmthrOrgUnit.setCommitFormat("$number$");		
        this.prmthrOrgUnit.setRequired(false);
        // scrollPaneselectItemCol
        // txtselectItemCol		
        this.txtselectItemCol.setVisible(true);		
        this.txtselectItemCol.setRequired(false);		
        this.txtselectItemCol.setMaxLength(2000);
        // scrollPanebillProperties
        // txtbillProperties		
        this.txtbillProperties.setVisible(true);		
        this.txtbillProperties.setRequired(false);		
        this.txtbillProperties.setMaxLength(2000);
        // scrollPaneentryProperties
        // txtentryProperties		
        this.txtentryProperties.setVisible(true);		
        this.txtentryProperties.setRequired(false);		
        this.txtentryProperties.setMaxLength(2000);
        // scrollPaneschemeItems
        // txtschemeItems		
        this.txtschemeItems.setVisible(true);		
        this.txtschemeItems.setRequired(false);		
        this.txtschemeItems.setMaxLength(2000);
        this.setFocusTraversalPolicy(new com.kingdee.bos.ui.UIFocusTraversalPolicy(new java.awt.Component[] {txtName,txtNumber,txtDescription,txtSimpleName,prmtcalSubmitScheme,state,prmthrOrgUnit,kdtEntry,txtselectItemCol,txtbillProperties,txtentryProperties,txtschemeItems}));
        this.setFocusCycleRoot(true);
		//Register control's property binding
		registerBindings();
		registerUIState();


    }

	public com.kingdee.bos.ctrl.swing.KDToolBar[] getUIMultiToolBar(){
		java.util.List list = new java.util.ArrayList();
		com.kingdee.bos.ctrl.swing.KDToolBar[] bars = super.getUIMultiToolBar();
		if (bars != null) {
			list.addAll(java.util.Arrays.asList(bars));
		}
		return (com.kingdee.bos.ctrl.swing.KDToolBar[])list.toArray(new com.kingdee.bos.ctrl.swing.KDToolBar[list.size()]);
	}




    /**
     * output initUIContentLayout method
     */
    public void initUIContentLayout()
    {
        this.setBounds(new Rectangle(0, 0, 1013, 629));
        this.setLayout(null);
        kDLabelContainer1.setBounds(new Rectangle(102, 44, 270, 19));
        this.add(kDLabelContainer1, null);
        kDLabelContainer2.setBounds(new Rectangle(102, 81, 270, 19));
        this.add(kDLabelContainer2, null);
        kDLabelContainer3.setBounds(new Rectangle(102, 118, 270, 19));
        this.add(kDLabelContainer3, null);
        kDLabelContainer4.setBounds(new Rectangle(102, 155, 270, 19));
        this.add(kDLabelContainer4, null);
        contcalSubmitScheme.setBounds(new Rectangle(0, 0, 270, 19));
        this.add(contcalSubmitScheme, null);
        kdtEntry.setBounds(new Rectangle(0, 0, 600, 170));
        kdtEntry_detailPanel = (com.kingdee.eas.framework.client.multiDetail.DetailPanel)com.kingdee.eas.framework.client.multiDetail.HMDUtils.buildDetail(this,dataBinder,kdtEntry,new com.kingdee.eas.custom.compensation.SubmitShemeTemplateEntryInfo(),null,false);
        this.add(kdtEntry_detailPanel, null);
        contstate.setBounds(new Rectangle(0, 0, 270, 19));
        this.add(contstate, null);
        conthrOrgUnit.setBounds(new Rectangle(0, 0, 270, 19));
        this.add(conthrOrgUnit, null);
        contselectItemCol.setBounds(new Rectangle(0, 0, 270, 19));
        this.add(contselectItemCol, null);
        contbillProperties.setBounds(new Rectangle(0, 0, 270, 19));
        this.add(contbillProperties, null);
        contentryProperties.setBounds(new Rectangle(0, 0, 270, 19));
        this.add(contentryProperties, null);
        contschemeItems.setBounds(new Rectangle(0, 0, 270, 19));
        this.add(contschemeItems, null);
        //kDLabelContainer1
        kDLabelContainer1.setBoundEditor(txtNumber);
        //kDLabelContainer2
        kDLabelContainer2.setBoundEditor(txtName);
        //kDLabelContainer3
        kDLabelContainer3.setBoundEditor(txtSimpleName);
        //kDLabelContainer4
        kDLabelContainer4.setBoundEditor(txtDescription);
        //contcalSubmitScheme
        contcalSubmitScheme.setBoundEditor(prmtcalSubmitScheme);
        //contstate
        contstate.setBoundEditor(state);
        //conthrOrgUnit
        conthrOrgUnit.setBoundEditor(prmthrOrgUnit);
        //contselectItemCol
        contselectItemCol.setBoundEditor(scrollPaneselectItemCol);
        //scrollPaneselectItemCol
        scrollPaneselectItemCol.getViewport().add(txtselectItemCol, null);
        //contbillProperties
        contbillProperties.setBoundEditor(scrollPanebillProperties);
        //scrollPanebillProperties
        scrollPanebillProperties.getViewport().add(txtbillProperties, null);
        //contentryProperties
        contentryProperties.setBoundEditor(scrollPaneentryProperties);
        //scrollPaneentryProperties
        scrollPaneentryProperties.getViewport().add(txtentryProperties, null);
        //contschemeItems
        contschemeItems.setBoundEditor(scrollPaneschemeItems);
        //scrollPaneschemeItems
        scrollPaneschemeItems.getViewport().add(txtschemeItems, null);

    }


    /**
     * output initUIMenuBarLayout method
     */
    public void initUIMenuBarLayout()
    {
        this.menuBar.add(menuFile);
        this.menuBar.add(menuEdit);
        this.menuBar.add(MenuService);
        this.menuBar.add(menuView);
        this.menuBar.add(menuBiz);
        this.menuBar.add(menuTool);
        this.menuBar.add(menuHelp);
        //menuFile
        menuFile.add(menuItemAddNew);
        menuFile.add(kDSeparator1);
        menuFile.add(menuItemCloudFeed);
        menuFile.add(menuItemSave);
        menuFile.add(menuItemCloudScreen);
        menuFile.add(menuItemSubmit);
        menuFile.add(menuItemCloudShare);
        menuFile.add(menuSubmitOption);
        menuFile.add(kdSeparatorFWFile1);
        menuFile.add(rMenuItemSubmit);
        menuFile.add(rMenuItemSubmitAndAddNew);
        menuFile.add(rMenuItemSubmitAndPrint);
        menuFile.add(separatorFile1);
        menuFile.add(MenuItemAttachment);
        menuFile.add(kDSeparator2);
        menuFile.add(menuItemPageSetup);
        menuFile.add(menuItemPrint);
        menuFile.add(menuItemPrintPreview);
        menuFile.add(kDSeparator3);
        menuFile.add(menuItemExitCurrent);
        //menuSubmitOption
        menuSubmitOption.add(chkMenuItemSubmitAndAddNew);
        menuSubmitOption.add(chkMenuItemSubmitAndPrint);
        //menuEdit
        menuEdit.add(menuItemCopy);
        menuEdit.add(menuItemEdit);
        menuEdit.add(menuItemRemove);
        menuEdit.add(kDSeparator4);
        menuEdit.add(menuItemReset);
        //MenuService
        MenuService.add(MenuItemKnowStore);
        MenuService.add(MenuItemAnwser);
        MenuService.add(SepratorService);
        MenuService.add(MenuItemRemoteAssist);
        //menuView
        menuView.add(menuItemFirst);
        menuView.add(menuItemPre);
        menuView.add(menuItemNext);
        menuView.add(menuItemLast);
        //menuBiz
        menuBiz.add(menuItemCancelCancel);
        menuBiz.add(menuItemCancel);
        //menuTool
        menuTool.add(menuItemMsgFormat);
        menuTool.add(menuItemSendMessage);
        menuTool.add(menuItemCalculator);
        menuTool.add(menuItemToolBarCustom);
        //menuHelp
        menuHelp.add(menuItemHelp);
        menuHelp.add(kDSeparator12);
        menuHelp.add(menuItemRegPro);
        menuHelp.add(menuItemPersonalSite);
        menuHelp.add(helpseparatorDiv);
        menuHelp.add(menuitemProductval);
        menuHelp.add(kDSeparatorProduct);
        menuHelp.add(menuItemAbout);

    }

    /**
     * output initUIToolBarLayout method
     */
    public void initUIToolBarLayout()
    {
        this.toolBar.add(btnAddNew);
        this.toolBar.add(btnCloud);
        this.toolBar.add(btnEdit);
        this.toolBar.add(btnXunTong);
        this.toolBar.add(btnReset);
        this.toolBar.add(kDSeparatorCloud);
        this.toolBar.add(btnSave);
        this.toolBar.add(btnSubmit);
        this.toolBar.add(btnCopy);
        this.toolBar.add(btnRemove);
        this.toolBar.add(btnAttachment);
        this.toolBar.add(separatorFW1);
        this.toolBar.add(btnPageSetup);
        this.toolBar.add(btnPrint);
        this.toolBar.add(btnPrintPreview);
        this.toolBar.add(separatorFW2);
        this.toolBar.add(btnFirst);
        this.toolBar.add(btnPre);
        this.toolBar.add(btnNext);
        this.toolBar.add(btnLast);
        this.toolBar.add(separatorFW3);
        this.toolBar.add(btnCancelCancel);
        this.toolBar.add(btnCancel);


    }

	//Regiester control's property binding.
	private void registerBindings(){
		dataBinder.registerBinding("entry.seq", int.class, this.kdtEntry, "seq.text");
		dataBinder.registerBinding("Entry", com.kingdee.eas.custom.compensation.SubmitShemeTemplateEntryInfo.class, this.kdtEntry, "userObject");
		dataBinder.registerBinding("entry.column", String.class, this.kdtEntry, "column.text");
		dataBinder.registerBinding("entry.alias", String.class, this.kdtEntry, "alias.text");
		dataBinder.registerBinding("entry.templateField", String.class, this.kdtEntry, "templateField.text");
		dataBinder.registerBinding("entry.state", com.kingdee.util.enums.Enum.class, this.kdtEntry, "state.text");
		dataBinder.registerBinding("entry.sorttype", String.class, this.kdtEntry, "sorttype.text");
		dataBinder.registerBinding("number", String.class, this.txtNumber, "text");
		dataBinder.registerBinding("name", String.class, this.txtName, "_multiLangItem");
		dataBinder.registerBinding("simpleName", String.class, this.txtSimpleName, "text");
		dataBinder.registerBinding("description", String.class, this.txtDescription, "_multiLangItem");
		dataBinder.registerBinding("calSubmitScheme", com.kingdee.eas.basedata.org.PositionInfo.class, this.prmtcalSubmitScheme, "data");
		dataBinder.registerBinding("state", com.kingdee.eas.fm.fs.SendAcctStatusEnum.class, this.state, "selectedItem");
		dataBinder.registerBinding("hrOrgUnit", com.kingdee.eas.basedata.org.HROrgUnitInfo.class, this.prmthrOrgUnit, "data");
		dataBinder.registerBinding("selectItemCol", String.class, this.txtselectItemCol, "text");
		dataBinder.registerBinding("billProperties", String.class, this.txtbillProperties, "text");
		dataBinder.registerBinding("entryProperties", String.class, this.txtentryProperties, "text");
		dataBinder.registerBinding("schemeItems", String.class, this.txtschemeItems, "text");		
	}
	//Regiester UI State
	private void registerUIState(){
	        getActionManager().registerUIState(STATUS_ADDNEW, this.txtName, ActionStateConst.ENABLED);
	        getActionManager().registerUIState(STATUS_ADDNEW, this.txtDescription, ActionStateConst.ENABLED);
	        getActionManager().registerUIState(STATUS_ADDNEW, this.txtNumber, ActionStateConst.ENABLED);
	        getActionManager().registerUIState(STATUS_ADDNEW, this.txtSimpleName, ActionStateConst.ENABLED);
	        getActionManager().registerUIState(STATUS_EDIT, this.txtName, ActionStateConst.ENABLED);
	        getActionManager().registerUIState(STATUS_EDIT, this.txtDescription, ActionStateConst.ENABLED);
	        getActionManager().registerUIState(STATUS_EDIT, this.txtNumber, ActionStateConst.ENABLED);
	        getActionManager().registerUIState(STATUS_EDIT, this.txtSimpleName, ActionStateConst.ENABLED);					 	        		
	        getActionManager().registerUIState(STATUS_VIEW, this.txtName, ActionStateConst.DISABLED);					 	        		
	        getActionManager().registerUIState(STATUS_VIEW, this.txtDescription, ActionStateConst.DISABLED);					 	        		
	        getActionManager().registerUIState(STATUS_VIEW, this.txtNumber, ActionStateConst.DISABLED);					 	        		
	        getActionManager().registerUIState(STATUS_VIEW, this.txtSimpleName, ActionStateConst.DISABLED);		
	}
	public String getUIHandlerClassName() {
	    return "com.kingdee.eas.custom.compensation.app.SubmitShemeTemplateEditUIHandler";
	}
	public IUIActionPostman prepareInit() {
		IUIActionPostman clientHanlder = super.prepareInit();
		if (clientHanlder != null) {
			RequestContext request = new RequestContext();
    		request.setClassName(getUIHandlerClassName());
			clientHanlder.setRequestContext(request);
		}
		return clientHanlder;
    }
	
	public boolean isPrepareInit() {
    	return false;
    }
    protected void initUIP() {
        super.initUIP();
    }


    /**
     * output onShow method
     */
    public void onShow() throws Exception
    {
        super.onShow();
        this.txtName.requestFocusInWindow();
    }

	
	

    /**
     * output setDataObject method
     */
    public void setDataObject(IObjectValue dataObject)
    {
        IObjectValue ov = dataObject;        	    	
        super.setDataObject(ov);
        this.editData = (com.kingdee.eas.custom.compensation.SubmitShemeTemplateInfo)ov;
    }
    protected void removeByPK(IObjectPK pk) throws Exception {
    	IObjectValue editData = this.editData;
    	super.removeByPK(pk);
    	recycleNumberByOrg(editData,"NONE",editData.getString("number"));
    }
    
    protected void recycleNumberByOrg(IObjectValue editData,String orgType,String number) {
        if (!StringUtils.isEmpty(number))
        {
            try {
            	String companyID = null;            
            	com.kingdee.eas.base.codingrule.ICodingRuleManager iCodingRuleManager = com.kingdee.eas.base.codingrule.CodingRuleManagerFactory.getRemoteInstance();
				if(!com.kingdee.util.StringUtils.isEmpty(orgType) && !"NONE".equalsIgnoreCase(orgType) && com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit(com.kingdee.eas.basedata.org.OrgType.getEnum(orgType))!=null) {
					companyID =com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit(com.kingdee.eas.basedata.org.OrgType.getEnum(orgType)).getString("id");
				}
				else if (com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit() != null) {
					companyID = ((com.kingdee.eas.basedata.org.OrgUnitInfo)com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit()).getString("id");
            	}				
				if (!StringUtils.isEmpty(companyID) && iCodingRuleManager.isExist(editData, companyID) && iCodingRuleManager.isUseIntermitNumber(editData, companyID)) {
					iCodingRuleManager.recycleNumber(editData,companyID,number);					
				}
            }
            catch (Exception e)
            {
                handUIException(e);
            }
        }
    }
    protected void setAutoNumberByOrg(String orgType) {
    	if (editData == null) return;
		if (editData.getNumber() == null) {
            try {
            	String companyID = null;
				if(!com.kingdee.util.StringUtils.isEmpty(orgType) && !"NONE".equalsIgnoreCase(orgType) && com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit(com.kingdee.eas.basedata.org.OrgType.getEnum(orgType))!=null) {
					companyID = com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit(com.kingdee.eas.basedata.org.OrgType.getEnum(orgType)).getString("id");
				}
				else if (com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit() != null) {
					companyID = ((com.kingdee.eas.basedata.org.OrgUnitInfo)com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit()).getString("id");
            	}
				com.kingdee.eas.base.codingrule.ICodingRuleManager iCodingRuleManager = com.kingdee.eas.base.codingrule.CodingRuleManagerFactory.getRemoteInstance();
		        if (iCodingRuleManager.isExist(editData, companyID)) {
		            if (iCodingRuleManager.isAddView(editData, companyID)) {
		            	editData.setNumber(iCodingRuleManager.getNumber(editData,companyID));
		            }
	                txtNumber.setEnabled(false);
		        }
            }
            catch (Exception e) {
                handUIException(e);
                this.oldData = editData;
                com.kingdee.eas.util.SysUtil.abort();
            } 
        } 
        else {
            if (editData.getNumber().trim().length() > 0) {
                txtNumber.setText(editData.getNumber());
            }
        }
    }

    /**
     * output loadFields method
     */
    public void loadFields()
    {
        		setAutoNumberByOrg("NONE");
        dataBinder.loadFields();
    }
		protected void setOrgF7(KDBizPromptBox f7,com.kingdee.eas.basedata.org.OrgType orgType) throws Exception
		{
			com.kingdee.eas.basedata.org.client.f7.NewOrgUnitFilterInfoProducer oufip = new com.kingdee.eas.basedata.org.client.f7.NewOrgUnitFilterInfoProducer(orgType);
			oufip.getModel().setIsCUFilter(true);
			f7.setFilterInfoProducer(oufip);
		}

    /**
     * output storeFields method
     */
    public void storeFields()
    {
		dataBinder.storeFields();
    }

	/**
	 * ????????งต??
	 */
	protected void registerValidator() {
    	getValidateHelper().setCustomValidator( getValidator() );
		getValidateHelper().registerBindProperty("entry.seq", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("Entry", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("entry.column", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("entry.alias", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("entry.templateField", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("entry.state", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("entry.sorttype", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("number", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("name", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("simpleName", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("description", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("calSubmitScheme", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("state", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("hrOrgUnit", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("selectItemCol", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("billProperties", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("entryProperties", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("schemeItems", ValidateHelper.ON_SAVE);    		
	}



    /**
     * output setOprtState method
     */
    public void setOprtState(String oprtType)
    {
        super.setOprtState(oprtType);
        if (STATUS_ADDNEW.equals(this.oprtState)) {
		            this.txtName.setEnabled(true);
		            this.txtDescription.setEnabled(true);
		            this.txtNumber.setEnabled(true);
		            this.txtSimpleName.setEnabled(true);
        } else if (STATUS_EDIT.equals(this.oprtState)) {
		            this.txtName.setEnabled(true);
		            this.txtDescription.setEnabled(true);
		            this.txtNumber.setEnabled(true);
		            this.txtSimpleName.setEnabled(true);
        } else if (STATUS_VIEW.equals(this.oprtState)) {
		            this.txtName.setEnabled(false);
		            this.txtDescription.setEnabled(false);
		            this.txtNumber.setEnabled(false);
		            this.txtSimpleName.setEnabled(false);
        }
    }

    /**
     * output getSelectors method
     */
    public SelectorItemCollection getSelectors()
    {
        SelectorItemCollection sic = new SelectorItemCollection();
		String selectorAll = System.getProperty("selector.all");
		if(StringUtils.isEmpty(selectorAll)){
			selectorAll = "true";
		}
    	sic.add(new SelectorItemInfo("entry.seq"));
		if(selectorAll.equalsIgnoreCase("true"))
		{
			sic.add(new SelectorItemInfo("Entry.*"));
		}
		else{
		}
    	sic.add(new SelectorItemInfo("entry.column"));
    	sic.add(new SelectorItemInfo("entry.alias"));
    	sic.add(new SelectorItemInfo("entry.templateField"));
    	sic.add(new SelectorItemInfo("entry.state"));
    	sic.add(new SelectorItemInfo("entry.sorttype"));
        sic.add(new SelectorItemInfo("number"));
        sic.add(new SelectorItemInfo("name"));
        sic.add(new SelectorItemInfo("simpleName"));
        sic.add(new SelectorItemInfo("description"));
		if(selectorAll.equalsIgnoreCase("true"))
		{
			sic.add(new SelectorItemInfo("calSubmitScheme.*"));
		}
		else{
        	sic.add(new SelectorItemInfo("calSubmitScheme.id"));
        	sic.add(new SelectorItemInfo("calSubmitScheme.number"));
        	sic.add(new SelectorItemInfo("calSubmitScheme.name"));
        	sic.add(new SelectorItemInfo("calSubmitScheme.effectDate"));
		}
        sic.add(new SelectorItemInfo("state"));
		if(selectorAll.equalsIgnoreCase("true"))
		{
			sic.add(new SelectorItemInfo("hrOrgUnit.*"));
		}
		else{
        	sic.add(new SelectorItemInfo("hrOrgUnit.id"));
        	sic.add(new SelectorItemInfo("hrOrgUnit.number"));
        	sic.add(new SelectorItemInfo("hrOrgUnit.name"));
        	sic.add(new SelectorItemInfo("hrOrgUnit.isSealUp"));
		}
        sic.add(new SelectorItemInfo("selectItemCol"));
        sic.add(new SelectorItemInfo("billProperties"));
        sic.add(new SelectorItemInfo("entryProperties"));
        sic.add(new SelectorItemInfo("schemeItems"));
        return sic;
    }        

    /**
     * output getMetaDataPK method
     */
    public IMetaDataPK getMetaDataPK()
    {
        return new MetaDataPK("com.kingdee.eas.custom.compensation.client", "SubmitShemeTemplateEditUI");
    }

    /**
     * output getEditUIName method
     */
    protected String getEditUIName()
    {
        return com.kingdee.eas.custom.compensation.client.SubmitShemeTemplateEditUI.class.getName();
    }

    /**
     * output getBizInterface method
     */
    protected com.kingdee.eas.framework.ICoreBase getBizInterface() throws Exception
    {
        return com.kingdee.eas.custom.compensation.SubmitShemeTemplateFactory.getRemoteInstance();
    }

    /**
     * output createNewData method
     */
    protected IObjectValue createNewData()
    {
        com.kingdee.eas.custom.compensation.SubmitShemeTemplateInfo objectValue = new com.kingdee.eas.custom.compensation.SubmitShemeTemplateInfo();
        objectValue.setCreator((com.kingdee.eas.base.permission.UserInfo)(com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentUser()));		
        return objectValue;
    }



    /**
     * output getDetailTable method
     */
    protected KDTable getDetailTable() {
        return kdtEntry;
	}
    /**
     * output applyDefaultValue method
     */
    protected void applyDefaultValue(IObjectValue vo) {        
    }        
	protected void setFieldsNull(com.kingdee.bos.dao.AbstractObjectValue arg0) {
		super.setFieldsNull(arg0);
		arg0.put("number",null);
	}

}