时间框默认显示当前日期

 public String forinsert(
        HttpServletRequest req,
        HttpServletResponse rep,
        IErrorHandler errorHandler,
        IMessageHandler messageHandler,
        ViewHelper viewHelper) {
    	
        ItsmDefectDataView view= new ItsmDefectDataView();
        String today = DateTool.getToday(DateTool.DATEFORMATSTR_8);
        view.setCreateDate(today);
        viewHelper.setView(view);
        return "itsmdefectdataView.forinsert";
    }

 在cmd中写,写前看看data和view中有没有该字段的set get方法。

 

<td class="defectTitle"><%=ResourcesFactory
											.getString("ITSM_TD_DATA.CREATE_DATE")%><font color="red">*</font></td>
				<td class="defectRight">
				<date:date name="createDate" property="createDate" hastime="false" hasecond="false" readonly="true" title="默认为系统当前时间"
			                    		sourceFormat="yyyyMMdd" targetFormat="yyyyMMdd" divname="createDateDiv" onchange="getNetValue()"/>
			                    		</td>

 

 jsp显示

你可能感兴趣的:(jsp 默认显示当前时间)