Oracle WebCenter (FatWire)

During my time working in consulting I was tasked many times with delivering FatWire sites. I took notes due to the lack of useful documentation at the time. These are the results of those notes made and shared.

Assign Asset Attribute to a Variable and Output to Screen

The first part of this is the same as Output Asset Attributes to Screen, the difference begins at the end of the ics:listget tag. I have added output="" and added a name. This is the variable to which the attribute will be assigned.

Output Asset Attributes to Screen

This example sets an asset which I have named objAddress using the assetset:setasset tag.

Create a List

In the example below I am adding the assetid and the assettype of a sample asset to a new IListObject listobject created using listobject:create. listobject:create specifies the object name and also the columns you wish to have in your list.

Creating a PickList and PickList Category

You want to create a picklist to allow you to dynamically update options in select statements. This is easily achieved using picklists.

Debugging

At any and all stages of development debug text in useful for locating & resolving errors or simply tracking progress. FatWire's main log is called the FutureTense.txt. This log can be written to from either the JSP or XML classes using the ics library.

Find all available variables on a page

When developing it is often useful to identify the variables that are available to you at any given moment and the values associated with them. FatWire offer a simple method in the ics library GetVars() which returns an enumeration of all the variables in all scopes accessible at that instance.

Get Details of a List

ics:listget gets the list specified in the attribute listname and retrieves the info requested in the attribute fieldname.  This information can be assigned to the variable declared in output.

Get the Attributes of an Asset Dynamically

It has often proven useful to gain access to the asset definition so as to access all the attributes of an asset.  In the example below I am looking for the attributes of asset of type MyAddressAsset which has an asset definition called MyAddressDefinition.

Iterate a List

The initial part of this example is simply retrieving a list of titles from an asset of type myAsset. This list of titles are passed into a variable of called listTitles using the listvarname attribute of the assetset:getattributevalues FatWire tag.

How FatWire works

Understanding FatWire architecture is the main purpose of this lesson. FatWire is a content centric CMS, so in FatWire everything is considered content, or specifically to FatWire content is referred to as an asset.

Order a List

To order a list you create a listobject using the listobject:create tag as shown below.   You then add a listobject:addrow to the listobject:create which has three listobject:argument.

Output an Attribute of Type Asset

In the example below we set up the assets as in FatWire Assign Asset Attribute to a Variable and Output to Screen and assign them to the output variable named pageID.

Output an Image or BLOB

This shows how to output a blob.  The first section under the comment "build the asset" is explained in FatWire Output Asset Attributes to Screen.  The id tag contains the id of the blob to be displayed this is the first edit to the code below that is required to render the blob.  This id can be located under the images tab of the advanced view in CS7.

Output HTML or XHTML Compliant Images

There are only two edits necessary to make this work firstly you need to change the <%=ics.GetVar("Image")%> in the render:getbloburl tag to get the variable holding your image list output.

Retrieving a list of FatWire sites (Publications)

This is a simple and very useful code snippet which allows you to list all the FatWire sites on an App Server. This can be used in designing your own custom forms where you want the user to select the site from a list.

Retrieving Current User Details

This is a simple piece of functionality that takes advantage of the usermanager tag library. The Logged in User id can be retrieved using the usermanager:getloginuser tag and you can out put this to a var using the attribute varname="".

Retrieving Search Results

The searchstate:create tag specifies the name of the search. This name is then referenced by the searchstate:addsimplestandardconstraint and assetset:setsearchedassets tags.

Using PickList for HTML select

This allows users to retrieve the values for their HTML <select> option boxes from the database using a tag.  This tag asset:list allows the user to specify the attributes and it returns them in a list that can then be iterated as in the example below. The list can also be ordered using the order attribute of the tag.

Articles

Java

This what I have spent most of my time working in over the years and these are the little bits of logic or snippets I have come across. Some of these are things I have needed to search for or I have found I needed to feedback on code reviews.

Oracle WebCenter (FatWire)

During my time working in consulting I was tasked many times with delivering FatWire sites. I took notes due to the lack of useful documentation at the time. These are the results of those notes made and shared.

CSS HTML JS

I believe the majority of time on a project is spent with the UI. Web is no exception. I have compiled a set of articles covering HTML, CSS and JS with the intention of taking the sting out of this work.

DevOps

A space dedicated to all those things you need to know beyond writing code. This covers Linux, Windows, Git and SVN among other hopefully useful nuggets.

Security

I picked up some pointers over the years consulting for government and banking sectors before entering a PCI DSS development environment. This section covers aspects like coding, testing, code review and best practice.

Apps

Apps is a section which offers access to bits and pieces I have put together over the last few years. This includes Random Password Generator and Base64 Encoder.