Get context root or URL of ADF / Webcenter application

Hi,

I have requirement to get the context root in javascript on page load.Not on any event.If you need on java you can try my previous solution like get the current viewId or url in ADF using ControllerContext. Following solution will work in any application

Try this

window.location.protocol = “http:” // gives you protocol
window.location.host = “techartifact.com”
window.location.pathname = “blogs/2015/08/building-taskflow-for-reuse.html”

var pathArray = window.location.pathname.split(‘/’);
var secondLevelLocation = pathArray[1]; // this will give you the context root of application

Similarly you can get the current page number or param etc in javascript.

Similarly if you need this context root on some button event you can try like passing it using a af:clientAttribute and EL as *#{facesContext.externalContext.request.contextPath}*

<af:document id=”d1”>
<af:resource type="javascript">
        function onLoad(evt){
            var path=evt.getSource().getProperty("pagePath");
            window.location.replace(path);// here we were trying a redirect , just an example
        }
        </af:resource>
        <af:clientListener method="onLoad" type="load"/>
        <af:clientAttribute name="pagePath"
                            value="#{facesContext.externalContext.request.contextPath}/faces/<pagePath>"/>
….
</af:document>

 

Happy coding in techartifact

Building ADF Taskflow for reuse

Hi All,

If you making taskflow for reuse either as jar or in portal and so on.Always make sure one property that Library Internal
This property makes an entry in task-flow-registry.xml and enable/disable taskflow to reuse.

Library Internal: This property controls the visibility of a task flow when packaged in an ADF library.
This helps developers to expose only those task flows that are indented for reuse.

taskflowProperties

if you check this property you will have task-flow-registry.xml as below

<?xml version = '1.0' encoding = 'UTF-8'?>
<task-flow-registry xmlns="http://xmlns.oracle.com/adf/controller/rc">
 <task-flow-descriptor path="../../main/public_html/WEB-INF/testTaskFlow.xml" id="" type="" uses-page-fragments="false" library-internal="true" remote-invocable="false" train="false"/>
</task-flow-registry>

 

So always make sure you never check this property if you want to reuse.Or if you have parent taskflow and 5 sub taskflow which is called by parent taskflow then you can have 5 sub taskflow as
internal library but parent should be as internal library false.

Happy reusing with Vinay in techartifact

Webcenter portal 12c released. An in-depth view of Webcenter portal 12c.

Oracle releases first FMW 12c platform which also includes ORACLE WEBCENTER 12.2.1. Oracle webcenter portal changed a lot in this release. Some of the interesting features includes :

– New User Experience
responsive12c111

admin

– Responsive UI
Two OOTB Responsive Page Templates – Mosaic and Unicorn

– Rigorous stress and performance testing allowed to achieve an average response time of
-Portal composer view is completely changed. Options of draft is available.
composer

– Multiple OOTB page style.
pagestyle

– Component wiring – Wiring between consumer and producer taskflow or pass value as parameter to component or Pass values to page components using values in page URLs. This is one of most likeable features in this version.

– Rapid application integration :

rad

OOTB Integration – integration between WCP and Oracle products is available OOTB (Oracle BPM, OBIEE or IDM – now, Oracle Mobile Cloud Service (MCS) or Catalog Service – in 12c.

– Wizard-driven tools for data integration via support for REST and SQL data sources, earlier we only had sql data source. Now we can perform crud operations through REST.
sqldatasource

sqll

– OOTB and custom visualization templates
– View/Update operations support
– Visualization can participate in components wiring
– Catalog of REST APIs from OSB

– Content manager in Webcenter Portal

Previous document explorer taskflow is not present in 12c. We have new content manager. After this you don’t need separate UI for webcenter content.

– ECM in the Portal – WC Content model of managing content, DAM
– Replacement to 11g Document Library taskflows
– Access to workflows, enterprise libraries, metadata and more
– WC Content tools – Mobile Apps, DIS, WebDAV
– Pin view to a particular configuration
– Portal events and parameters
– Works only with Framework folders
– Browse, View and Find documents similar to WebCenter Content UI
– You can leverage IRM, DAM inside portal directly.
– Add metadata for each document.
– easy merging of video using embed code for videos.
– Better development of content presenter directly in jdeveloper.

document

metadata

shared asset
– Portal life cycle

-Create portal server connection to production systems and Choose a server connection and deploy a portal to it.
Deployment happens on the UI with 4 clicks. Changes to a portal is propagated in a similar fashion. Shared Assets as well as (ADF) shared Libraries are transferred to the target server. Really cool.
– All the assets associated with a portal—including global assets—are deployed or the changes are propagated
– Shared libraries—including the linked shared libraries—are optionally deployed along with a portal
– Changes since the last deployment is clearly displayed prior to propagation
– Portal managers can deploy portals in a self-service manner.
– All portal deployments are audited. That means you can verify all the deployments.
– The details can be viewed after a deployment completes.

deply

– Round trip Asset development for portal.
– Same as before. Can create following assets
Layouts
Page Styles
Page Templates
Skins
Visualization Templates(New)
Content Presenter Templates

Summary –

New technologies and standards support:
ADF 12c stack uptake (JSF2 / Jersey 2 / Oracle REST standard / Alta look & feel)
Produce and Consume REST APIs (ADF REST DC with JSON Descriptors)
Responsive UI OOTB (Twitter Bootstrap, jQuery)
Native HTML5 tag support (camera, geospatial, phone)

–REST API for portal lifecycle & deployment to a remote Server (e.g. T2P)

–Easily configure role based security (simplification of roles)

Overall its quite a new and changed version in comparison with 11g. With addition of bootstap and Rest support, it make the webcenter portal really powerful. You can download portal here.
Webcenter portal release notes

Happy Learning Webcenter Portal 12c with Vinay. Stay tuned for more posts on webcenter portal 12c.