This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSF and the fly likes Customer Validator - List always empty Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Customer Validator - List always empty" Watch "Customer Validator - List always empty" New topic
Author

Customer Validator - List always empty

Marc Huber
Greenhorn

Joined: May 16, 2011
Posts: 1
Hi,

I have two Array-Lists. One Array-List (VersorgDataEntryListCompare) contains only data from database; the other (VersorgDataEntryList) is filled with data from database, too. The data of VersorgDataEntryList are shown by h:dataTable e.g.


If the user press the button "Speichern", the data from the inputfields are load into VersorgDataEntryList (the old values are deleted before)


The problem:

I want to proof, if the date from VERSORGUNG_VON is after the date of VERSORGUNG_BIS and if the inputvalues are not the same as in database.

For example:

Correct:
VERSORGUNG_VON.........VERSORGUNG_BIS
22.10.2000......................30.11.2004

Wrong
VERSORGUNG_VON........VERSORGUNG_BIS
12.10.2006.....................30.11.2004

Also wrong
VERSORGUNG_VON (database).....VERSORGUNG_VON (inputfield)
12.10.2006...................................12.10.2006


So i have written my own Validator.

I use the id-number of the component to know the number of fields and to know, from which field the value come from.

But my two list's are empty in this method. If I write a "normal" method (not a validator-method) to test, but there the list's are filled.
Why are both list's in the validator-method empty?




Or is there a better way to compare two fields?


Thank you

Greets Veni_Vidi_Vici
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Customer Validator - List always empty
 
Similar Threads
Custom input validator
Problem jsf cutom validation -- validate method dont call
empty space validation
JSF validation not validating
Custom validator not validating