How to Style an ADF Checkbox

December 6, 2016

By: Andreja Sambolec – Application Consultant

Sometimes, you want to customize your checkbox component by changing the background color.

This can be done using CSS and :after and :before pseudo classes on checkbox elements.

This is what a checkbox looks like:

code

The condition necessary to be able to change the background color:

The element must precede the

The steps to style a checkbox:

#1 Hide the checkbox

input[type=checkbox] {
opacity: 0;
}

#2 Use :checked and :before pseudo classes to style checkbox

.checkbox input[type=checkbox]:checked + label::before{
content: 'ON';
background-color: #428bca;
}

Read more on these steps here.

So, how do you apply these steps to ADF components?

To display a checkbox component in ADF, we are using af:selectBooleanCheckbox element:

<af:selectBooleanCheckbox value=”#{bindings.InternalApplication1.inputValue}”

text=”#{bindings.InternalApplication1.label}”

styleClass=”checkbox”

shortDesc=”#{bindings.InternalApplication1.hints.tooltip}”

id=”sbc1″

disabled=”true”/>

There are two options to set the label:

  1. Using label attribute– it’s placed before input component
  2. Using text attribute – it’s placed after input component

When using text, the result is:

<td valign=”top” nowrap=”” class=”AFPanelFormLayoutContentCell”>

<span class=”af_selectBooleanCheckbox_content”>

<span class=”af_selectBooleanCheckbox_content-input”>

<input id=”r1:0:sbc4::content” name=”r1:0:sbc4″ class=”af_selectBooleanCheckbox_native-input” type=”checkbox” value=”t” checked=”” onclick=”this.focus()”>

<label for=”r1:0:sbc4::content” class=”p_OraHiddenLabel”></label>

</span>

<label for=”r1:0:sbc4::content” class=”af_selectBooleanCheckbox_item-text”>Refugee</label>

</span>

</td>

 

When using label, the result is:

 

<tr class=”checkbox af_selectBooleanCheckbox p_AFDisabled” id=”r1:0:sbc1″ _adftrc=”r1:0:sbc1::icon-style”>

<td class=”af_selectBooleanCheckbox_label af_panelFormLayout_label-cell”>

<label class=”af_selectBooleanCheckbox_label-text” for=”r1:0:sbc1::content” id=”r1:0:sbc1::contentlabelId”>Internal Application</label>

</td><td valign=”top” nowrap=”” class=”AFPanelFormLayoutContentCell”>

<span class=”af_selectBooleanCheckbox_content”>

<span class=”af_selectBooleanCheckbox_content-input”>

<input id=”r1:0:sbc1::content” name=”r1:0:sbc1″ disabled=”” class=”af_selectBooleanCheckbox_native-input” type=”checkbox” value=”t” checked=”” onclick=”this.focus()” aria-labelledby=”r1:0:sbc1::contentlabelId”>

</span></span>

</td></tr>

 

We can see that only the option with text works because the label is set after the input element.

If you have the readOnly attribute set to ‘true’, replace it with ‘disabled=true’. This will make it easier to style.

This is what the CSS should look like:

/**hide checkbox*/
.checkbox input[type="checkbox"] {
opacity: 0;
width: 0px;
}

/*style label to display checkbox*/
.checkbox .p_OraHiddenLabel {
position: relative;
left: inherit;
font-size: 12px;
top: inherit;
content: "";
display: inline-block;
position: relative;
width: 17px;
height: 17px;
left: inherit;
margin-left: 0px;
border: 1px solid #cccccc;
border-radius: 3px;
background-color: #428bca;
border-color: #428bca;
}

/*style for unchecked state
Set the content to have no issues with moving elements when switching between states – the content is hidden, but save space for it.
*/

.checkbox input[type="checkbox"]:not(:checked) + label:before {
content: "ON";
color: #428bca;
display: inline-block;
}

/*style for checked state*/
.checkbox input[type="checkbox"]:checked + label:before {
font-family: 'FontAwesome';
content: "\f00c";
display: inline-block;
}

/*styling disabled chheckbox*/
.checkbox input[type="checkbox"]:disabled + label {
background-color: #428bca;
border-color: #428bca;
opacity: 0.65;
}

/**/
af|selectBooleanCheckbox::item-text {
margin: 0px 1px;
padding-right: 3px;
padding-left: 2px;
vertical-align: middle;
margin-left: 1px;
left: -167px;
position: relative;
}

/**hide checkbox*/
.checkbox input[type="checkbox"] {
opacity: 0;
width: 0px;
}

af|selectBooleanCheckbox::content {
line-height: 19px;
}

The end result:

adf-blog


Using Enterprise Manager for Troubleshooting and Optimizing your WebCenter Content Deployment

May 10, 2016

Raoul Miller – Enterprise Architect

When Oracle WebCenter Content made the architectural shift from a standalone J2SE application to a managed application running in WebLogic Server (WLS), the change provided a number of new capabilities for management, integration, and support.  One of these capabilities is the version of Enterprise Manager that is built into WLS which allows administrators to monitor many different aspects of the WebCenter Content application.

If you haven’t been through formal WLS or Enterprise Manager training, the interface may seem complex or confusing.  My speaking session at Collaborate 2016 in April explained how to use Enterprise Manager to monitor, optimize, and troubleshoot your WCC deployment(s) and I wanted to accompany that with a post here to provide a bit more context.

First a little background – there are multiple versions of Enterprise Manager (EM), and it’s important to be clear which one we are talking about.  Those of us who have worked with the Oracle Database will be familiar with the original EM that’s been used to manage databases since version 9i.  This is now specifically called Enterprise Manager Database Control.

At the other end of the spectrum there is the full-featured Enterprise Manager platform.  This is a multi-tier set of applications which monitor and manage all aspects of your Oracle hardware and software deployment.  We recommend it highly for large Enterprise clients, but it can be expensive and complex.

In the middle is the Enterprise Manager we will discuss today which is a set of web-based tools used to manage and monitor your WLS application server deployments.  You access this at almost the same URL as the WLS administration interface – http://<WLS servername>:7001/em – note the /em rather than /console for WLS, and it’s possible you may not be using the standard 7001 port.

Your initial screen will show you what is deployed to your domain and whether the applications / servers are running or not.

Picture1

You’ll notice that there are lists of application deployments and managed servers within the domain and right clicking on any of these will show you custom actions for each.

Picture2

Before we get to what to monitor and measure, let’s take a moment to review best practices when we are optimizing or troubleshooting WebCenter Content.  As the java application architecture has stayed much the same over the years, the standard areas to focus on have remained fairly constant.  It cannot be stated strongly enough that it is vital to look at ALL these areas, measure and test performance before making any changes, change one thing at a time, and then re-test and re-measure after making that isolated change.  It’s very much an iterative approach as without data you are just playing around with inputs and outputs to a black box model.

The areas you need to monitor and measure when optimizing or troubleshooting WCC are:

  • Java virtual machine
  • File system
  • Database (metadata and indexing)
  • Network
  • Authentication / authorization
  • Customization / components
  • Hardware

 

(I have to credit Brian “Bex” Huff and Kyle Hatlestad for their presentations back in the day at Stellent which taught me this approach.)

Enterprise Manager can help you with many of these areas, but not all – you need other tools to look at file system I/O and utilization, network speed and routing, and (non-oracle) hardware.  However, for the other areas, EM can be extremely helpful.  Let’s look at a couple of examples:

JVM metrics

Right click on the managed server instance and select JVM Performance

Picture3

This brings up a pre-selected set of JVM metrics and a non-standard color scheme.

Picture4

 

This will let you monitor the heap and non-heap memory usage in real time.

**TIP** You may see that the heap is smaller than you thought you had set it – I have often seen an issue where there has been confusion over where the non-default maximum and minimum heap sizes should be set.

Lower on the page you’ll see more granular data on JVM threads, objects, etc.

Picture5

Picture6

Datasource Metrics

You’ll need to open the metric palette on the right side of the screen and open up the Datasource Metrics folder.

Picture7

**TIP ** Make sure you choose this rather than the Server Datasource Metrics, because you will need to select the “CSDS domain-level Datasource”.

Picture8

WebCenter Content Metrics

 

Navigate to the WebCenter Content Server deployment at the bottom of the folder list in the left hand area:

Picture9

Select “Performance Summary” and you’ll see a pre-selected set of content-specific metrics in the graph area.  As with all of the other selections, you can add or subtract metrics as you go – this short cut just gives you a good starting point.

Picture10

We have only scratched the surface here of the capabilities of Enterprise Manager and its use for optimization of WebCenter Content.  For much more information, download to my presentation from Collaborate 2016 or contact us through our website.  We’ll be happy to discuss how we can further help you optimize and troubleshoot your WCC deployments.


What Oracle’s Documents Cloud Service Means for You

April 30, 2015

By: Jon Chartrand – Solution Architect

The sphere of influence that is Enterprise Content Management has been steadily expanding to encompass areas such as records, digital assets, web content, and others. This has meant your ECM solution suite has had to grow and mature to support and maintain these activities. The newest is cloud-based document management, sharing, and collaboration. Now, I bet you’re thinking, “We don’t need that nor do we support that in our enterprise.” Here’s the trick though: Your users are already doing it and they’re very likely making it happen with software that’s not a part of your enterprise ecosystem. That means it’s probably unsupported, potentially insecure, and generally out of your control – not a good combination.

The rapid growth of this field has led to many solutions which attempt to enhance the consumer-level products and businessify them by offering a few more features at a wildly increased price. While these options can seem appealing, they still represent a gap in enterprise coverage as they aren’t themselves enterprise applications. 1Oracle, however, has expanded their Public Cloud offering – already the largest in the world – to not only fill the gap of Enterprise File Sync & Share, but also to expand cloud content management to your on-premises solutions, as well as mesh seamlessly with other applications.Now it’s possible to keep your users happy and productive while maintaining control and even expanding the capabilities of your enterprise. Introducing Oracle’s Documents Cloud Service, also known as DOCS.

DOCS for File Sync & Share

2DOCS represents a trident of capability, the first tine of which is as an enterprise-grade file sync and share replacement for the consumer-grade applications your users may already be utilizing. Before you can sync or share content, however, you have to manage it and Oracle provides a modern, intuitive web interface, for access across every device, to do just that. From here users can upload, preview, revision, delete, and share content and folders with ease making this the front line in our EFSS battle.

On the syncing front, native desktop applications for both Windows and MacOS allows users to seamlessly sync folders of their choosing with the local file system. This means files are available for viewing and editing when and where users demand them and without the need for an Internet connection. When connectivity is restored the sync application automatically updates the cloud with any changes, removing a step for the user.

3On the sharing front, sharing content internally and externally has been rendered both simple and secure. Internally, named users can be shared to folders as one of four roles; Manager, Contributor, Downloader, or Reader. This means you have control over who has access and what kind of permissions they receive. When sharing to an external, non DOCS, user Oracle has provided several capabilities to make the process simple and safe. First, public link accesses are carefully tracked and an audit trail is provided. Each public link can also be assigned an expiration date so you don’t have to worry about forever managing every link that’s been distributed. Even more, each public link can be created with a required passcode so that even if the link is improperly distributed, the materials remain secure. Finally, each public link can be assigned a role which is granted to those who use it. All these features combine to allow incredibly granular control over who can access what content when and with what privileges.

The last point is for those on-the-go. For mobile users Oracle provides native applications for both Android and iOS which enable feature-parity between the mobile and web platforms. This means users can access their content from virtually any device, at any time, and maintain the full suite of capabilities no matter what method they’re using. This represents an unprecedented level of access to and control over enterprise content for your users.

DOCS for Hybrid Content Management

File Sync & Share is a great step forward in content management, however we’re still potentially left with a cache of content that stands apart from your Enterprise Content repository. DOCS addresses this through a process whereby your ECM repository is “tethered” to your DOCS repository through a 3rd party solution and content is shuttled between the two applications when edits are made, ensuring both repositories have the appropriate version available. This process allows your current ECM solution to remain the single point of truth in your enterprise for all content but enables users to access that content from beyond the firewall in a safe and secure manner.

4The use cases for this method are almost endless but imagine a contract package being worked on by a CMO, a salesperson in the field, and a client with contributor access via a shared link. The CMO, working from within the company, can make edits to the documents and upload them to the ECM system. The salesperson in the field accesses the documents via DOCS and can also make changes and suggestions. As revisions are made, the CMO is kept in the loop as the document updates back to the ECM system as well. Finally, when complete, the client can access the documents, digitally sign them, and upload new versions to DOCS. Within moments of uploading the CMO has access and can move them to the appropriate next step.

Hybrid Content Management takes the premise of EFSS and keeps it a truly enterprise endeavor by ensuring that content is reflective of only one repository. This ensures that all users are working with the same materials without fear of unknown changes or missing versions. It also guarantees that content owned by the enterprise is continually merged into the enterprise so there’s reduced anxiety over content ownership and location.

DOCS for PaaS Application Integration

5Finally, DOCS takes an even longer and wider view of its role in the enterprise by enabling you to integrate other Software as a Service (SaaS) applications. The idea here is that any application to which users are uploading content represents another repository in the enterprise. Why should contracts uploaded to SalesForce live in that application? It’s not a content management application and it doesn’t have the metadata, workflows, and processes that your ECM system has. Documents Cloud Service works to solve this issue by providing a rich API foundation and an accessible embedded interface to allow you to merge applications with it and utilize its capabilities as a content platform. This Platform as a Service (PaaS) functionality allows you to keep your enterprises’ content in a single location – especially if you’re utilizing the Hybrid CM capabilities and merging your DOCS repository with your ECM platform.

6With the embedded interface method you can add a simple iframe to any updateable UI to create an almost seamless merging of the two applications. While it looks like a user is uploading documents to the primary application, in reality they’re uploading to DOCS. With the API method, much more elaborate services can be written to customize the functionality of virtually any application, creating a background integration with Documents Cloud Service that is completely transparent to users. In either case, you’re removing another disparate cache of content and centralizing management into a single location. Ultimately this means less storage overhead for your SaaS applications and more complete control over your enterprise content.

Bringing It All Together

Consider a purchase order document uploaded to a contact entity in SalesForce. Though an integration with Document Cloud Services, the content item is actually seamlessly uploaded to DOCS. With the DOCS repository linked to your on-premises platform, the content is replicated to the appropriate folder in the ECM system and an automatic workflow is started, alerting the Director of Sales to the new purchase order and requesting approval. The Director makes a small edit and approves the content. This sends a notification to the sales agent and ends the workflow. The content, now being newer in the ECM system than on DOCS, then flows outward to the cloud, updating the version there. The sales agent happens to also use the desktop client to sync DOCS content with their laptop and so the version there is updated automatically. On receiving the notification, the agent goes to their Oracle Documents folder on the desktop and opens the purchase order to review the Director’s changes. Satisfied, the agent closes the document and then right-clicks on it to access DOCS’ sharing. The agent creates a public link with downloader privileges and sends this link to the purchaser.

In this scenario, the content is available through the SalesForce site, the DOCS site, the DOCS mobile apps, synced to the desktop, and through the on-premises ECM platform. Instead of having two, three, even four different copies of the content across various systems and on various workstations, all versions are centrally managed and maintained in the system of record. This degree of centralized control is precisely what Enterprise Content Management seeks to achieve and Documents Cloud Services bring us all one step closer to that goal.

 

Have questions? Want to learn more? Contact TEAM today!


Easy Mass Metadata Updates In WebCenter Content

October 2, 2014

By: Dwayne Parkinson – Solution Architect

*This blog is informational in nature on an approach to mass updating WebCenter Content. Because each WebCenter implementation is unique in nature, it is not intended as a “how to” guide and any use of this information is at your own discretion.

If I had $100,000 for every time someone wanted to perform a mass update in WebCenter Content, I’d be a very wealthy man. The request doesn’t happen enough for me to lower the price, but it’s still a fairly regular request so I think it’s worth knowing how to answer the question: “How can I update all of these content items with a new metadata value?” Fortunately WebCenter Content offers a number of ways to do this.

Before we dive into the details I’ll just state the obvious disclaimer. Performing mass updates to large groups of content can have some unintended consequences so be careful!

Records Management Global Update

Surprise!!! There’s an incredibly easy to use feature called “Global Update” and as the name suggests, it allows you to perform global updates to metadata. The only caveat is that you must have WebCenter Content: Records Management enabled to use this feature. From the Records menu select Global Updates. From there you will see three options that you can update globally: Retention Categories, Records Folders and <insert heavenly choir of angels singing here> Content!

Untitled

When you select the Content option you will see the Global Updates: Content screen.

Untitled2

As shown above, you can define a query to select the content you want using standard metadata fields or free text searching and then define the metadata field to update. Notice the Preview option allows you to see the results of your query to insure you are updating only the content you want to update.

For reasons unknown to me, this incredibly useful option is hidden by default from the RM admin user. You will need to enable this feature by doing the following:

1) Login in as weblogic or Admin user.

2) Navigate to Administration > Admin Applets

3) Select the User Admin Applet

4) In the User Admin Applet > select the top menu “Security” option and then select the “Permission by Role” option.

5) In The “Permisions by Role” section, Highlight  the RMadmin Role and then select “Edit RMA Rights” option.

6) Select the “Admin” Tab from the “Edit RMA rights” section, then check the “No Security” option and select OK to save.

7) Exit out of the applet, and navigate to “Records “ and choose “Global Updates” to confirm this feature has been enabled.

 

Folder Metadata Propagation

For content that is stored in folders there is an exceptionally easy way to perform a mass update of metadata values. However, it’s important to know that there are two versions of folders implemented in WebCenter Content and as a best practice you have either one or the other, not both.

Let’s start with the “old” version of folders which is called Folders_g. If you click on the Browse Content menu and you see an option for Contribution Folders, then you have Folders_g.

Untitled3

To perform a mass metadata update for all content items in a Folders_g folder you browse to the folder containing the content you want to update. At that point you click on the Information icon.

Untitled4

On the next screen you select the Actions menu and choose Update to update the metadata for the folder.

Untitled5

Once you’ve updated the metadata from the folder, you still have one more step. Select the Actions menu again and choose Propagate. This will propagate the metadata change to all content items in that folder.

If you have the new version of folders, called Framework Folders, when you click on the Browse Content menu you will see an option that says Folders.

Untitled6

As with Folders_G you navigate to the folder which contains the items you want to update. Once you’ve selected your folder choose the Edit menu and update the metadata values for the folder.

Untitled7

After the metadata for the folder has been updated, select the Edit menu again and choose Propagate. This will update all of the content items in the folder with the new metadata value.

Yes, I know what you’re thinking. Folder propagation is great but it leads to an obvious question: What if not everything in the folder needs to be updated or your content is spread across hundreds of folders?

Query Folder Propagation

With the advent of Framework Folders, Oracle invented a new gizmo called a Query Folder. A Query Folder is a folder which contains the results of a query. To add a Query Folder you simply browse to any folder in your system that you want to contain the Query Folder, click the Add button and choose New Query Folder.

Untitled8 copy

The Query Folder creation screen allows you to use Full-Text Search or Query Builder options to determine which content items should be included in the Query Folder.

Untitled8

Once created, you will see a new Query Folder on your system and it will have a different icon that is a folder with a magnifying glass rather than just a folder.

Untitled10

This new Query Folder contains call content items that match the query defined when the folder was created. With the new folder in place you can use the Folder Propagation techniques above to update all of the content items in your Query Folder. This two step process of creating a Query Folder containing just the content items you want plus folder propagation, gives you the ability to have fine grained control over your mass update.

Conclusion

As you might expect, there are a number of hard and complex ways to perform mass metadata updates as well, but with the tools above, making mass metadata updates can be quick and easy.

If you have questions about WebCenter and want to talk to someone at TEAM, contact us today!

 


TEAM Announces Gold Systems Integrator Partnership with Alfresco Software, Inc.

August 4, 2014

ARDEN HILLS, MINNESOTA — July 31st, 2014

TEAM Informatics, Inc., a leading enterprise software products firm, announces its acceptance as a Gold Partner with Alfresco, named a Visionary in Enterprise Content Management by Gartner Magic Quadrant. TEAM announced the alpha release of its Google Search Appliance (GSA) Connector for Alfresco earlier this year and has continued to expand the partnership. TEAM’s connector product allows the GSA to index and search content held within the Alfresco repository, allowing customers to search content with the familiar Google interface.

“As TEAM continues to find a growing interest in Alfresco as a comprehensive content solution, we have begun developing our capability to provide quality Alfresco development services to our customers,” said Doug Thompson, President of TEAM. ”Our proven success with Oracle WebCenter and Enterprise Search provides the foundation for us to expand our services to include the Alfresco platform.”

TEAM’s recognized ability to provide its customers with successful content management solutions puts the company at the forefront of the enterprise content market. Find more information on the Alfresco Partnership, the GSA to Alfresco Connector and other TEAM products at www.teaminformatics.com

Watch the Alfresco One Introduction

Watch the Document Management with Alfresco One Overview

Watch the Collaboration with Alfresco One Overview

Watch the demonstration of TEAM’s Alfresco Connector for the Google Search Appliance

 


Customizing WebCenter Content: Part 5 – Custom Service

July 2, 2014

By: Dwayne Parkinson – Solution Architect

As we conclude our Blog series on customizing WebCenter Content we are going to finally create a custom WebCenter Content service which will leverage the query and template we created in earlier Blog entries.  Once we have a custom service created, it can be placed on WebCenter Content menus, called from applications, used in iDoc Script and other WebCenter Content services. While our service will perform relatively simple functions, you will see how the same steps can be used to build fairly elaborate customizations.

Create a Custom Service

A Service is yet another type of resource that exists within a custom component, so the first step to creating a custom service is to create a custom component.  We already have a custom component from our previous Blog entries, so using the Component Wizard we’ll open the example component we created in the previous Blog entries and put our service in that component.

To create a service you click the Add button in the Custom Resource Definition pane of the Component Wizard.  On the next screen select the Service checkbox and accept the default names.

cw51

Make sure the service is in the “resources” folder and click on Next.

The next screen will ask for a Table Name which is used to store information about the custom service.  Accept the default table name here as well.

cw52

Finally we get to the point where we can add our custom service and tie all of our work together.  The top half of the screen defines our service while the bottom half tells what actions the service will perform.
cw53

The Name field is the name of your service.  The standard convention in WebCenter Content is for all service names to be in all upper case with words separated by an underscore.  The service name will be what you see in the URL when the service is called.  So in our case the portion of the URL with our service would look something like this: idcplg?IdcService=EXAMPLE_GET_FULL_NAME

The next field designates the class of service.  The class of service is really referring to a Java class and it determines what actions can be performed by the service.  For our example we’ll use the class of Service.

The Template field is used when there is a template to display results of the service.  We are going to use our EXAMPLE_PAGE template resource that we created in a previous Blog entry.  This template is a page that says “Hello World” with standard WebCenter Content page begin, end, etc.

The Service Type field we will leave blank.  The type of Sub-Service is only used when you are creating a service that will only be called from another service.  Our example service will be initiated directly from the URL so we will leave this blank.

The Access Level must have Scriptable checked for your service to execute.

The Subjects Notified is for defining which subsystems within WebCenter Content should be aware of this service.  For our example (and in most cases) this will be blank.

Finally, the Error Message is a text field that defines the error message returned by the service unless one of the actions overrides it.  For our purposes we will leave this blank and now we’re ready to start adding some actions to our service.

Adding Service Actions

The action list defines which actions the service will perform and in what order.  To add an action, click the Add button in the Action section.

cw54

The Type of action indicates what type of resource we will be invoking from our service.  The table below provides information on what each type of action does.

Action Type Description
Select Query Executes a select query, but does not return the results. Instead, the query will return whether the execution succeeded or failed.
Execute Query Executes data manipulation queries (insert, update, delete). The execution will not return any results, but will alter the database.
Java Method Executes a Java method. The method can be contained in the Service or a handler.
Load Option List Loads an option list into local data of the service. The option list is available to use in a template.
Select Cache Query Executes a select query and puts the results into Content Server’s backend data. The output will be available as a ResultSet.

 

Since we will be using the query resource we created in a previous Blog entry to return the full user name, we will use the Select Cache Query.

The next step in adding an action is to specify the name of the action.

cw55

In our case the name of our query was QfullName so we will type that in to the action field.  NOTE: There is a quirk in action field.  When you tab out of the action field the first time it may default back to the first entry from the drop down list and you will need to retype your action name.

The Parameters section specifies the parameters for the action.  Since we’re using a Select Cache Query, the parameter we specify will be used to store the results returned from our query.  By entering FullName, the service will generate a result set with the name FullName.  The result set will contain the results of our query.

The Control Mask is beyond the scope of this Blog, but documentation can be found here: http://docs.oracle.com/cd/E23943_01/doc.1111/e11011/c03_customizing_services.htm#CSSRG2048

The Error Message is the text that will be displayed if this action produces an error.  We will leave it blank and allow system generated errors to be seen.

Now we can click on OK and complete the definition of our service.

Testing the Service

To test our service we must first enable our custom component using the Component Wizard and then restart the content server so our component can be loaded.  Once that’s complete, sign on and change the URL so it calls our EXAMPLE_GET_FULL_NAME service as shown below.

cw56

Notice that there’s a parameter of dName after our service.  This parameter is required by the QfullName query we used so it must be supplied after the service call.

When we call the service you’ll notice that the EXAMPLE_PAGE template is displayed.  This shows us that the template we hooked up to the service is working as expected since we’re seeing our “Hello World” message.

Of course we also want to know if our service actually returned the full name of the user by executing the QfullName query.  To do that let’s execute our service again and append &IsSoap=1 to the end of the URL as shown below.

cw57

When using the IsSoap parameter, the results are redirected from our EXAMPLE_PAGE template to a SOAP envelope which is nothing more than an XML file.  As you can see, the result set of FullName contains a row that says the full name for user weblogic is Web Logic.  (Remember, we specified FullName as the parameter on our Select Cache Query and that’s how the result set gets its name)

The Finished Product

We would be remiss if we left our discussion of custom components, services and templates without actually displaying the results of our query on our template.  While it’s beyond the scope of this Blog to dive deeply into the iDoc scripting language, thankfully we only need a few lines of iDoc Script.  Within the Component Wizard, highlight the template resource and select our EXAMPLE_PAGE template.  Now we can click on the Launch Editor button in the lower right corner of the screen and add the highlighted lines of iDoc Script to our template.

cw58

Once those three lines are added, the server must be restarted and then we can execute the service again.  With our template changes in place, the service will show the following screen.

cw59

Conclusion

We have covered a lot of ground to merely show Hello World and the full name of a user, but the principles we’ve demonstrated are incredibly powerful.  As you can see, WebCenter Content is not just a piece of software; it’s a framework that can be extended for developing truly custom solutions to meet the unique needs of your organization.

For more information about the possibilities of extending WebCenter Content to meet the requirements for your next project or to request customized training for your development team please contact TEAM Informatics and ask about our extensive WebCenter Content customization capabilities.

 


Customizing WebCenter Content Server: Part 2 – Understanding Components

June 11, 2014

By: Dwayne Parkinson – Solution Architect

In the previous blog entry on customizing WebCenter Content Server we covered the basic content server architecture.  With that architecture in mind we can discuss how customization is done on the content server.

Customizing the content server involves creating custom “components” that run on top of the base architecture.  Components are made up of five types of resources. The resources provide specific functionality and are each managed differently. The table below describes each of the resources.

Types of Component Resources

Resource Type Description
Environment This resource defines variables. The variables can overwrite existing or create new variables for the component.
Resource This resource defines custom content. The resource can create page sections or strings to be used on pages.
Template This resource manages and defines page layout templates. The custom templates can be used with services and override existing templates.
Query This resource defines SQL queries that can be used against Content Servers database. The SQL queries are defined by name, which allows them to be referenced throughout Content Server’s architecture.
Service This resource defines functionality for Content Server. The resource can override core services or add new capabilities to Content Server.

 

Each type of resource is used differently.  These resources and the code contained within them can be part of custom components, but each resource type also has a counterpart within Content Server core files.

Core Files

The core Content Server files contain the same types of resources as are contained in components. For that reason, it is often very useful to look at the core files as examples when creating custom components.  Creating your own custom components allows for customizations to be separated from the core, which is especially handy during the installation of a Content Server update because your customizations will not be lost.

Note: The core files should not be modified to create customizations for Content Server.

The core files are available in the <install_dir>/ucm/idc/resources/core directory.

Covered Core Content Server Files

File Description
idoc/std_page.htm Contains Content Server’s core includes. The file is a good reference when trying to modify Content Server’s interface.
idoc/std_services.htm Contains Content Server’s core services. The file is used to learn more about a specific service.
tables/query.htm Contains Content Server’s core queries. The file can be referenced to find existing queries to use in components.
lang/cs_string.htm Contains Content Server’s system strings. The strings contained in this file are system and errors messages.
lang/ww_strings.htm Contains Content Server’s interface strings. The strings contained in this file are displayed on the web interface.

 

The table above lists a few of the important files that you will find useful when creating custom components. The core folder contains many more files that can be used as references in the development of custom components as well, but they won’t be covered here.

Components Files

Now that we have an understanding of some of the types of resources a component contains, let’s look at the component itself.  A “component” is a predefined folder structure that contains many different files that define and are used by the component.  The content server expects this folder structure to be in place when a component is installed and it will look inside the folder for specific files and expect certain files in certain locations based on how the component is built.  The diagram below depicts some of the most common files that you will find in a component folder structure.

CWC1

You can use the above diagram to help identify different types of files as it specifies the naming convention for each type of file under the name of the file.  The following table shows some of the most common files that a component will contain and a brief description of what they are used for.

Component File Locations and Descriptions

Name File Description
Component File components.hda Specifies the components that are enabled and the location of the corresponding Component Definition File.  It is located in the /config directory.
Component Definition File (Glue File) *.hda A glue file or component definition file.  Points to custom resources defined for a file.  The glue file for a component is typically named ComponentName.hda.  It is located in the root component directory.
 Manifest File manifest.hda This lists the files that make up the component and specifies their locations. It points to resources through the Glue File. The file is always located in the root directory when present, but does not appear until the Component is built.  This is because this file is used for installation of the component.
Environment Resource *_environment.cfg File defines configuration setting for Content Server.  Located in the root component directory.
Resource Resource *_resource.htm Resource file contains includes, strings, static tables, and dynamic tables.  It is located in the resources directory.
Template Resource *_template.hda A template definition file that points to the custom template resource files defined for a component.  Typically located in the templates directory.
Template Page *_template.htm A resource file that defines a function or procedure that is performed by the content server.  Typically located in the resources directory.
Service Resource *_service.htm Defines a function or procedure that is performed by the content server.
Query Resource *_query.htm Defines SQL queries.  These can be specified in a service resource directly but this allows for reusability.

Now that we know a little about the component, let’s look at the folder structure for a component and see what it looks like.

cwc2As you can see, most of the component folders shown here have a resources and a templates folder.  In addition, some files may be in the root component name directory (highlighted).

You may notice some variability in the file structure for different components, however, when using the Component Wizard to create a custom component, there are three directories that are typically created.

            1. <ComponentName>
            2. resources
            3. templates

The <ComponentName> directory contains the glue file and environment resource.  It also contains the resources and templates subdirectory.

The Resources folder contains the component’s resource definitions such as queries, page resources, and services.

The Templates folder contains the template definition file for that component and the template pages.

As you can see from the screenshot, there are often other directories as well including classes, images, publish, etc. A manifest file lists the files that make up the component and specifies their locations.  The file is always located in the /ComponentName directory.

 

Custom Component Locations

When you create or load a custom component you will find the component files by navigating to the following location on your server:

Oracle\Middleware\user_projects\domains\ucm_domain\ucm\cs\custom

From there you will see a folder structure similar to the one shown above.  Exploring this folder structure and reviewing the files will provide a good basis for understanding the next steps in component creation.

When components are moved from system to system, the entire component folder structure is “zipped” up using standard compression programs.  The zipped files can then be transferred between the systems and installed using either Configuration Manager or the Component Manager (see Oracle Documentation for these products).

Summary

Understanding and creating custom components provides tremendous opportunity to leverage your WebCenter Content server in new and exciting ways.  For more information on how to create custom components, please contact TEAM Informatics and ask about our training options, including classes customized to meet your specific needs.