Thursday, December 26, 2013

Programmatic Partial Page Refresh in ADF for a gantt component

My requirement:
Give the user the ease to schedule the products on a production line.
Use of PPR:
In the production scheduling gantt chart component i am unable to select the task bar component to set the PPR on it. Thats why i have gone for Programmatic PPR.

In the pseudo code:
       -> Get the ADF Faces context
       -> Get access to the UI component instance
       -> Make that component target for PPR.


-> First step bind the gantt component so that the UI component is accessible in the bean.
-> Using the ADFFacesContext get the current instance.
-> Add the component to the current instance partial target.

                    AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
                    adfFacesContext.addPartialTarget(getGetGantt());
         NOTE: here its a gantt component and i get getGetGantt() after i set the binding to the gantt       component. Like wise we can have what ever component we want to have.

add this code to the data change listener after you change the start date, resource_Id and other details in the back end. So that you are refreshing the gantt component after the changes are made.

No comments:

Post a Comment