Posts

Showing posts from November, 2013

Creation of transient Entity Object in ADF

Image
Scenario:  At many point you may feel to create the transient entity object. As we know a transient attribute and transient view object can be created. In the same way we can create the transient entity object. Why we need to create the transient entity object ? This can be see with a suitable example. Suppose you have a transient view object. Now you have created a table on your screen with the help of this transient view object. Now you have populated the data by some code in the transient view object. In my case I have created a page as shown below and created a button which will call a method to populate the table based on transient view object. I have created a transient view object which look likes as shown below. Now I have created the table based on this view object and populating the data using a method call on clicking the button "Populate Table" as shown below. Now when you put the value in table filter with existing value a...

Popup going behind in detach mode for table

Image
Scenario: Suppose you have a table with employee data in ADF screen. This table is surrounded with panel collection. On panel collection you have some button/link to open a popup. Now when you click on detach and try to open popup the popup will open and go behind the detach popup. When you close the detach popup then you can see the popup is opened. This scenario I have shown below: Now when you click on Detach first and then click on "Open Popup" button the popup will open for very short time and it will disappear. Solution: In table property we have a property called "ContentDelivery" which is by default "When Available". Change this property to "Immediate". After changing the property run the page and click on Detach icon. It will open a popup window on full screen. The detach is nothing but full screen view of any table. Now click on the "Open Popup" button. You can see that now popup is coming on top of detach w...

How to show attribute level validation message programatically in ADF

Image
Scenario: As we know if we have to show attribute level validation message in ADF then we put business rules in Entity Object for the attribute. Then the message will show like this. But what if we have to do it programatically.  It is very easy. Suppose we have to put the validation error for Department Name that if department Name is less than 3 character the the error message should be shown as "Department Name must be greater than three character. Solution: Create the EOImpl for the DepartmentEO and go to method:     public void setDepartmentName(String value) {         setAttributeInternal(DEPARTMENTNAME, value);     } Put your validation logic in this method as follows :     public void setDepartmentName(String value) {         setAttributeInternal(DEPARTMENTNAME, value);         if(value.length()<3){          ...