Skip to Main Content

Application Development Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Query UCM

822620Apr 1 2011 — edited Apr 6 2011
Hello,

I currently have a webapp that uses a navigation in which I have two content queries that display content using content presenter templates.

I need to create an "Index" page that displays the results of those content queries in commandLinks, so that when the user clicks on the link it will display the content with the content presenter correct.

I know how to do this using the navigation-model, but how can I accomplish this in a JSPX?

Thanks!
Mitch

Comments

2827010
You have 3 options here (or maybe some more)

1) Use the content presenter with a List template. This should be an OOTB template.
2) Create your own content presenter template. You have two sorts of templates for the CP. The first one is for single item content and the second one is for multiple items. The one i gave you in the previous example (MovieLibrary) is a single item template. When you create a template for multiple items, you have a reference to a collection with all the content from your query in the content presenter. THis can be based upon a query, folder,...
3) Create your own custom taskflow and use the RIDC API from UCM to query the UCM. This is the most flexible solution but needs most coding.
2827010
Is is also an option if you could create a single page that could both show the list as your specific template?
822620
Option 2 seems the way to go, I'll read in the developer guide about it... any tips, advice, or sample code would be much appreciated (using the same 'Movie' example).
2827010
Basicly, half of the work is already done :)
Remember thati said how you could include an existing content presenter in your template?
this is the technique we will be using in the "Master template".

I'll see what i can put up :)
822620
Heres what I have so far...

<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
xmlns:dt="http://xmlns.oracle.com/webcenter/content/templates"
xmlns:cmf="http://xmlns.oracle.com/webcenter/content/faces"
version="2.1" xmlns:f="http://java.sun.com/jsf/core">

<dt:contentListTemplateDef var="nodes">
<af:panelGroupLayout id="pgl1" layout="horizontal">
<af:panelGroupLayout id="pgl2" layout="vertical">
<af:outputText value="Weapon Systems" id="ot1"/>
<af:iterator id="i1" value="#{nodes}" var="node">
<af:commandLink text="#{node.title}" id="cl1" action="*?????*"
actionListener="#{*????*}"/>
</af:iterator>
</af:panelGroupLayout>
<f:facet name="separator">
<af:spacer width="20" height="10" id="s1"/>
</f:facet>
</af:panelGroupLayout>
</dt:contentListTemplateDef>


</jsp:root>
822620
I don't know how to pass a reference to a collection with all the content from your query in the content presenter... I'm guessing I use a parameter?
822620
I ended up creating a new Navigation-Model and displaying it with a foreach.
1 - 7
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on May 4 2011
Added on Apr 1 2011
7 comments
190 views