Friday, November 13, 2015

Developing Webcenter Portal Assets for 12c

Portal Assets Development

The development of Webcenter Portal assets changed quite a lot on Webcenter Portal 12c. Oracle WebCenter Portal's round-trip development, where the developer would be able to download assets directly from Webcenter Portal server, update them in Jdeveloper and later upload them back is no longer available. Along with round-trip development, DesignWebCenterSpaces ready-made application is also gone (big grin).
A new application template named Webcenter Portal Asset Application is available in Jdeveloper 12.2.1 (as long as Webcenter Core and Webcenter framework addons are installed). This application can hold Asset Projects to to create or modify portal elements such as page templates, skins, layouts, page styles, Content Presenter templates, and Visualization templates. As you may notice you can no longer manage navigations as an asset and now the navigation is fully controlled by the page hierarchy. The process described below on how to create and upload a portal asset is very similar to oracle material available here.

  1. So first step would be to create a new application on Jdeveloper using the Webcenter Portal Asset template.


  2. On the second step of the wizard give a project name that refers the asset that you want to create, for example PageStyleThreeColumns.
  3. On the fourth step select the type of asset that the project will hold, in this case Page Style.
After the wizard is finished we will have a structure similar to this one:


Highlighted are two important files created. ThreeColumns.jspx is the page style itself that we need to customize. The file assetDef.xml is a new concept that stores metadata for the definition of our Portal Asset. You can change the values for asset-specific properties, such as displayName and the Description, by editing the assetDef.xml file.
One of the great things about asset development for Webcenter 12c is that you no longer need to copy files around or to setup configuration files in order to upload your assets. A new type of connection for Webcenter Portal Server is available. Just right-click the Connections folder in the Application Resources view and add the connection.
After the customizations on our page style are done its time for deployment. Just right click the project and select deploy. There will be available the option to deploy it directly to the Webcenter Portal Connection we created earlier. On the second step of the deployment we have to define the target of our deployment (if its a shared asset or restricted to a portal). Click Finish to deploy the asset, or click Summary to see a summary of your deployment selections before deploying. Open the Deployment - Log pane and check the status of the deployment. You can also click on the target URL on the Portal Server to view the recently deployed asset.
So far so good, great improvement when compared to Webcenter 11g, but there are a few catches. Since you can no longer download the assets from your portal server, special attention must be given when uploading the asset to the server to not overwrite changes made at runtime.

Multiple Portal Asset projects in one Portal Asset application 

Another problem of the new model is that one Portal Asset Project can hold just a single asset. So if you portal has 2 skins, 2 templates 3 page styles you will have to create 7 Portal Asset projects. To make things worse if you try to add a new Portal Asset project on the same Portal Asset application the wizard to create the project does not have the step to select the asset type that we want to create, as shown on the image below. 

Not having the asset creation on the wizard causes one issue in particular. When we add the new asset to the project it will not create the assetDef.xml, and without it we cannot deploy the project. Sure you could create one application for each asset, but this would mean several applications to manage the same type of entity, and if the Webcenter Portal server changes you have to change the connection in several projects. 
 The solution to have a single application with multiple asset projects is to manually create the assetDef.xml for each new project. In order to do that follow this steps:
  1. Create a new Portal Asset project;
  2. Add to it the desired asset (skin, page style, page template, ...).
  3. Right click the META-INF folder on Application Sources and select New -> From Galery.
  4. On the gallery go to the category General -> XML -> XML Document.
  5. On the Create XML File dialog set the file name to assetDef.xml and the directory must be: <project folder>src\META-INF\assets\<asset name> as shown bellow:
  6. Now edit the XML file like one of the examples bellow.
  7. If you try to deploy your asset now you will face an error like this one:
  8. Close Jdeveloper and open it again and you will be able to deploy. if you don't want to close it, you may use the refactor->rename on the assetDef file to make Jdev update its references.

For your reference, bellow are presented some examples of assetDef.xml, one for each type of asset:


Page Style
<?xml version="1.0" encoding="UTF-8"?>
<name>ThreeColumns</name>
<displayName>ThreeColumns</displayName>
<sourcePath>/threeColumns</sourcePath>
<pagePath>ThreeColumns.jspx</pagePath>
<pageDefinitionPath>ThreeColumnsPageDef.xml</pageDefinitionPath>
</ns0:pageStyle>


Page template
<?xml version="1.0" encoding="UTF-8"?>
<name>PageTemplate1</name>
<displayName>Page Template 1</displayName>
<sourcePath>/pageTemplate1</sourcePath>
<pagePath>PageTemplate1.jspx</pagePath>
<pageDefinitionPath>PageTemplate1PageDef.xml</pageDefinitionPath>
</ns0:pageTemplate>

jpr file
<value n="assetDescription" v=""/>
<value n="assetDirectory" v="\pageTemplate1"/>
<value n="assetDisplayName" v="Page Template 1"/>
<value n="assetType" v="Page Template"/>


Layout
<?xml version="1.0" encoding="UTF-8"?>
<name>PageTemplate1</name>
<displayName>Page Template 1</displayName>
<sourcePath>/pageTemplate1</sourcePath>
<pagePath>PageTemplate1.jspx</pagePath>
<pageDefinitionPath>PageTemplate1PageDef.xml</pageDefinitionPath>
</ns0:pageTemplate>


Skin
<?xml version="1.0" encoding="UTF-8"?>
<name>Skin1</name>
<displayName>Skin 1</displayName>
<resourceBundle>portal.skinBundle</resourceBundle>
<sourceMetadataFilePath>skin1/Skin1.css</sourceMetadataFilePath>
<skinId>Skin1.desktop</skinId>
<skinFamily>Skin1</skinFamily>
<skinExtends>skyros-v1.desktop</skinExtends>
</ns0:skin>

Content Presenter Template
<?xml version="1.0" encoding="UTF-8"?>
<ns0:contentPresenterTemplate xmlns:ns0="http://xmlns.oracle.com/webcenter/assetpublishing/assetdef">
<name>ContentPresenterTemplate1</name>
<displayName>Content Presenter Template 1</displayName>
<sourcePath>/contentPresenterTemplate1</sourcePath>
<pagePath>ContentPresenterTemplate1.jsff</pagePath>
<viewId>contentPresenterTemplate1</viewId>
<categoryId>oracle.webcenter.content.templates.default.category</categoryId>
<categoryDescription>Default display templates for multiple content items.</categoryDescription>
<categoryDescriptionKey>DEFAULT_LIST_CATEGORY_DESC</categoryDescriptionKey>
<categoryName>Default Templates</categoryName>
<categoryNameKey>DEFAULT_LIST_CATEGORY_NAME</categoryNameKey>
<templateType>list</templateType>
<categoryIsDefault>true</categoryIsDefault>
</ns0:contentPresenterTemplate>

Visualization Template
<?xml version="1.0" encoding="UTF-8"?>
<ns0:visualizationTemplate xmlns:ns0="http://xmlns.oracle.com/webcenter/assetpublishing/assetdef">
<name>VisualizationTemplate1</name>
<displayName>Visualization Template 1</displayName>
<sourcePath>/visualizationTemplate1</sourcePath>
<pagePath>VisualizationTemplate1.jsff</pagePath>
</ns0:visualizationTemplate>

40 comments:

  1. Hi peter,
    Your post on webcenter 12c page template creation is very much usefull to us.
    We have created Page template in Jdeveloper 12c, by default we are getting Top Navigation model for webcenter pages.How can we implement Side Menu Navigation for the Template.
    Thanks,
    Suresh.

    ReplyDelete
  2. Hi Suresh,

    Webcenter Portal 12c provides out of the box two task flows. One for top and one for side navigation. You can update your template to call the side navigation task flow.
    Webcenter also provides a Side Navigation Page Template. You may use as a basis for start building your own template.

    ReplyDelete
  3. Thanks Peter,
    Added a taskflow for Side Navigation Page Template from the bindings and able to get the side naviigation taskflow.


    ReplyDelete
  4. Hi Peter,

    When i create content presenter template, assetDef.xml is having tags related to List template. How can i change it to single item template definition file?
    Can you please send me the sample assetDef.xml file for single content item template?

    Regards
    Mamatha

    ReplyDelete
    Replies
    1. Hi Mamatha,

      to create a single item content presenter template you have to make a few changes on top of what Jdev creates:

      On assetDef.xml change the templateType property value from "list" to "single".

      On the JSFF file you have to replace the tag:
      dt:contentListTemplateDef var="nodes"
      for
      dt:contentTemplateDef var="node"

      Delete
  5. I am beginner in Oracle Webcenter. Finally, I got my answer after many hours of surfing the web by reading your article. hope to see more posts on this technology.

    ReplyDelete
  6. The information you provided in this Blog is very useful.I found your blog very interesting and very informative.Oracle WebCenter is the center of engagement for business powering exceptional experiences for customers, partners, and employees More Details About Oracle Webcenter Click here.

    ReplyDelete
  7. Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.Thanks for this great share. This post is much helpful for us.Excellent Blog! This is very helpful for who wants to learn professional Education.Thank you. Please keep Going. I am waiting for your more posts like this or related to any other informative topic.
    vmware training classes

    vmware training institute


    ReplyDelete
  8. The blog was absolutely fantastic! Lot of information is helpful in some or the other way. Keep updating the blog, looking forward for more content...Great job, keep it up
    Workday HCM Online Training
    Oracle Fusion Financials Online Training
    Oracle Fusion HCM Online Training
    Oracle Fusion SCM Online Training

    ReplyDelete
  9. You can easily all from the QuickBooks Payroll Support Phone Number number to find out more details. Let’s see several of the choices that come with QuickBooks which includes made the QuickBooks payroll service exremely popular.

    ReplyDelete
  10. QuickBooks Pro is some type of class accounting software which has benefited its customers with different accounting services. It offers brought ease to you by enabling some extra ordinary features as well as at QuickBooks Support Number voices and keep close track of every little thing like exacltly what the shoppers bought, just how much they paid etc. In addition it enables you to have a crystal-clear insight of the business which will help anyone to monitor your hard earned money, taxes as well as sales report, everything at one place.

    ReplyDelete
  11. QuickBooks Payroll Contact Phone Number

    So so now you are becoming well tuned directly into advantages of QuickBooks online payroll in your business accounting but because this premium software contains advanced functions that will help you and your accounting task to accomplish, so you could face some technical errors when using the QuickBooks payroll solution. In that case, Quickbooks online payroll support number provides 24/7 make it possible to our customer. Only you must do is make a person call at our toll-free QuickBooks Payroll tech support number . You could get resolve most of the major issues include installations problem, data access issue, printing related issue, software setup, server not responding error etc with this QuickBooks payroll support team.

    ReplyDelete
  12. You will need to choose QuickBooks Enterprise Support Phone Number to cover your valuable time and cash on development of your organization in place of resolving errors in your accounting software. Even as we provide one day customer care at , your issues are resolved at any instance of times from technically skilled professionals at minimal price.

    ReplyDelete
  13. Problems are inevitable plus they usually do not come with a bang. Our team at QuickBooks Payroll Support Phone Number is ready beforehand to provide you customer-friendly assistance if you speak to an issue using QuickBooks Pro. All of us is skilled, talented, knowledgeable and spontaneous. Without taking most of your time, our team gets you rid of all unavoidable errors of this software.

    ReplyDelete
  14. QuickBooks is amongst the great accounting software to easily manage all of those things. And in case you employ this excellent accounting software and in case you are suffering from any errors or issues associated with QuickBooks like undo reconciliation in QuickBooks on the internet and many more. Simply contact our QuickBooks support team through toll-free QuickBooks Technical Support Phone Number.

    ReplyDelete
  15. By using QuickBooks Payroll Support USA, you can create employee payment on time. In any case, you will be facing some problem when making use of QuickBooks payroll such as for instance issue during installation, data integration error, direct deposit issue, file taxes, and paychecks errors, installation or up-gradation or simply just about virtually any than you don’t panic, we provide quality QuickBooks Payroll help service.

    ReplyDelete
  16. Our support also extends to handling those errors that always occur when your type of QuickBooks has been infected by a malicious program like a virus or a spyware, which could have deleted system files, or damaged registry entries. Moreover, our QuickBooks Enterprise Tech Support Number also handle any type of technical & functional issue faced during installation of drivers for QB Enterprise; troubleshoot just about any glitch that may arise in this version or perhaps the multi-user one. QuickBooks Enterprise is an extremely advanced software suit that offers you more data handling capacity, more advanced and improved inventory management features and support for handling multiple entities at the same time. This software suit is perfect for companies that have outgrown the basic level accounting software requirements and are usually now in search of something more powerful and more feature rich to handle more business functions in a much lesser time.

    ReplyDelete
  17. There are many features that produce QuickBooks Support Phone Number Premier standout such as for instance it gives bank security that aids you to go with IT maintenance smoothly. You can also add amount of users that will access company files at multiple locations. It gives you the facility of automated data backup and recovery. These features are actually perfect for the development of a person's business. QuickBooks Premier will likely be two versions Premier and Premier Plus. Both in the versions you will want to select the industry type during the time of installation.

    ReplyDelete

  18. The experts at our QuickBooks Enterprise Technical Support tech support number have the necessary experience and expertise to deal with all issues linked to the functionality for the QuickBooks Enterprise.

    ReplyDelete
  19. The QuickBooks Tech Support Phone Number executives can even provide remote assistance under servers which are highly secured and diagnose the issue within seconds of the time period.

    ReplyDelete

  20. There are many features that produce QuickBooks Support Phone Number Premier standout such as for instance it gives bank security that aids you to go with IT maintenance smoothly. You can also add amount of users that will access company files at multiple locations. It gives you the facility of automated data backup and recovery.

    ReplyDelete
  21. Revenue With QuickBooks Tech Support Number Every business wishes to get revenues on a regular basis. But, not all of you'll be capable. Do you realize why? It is as a result of lack of support service.

    ReplyDelete
  22. In conclusion, don’t hesitate to call us on our QuickBooks Online Help Number. We have been surely here for you personally. In conclusion, any error, any problem, any bug or whatever else pertaining to QuickBooks related problem, just call our QuickBooks Customer Service Number.

    ReplyDelete
  23. Being a regular business person, working on professional accounting software, like QuickBooks, is certainly not always easy. Thus, users may need to face a quantity of issues and error messages while using the software; when you feel something went wrong with your accounting software and should not find a way out, you will get tech support team from QuickBooks Support Phone Number, working day and night to fix any issues linked to QuickBooks.

    ReplyDelete
  24. You are always able to relate with us at our QuickBooks Helpline Number to extract the very best support services from our highly dedicated and supportive QuickBooks Support executives at any point of the time as most of us is oftentimes prepared to work with you. A lot of us is responsible and makes sure to deliver hundred percent assistance by working 24*7 to meet your requirements.

    ReplyDelete
  25. The most common errors faced by the QuickBooks users is unknown errors thrown by QuickBooks software at the time of software update. To help you to correct the problem, you need to look at your internet and firewall setting, internet browser setting and system time and date setting you can simply contact us at QuickBooks Support Phone Number for instant assistance in QB issues.

    ReplyDelete
  26. QuickBooks Support Phone Number is an industry leading software providing efficient business automation. It has made bookkeeping and accounting easier for small business owners. It also reduces time and effort required to manage a company’s financial accounts.

    ReplyDelete
  27. QuickBooks Payroll Support Number is a service provided by Intuit which lets you use Payroll together with your QuickBooks Software. Enhanced Payroll and Full-service payroll come inside the Online Payroll whereas Basic, Enhanced and Assisted Payroll come under Payroll for Desktop.

    ReplyDelete
  28. We are the one stop solution to all your glitches in the Quickbooks Payroll Support Phone Number 1-800-986-4607. We are Providing immediate & effective response to the user. Our team constitutes of various qualities.Our team is very friendly & polite. So, whatever the issue you are preoccupied .

    ReplyDelete
  29. Nice Blog ! Do you need instant help to fix your QuickBooks issues? If yes, we are here to help you. Dial our QuickBooks Toll Free Phone Number +1-800-986-4607 now.our team have are 24*7 availability & very Experienced.
    View on Map: https://tinyurl.com/yyah7zez.

    ReplyDelete
  30. Get connected with QuickBooks Phone Number Support +1(800)986-4591, to resolve error problems in the software. The experts deployed on the support line is to deliver immediate assistance regarding QuickBooks & its issues. If having trouble in QuickBooks, get connected with the experts by calling on the support phone Number. For More Visit: https://www.quickbooksphonenumbersupport.com/

    ReplyDelete
  31. Very well explained and informative blog click here for
    Quickbooks POS Support Phone Number and for more detail dial on our support number 844-908-0801

    ReplyDelete
  32. Nice Blog ! We are here at QuickBooks Support Phone Number 855-9O7-O4O6 to give our customers instant support services. We are responsible for providing support services for all versions of QuickBooks.

    ReplyDelete
  33. Do you want help to get your QuickBooks issues resolved in seconds? If yes, Dial our QuickBooks Customer Service Phone Number 855-907-0406 now! We will let you do your accounting duties without any interruptions.

    ReplyDelete
  34. Nice Blog ! Do you Need instant help fixing problems with your QuickBooks? Now dial our QuickBooks Payroll Support Phone Number 855 -9O7-O4O6! We have technical experts who can instantly fix your problems.

    ReplyDelete
  35. QuickBooks Customer Service has assembled a solid dependence inside the customer base that clients can get any of their issues settled by approaching toll-free Number + 1-833-780-0086.

    ReplyDelete
  36. Hello, Everyone,I'm Adrik Vadim living in Kurgan City , I want to share with you all on here on how Mr Benjamin help me with a loan of 15,000.000.00 Rubles to start up my food beverage delivery after all I have work in several hotels here in kurgan just to earn a living but unfortunate I was still having difficulties to pay a rent but I thank God now that I'm a self employ now with 5 workers working in my care. Just if you looking for financial freedom I will advise you contact Mr Benjamin with this email below and whats app number as well. 247officedept@gmail.com   +1-989-394-3740

    ReplyDelete