This content has been marked as final.
Show 2 replies
-
1. Re: Validate dataTable-dataModel fields
michaelcourcy Aug 25, 2008 10:48 AM (in response to nvcyril)Did you try this ?
<h:inputText validator="#{myvalidator.validateValue2(_item)}" id="value2" value="#{_item.value2}"/>
Passing the whole object to the method.
-
2. Re: Validate dataTable-dataModel fields
nvcyril Aug 25, 2008 5:47 PM (in response to nvcyril)yes but it doesn't work... i have found a other solution :
In my validateValue2 function :
UIData dataTable = (UIData)context.getViewRoot().findComponent("myForm:myList"); myItemType currentItem = (myItemType)dataTable.getRowData();
The validator runs for each item so, getRowData returns the current item.
Thank you Michael !