在extjs中设置类属性

时间:2012-02-10 06:42:20

标签: javascript

我正在尝试使用extj来增强我的应用程序。我使用Ext.form.DateField在jsp中呈现数据。我在dataField中使用'applyTo'属性,并使用其ID在我的jsp中呈现它。我现在的问题是我无法将特定的类属性(例如width,height n color)应用于文本字段,我在其中呈现日期字段。请帮帮我。以下是我的评论示例代码。

提前感谢。

的问候, Shalini.A

< ---- ----- createTask.jsp>

这是EXT PART:

Ext.onReady(function() {

var custWindowEndDate =  new Ext.form.DateField({
    allowBlank:false,
    applyTo : 'oneTimeDiv', //apply to
    name: 'oneTimeDivDate',
    id : 'oneTimeDivDate',
    format:'m/d/Y g:i A',
    //fieldBodyCls: 'height-18_width-133 input_LegendsColor',
    Cls:'height-18_width-133 input_LegendsColor',
    width:150,
menu: new DatetimeMenu(),
    selectOnFocus:false
});

这是HTML部分:

<div id="frequencySelection" class="dynamic-side-note-container">
<div class="maincontentleftcolumnHeaderBg_normal">
    <div class="sub_tool_accord_norm"></div>

    <div class="header_txt">Task Selection</div>
</div>

<div id="panel" class="side-note dynamic-side-note">
<table width="90%" border="0" cellspacing="10" cellpadding="0"
       class="bodytxt">
<tr height="24">
    <td class="bodytxt" width="20%">
        <input type="radio" checked="true" value="rbOneTimeTask"
               name="rbOneTimeTask" id="rbOneTimeTask"
               tabindex="3"
               onClick="taskSelection(this); ">
        One Time Task on
    </td>

<td width="75%" colspan="4">
<core:bind path="createSchedule.txtOneDate">
<c:if test="${status.error}">

<script>displayAlert("${status.errorMessage}")</script>
</c:if></core:bind>
 <input type="text" name="oneTimeDiv" id="oneTimeDiv"  class="height-18_width-133 input_LegendsColor"  >
 </td>
</tr>

0 个答案:

没有答案
相关问题