Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /* 
   * Copyright (C) 2010---2013 星星(wuweixing)<349446658@qq.com>
   * 
   * This file is part of Wabacus 
   * 
   * Wabacus is free software: you can redistribute it and/or modify
   * it under the terms of the GNU Lesser General Public License as published by
   * the Free Software Foundation, either version 3 of the License, or
   * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 package com.wabacus.system.inputbox;
 
 import java.util.List;
 import java.util.Map;
 
 
 
 public abstract class AbsInputBox implements Cloneable
 {
     private static Log log=LogFactory.getLog(AbsInputBox.class);
 
     public final static String VALIDATE_TYPE_ONBLUR="onblur";
 
     public final static String VALIDATE_TYPE_ONSUBMIT="onsubmit";
 
     public final static String VALIDATE_TYPE_BOTH="both";
 
     protected String defaultvalue;//输入框的默认显示值,如果当前输入框没有数据进行显示时,将显示这里配置的默认值,只有此输入框属于编辑列,即配置在<col/>下时,此默认值才有效,当为查询条件下的输入框时,此属性无效。
 
     protected String defaultstyleproperty;//在wabacus.cfg.xml中配置的默认样式字符串,在editablelist2/editabledetail2两种报表类型的编辑列输入框中不会用到这里的样式,在其它任意场合的输入框中都会用到这里的样式,且不会被覆盖
 
     protected String inputboxparams;
 
     protected String styleproperty;
 
     private List<StringlstDynStylepropertyParts;
 
     protected String styleproperty2;
 
     private String beforedescription;
 
 
     private String afterdescription;
 
 
     private String tip;
 
     protected Map<String,StringmStyleProperties2;
 
     protected String language;
 
     private String jsvalidate;
 
     private String jsvalidatetype;
 
     private String servervalidate;//服务器端校验
 
     private String servervalidatetype;
 
     private String servervalidateCallback;
 
     protected String typename;
 
     protected IInputBoxOwnerBean owner;
 
 
    private List<StringlstChildids;
    protected int fillmode=1;
    protected int displaymode=1;
    private String displayon;//如果当前输入框是配置给可编辑报表,且当此列没有出现在<insert/>和<update/>中时,如果想显示输入框,则通过此属性指定在什么条件下需要显示输入框,可配置值为insert、update、insert|update,此属性对查询条件中的输入框无效
    public AbsInputBox(String typename)
    {
        this.=typename;
    }
    public IInputBoxOwnerBean getOwner()
    {
        return ;
    }
    public void setOwner(IInputBoxOwnerBean owner)
    {
        this.=owner;
    }
    public List<StringgetLstChildids()
    {
        return ;
    }
    public void addChildInputboxId(String inputboxid)
    {
        if(inputboxid==null||inputboxid.trim().equals("")) return;
        if(this.==nullthis.=new ArrayList<String>();
        if(!this..contains(inputboxid)) this..add(inputboxid);
    }
    protected String getInputBoxValue(ReportRequest rrequest,String value)
    {
        if(value==null||value.trim().equals("")&&!=null)
        {
            value=ReportAssistant.getInstance().getColAndConditionDefaultValue(rrequest,);
        }
        if(value==nullvalue="";
        return Tools.htmlEncode(value);
    }
    public String getJsvalidatetype()
    {
        return ;
    }
    protected boolean isJsvalidateOnblur()
    {
        if(this.==null||this..trim().equals("")) return false;
    }
    public String getLanguage()
    {
        return ;
    }
    public void setDefaultvalue(String defaultvalue)
    {
        this.=defaultvalue;
    }
    public String getDefaultvalue(ReportRequest rrequest)
    {
        if(==nullreturn null;
        return ReportAssistant.getInstance().getColAndConditionDefaultValue(rrequest,);
    }
    {
        return ;
    }
    public void setAutoCompleteBean(AutoCompleteBean autoCompleteBean)
    {
        this.=autoCompleteBean;
    }
    public String getTypename()
    {
        return ;
    }
    private String getStyleproperty(ReportRequest rrequest)
    {
        return WabacusAssistant.getInstance().getStylepropertyWithDynPart(rrequest,this.,this.,"");
    }
    private String getStyleproperty2(ReportRequest rrequest)
    {
        return WabacusAssistant.getInstance().getStylepropertyWithDynPart(rrequest,this.,this.,"");
    }
    
    private void setStyleproperty(String styleproperty)
    {
        Object[] objArr=WabacusAssistant.getInstance().parseStylepropertyWithDynPart(styleproperty);
        this.=(String)objArr[0];
        this.=(List<String>)objArr[1];
    }
    public String getJsvalidate()
    {
        return ;
    }
    private void setBeforedescription(String beforedescription)
    {
        Object[] objArr=WabacusAssistant.getInstance().parseStringWithDynPart(beforedescription);
        this.=(String)objArr[0];
        this.=(Map<String,String>)objArr[1];
    }
    private void setAfterdescription(String afterdescription)
    {
        Object[] objArr=WabacusAssistant.getInstance().parseStringWithDynPart(afterdescription);
        this.=(String)objArr[0];
        this.=(Map<String,String>)objArr[1];
    }
    public String getBeforedescription(ReportRequest rrequest)
    {
        return WabacusAssistant.getInstance().getStringValueWithDynPart(rrequest,this.,this.,"");
    }
    public String getAfterdescription(ReportRequest rrequest)
    {
        return WabacusAssistant.getInstance().getStringValueWithDynPart(rrequest,this.,this.,"");
    }
    protected boolean hasDescription()
    {
        if(this.!=null&&!this..trim().equals("")) return true;
        if(this.!=null&&!this..trim().equals("")) return true;
        return false;
    }
    public String getTip(ReportRequest rrequest)
    {
        if(this.!=null&&!this..trim().equals(""))
        {
            return rrequest.getI18NStringValue(this.);
        }
        return "";
    }
    public int getFillmode()
    {
        return ;
    }
    public void setFillmode(int fillmode)
    {
        this.=fillmode;
    }
    public int getDisplaymode()
    {
        return ;
    }
    public void setDisplaymode(int displaymode)
    {
        this.=displaymode;
    }
    public String getDisplayon()
    {
        return ;
    }
    
    public String getDefaultlabel(ReportRequest rrequest)
    {
        if(!=nullreturn ReportAssistant.getInstance().getColAndConditionDefaultValue(rrequest,);
        return "";
    }
    public String getDisplayStringValue(ReportRequest rrequest,String value,String dynstyleproperty,boolean isReadonly)
    {
        return doGetDisplayStringValue(rrequest,value,Tools.mergeHtmlTagPropertyString(this.getStyleproperty(rrequest),dynstyleproperty,1),isReadonly);
    }
    public void setDefaultstyleproperty(String defaultstyleproperty)
    {
        this.=defaultstyleproperty;
    }
    public abstract String getIndependentDisplayString(ReportRequest rrequest,String value,String dynstyleproperty,Object specificDataObj,
            boolean isReadonly);
    protected abstract String doGetDisplayStringValue(ReportRequest rrequest,String value,String style_property,boolean isReadonly);
    public abstract String filledInContainer(String onblur);
    protected abstract String getDefaultStylePropertyForDisplayMode2();
    public abstract String getInputboxInnerType();
    public void setDefaultFillmode(AbsReportType reportTypeObj)
    {
        if(reportTypeObj instanceof EditableListFormReportType)
        {
            this.=1;
        }else if(reportTypeObj instanceof EditableListReportType2||reportTypeObj instanceof EditableDetailReportType2)
        {
            this.=2;
        }else
        {
            this.=1;
        }
    }
    public String initDisplay(ReportRequest rrequest)
    {
        StringBuffer resultBuf=new StringBuffer();
        resultBuf.append(initDisplaySpanStart(rrequest)).append(">");
        resultBuf.append(initDisplaySpanContent(rrequest));
        resultBuf.append("</span>");
        return resultBuf.toString();
    }
    protected String initDisplaySpanStart(ReportRequest rrequest)
    {
        StringBuffer resultBuf=new StringBuffer();
        resultBuf.append("<span id=\"span_"+this..getInputBoxId()+"_span\" style=\"display:none;\"");
        if(this. instanceof EditableReportColBean)
        {
            String formatemplate=((EditableReportColBean)this.).getFormatemplate(rrequest);
            if(formatemplate!=null&&!formatemplate.trim().equals(""))
            {
                resultBuf.append(" formatemplate=\"").append(Tools.onlyHtmlEncode(formatemplate)).append("\"");
                resultBuf.append(" formatemplate_dyncols=\"").append(
                        ((EditableReportColBean)this.).getColPropertyAndPlaceHoldersInFormatemplate()).append("\"");
            }
        }
        String style2=this.getStyleproperty2(rrequest);
        if(style2!=null&&!style2.trim().equals(""))
        {
            resultBuf.append(" styleproperty=\""+Tools.jsParamEncode(style2)+"\"");
        }
        if(this.!=null)
        {
            for(Entry<String,StringentryTmp:this..entrySet())
            {
                if(entryTmp.getValue()==null||entryTmp.getValue().trim().equals("")) continue;
                resultBuf.append(" ").append(entryTmp.getKey()).append("_propertyvalue=\"").append(entryTmp.getValue()).append("\"");
            }
        }
        if(this.!=null&&!this..trim().equals(""))
        {
            resultBuf.append(" inputboxparams=\""+this..trim()+"\"");
        }
        if(this.!=null&&this..size()>0)
        {
            resultBuf.append(" childboxids=\"");
            for(String childidTmp:this.)
            {
                resultBuf.append(childidTmp).append(";");
            }
            if(resultBuf.charAt(resultBuf.length()-1)==';'resultBuf.deleteCharAt(resultBuf.length()-1);
            resultBuf.append("\"");
        }
        return resultBuf.toString();
    }
    protected String initDisplaySpanContent(ReportRequest rrequest)
    {
        return "";
    }
    {
        StringBuffer resultBuf=new StringBuffer();
        resultBuf.append("boxstr=boxstr+\" id= '\"+name+\"'").append(" name='\"+name+\"'");
        resultBuf.append(" typename='"+this.+"' \"+styleproperty;");
        resultBuf.append("boxstr=boxstr+\" style=\\\"text-align:\"+textalign+\";\";");
        resultBuf.append("if(wid!=null&&parseInt(wid)>0){boxstr=boxstr+\"width:\"+wid+\";\";}");
        resultBuf.append("boxstr=boxstr+style_propertyvalue+\"\\\"\";");
        return resultBuf.toString();
    }
    public String attachInfoForDisplay()
    {
        return "";
    }
    {
        StringBuffer buf=new StringBuffer();
        buf.append("var boxObj=document.getElementById(id);");
        buf.append("if(boxObj){boxObj.value=newvalue;}");
        return buf.toString();
    }
    public String createGetValueByIdJs()
    {
        StringBuffer buf=new StringBuffer();
        buf.append("var boxObj=document.getElementById(id);");
        buf.append("if(boxObj!=null){ return boxObj.value;}");
        buf.append("return null;");
        return buf.toString();
    }
    public String createGetLabelByIdJs()
    {
        return "return getInputBoxValue(id,type);";
    }
    {
        return "value=boxObj.value; label=boxObj.value;";
    }
    protected String getInputBoxId(ReportRequest rrequest)
    {
        String inputboxid=rrequest.getStringAttribute("DYN_INPUTBOX_ID");
        if(inputboxid==null||inputboxid.trim().equals("")) inputboxid=.getInputBoxId();
        return inputboxid;
    }
    
    //    {
    
    
    
    
    
    //            {//没有在styleproperty中指定onkeypress事件,则加上默认的事件
    
    //                {//如果要显示输入框边框,由按回车键时,跳到下一个输入框(一般是输入框显示在表单中的情况)
    
    
    //                {//如果不显示输入框边框,说明输入框只是做为其它可编辑元素的一部分,此时按回车键时,失去焦点即可(一般是editablelist2/editabledetail2的情况)
    
    
    
    
    
    
    //            resultStr=resultStr+"if(displaymode==1){boxstr=boxstr+\" onkeypress='return onInputBoxKeyPress(event)' \";}";
    
    
    
    
    
    
    
    
    
    //        {//如果是被getDisplayStringValue()调用
    
    
    
    
    
    //                classname="cls-inputbox-textbox2";
    
    
    //        {//如果是被filledInContainer()调用
    
    
    
    
    protected String addReadonlyToStyleProperty1(String style_property)
    {
        if(style_property==null)
        {
            style_property="";
        }else if(style_property.toLowerCase().indexOf(" readonly ")>=0)
        {
            return style_property;
        }
        return style_property+" readonly ";
    }
    protected String addReadonlyToStyleProperty2(String style_property)
    {
        if(style_property==null)
        {
            style_property="";
        }else if(style_property.toLowerCase().indexOf(" disabled ")>=0)
        {
            return style_property;
        }
        return style_property+" disabled ";
    }
    public void loadInputBoxConfig(IInputBoxOwnerBean ownerbean,XmlElementBean eleInputboxBean)
    {
        this.=ownerbean;
        if(eleInputboxBean==nullreturn;
        XmlElementBean eleAutocompleteBean=eleInputboxBean.getChildElementByName("autocomplete");
        if(eleAutocompleteBean!=null)
        {
            if(ownerbean instanceof EditableReportColBean)
            {
                this.=new AutoCompleteBean(this);
                this..loadConfig(eleAutocompleteBean);
            }else
            {//是查询条件上的自动填充输入框,则不用加载<autocomplete/>里面的配置,只要生成一个此对象标识一下有这个功能
                
            }
        }
        String beforedescription=eleInputboxBean.attributeValue("beforedescription");
        if(beforedescription!=null)
        {
            this.setBeforedescription(Config.getInstance().getResourceString(null,ownerbean.getReportBean().getPageBean(),beforedescription,true));
        }
        String afterdescription=eleInputboxBean.attributeValue("afterdescription");
        if(afterdescription!=null)
        {
            this.setAfterdescription(Config.getInstance().getResourceString(null,ownerbean.getReportBean().getPageBean(),afterdescription,true));
        }
        String tip=eleInputboxBean.attributeValue("tip");
        if(tip!=null)
        {
            this.=Config.getInstance().getResourceString(null,ownerbean.getReportBean().getPageBean(),tip,true);
        }
        String styleproperty=eleInputboxBean.attributeValue("styleproperty");
        if(styleproperty!=null)
        {
            this.setStyleproperty(Tools.formatStringBlank(styleproperty.trim()));
        }
        String jsvalidate=eleInputboxBean.attributeValue("jsvalidate");
        if(jsvalidate!=null&&!jsvalidate.trim().equals(""))
        {
            this.=jsvalidate.trim();
            String jsvalidatetype=eleInputboxBean.attributeValue("jsvalidatetype");
            if(jsvalidatetype!=null&&!jsvalidatetype.trim().equals(""))
            {
                jsvalidatetype=jsvalidatetype.toLowerCase().trim();
                if(!jsvalidatetype.equals()&&!jsvalidatetype.equals()
                        &&!jsvalidatetype.equals())
                {
                    throw new WabacusConfigLoadingException("加载报表"+ownerbean.getReportBean().getPath()+"上的输入框"+ownerbean.getInputBoxId()
                            +"失败,配置的jsvalidatetype无效");
                }
                this.=jsvalidatetype;
            }else
            {
                this.=Config.getInstance().getSystemConfigValue("default-jsvalidatetype",);
                if(!this..equals()&&!this..equals()
                        &&!this..equals())
                {
                    throw new WabacusConfigLoadingException("在wabacus.cfg.xml系统级配置文件配置的default-jsvalidatetype配置项无效");
                }
            }
        }
        String servervalidate=eleInputboxBean.attributeValue("servervalidate");
        if(servervalidate!=null&&!servervalidate.trim().equals(""))
        {
            this.=servervalidate.trim();
            String servervalidatetype=eleInputboxBean.attributeValue("servervalidatetype");
            if(servervalidatetype!=null&&!servervalidatetype.trim().equals(""))
            {
                servervalidatetype=servervalidatetype.toLowerCase().trim();
                if(!servervalidatetype.equals()&&!servervalidatetype.equals()
                        &&!servervalidatetype.equals())
                {
                    throw new WabacusConfigLoadingException("加载报表"+ownerbean.getReportBean().getPath()+"上的输入框"+ownerbean.getInputBoxId()
                            +"失败,配置的servervalidatetype无效");
                }
                this.=servervalidatetype;
            }else
            {
                this.=Config.getInstance().getSystemConfigValue("default-servervalidatetype",);
                        &&!this..equals())
                {
                    throw new WabacusConfigLoadingException("在wabacus.cfg.xml系统级配置文件配置的default-servervalidatetype配置项无效");
                }
            }
        }
        String serverValidateCallback=eleInputboxBean.attributeValue("servervalidatecallback");
        if(serverValidateCallback!=null&&!serverValidateCallback.trim().equals(""))
        {
            this.=serverValidateCallback.trim();
        }
        if(this.==null||this..trim().equals("")) this.="null";
        String inputboxparams=eleInputboxBean.attributeValue("inputboxparams");
        if(inputboxparams!=nullthis.=inputboxparams.trim();
        String _language=eleInputboxBean.attributeValue("language");
        if(_language==null||_language.trim().equals(""))
        {
            this.=null;
        }else
        {
            this.=_language;
        }
        String displayon=eleInputboxBean.attributeValue("displayon");
        if(displayon!=null)
        {
            displayon=displayon.toLowerCase().trim();
            if(!displayon.equals(""))
            {
                this.="";
                List<StringlstTmp=Tools.parseStringToList(displayon,"|");
                for(String tmp:lstTmp)
                {
                    if(!tmp.trim().equals("insert")&&!tmp.trim().equals("update")) continue;
                    this.=this.+tmp+"|";
                }
            }else
            {
                this.=null;
            }
        }
    }
    public void doPostLoad(IInputBoxOwnerBean ownerbean)
    {
        AbsReportType reportTypeObj=Config.getInstance().getReportType(ownerbean.getReportBean().getType());
        setDisplaymode(reportTypeObj,ownerbean);
        if(this.==1)
        {
            this.=this.==null?"":this..trim();
            if(this..toLowerCase().startsWith("(overwrite)"))
            {
                this.=this..substring("(overwrite)".length());
            }else if(this..toLowerCase().startsWith("[overwrite]"))
            {
                this.=this..substring("[overwrite]".length());
                this.=Tools.mergeHtmlTagPropertyString(this.,this.,0);
            }else
            {
                this.=Tools.mergeHtmlTagPropertyString(this.,this.,1);
            }
        }else
        {
            if(this.!=null
                    &&(this..toLowerCase().trim().startsWith("(overwrite)")||this..trim().toLowerCase().startsWith(
                            "[overwrite]")))
            {
                .warn("报表"+ownerbean.getReportBean().getPath()
                        +"为editablelist2/editabledetail2之一的报表类型,不能在其编辑列的输入框上的styleproperty配置(overwrite)或[overwrite]方式");
                this.=this..trim().substring("(overwrite)".length());
            }
        }
        processRelativeInputBoxes();
        if(this.!=nullthis..doPostLoad();
        if(this.!=null)
        {
            .getReportBean().addInputboxWithAutoComplete(this);
            ColBean cbOwner=(ColBean)((EditableReportColBean)).getOwner();
                    "onfocus=\"autoComplete_oldData=getInputBoxValue(this.getAttribute('id'),this.getAttribute('typename'));\"",1);
            StringBuffer blurEventBuf=new StringBuffer();
            blurEventBuf.append("loadAutoCompleteInputboxData(");
            blurEventBuf.append("'").append(.getReportBean().getPageBean().getId()).append("'");
            blurEventBuf.append(",'").append(.getReportBean().getId()).append("'");
            blurEventBuf.append(",this.getAttribute('id'),'").append(cbOwner.getProperty()).append("'");
            if(cbOwner.getUpdateColBeanDest(false)!=null)
            {
                blurEventBuf.append(",'").append(cbOwner.getUpdateColBeanDest(false).getProperty()).append("'");
            }else
            {
                blurEventBuf.append(",''");
            }
            blurEventBuf.append(",'");
            if(this..getLstColPropertiesInColvalueConditions()!=null)
            {
                for(String colPropTmp:this..getLstColPropertiesInColvalueConditions())
                {
                    if(colPropTmp==null||colPropTmp.trim().equals("")) continue;
                    blurEventBuf.append(colPropTmp).append(";");
                }
            }
            blurEventBuf.append("');");
            =Tools.mergeHtmlTagPropertyString(,"onblur=\"try{"+blurEventBuf.toString()
                    +"}catch(e){logErrorsAsJsFileLoad(e);}\"",1);
        }
        if(this.!=null&&!this..trim().equals(""))
        {
            JavaScriptAssistant.getInstance().createInputBoxValidateMethod(this);
        }
        processServerValidate();
        processStylePropertyAfterMerged(reportTypeObj,ownerbean);
        if((ownerbean instanceof EditableReportColBean)
                &&(reportTypeObj instanceof EditableDetailReportType2||reportTypeObj instanceof EditableListReportType2))
        {
        }
        if(this. instanceof EditableReportColBean&&this.!=null)
        {
            if(this..indexOf("insert")>=0&&((EditableReportColBean)this.).getEditableWhenInsert()<=0)
            {
                ((EditableReportColBean)this.).setEditableWhenInsert(1);
            }
            if(this..indexOf("update")>=0&&((EditableReportColBean)this.).getEditableWhenUpdate()<=0)
            {
                ((EditableReportColBean)this.).setEditableWhenUpdate(1);
            }
        }
        if(this.!=null&&Tools.isDefineKey("url",this.))
        {
            this..getReportBean().addParamNameFromURL(Tools.getRealKeyByDefine("url",this.));
        }
    }
    private void processServerValidate()
    {
        if(this.==null||this..trim().equals("")) return;
        List<StringlstValidateMethods=Tools.parseStringToList(.trim(),';','\'');
        if(lstValidateMethods==null||lstValidateMethods.size()==0) return;
        ServerValidateBean svbean=new ServerValidateBean(this);
        svbean.setValidatetype(this.);
        String methodnameTmperrormsgTmp;
        for(String methodTmp:lstValidateMethods)
        {
            methodTmp=methodTmp.trim();
            methodnameTmp=methodTmp;
            errormsgTmp=null;
            int lidx=methodTmp.indexOf("(");
            int ridx=methodTmp.lastIndexOf(")");
            if(lidx>0&&lidx<ridx)
            {
                methodnameTmp=methodTmp.substring(0,lidx);
                if(methodnameTmp.equals("")) continue;
                errormsgTmp=methodTmp.substring(lidx+1,ridx).trim();
                errormsgTmp=Config.getInstance().getResourceString(null,this..getReportBean().getPageBean(),errormsgTmp,true);
            }
            svbean.addValidateMethod(this..getReportBean(),methodnameTmp,errormsgTmp);
        }
        if(svbean.getLstParams()!=null&&svbean.getLstParams().size()>0)
        {
            this..setServerValidateBean(svbean);
            if(!.equals(this.))
            {//当前校验不是只在提交时进行校验,即在onblur时也要进行校验
                this..getReportBean().addServerValidateBeanOnBlur(this..getInputBoxId(),svbean);
                String onblur="onblur=\"wx_onblurValidate('"+this..getReportBean().getGuid()+"',this,";
                onblur+=(this. instanceof ConditionBean)+",true,";
                onblur+=this.+")\"";
                this.=Tools.mergeHtmlTagPropertyString(this.,onblur,1);
            }
        }
    }
    protected void processRelativeInputBoxes()
    {
        if(this.==null||this..size()==0) return;
        ReportBean rbean=this..getReportBean();
        if(this.==1)
        {
            StringBuffer childidAndParamsBuf=new StringBuffer("{");
            AbsSelectBox childBoxObjTmp;
            boolean isConditionBox=this. instanceof ConditionBean;
            for(String childidTmp:this.)
            {
                childidAndParamsBuf.append(childidTmp).append(":'");
                if(isConditionBox)
                {
                    childBoxObjTmp=rbean.getChildSelectBoxInConditionById(childidTmp);
                }else
                {
                    childBoxObjTmp=rbean.getChildSelectBoxInColById(childidTmp);
                }
                childidAndParamsBuf.append(childBoxObjTmp.getAllParentIdsAsString()).append("',");
            }
            if(childidAndParamsBuf.charAt(childidAndParamsBuf.length()-1)==','childidAndParamsBuf.deleteCharAt(childidAndParamsBuf.length()-1);
            childidAndParamsBuf.append("}");
            String event=getRefreshChildboxDataEventName()+"=\"reloadSelectBoxData('"+rbean.getPageBean().getId()+"','"+rbean.getId()+"',this,"
                    +childidAndParamsBuf.toString()+","+isConditionBox+")\"";
            this.=Tools.mergeHtmlTagPropertyString(this.,event,1);
        }else
        {
            String event=getRefreshChildboxDataEventName()+"=\"resetChildSelectBoxData(this)\"";
            this.=Tools.mergeHtmlTagPropertyString(this.,event,1);
        }
    }
    {
        return "onblur";
    }
    private void setDisplaymode(AbsReportType reportTypeObj,IInputBoxOwnerBean ownerbean)
    {
        if(ownerbean instanceof EditableReportColBean
                &&((reportTypeObj instanceof EditableListReportType2&&!(reportTypeObj instanceof EditableListFormReportType))||reportTypeObj instanceof EditableDetailReportType2))
        {
            this.=2;
        }else
        {
            this.=1;
        }
    }
    protected void processStylePropertyAfterMerged(AbsReportType reportTypeObj,IInputBoxOwnerBean ownerbean)
    {
        addJsValidateOnBlurEvent(reportTypeObj,ownerbean);
        if(this.!=null&&!this..trim().equals(""))
        {
            this.=Tools.mergeHtmlTagPropertyString(this.,"title=\""+this.+"\"",1);
        }
        if(!(this. instanceof ConditionBean))
        {
            this.=Tools.mergeHtmlTagPropertyString(this.,"onblur=\"try{addInputboxDataForSaving('"
                    +this.getOwner().getReportBean().getGuid()+"',this);}catch(e){logErrorsAsJsFileLoad(e);}\"",1);
        }
    }
    protected void addJsValidateOnBlurEvent(AbsReportType reportTypeObj,IInputBoxOwnerBean ownerbean)
    {
        if(this.isJsvalidateOnblur())
        {
            String onblur="onblur=\"wx_onblurValidate('"+this..getReportBean().getGuid()+"',this,";
            onblur+=(this. instanceof ConditionBean)+",false,null)\"";
            this.=Tools.mergeHtmlTagPropertyString(this.,onblur,1);
        }
    }
    {
        this.=new HashMap<String,String>();
        this.=this.;
        String onfocus=Tools.getPropertyValueByName("onfocus",this.,false);
        if(onfocus!=null&&!onfocus.trim().equals("")) this..put("onfocus",onfocus);
        this.=Tools.removePropertyValueByName("onfocus",this.);
        String onblur=Tools.getPropertyValueByName("onblur",this.,false);
        if(onblur!=null&&!onblur.trim().equals("")) this..put("onblur",onblur);
        this.=Tools.removePropertyValueByName("onblur",this.);
        String style=Tools.getPropertyValueByName("style",this.,false);
        if(style!=null&&!style.trim().equals("")) this..put("style",style);
        this.=Tools.removePropertyValueByName("style",this.);
    }
    protected Object clone() throws CloneNotSupportedException
    {
        return super.clone();
    }
    public Object clone(IInputBoxOwnerBean owner)
    {
        try
        {
            AbsInputBox inputBoxNew=(AbsInputBox)clone();
            inputBoxNew.setOwner(owner);
            if(this.!=null)
            {
                inputBoxNew.setAutoCompleteBean(this..clone(inputBoxNew));
                owner.getReportBean().addInputboxWithAutoComplete(inputBoxNew);
            }
            return inputBoxNew;
        }catch(CloneNotSupportedException e)
        {
            throw new WabacusConfigLoadingException("clone输入框对象失败",e);
        }
    }
New to GrepCode? Check out our FAQ X