填写报销单,显示异常

填写报销单,显示异常

http://img1.sycdn.imooc.com//climg/5cfa16520001d69319090973.jpg

<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%--
  Created by IntelliJ IDEA.
  User: Infinite
  Date: 2019/6/7
  Time: 14:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:include page="top.jsp"/>

<section id="content" class="table-layout animated fadeIn">
    <div class="tray tray-center">
        <div class="content-header">
            <h2> 填写报销单 </h2>
            <p class="lead"></p>
        </div>
        <div class="admin-form theme-primary mw1000 center-block" style="padding-bottom: 175px;">
            <div class="panel heading-border">
                <form:form id="admin-form" name="addForm" action="/claim_voucher/add" modelAttribute="info">
                    <div class="panel-body bg-light">
                        <div class="section-divider mt20 mb40">
                            <span> 基本信息 </span>
                        </div>
                        <div class="section">
                            <label for="claimVoucher.cause" class="field prepend-icon">
                                <form:input path="claimVoucher.cause" cssClass="gui-input" placeholder="事由..." />
                                <label for="claimVoucher.cause" class="field-icon">
                                    <i class="fa fa-lock"></i>
                                </label>
                            </label>
                        </div>
                        <div class="section-divider mt20 mb40">
                            <span> 费用明细 </span>
                        </div>
                        <div class="section row" id="items">
                            <div>
                                <div class="col-md-3">
                                    <label for="items[0].item" class="field prepend-icon">
                                        <form:select  path="items[0].item" cssClass="gui-input" placeholder="花销类型..." itmes="${itmes}"/>
                                </div>
                                <div class="col-md-3">
                                    <label for="items[0].amount" class="field prepend-icon">
                                        <form:input path="items[0].amount" cssClass="gui-input money" placeholder="金额..." />
                                        <label for="items[0].amount" class="field-icon">
                                            <i class="fa fa-lock"></i>
                                        </label>
                                    </label>
                                </div>
                                <div class="col-md-5">
                                    <label for="items[0].comment" class="field prepend-icon">
                                        <form:input path="items[0].comment" cssClass="gui-input" placeholder="备注..."  />
                                        <label for="items[0].comment" class="field-icon">
                                            <i class="fa fa-lock"></i>
                                        </label>
                                    </label>
                                </div>
                                <div class="col-md-1" style="text-align:right;">
                                    <button type="button" class="button"> X </button>
                                </div>
                            </div>
                        </div>
                        <div class="section row">
                            <div class="col-md-3">
                                <label for="totalMoney" class="field prepend-icon">
                                    <form:input id="totalMoney" path="claimVoucher.totalAmount" cssClass="gui-input" placeholder="总金额..." readonly="true" />
                                    <label for="totalMoney" class="field-icon">
                                        <i class="fa fa-user"></i>
                                    </label>
                                </label>
                            </div>
                            <div class="section" style="text-align:right;">
                                <div class="col-md-9">
                                    <button type="button" class="button" id="addItemButton"> + </button>
                                </div>
                            </div>
                        </div>
                        <div class="panel-footer text-right">
                            <button type="submit" class="button"> 保存 </button>
                            <button type="button" class="button" onclick="javascript:window.history.go(-1);"> 返回 </button>
                        </div>
                    </div>
                </form:form>
            </div>
        </div>
    </div>
</section>



<jsp:include page="bottom.jsp"/>


正在回答 回答被采纳积分+1

登陆购买课程后可参与讨论,去登陆

2回答
好帮手慕柯南 2019-06-07 18:48:52

同学你好!根据同学的报错信息建议同学检查一下这个类中是否有items的get,set方法。

http://img1.sycdn.imooc.com//climg/5cfa40800001c34509070379.jpg

以及以下类属性的get,set方法是否都添加

http://img1.sycdn.imooc.com//climg/5cfa40dd0001afd908630728.jpg

如果我的回答解决了你的疑惑,请采纳,祝学习愉快~

  • 提问者 weixin_慕丝9295137 #1
    老师,都填写过的。请看下一条提问。
    2019-06-07 19:40:35
  • 同学好,老师看到同学的下一条提问中http://class.imooc.com/course/qadetail/123696 表示同学自己已经解决了是吗? 如果还是有问题,可以再次提问,祝学习愉快。
    2019-06-09 09:52:18
好帮手慕柯南 2019-06-07 16:37:24

同学你好!贴一下控制台报错的信息。祝学习愉快~

  • 提问者 weixin_慕丝9295137 #1
    07-Jun-2019 16:47:24.783 涓ラ噸 [http-nio-8080-exec-6] org.springframework.web.servlet.tags.form.SelectTag.doStartTag Invalid property 'items[0]' of bean class [com.imooc.oa.dto.ClaimVoucherInfo]: Bean property 'items[0]' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter? org.springframework.beans.NotReadablePropertyException: Invalid property 'items[0]' of bean class [com.imooc.oa.dto.ClaimVoucherInfo]: Bean property 'items[0]' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter? at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:725) at org.springframework.beans.BeanWrapperImpl.getNestedBeanWrapper(BeanWrapperImpl.java:571)
    2019-06-07 16:51:29
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师