开发者

Read Only Property On View Model in Spring MVC View

How do you access a read only property on a view model in Spring MVC view?

<开发者_JAVA百科;img id="avatar" src="<c:url value="${model.getSquareImage}" />" />

public ImageModel getSquareImage() {

        if(getImages() != null && getImages().size() > 0)
            return getImages().get(0);

        return null;
    }


By using ${model.squareImage}, not ${model.getSquareImage}. This is standard JSP/JavaBean stuff, and nothing to do with Spring or read-only properties.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜