Wednesday, May 25, 2011

ADF BC : Create method in View Object and call it from managed bean or JSF

 

In previous blog I mentioned how to call method in application module from gui and managed bean. Here I will explain you how to call method from gui and managed bean that is in View Object implementation class.

How to make sure that we create method in right impl class depent on your scenario.

If you are having business logic that is pretty generic and not specific and which utilize many VO/EO then go for applicatino module.

If you are having business logic that is specific to only view object and associated view object then go for method in view object impl class.

I created a method in vo that will show employee count.So I followed the same step to generate view object java classes as appmodule.

image

I wrote following method to show employee count.

image

When I exposed the method it came in data control inside employee view object instance.

image

Now I can drag drop this as button , link or even call from managed bean as mentioned in previous blog.

image

No comments:

Post a Comment