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…. 🙂

How to connect with UCM in ADF using RIDC API

In order to get things started you need to install the WebCenter extensions for JDeveloper, create a WebCenter Portal project and configure a Content Server connection to point to a running instance of UCM 11g..

Once you have these in place, you can start programming RIDC. I will describe below the most useful operations that can be performed using the API.

            IdcContext idcContext = new IdcContext("weblogic", "welcome1");
            IdcClientManager clientManager = new IdcClientManager();
            try {
                // Create idc client
                IdcClient client = clientManager.createClient("idc://dummy.com:4444");
                // Create a new binder
                DataBinder dataBinder = client.createBinder();
                // set parameter for service call
               // dataBinder.putLocal(WCCConstants.KEY_IDC_SERVICE, "DELETE_REV");
                //
                dataBinder.putLocal(CWCCConstants.KEY_TIMESTAMP, ts.toString());            logger.fine("get response");
            result = response.getResponseAsBinder();
        } catch (IdcClientException e) {
            throw new ContentServiceException("Error in request IdcClient: " + e.getMessage(), e);
        }
        return result;
    

Using this way we can call the UCM service and get the result set.

Happy coding with Vinay in Techartifact.

Useful Expression language (el)in Webcenter Spaces Application

Small webenter tip- If we want to check whther a user if member of any group or space.Or role of the user. and etc etc

following are el which i found today and usefull too.thats why i am sharing with you.

WebCenterSecurityContextSupport -this interface Provides EL support for WebCenter Security.

#{WCSecurityContext.userInScopedRole[‘Moderator’]} – Checks if current user is in group space role. Role membership is checked against the current Group Space Identifier.

#{WCSecurityContext.userInGroup[‘Administrators’]} – Checks if the current user is a member of the specified enterprise group.

#{WCSecurityContext.userInAppRole[‘SiteResourceAdmin’]} – Checks if current user is in application role.

#{WCSecurityContext.currentUser[‘weblogic’]} – Checks if current user name matches the one specified.

you can try this el as well for checking the current user have specified role in spaces application – #{WCSecurityContext.userInScopedRole[‘ReadOnly or custom role’]}”

Happy coding with Vinay Kumar in Techartifact . 🙂