无法将jsp参数值发送到struts2中的action类

时间:2013-09-06 14:23:49

标签: jsp struts2

我的jsp文件是

<s:form action="UpdatePartnerPL" method="post">
        <s:textfield label="PARTNER NAME" readonly="true" disabled="true" id="ptnrname" value="%{ptnrpl.partner_name}" required="true" tooltip="Mandatory Field" name="ptnrpl.partner_name" />
            <s:textfield name="siebel_row_id" readonly="true" disabled="true" label="SIEBEL_ROW_ID"  value="%{ptnrpl.siebel_row_id}"  maxlength = "50"  id="sbl_row_id" />
            <s:checkboxlist label="PRODUCT GROUP" list="prdgrp" name="productgrp" value="%{ptnrpl.product_group}" id="productgrp" required="true" tooltip="Select atleast one or multiple product groups to display Product Lines" onclick ="callprdlines();"/>
            <s:optiontransferselect 
            label="PL LIST"
            name="leftSidePLlist"
            leftTitle="List of available Product Lines"
            rightTitle="Selected Product Lines"
            list="plList"
            id="plListid" 
            headerKey="headerKey"
            headerValue="--- Please Select ---"
            doubleName="plCode" 
            doubleHeaderKey="doubleHeaderKey"
            doubleList="sel_plList"
            doubleHeaderValue="--- Please Select ---"/>
            <s:textfield name="duns_id" label="DUNS ID" readonly="true" disabled="true" value="%{ptnrpl.duns_id}" maxlength = "50"  />
            <s:checkboxlist label="Allow Partner flow to Down Stream"  list="filters" value="%{ptnrpl.ptnr_dwnstrm_filter}" required="true" name="filter"  />
            <sx:datetimepicker  required="true" name="start_date" label="START_DATE"  displayFormat="yyyy-MM-dd"  value="%{#ptnrpl.start_date}" />
            <sx:datetimepicker name="end_date" required="true" label="END_DATE"   displayFormat="yyyy-MM-dd"  value="%{#ptnrpl.end_date}" />
            <s:textfield name="comment" label="COMMENT" value="%{ptnrpl.comments}" maxlength = "100"  />

在我的动作中,我已经使用它们的名称定义了所有参数,并且我也引用了ptnrpl对象,但我仍然没有从jsp获取动作类中的值 请帮忙

1 个答案:

答案 0 :(得分:0)

最后添加

<s:submit valur="submit">
 </s:form>

并将JSP页面中的字段名称放入JSP页面并生成getter / setter。