find ADF Faces Components in Page by javascript-findComponent

When we using JavaScript with ADF, the AdfPage.PAGE.findComponentByAbsoluteId() and AdfPage.PAGE.findComponent() are useful.

-> Search by the component ID – use findComponentByAbsoluteId function
-> Search in component that stamps its children – use findComponentByAbsoluteLocator function Relative Search
-> Use findComponent function. This function searches the component clientId which can be renderer implementation specific.

you can write a java script function like

    <af:resource type="javascript">
          function contactsPopupOpenListener(evnt) { var contactBtn =
          AdfPage.PAGE.findComponent("T:topMenuLink_contact");
          contactBtn.setStyleClass("OCCTopMenuContactLinkActive"); } function
          contactsPopupCloseListener(evnt) { var contactBtn =
          AdfPage.PAGE.findComponent("T:topMenuLink_contact");
          contactBtn.setStyleClass("OCCTopMenuContactLink"); }
        </af:resource>

happy finding of component with Vinay in Techartifact…. 🙂

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