Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Retrieve the dcr form data dynamically in targetting component
Nageswar
Hi Techies ,
We are having the issue like how to retrieve the actual DCR form values, we can able to get the RelativeVpath of the DCR dynamically in Component. this is through targetting , based on the rule applied to page , it will retrieve the dcr or image dynamically in the page. Here the SampleContentRetrieverAction class querying the LSCS and retrieving the
reletiveVpath of the dcr dynamically and we are displaying that dcr path in the page. We can able to retrieve the Metadata values also.
But issue here is how to retrieve the actual DCR form values in the page. please suggest shall we need to pass any Action parameters in Content XML section.
Thanks in advance,
Regards,
Nageswar
Find more posts tagged with
Comments
Rick Poulin
SampleContentRetrieverAction only retrieves metadata. If you want the contents of the DCR to be included, you'll have to extend/wrap that class with your own call to do the additional processing.
Given a relative path, you can get the XML from LSDS like this:
org.dom4j.Document xmlDoc = ExternalUtils.readXmlFile(context, relpath);
Or, given an LSCS Document (as returned by lscsclient.jar), you can get the content from LSCS using
org.dom4j.Document xmlDoc = Dom4jUtils.newDocument(lscsDoc.getContentStream());
Nageswar
Thank you very much rpoulin,
It is working fine, I have customized the SampleConentActionretriever java class and appended the Element object with required dcr content data & passes to the component.
Regards,
Nageswar