I have created a VF page and in the controller it contain a list of object fields records. I have wrote a condition in it, if the condition is true then an error message should dispaly else the record should be displayed.
eg: - in a object A. i have fields b c d.
in a list i have the records of b, c and d.
list contain 10 records. The first 3 the condition is true then a error messag is shown else the value is dispalyes.
The issue is i am getting an error message but it is diplaying 3 times according to the example. That mean it is displayes according to the number of condition gets true.
I want it to be displayed only once.
Please help me to solve this problem.