zen.component on csp.page

61 views
Skip to first unread message

Zen_user

unread,
Feb 2, 2012, 5:23:37 AM2/2/12
to InterSystems: Zen Community
Hi guys,

exist a way, how I can use a %Zen.Component at a %CSP.Page?

Best Regards

Bill McCormick

unread,
Feb 2, 2012, 5:34:39 AM2/2/12
to <intersystems-zen@googlegroups.com>, InterSystems: Zen Community
This is not possible. A CSP page does not load the zen infrastructure.

Bill

> --
> You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
> To post to this group, send email to InterSys...@googlegroups.com
> To unsubscribe from this group, send email to InterSystems-Z...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/InterSystems-ZEN?hl=en
> Zen Community Terms and Conditions: http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-conditions
>

Lori Fassman

unread,
Feb 2, 2012, 7:38:26 AM2/2/12
to intersys...@googlegroups.com
I don't know if this would be considered bad practice, but how about putting an iframe in the CSP page and having the source be a Zen page? I've been told to avoid iframes, but presumably they're okay once in a while?

Lori

Zen_user

unread,
Feb 2, 2012, 7:50:12 AM2/2/12
to InterSystems: Zen Community
As source I have now a zenPage. So I can use the jsonProvider (my
zen.component, which I need). I defined in the XData Content the
OnDrawContent Property, in which I implemented, in embedded html, my
page like csp. At the moment it is the best way, which I have.

Malte Schnack

unread,
Feb 2, 2012, 8:07:03 AM2/2/12
to intersys...@googlegroups.com
Working, though maybe even "worse practive" is:

<CSP:INCLUDE PAGE="my.ZenClass.cls">

Regards

malte.

Bill McCormick

unread,
Feb 2, 2012, 8:22:34 AM2/2/12
to <intersystems-zen@googlegroups.com>

If all you want is to mess with JSON then you can use the lowlevel APIs in the JSON Provider class. There are functions to convert arrays or objects in to JS that will instantiate a JSON object. And there are others that will take a JSON object from JS and convert it to an array in memory in COS. If that is all you are after have at it.

Reply all
Reply to author
Forward
0 new messages