On 21.09.2005, at 11:46, Tomasz Mazan wrote:

Philipp Bracher napisaƂ(a):

I think you are mixing the concept of dialogs and templates: Hope this helps - the jsp (template) is independent of the dialog (no way to pass a parameter)
- the dialog gets the information directly from the repository
- since the dialog has access to the repository and has a pointer to the current node, you are able to read any property of a page

Plan A
======
here some pseudo:

drawHtml(out){
String value = getWebsiteNode().getParent().getNodeData("customParam");
out.println(value);
}

the method DialogSuper.getWebsiteNode() returns the node the dialog is working with

OK, but how to _set_ this customParam from jsp code?

There is no way. Store the parameter in the page node. If this is not a solution for your problem user Plan B:

- make in the jsp a javascript variable
- in the dialog you use (javascript) opener.yourParam to access the value

Keep in mind: there is no relation between the template jsp call and the dialog opening call. This has nothing to do with magnolia! This is how webapplications work.

If you want you can store your value also in the session but this is not save since concurrent use of the value would corrupt your application.

Phillipp Bracher


----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Reply via email to