Display UCM files in ADF/Webcenter application as images or link

Requirement- Display UCM images on the page or as link, so that user click of that image and can open in new window

Implementation – You can also have my previous videos to make connection between portal and content and other video Content Presenter in Webcenter Portal
or Content Integration Using Folder viewer in Webcenter Portal .

But if you really want to display your ucm image or show as link for your images or document then you follow below approach
Taking scenario if you don’t how many documents are there.then for that case use below approach

You can use af:image or af:goLink component to put the below url as source or destination

#{WCAppContext.applicationURL}/content/conn/contentserver/uuid/dDocName%3a#{contentId}

#{WCAppContext.applicationURL} = This will return the url with full context till port number = abc.com/7001/yourPortal

contentserver- is connection name to the UCM.

content id = is the content id of the document.

Displaying as link

Image-001

ssdsds-2
Final output would be like below

sdsdsd

Happy Learning by Vinay in techartifact….

Get the display value of selectonechoice or LOV in bean – Oracle ADF

I found one approach to get the display value of LOV in managed bean using  ADFUtils.evaluateEl method.

Say if you have a value change listener for an lov,  valueChangeEvent.getNewValue() gives the index of the value. To get the display value of the lov, use below logic  :

public void onDeptNameChange(ValueChangeEvent valueChangeEvent) {

Object deptNameAttribute = ADFUtils.evaluateEL("#{bindings.deptName.items['"+valueChangeEvent.getNewValue().toString()+

"'].label}");

String deptNameStr = deptNameAttribute .toString();  // This should have the selected display value of lov.

}

Say if you want to access the display value of LOV, in any other method, other than valueChange listener, then use below code :

Object deptNameAttribute = ADFUtils.evaluateEL("#{bindings.deptName.items['"+ADFUtils.getBoundAttributeValue("deptId")+"'].label}");

Here deptId is the code of this lov.  Hope this is helpful.

Happy learning with Techartifact……

Display data for last 15 days and next 30 days in af:calendar in ADF | Techartifact.

Requirment – In calendar component , we need to show data for last 15 days and next 30 days in list mode.

Solution-Seems little tricky. But not much.Let check out in calendar property.

Well there is property called ActiveDay and ListCount. We will be binding the ActiveDay with a managed bean and setting ActiveDay from that bean.

Create a varible like “private Date currentDate;” and generate getter setter method of it in myCalendarBean. Override the getter method of current Date.

    public void setCurrentDate(Date currentDate) {
        this.currentDate = currentDate;
    }

    public Date getCurrentDate() {
        Calendar calendar = Calendar.getInstance();
        calendar.add(Calendar.DATE, -15);
        Date date = calendar.getTime();
        
        return date;
    }


And we need to show last 15 days and next 30 days. that mean total 45 days. We will putting 45 in ListCount.

See in below screenshot.Today is 18 nov. And we getting date range from 3 nov to 17 Dec. 🙂

And that all. nothing to do.

Happy Coding with Techartifact.