踩坑Freemarker對象屬性rName獲取爲空

今天在寫頁面的時候又掉坑裏了,使用freemarker獲取對象的屬性,其中一個屬性(“rName”)死活獲取不到,上代碼:

<#list multyAccountList as accountInfo>
                    <div class="radio-group">
                        <div class="radio-check">
                            <input type="radio" name="c-radio" class="i-radio" value="${accountInfo.userId}"/>
                            <#if purchaserVO.loginAccount == accountInfo.loginAccount>
                                <em class="iconfont pur_icon_PC_Checkbox_pre"></em>
                            <#else >
                                <em class="iconfont pur_icon_PC_Checkbox_nor"></em>
                            </#if>
                        </div>
                        <label class="radio-lab">${accountInfo.userName}(${accountInfo.orgName},${accountInfo.rName})</label>
                    </div>
                </#list>

其他的都能獲取到。。。
嘗試了下,把"rName"的值放到另一個屬性(“orgName”)中能獲取到。。。
那麼問題應該出現在頁面獲取上。。。
freemarker的取值方式是:

${object.param}

也相當於getParam。那麼獲取"rName"的時候,應該是getRName。
嘗試了一下果然如此:

${accountInfo.RName}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章