Hi,
I have some problems in implementing a paragraph system in CQ.
I have to implement it in CQ 4.2.
Does any one explain it to me in simple words?
Thanks a lot in advance, Seboeh
I found the solution.
I could implement a paragraph system now.
I shortly describe the most important things.
1. the spooler script should not have any carriage return
2. for a component the spooling works only with following link.
<img src='<% cc.getPage().getHandle() + ".spool." + cc.getQualident() + ".jsp" %>' width=200px>
Further on, in the "Component Definitions" for this script only "spool" should be written as globbing. Not "*spool" or "spool*".
This is also the reason, why we have cc.getQualident() after spool in the img-tag.
3. Further on it is important for a paragraph system to include the following initialization.
<%
Style actstyle = null;
%>
<cfc:initComponent cellId="body" componentId="/libs/Components/body">
<% actstyle = componentContext.getStyle(); %>
</cfc:initComponent>
<cfc:includeComponent cellId="body" componentId="/libs/Components/body" />
<cfc:includeComponent cellId="parsys"
componentId="/apps/emb/Components/parsys" />
4. in side the spooler script, you get the atom by:
String[] selectors = cqReq.getSelectors();
String qualident = selectors[1] + "." + selectors[2];
Container local = (Container) actpage.getElement(qualident);
Atom atom = local.getAtom("myImageSrc");
where "myImageSrc" is the atom.xml content definition.
The selcorts[2] is either "Single" or somthing like "parsys.0001".
5. In simple components, you need also this kind of code to initialize a edit bar.
<%
ComponentContext cc = (ComponentContext) request.getAttribute("componentContext");
ComponentInfo ci = cc.getComponentInfo();
%>
<cfc:editbar
parName="<%= cc.getContainerList() %>"
parNum="<%= cc.getContainerLabel() %>"
storagePre="<%= cc.getStoragePre() %>"
dialogAny="<%= ci.getContentDialog() %>"
/>
I hope this could help you creating the paragraph system.
Kind regards, Seboeh@web.de
North America
Europe, Middle East and Africa
Asia Pacific