nested el in jsf
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?
This should work:
required="#{!empty paramValues.postalCode[rowIndex]}"
The #{paramValues.name}
returns a String[]
with values in the indexed order.
精彩评论