nested el in jsf

心不动则不痛 提交于 2019-12-10 17:06:27

问题


I am having a problem with nested EL for <t:inputText> required Attribute. I am using tomahawk implementation. I have a dataTable with 2 columns of inputText. I have forceId=true for both the inputText boxes. When you look at view source of page, id's looks as postal[0] and zone[0] where postalCode and zone are the id's of textBox and the number 0 is the rowId of dataTable.

My requirement here is zone inputText is required only when postal is not empty. I have written something like below which I know is not right.

required="#{!empty param['postalCode[#{rowIndex}]']}">

Can some one suggest how to do it?


回答1:


This should work:

required="#{!empty paramValues.postalCode[rowIndex]}"

The #{paramValues.name} returns a String[] with values in the indexed order.



来源:https://stackoverflow.com/questions/3149848/nested-el-in-jsf

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!