Hi Lakshmi
I just scanned very quickly your mail and noted the following:
whenerver I created pages through custom code I found it to be
necessary to update the metadata:
myPage.updateMetaData();
before save.
This might not realy solve your issue - but you might give it a shot.
Cheers, T
On 27.08.2007, at 07:19, Nagalakshmi.G wrote:
Hi all,
I am working on RSS feeds. I have my own Rss class that gets
information
from particular url. I have to get the content from website and add it
to my website under website menu in magnolia(3.0). I have added a node
to website menu, set the template (my own template that has just the
controls(property) text and image),
Node channelContent = rssFeeds.addNode(webPageName,"mgnl:content");
Node
chParagraph=channelContent.addNode
("contentParagraph","mgnl:contentNode"
);
Node chContent=chParagraph.addNode("0","mgnl:contentNode");
chContent.setProperty("text", buffer.toString()); /*set the 'text'
field
in my template with the content from rss page*/
session.save();
HierarchyManager hm = MgnlContext.getHierarchyManager("website");
Content myPage = hm.getContent("Projects/DML/RssIn/"+ webPageName);
MetaData md = myPage.getMetaData();
md.setProperty("mgnl:template", "MediaTemplate");
md.setTemplate("MediaTemplate");
md.setTemplateType("jsp");
myPage.save();
The webpage is added under the folder but when I open it I cannot see
the content I added under 'text' property. It says 'resource not
found'.
When I create a page from 'new page' option in UI,it works,but when I
add a node thru my code, it doesn't show the page contents.
I made the sure that the JCR Browse (menu) of my page added thru code
and the one added from Website UI resemble each other. But still am
not
able to see the contents of page added thru code. ('Resoruce not found
error' on page when I open it)
Where I going wrong or what am I missing in setting any property
for the
page?
Pls help if anybody knows, am new to magnolia just started working
on it
2 weeks ago.
Thanks in Advance,
Lakshmi
This e-mail and any files transmitted with it are for the sole use
of the intended recipient(s) and may contain confidential and
privileged information.
If you are not the intended recipient, please contact the sender by
reply e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination,
forwarding, printing or copying of this email or any action taken
in reliance on this e-mail is strictly
prohibited and may be unlawful.
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------