Home | Oracle ECM Home Page  | Oracle ECM Documentation  | Oracle ECM Downloads  | Oracle ECM Forums  | Yahoo Intradoc Users Group Feed your aggregator (RSS 2.0)  
  Oracle Fusion ECM Blog. Are you "kuh n-tent" with your "kon-tent"?
 
 
# Monday, September 15, 2008

There are several ways to execute iDocScript from Java, but in this quick example we will use a PageMerger object.  There are several ways to get ahold of a PageMerger object.  If you are executing in a context where a service object is readily available you may be able to get a PageMerger object reference with code like this:

PageMerger pm = m_service.m_pageMerger;

If that doesn't work for you I would try something like:

PageMerger pm = new PageMerger(databinder, executioncontext);

Now that you have your merger object you can execute all kinds of iDocScript code, an example of which might be:

pm.evaluateScript("<$lc(\"wwMyString\")$>");
Monday, September 15, 2008 8:22:54 PM (Central Daylight Time, UTC-05:00)  #    Comments [2]   Oracle UCM  | 
Monday, September 15, 2008 8:56:19 PM (Central Daylight Time, UTC-05:00)
Hi Jason,

Great stuff on your blog, we were using your ServerBean javadoc just the other day.

If you're executing from a filter where you may not have a service object, you can also usually pull the PageMerger from the ExecutionContext object.

PageMerger pm = (PageMerger)cxt.getCachedObject("PageMerger");

David
Monday, September 15, 2008 9:00:58 PM (Central Daylight Time, UTC-05:00)
Sweet. Thanks for the note David! That's a great addition. I had always suspected this might be the case but had not had the time to dig into it. You just saved me some time!
Comments are closed.
Copyright © 2009 Jason Stortz. All rights reserved.