Invoke Extension From Content Explorer Menu - How best to do this?

Hello,
We would like to be able to select a content item (or items), or folder in content explorer and invoke some custom extension to operate on the folder or content item(s) selected. I was going to use the spring mvc framework in place for custom UI (/Rhythmyx/user/apps/) to do this, but is there a better way that I’m not aware of? Any way to get an xml application to invoke an extension?

Thanks,
Brian

I guess it depends on the extension.

If it is more like a script, I like using a straight up JSP for this unless there is something more complicated to the UX in the extension (like a multi page flow wizard for example). You can drop the JSP in AppServer\server\rx\deploy\rxapp.ear\rxapp.war\user\pages and it will be accessible via the http://server:port/Rhythmyx/user/pages/<you choose> URL.

The JSP approach is simple and easy to debug, and often you can inline code there. You see some examples of calling the API in the AppServer\server\rx\deploy\rxapp.ear\rxapp.war\ui\admin pages. Good to pull the CSS header stuff out of one of those so the extension page looks similar to rest of system.

XML apps can invoke extensions via the Java Exits. Look at system rxs_navSupport app for example, and the navReset resource. When you look at the Java exit, that is calling 2 extensions, one to reset the nav and the other to flush the assembly cache, the sys_flushassembly cache extension is mapped to the internal class (com.percussion.server.cache.PSExitFlushAssemblerCache) which is just an extension that implements the IPSRequestPreProcessor interface. PSOProxyQueryResource in the PSO toolkit is another one that could be an example.

Either approach is fine, I tend to lean to JSP if it has UI and is scripty, but that is because I am more comfortable with debugging/designing that as a developer than with the XML app /XSL approach. On another note, The Bulk Update Community package in the code & snippet forum is also a good example of an XML app that updates folders and items without needing Java at all.

-n

[QUOTE=bhwilliamson;20749]Hello,
We would like to be able to select a content item (or items), or folder in content explorer and invoke some custom extension to operate on the folder or content item(s) selected. I was going to use the spring mvc framework in place for custom UI (/Rhythmyx/user/apps/) to do this, but is there a better way that I’m not aware of? Any way to get an xml application to invoke an extension?

Thanks,
Brian[/QUOTE]

Cool, thanks for the examples. It looks like we’ll have some UI anyway (confirmation & results) so it makes sense to use the jsp approach. I just wanted to make sure there wasn’t some other way to do it that I wasn’t thinking of.

Don’t get me wrong, you can do the UI with XSL in the XML app, that Bulk Community app does that. The Purge menu is another example of a confirm and results with XML. When you are in the XML App editor in the workbench if you click edit on one of those style sheets you can see how that works.

JSP just may be easier if you aren’t familiar with the XML apps and is way easier to debug as you can attach eclipse on the remote java debug port to step through the JSP code and code for any spring beans that your register in an XML file in WEB-INF/config/user/spring. Note, you have to start the Rhythmyx server with the java debug flags in the RhythmyxServer lax file for that.

lax.nl.java.option.additional=-Dprogram.name=RhythmyxServer.exe -Xms256m -Xmx1024m -Djava.endorsed.dirs="AppServer/lib/endorsed" -Djava.library.path=./bin -server -XX:MaxPermSize=256m  [B]-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n[/B] 

-n

Thanks… we went the jsp/servlet route since we’re more familiar/comfortable working with jsps than xml apps and it works like a charm.