Hi Bernd,
For jsp-Pages it is a very good solution and every page gets an
"Resource" object which serves the repository data in a comfortable
way.
But for a servlet/manual code it is not so easy :-( After digging
deep into the sources, I still could not find out how to get the
data out of the repository. I see that accessing the repository
manually is a little bit complicated, e.g. using an AccessManager,
creating a Session first etc.
My question:
Does anyone (maybe Sameer :-) who developed a lot of magnolia code
concering the persistence) have a piece of exsample code or a
"howto" for this issue that could help me find my way?
Assuming you are using magnolia 3 RC
You need to set MgnContext if your request goes directly to your
custom servlet.
this is how you do it:
WebContext webContext = (WebContext) FactoryUtil.getInstance
(WebContext.class);
webContext.init(request);
MgnlContext.setInstance(webContext);
// now you should be able to access HierarchyManager on this context
HierarchyManager websiteHierarchy = webContext.getHierarchyManager
("website");
Hope this helps
Regards,
Sameer Charles
Magnolia International Ltd.
------------------------------------------------------------------------
---------
[EMAIL PROTECTED] http://www.magnolia.info
Magnolia® - Simple Enterprise Content Management
------------------------------------------------------------------------
---------
On Sep 7, 2006, at 9:14 AM, Bernd Brenner wrote:
Hello all,
I am getting slowly in deep trouble, because I have promised my
customer a solution which I could not yet implement in magnolia.
There is a template-page with a flash elment embedded. The customer
should be able to edit the flash contents via magnolia.
So I configurated a paragraph and a dialog which he will call to
enter his data. But how the flash element will get its information
to display?
The idea is to develop a servlet which collects the data out of the
repository and generates an xml document out of it.
When the user requests the jsp-Page, the flash element will call
the servlet and "eat" the xml to display the data.
My Problem:
For jsp-Pages it is a very good solution and every page gets an
"Resource" object which serves the repository data in a comfortable
way.
But for a servlet/manual code it is not so easy :-( After digging
deep into the sources, I still could not find out how to get the
data out of the repository. I see that accessing the repository
manually is a little bit complicated, e.g. using an AccessManager,
creating a Session first etc.
My question:
Does anyone (maybe Sameer :-) who developed a lot of magnolia code
concering the persistence) have a piece of exsample code or a
"howto" for this issue that could help me find my way?
Or maybe I am on a completely wrong way with my idea, hopefully
not ...
Thanks for any hins,
Bernd
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------