Hi,
I didn't tested it, but maybe something like this works for you:
<tr:inputText label="textfield1" value="#{value1}" required="#{value2 != null}">
<tr:inputText label="textfield2" value="#{value2}" required="#{value1 != null}">
Maybe you have to replace "valueX != null" with some kind of
"isNotBlank(valueX)" and you have to add some PPR stuff to update textfield2 if
value of textfield1 changess (and vice versa)
Von: C Chang [mailto:[email protected]]
Gesendet: Montag, 27. April 2009 11:01
An: [email protected]
Betreff: [Trinidad]How to do dynamic form validation?
Dear all,
I have a form which has two <tr:inputText> elements, if first element has
value, then the second element must have value as well. If first element
doesn't have value, then the second element is optional.
Vice versa, if the second element has value, then the first element must have
value. If the second element doesn't have value, then the first element is
optional.
How can I implement this in trinidad? Thanks in advance!
Kind regards,
Leon