Archive

Archive for the ‘OracleWCM’ Category

Parse Date using RIDC

October 24, 2011 Comments off

Recently, I had a need to parse a String which contained a date returned from running a UCM search. The field in question was stored as an Oracle Database TIMESTAMP datatype (in the format 2010-02-04 06:00:00Z). I spent a while trying to parse it using the usual Java approaches (java.text.SimpleDateFormat,  java.sql.Timejavax.xml.bind.DatatypeConverter). After getting nowhere but receiving several parsing exceptions, a co-worker (thanks Wes Keppy) suggested I try using oracle.stellent.ridc.model.impl.DataObjectEncodingUtils.decodeDate to transform the String (in format 2010-02-04 06:00:00Z) to a Java Calendar object and it worked perfectly.

Since I was working in SSXA, the objects were using RIDC (Remote Intradoc Client). If I was within UCM and needed to parse a date, the intradoc.common.LocaleResources has methods that should be of some help. Sometimes it is best not to reinvent the wheel.
Categories: OracleWCM

Remove paragraph tag from WYSIWYG

September 14, 2011 Comments off

A question was once asked in the forums about how to stop WYSIWYG content from being wrapped in HTML p tags. Below are the steps to solve this problem.

1. Using JDeveloper (for 11g SSXA) or Site Studio Designer, open the element definition for the WYSIWYG in question.

2. Check the box for “Do Not Enclose Text in Editor”.

The 10gR4 Site Studio Designer Guide has this to say about the topic:

Do Not Enclose Text in Editor: Used to define how carriage returns are handled in HTML. If text is enclosed, each time the contributor enters a return, a paragraph is created. If not enclosed, a line break is inserted for each return.

Categories: OracleWCM

Assign Info Button at the Top

November 23, 2009 Comments off

When contributing various assets in Site Studio Designer the Assign Info form will be presented. By default, the buttons to commit are at the bottom of the screen. This is not such an issue the first time I save/commit the content. However, as I continue editing/saving the content I get annoyed by the fact that I have to scroll to the bottom of the page and click Assign Info each time.

I have finally broke down and created a new component that adds the Assign Info button to the top of the page as well.

Download the sample component from the Downloads page.

Assign Info buttons at the top

Categories: OracleWCM

Web Sites Menu Filtering

October 13, 2009 Comments off

I am starting to release some of the example components demonstrated at my session this year at Oracle OpenWorld 2009. In the demo I briefly showed the Web Sites menu and talked about filtering the sites in this menu based on UCM Roles. This component demonstrates how one might accomplish such a task. As other articles related to my session come on line I will inter-link them together.

You know that Web Sites menu Site Studio adds to Content Server? Can I limit the links in that list somehow? This question is asked fairly regularly. I wanted to get a sample of how one might accomplish just that out for general consumption. Once you see an example accomplishing the filtering of that list you’ll be able to apply your own specific business logic as well.

In this example we’re going to use Roles to control what web sites are listed in the menu for any given user. I’ve seen this list controlled by Roles, Accounts, Custom User Metadata and every combination of those aspects and more. This is a LOT less about securing sites away from the users (as it doesn’t do that AT ALL) and more about thinning the sites list to something more context appropriate for individuals attempting to do their everyday job.

How to do this? Override the custom_finish_layout_init dynamic html include. Here’s the important snippet (don’t worry, there is an example component!):

<$c=" STARTING EDIT HERE, JS"$>
   <$if UserIsAdmin OR userHasRole("SSMENU" & siteId)$>
  navBuilder.addChildNodeTo('SS_DISPLAY_WEBSITES'
, 'item'
, 'id==SS_WEBSITE_<$n$>'
, 'label==<$js(label)$>'
, 'url==<$js(siteRef)$>'
, 'icon==WebItem.gif');
   <$endif$>
<$c=" ENDING EDIT HERE, JS"$>

So, sysadmin has the admin role, so s/he can see our three site samples in the web sites list:

Sysadmin Sample Image

Now, pretend we’ve created a new user named SingleSiteGuy (stay on task here, this is not a dating site side story…). We’ll give SingleSiteGuy our new SSMENUPayPalDemo Role.

Role

And TA DA! Now SingleSiteGuy can only see the menu we gave him a role to access.

Single Site Guy

Grab the Websites Menu Filter Sample Component.

Categories: OracleWCM

jQuery Hosted by Google AND Microsoft

September 21, 2009 Comments off

Last Tuesday, 9/15/2009, Scott Gutherie of Microsoft broke the news about jQuery on the Microsoft CDN. Now, whichever side of the fence you sit on in the Google vs. Microsoft religious fervor you will still enjoy being able to use jQuery on their dime! Happy, happy, joy joy!

The official ASP.NET Page about the CDN:
http://www.asp.net/ajax/cdn/

An in action sample:
http://stephenwalther.com/blog/archive/2009/09/16/microsoft-ajax-cdn-and-the-jquery-validation-library.aspx

Which should you use?
http://stackoverflow.com/questions/1447184/microsoft-cdn-for-jquery-or-google-cdn

Those of us using jQuery in our Oracle Web Content Management initiatives need to be aware of this and the Google AJAX APIs. I always like to have options. This is just one more option for us.

You can also check out the Google jQuery hosting options here.

Categories: OracleWCM

Hide Primary File In Site Studio Contributor

June 10, 2009 Comments off

When users create new datafiles through Site Studio Contributor the Primary File (primaryFile) field can be the source of some questions or confusion. This field is usually pre-populated with ?default.xml?. Sometimes users will ask what this field is and/or why they see it. One of the easiest ways to deal with this issue or answer this problem is to hide that field! Add the following field to the server's config.cfg and restart. It looks like this setting may have been added in the may releases, so this may or may not work for you depending on your version and when this new feature was added.

SSHidePrimaryFileInContributor=true

Categories: OracleWCM

Disabling Site Studio Contributor

March 10, 2009 Comments off

Use can use the following configuration setting to disable contribution on a content server:

DisableSiteStudioContribution=true

Over on John's Blog you can find even more information about disabling and/or "enhancing" the contributor key-stroke

Component: Site Studio – Consumption to Contribution Ctrl Shift F5 redirect

Guide: Disable ctrl + shift + f5 Site Studio contributor option

Updated: Consumption to Contribution Ctrl Shift F5 redirect.

Categories: OracleWCM

Site Studio 10gR4 Update and Samples

March 9, 2009 Comments off

The Oracle Technology Network has a page with samples, viewlets and material on using Site Studio 10gR4.  Specfically, there is a nice PDF About Using 10gR4 From External Applications.

Categories: OracleWCM

Site Studio 10gR4 Now Available

January 9, 2009 Comments off
Categories: OracleWCM

Site Studio Default Link Format Per Site

October 20, 2008 Comments off

With the newer versions of Site Studio (10gR3, at least 10.1.3.3.3+) there is a handy way to set the default link format for your site.  You can do this through the Site Studio Designer and the setting is persisted in your Project XML file in Content Server.  This is pretty handy if you want to do things like using one manner of linking to data files for 90% of your content creation work.

Categories: OracleWCM
Follow

Get every new post delivered to your Inbox.