开发者

EL session object property

${sessionScope.pricer.applicableRateCode}

public class ViewPrices implements Cloneable, Serializable {    
    private static final long serialVersionUID = 1;
    // fields      
    public List<RateCod开发者_JAVA技巧e> applicableRateCode = null;
}

javax.el.PropertyNotFoundException: Property 'applicableRateCode' not found on type com...ViewPrices

${sessionScope.pricer} prints value but applicableRateCode won't print


You need to add a getter method to ViewPrices. JSP EL requires them.

public class ViewPrices implements Cloneable, Serializable {    
    private static final long serialVersionUID = 1;
    // fields      
    private List<RateCode> applicableRateCode = null;

    public List<RateCode> getApplicableRateCode() {
       return applicableRateCode ;
    }
}


Setter/Getter are missing in the class . JSTL EL will access property using standard accessors methods

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜