Tuesday Oct 04, 2011

Alphabetized Menus in UCM 11g

For those that may not be following the guys over at Redstone Content Solutions and their corecontentonly.com blog, they just released an updated 11g version of their Alphabetized menu component.  I got so used to using it in UCM 10g, it was hard to transition back to the standard menus in 11g!  

If you miss the 10g version or are new to WebCenter Content 11g, I'd highly recommend it.

Wednesday Aug 10, 2011

Hiding the Standard Check-In and Standard Search menu items

On 3 separate comment threads on my blog, I've had people asking how to hide the Standard Check-In and Standard Search menu items in UCM/URM navigation.  Given that it seems to be a popular topic, I thought I would cover it here.

Out of the box, UCM does not give you a way to hide these menu choices.  There aren't any secret configuration flags or tricks you can do with Idoc Script to get them to disappear.  You need to have a custom component to do it.   But the good thing is the code to do it is pretty minor.  And because the menus changed between 10g and 11g, the code is slightly different between the two.  But I'll cover both here.

In both cases, you want to modify the 'custom_finish_layout_init' resource. As the name implies, this is what gets called at the end of the JavaScript processing of the page layout and where we can insert our menu changes.  As best practice, you first want to include a 'super.' call to the resource to load any previously modified versions of the resource:

 <$include super.custom_finish_layout_init$>

The next portion depends upon the version you are running.  On 10g, the code would look like:


And that's it!  Just deploy your component and your menu choices should be gone.  Of course, you can always go beyond that and show the menus if the user is an admin or such.  Or hide just one or the other based on configuration entries.

In 11g, the code would look like:

var searchmenu= YAHOO.widget.MenuManager.getMenu("MENU_A_SEARCH");
var searchmenuitems=searchmenu.getItems();
    <$if isComponentEnabled("RecordsManagement")$>
navBuilder.deleteItem("MY_PERSONAL_SEARCHES_" + (searchmenuitems.length-<$lenghthCount$>));

var checkinmenu= YAHOO.widget.MenuManager.getMenu("MENU_A_NEW_CHECK_IN");
var checkinmenuitems=checkinmenu.getItems();
navBuilder.deleteItem("MY_PERSONAL_CHECKINS_" + (checkinmenuitems.length-1));

In this case, there isn't an Idoc variable that is maintaining a count anymore.  So it has to be calculated through the MenuManager.

For a pre-built version of the component, I have one available on our sample code site.  It has logic to detect if you are on 11g or 10g and apply the appropriate command to delete the menu items, so it can be used in either version.

Tuesday Jul 19, 2011

Copy And Paste in Java Applets

For a while now, I've noticed that copy and paste no longer works in the Admin Applets in UCM.  This was a minor annoyance as I was typically just trying to copy and paste a content ID or line of scripting.  But it suddenly became a real problem for me when I needed to create an option list of countries.  I had the list nicely formatted in my Notepad++, but no way to copy and paste it into my option list dialog.

Well, it turns out with the release of the Java Plug-in 1.6.0_24 in February 2011, copy and paste from the system clipboard was deemed a security hole and disabled.  You can copy and paste BETWEEN applets.  But if you try to use something from your main clipboard, it can't be copied in.  

So there are a couple of options for a workaround.  You can roll back to an earlier version of the plug-in.  That will work, but chances are all future releases will still keep copy and paste disabled, so you'd never be able to upgrade.  

The other alternative is to provide a custom java security policy file which enables access to the system clipboard again.  

  1. First locate your local Java Security Policy file.  The file is named java.policy and should be in the lib\security folder of your Java installation.  On Windows 7, it can be found at C:\Program Files (x86)\Java\jre6\lib\security.
  2. Copy this file to your home folder (ex. C:\Users\Kyle).
  3. Rename the file to .java.policy (note the period at the beginning). 
  4. Edit the file in a text editor.  Locate the line of text
    // "standard" properies that can be read by anyone

  5. Add the following line just below this line.
    // "standard" properies that can be read by anyone
    permission java.awt.AWTPermission "accessClipboard";

  6. Save the file.
  7. Close any open browsers and ensure that Java is not running before testing.


 While you can modify the java.policy file directly in the lib/security folder, chances are it will get overwritten again on the next JRE update.  This method should allow those changes to persist.

Wednesday Jun 08, 2011

Importing and exporting archives as zip files in UCM

Archive ZipOne of the features of Site Studio is the ability to backup and restore websites.  It takes all of the assets associated with the website and combines them into a backup directory that is stored on the server and can be downloaded as a zip if needed.  When it comes time to restore, you simply choose that backup from the server or upload the zip file saved earlier.  The mechanism that Site Studio is using in the background is simply a specialized Archiver process.  An archive is defined dynamically with the proper export criteria to grab the site assets and they are exported to that backup directory.  Then when you request a download of that backup, UCM zips that standard archive directory and delivers the zip file to the client browser.

Well, it turns out that this ability to download and upload zipped archives does not have to be for just Site Studio sites.  You can do this for regular content archives as well. 

First, when you go to the Archiver applet, you're taken to the default collection of archives.  In the menu, go to Options -> Open Archive Collection.  There you should see another one with the name "<instance name>_sitestudiobackupcollection".  Select that collection and click Open. 

Archive Collection

This collection got created when Site Studio was installed and is where site backups are archived. And even if you aren't using Site Studio at all, as long as you have it enabled, this feature will be available. If you've done backups or restores already, you'll see those listed. Now that you have the collection open, you can add your new archives here.  You can create those just as you normally would.  

archive list

Now perform the archive Export process.  The content/table data will then get exported to the collection location on the server.

To download the archive, go to Administration ->; Site Studio Administration -> Backup and Restore.   Click the Managed Archives button.  You should now see your archive in the list.  

Manage Backups

With the Actions icon, select 'Download backup archive as ZIP'.  This will zip up the archive and allow you to download it locally.  Note, large archives may take a while to zip up and may time out if too large.  For those types of archives, I'd recommend setting up the traditional ways of migrating the archive.

Now that you have your archive, you can just as easily import it into your target instance.  On that instance, go to  Administration -> Site Studio Administration -> Backup and Restore.  In the Upload Archive section, browse to your saved archive and click Upload Archive.  You'll then be taken to the archive information screen.   

Archive Information

On the Actions menu, select 'Restore backup archive contents'.  This will now import the archived documents.  If you wish to include some import mappings, you can simply go to the Archiver applet and set up the mappings there and do the import right from the applet.

Tuesday Feb 22, 2011

New security configuration flag in UCM PS3

[Read More]

Thursday Dec 30, 2010

Page debugging got easier in UCM 11g

[Read More]

Monday Dec 20, 2010

Filtering option list values based on security in UCM

[Read More]

Tuesday Nov 09, 2010

Hiding the Primary File field in UCM

[Read More]

Wednesday Sep 29, 2010

Using browser shortcuts to search UCM

[Read More]

Wednesday Sep 22, 2010

Using Dashboards in UCM and URM 11g

[Read More]

Wednesday Jun 02, 2010

Positioning metadata groups in Profiles

[Read More]

Kyle Hatlestad is a Solution Architect in the WebCenter Architecture group (A-Team) who works with WebCenter Content and other products in the WebCenter & Fusion Middleware portfolios. The WebCenter A-Team blog can be found at: https://blogs.oracle.com/ ateam_webcenter/


« June 2016