本文介绍了在jsf中嵌套el的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于<t:inputText>必需属性,嵌套EL出现问题.我正在使用战斧实现.我有一个dataTable,其中有2列inputText.我的两个inputText都有forceId=true盒子.当您查看页面的查看源时,id的外观为postal[0]zone[0],其中postalCode和zone是textBox的ID,数字0是dataTable的rowId.

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 inputTextboxes. 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.

我在这里的要求是,仅当邮政不为空时才需要区域inputText.我写了类似下面的内容,我知道这是不对的.

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?

推荐答案

这应该有效:

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

#{paramValues.name}返回具有按索引顺序排列的值的String[].

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

这篇关于在jsf中嵌套el的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 14:13