+ Start a Discussion
Venu VaddellaVenu Vaddella 

Apex Page Messages

Good day, 

I have a visual force page included with another two visual force pages using apex:include .


Page A is the main page. Page B & Page C are included in Page A.  Page B has separate class and Page C has separate class. 

These 2 pages are  rendering on Page A using onselect function. Page B is default page on Page A. 

If  Page B has no data, i am displaying messages & also  if Page C has no data , i am displaying messages. 

Now my problem is , 

If Page B has data & Page C has no data messages are working fine. In vice versa also working fine.  But when these 2 pages has no data, then two pages messages diplaying on page A at time. 

My requirement is when we select page B , only page b messages should display, similarlly for page C also. 

Please help. 
In this case, you will have to using two variables to store the 'displaying message'. since if you use <apex:message>, it will display all the messages. so what you can do is use a text dispaly , with render wherther it have data or not, and display a variable.