Navigating from calendar activity by clicking in Oracle ADF – Techartifact

af:calendar component in ADF is widely used.It is same as Google calendar we used. In calendar we are having different activities .We are having different calendar facet inside the calendar component i. e activitydetail, activityDelete, activityHover, activityContextMenu, create , contextMenu.

If you look down the property of calendar component inside property pallet. you will not find action or actionListener property instead of you will get
calendarActivity, calendarListener etc.

Now my requirment is to clicking on the calendar component , it should navigate to diffrent page in same taskflow. How to do that.Little tricky
According to calendar component we can have this navigation easily by the child component or from the calendar facet. We can have a show a popup
in the activityHover facet. In the popup window we can have the button ,inside the button action property we can define the control flow case or some string which we defined in the taskflow diagram for navigation. If you do like this when you hover over the calendar activity a pop up window will come and you will get button with some other detail , when you click the button you will be navigated to new page. look easy…….

But my requirment is navigate after clicking the acitivity . Then i made that button visible property to false .I created a managed bean and inside the activityListener of calendar component i wrote a method and invoke the button action programmatic and queue the action event as i described in my old post

 
        UIComponent component = null;
        FacesContext facesContext = FacesContext.getCurrentInstance();
        if (facesContext != null) {
          UIComponent root = facesContext.getViewRoot();
          component = findComponent(root, "buttonId");
        }
        
        
        // UIViewRoot root = facesContext.getViewRoot();
        //cb1 is the fully qualified name of the button
        RichCommandButton button = (RichCommandButton)component;
        ActionEvent actionEvent = new ActionEvent(button);
        actionEvent.queue();


Vinay

I am an Oracle ACE in Oracle ADF/Webcenter. Sr Java Consultant-working on Java/J2EE/Oracle ADF/Webcenter Portal/ content and Hibernate for several years. I'm an active member of the OTN JDeveloper/Webcenter forum. Passionate about learning new technologies. I am here to share my knowledge. Give your views and suggestion on [email protected] .

More Posts - Website

Follow Me:
TwitterLinkedInGoogle PlusYouTube