shall i write apexPages.messages in the dependent classes of controller? is it displayed on the page if we it meets the criteria. Lets take i have vf page A, Which has B has controller and c is the dependent class for Controller. If i write ApexPages.message in c.
If the criteria meets shall it show it as error message on the vf page??
system.debug(ApexPages.currentPage());
in "c" dependent class method that you're calling from B. you will see the vf page reference.Database.SaveResult
works fordatabase.xxx
methods -- or -- throw exceptions to be caught by its callers. This is a bigger discussion centered around architecture patterns, covered elsewhere.