Tag: Content

  • Creating a Single Item Content Presenter Template in WebCenter Portal 12c (12.2.1)

    Creating a Single Item Content Presenter Template in WebCenter Portal 12c (12.2.1)

    Creating a Single Item Content Presenter Template in WebCenter Portal 12c (12.2.1)

    By: Abhinand Shankar | Technical Architect

    The WebCenter Portal (WCP) implementations I have worked on include an integration with WebCenter Content (WCC). WCC managed the creation of the content items through Site Studio. WCP handled the presentation that covered the content on the web page that was finally rendered. This was done through Content Presenter Templates.

    In 11g, the round trip development of the templates involved downloading a DesignWebCenterSpaces application that was preconfigured for managing the assets. The release of 12c brought changes to this process. JDeveloper is now built in with the application template to create the portal assets.

    When creating a portal asset project, you have the option to select the asset type as Content Presenter Template.

    In platform view you have the option to select the asset type as Content Presenter Template in Oracle WebCenter Portal 12c.

    This generates the project and all the necessary artifacts.

    In desktop view of portal asset document tree in Oracle WebCenter Portal 12c.

    In this example, SampleContentPresenter.jsff contains the actual code. You can deploy the asset to the portal managed server directly from JDeveloper or create an AAR file and upload it. It is now available when configuring a Content Presenter task flow on the portal.

    In platform view of how you can deploy the asset to the portal managed server directly from JDeveloper or create an AAR file and upload it

    You will notice that the template is available only when the content source is a list of items and not for a single item. A look at assetDef.xml shows that it is created as a list template by default.

    In platform view of how assetDef.xml shows that it is created as a list template by default.

    The application creation wizard does not give you an option to select the type of template. Therefore, attempting to update assetDef.xml throws an error.

    In order to create a presenter template for a single item, create the application with the defaults and deploy it to the managed server. Log into portal administration and from the assets page download the template. Explode the archive and you should see a file called asset-entities.xml under the folder contentPresenter-s-gsr90079447_922e_48ff_a483_0c496a20c1c9 (the folder name contains a guide).

    Asset-entities.xml contains the definition for the template and is by default as shown below:

    In platform view of how asset-entities.xml contains the definition for the template and is by default as shown.

    Update this section as follows:

    In platform view of how asset-entities.xml contains the definition for the template and is by default as shown and how to update it.

    Make sure to update the jsff file to use the tag for a single item content presenter template.

    WCP 7

    Archive the files and deploy the AAR file. The template should now be available for a single content item.

    In platform view of how to archive the files and deploy the AAR file.

    Note: After deploying the template, you may have to uncheck the available box and then check it again before it shows up in the drop down.

    Contact Abhinand or TekStream Today
  • How to Keep Your Profile Value with the New Patch Set for Oracle WebCenter Content 11.8 (MLR15)

    How to Keep Your Profile Value with the New Patch Set for Oracle WebCenter Content 11.8 (MLR15)

    TekTalk: Weekly insights and tech tips from industry experts at TekStream Solutions.

    How to Keep Your Profile Value with the New Patch
    Set for Oracle WebCenter Content 11.8 (MLR15)

    By: Angela Lindsey | WebCenter Content Senior Developer

    Dependent on Profiles?

    Does your WebCenter Content system use profiles?  Do you ever have to update metadata from the Full Update Form? Do you expect that the profile value will remain as it was prior to clicking the Full Update Form button?  I would expect that basic behavior but the latest patch set for WCC 11.8 (aka MLR15) decided to make a slight change on the Full Update Form which clears this value!  Yes I did say, clears this value. Oh and not only clears the value but also removes the Default Update Form button.

    At one time when you clicked on Full Update Form to show all the metadata, not only was the value of Profile still there but there was a Default Update Form button to return to the profiled update screen.  With the latest patch set applied, when you are making a metadata update on the Full Update Form screen and don’t notice this value is now blank, a quick click on Submit Update will display the awful, un-profiled content information screen.  That is when the call comes into the help desk with a typical “my screen is all messed up” panic.

    TekSteam has a fix and can quickly remedy your issue.

  • Pagination in Oracle WebCenter Content Presenter

    Pagination in Oracle WebCenter Content Presenter

    TekTalk blog series thumbnail.

    Pagination in Oracle WebCenter Content Presenter

    By: Suresh Vuray

    Business Problem:

    Recently, I came across a requirement to do pagination in a Content Presenter.

    The business use case is to display a list of content items (Site Studio Data files) as a list of items on a page.  It can be achieved easily using the Content Presenter taskflow, assigning a list of items (multi-list or query based) and use a multi-list Content Presenter.  That works fine until the content grows and the number of items increase to more than a few (say more than 10). When the number of items increases, it affects the usability (user will have to scroll down a long page of content to find what they need) and the response times of the page (especially on pages with a lot of traffic as the number of lookups in WCC increases and the page size grows).

    This customer has a few “Archive” pages in the portal, where the user will be able to dig up an old “News” article, a “Publication” or some other form of site studio based content. A quick Google search pointed out a few ways to achieve pagination in a Content Presenter using a bean for persisting the pagination data such as page index, page size, etc. However, that would require custom library development, deployment, downtime, restarts, etc.

    TekStream Solution:

    Application Development Framework (ADF) Basic Table Component comes to the rescue. One of the new features of 11.1.1.7 is pagination in tables.  ADF Basic Table can be used as an iterator to loop thru the items restored by the list of items and pagination can be enabled by changing the following properties of the af:table component

    • autoHeightRows=0
    • scrollPolicy=”page”
    • fetchsize=5 – fetchsize property sets the items per page. In this example it is set to 5.
    • value=#{nodes} – where nodes is the list of items
    • var=”node”

    <af:table id=”cpTable” value=”#{nodes}” var=”node”                  

           scrollPolicy=”page” autoHeightRows=”0″ fetchSize=”5″

    </af:table>

    af:column component(s) can be added to the af:table to display the node property data. In the example below a single item template is used but multiple columns and standard adf component can also be used to get desired display of content.

    <af:table id=”cpTable” value=”#{nodes}” rowBandingInterval=”0″ var=”node”                         

            scrollPolicy=”page” autoHeightRows=”0″ fetchSize=”5“>

            <af:column id=”cpColumn1″>

                            <dt:contentTemplate  id=”singleItemTemplate” ”

                                            node=”#{node} nodesHint=”#{nodes}”

                                            view=”content.templates.singleItem” />

                    </af:column>
    </af:table>

    You may need to set nowrap=false property on the af:column component to achieve display of single item in a single / multiple lines as desired.

    However, ADF Basic Table component is developed for displaying typical database table data, hence it has some specific properties enabled by default and these need to be disabled appropriately.

    • disableColumnReordering=”true”
    • columnSelection=”none”
    • rowSelection=”none”
    • columnResizing=”disabled”
    • contentDelivery=”lazy”
    • contextMenuSelect=”false”
    • horizontalGridVisible=”false”
    • verticalGridVisible=”false”

    <af:table id=”cpTable” value=”#{nodes}” rowBandingInterval=”0″ var=”node”                 

            scrollPolicy=”page” autoHeightRows=”0″ fetchSize=”5″                        

          disableColumnReordering=”true” columnSelection=”none” rowSelection=”none”   

          columnResizing=”disabled” contentDelivery=”lazy” contextMenuSelect=”false”                           

          horizontalGridVisible=”false” verticalGridVisible=”false” >

            <af:column id=”cpColumn1″>

                            <dt:contentTemplate  id=”singleItemTemplate” ”

                                            node=”#{node} nodesHint=”#{nodes}”

                                            view=”content.templates.singleItem” />

                    </af:column>
    </af:table>

    Pagination 11 example screenshot.

    Skinning the af:table component will allow us to modify/remove the unnecessary elements of the pagination. Below is one such variation.

    Pagination 22 example screenshot.

    This approach improves portal page response time, especially for retrieving and presenting a large list of Site Studio based web assets from Oracle WebCenter Content.