context.getSiteContext

1 view
Skip to first unread message

Andres Alcarraz

unread,
Jun 29, 2007, 11:09:58 AM6/29/07
to jpublish users
Hi guys, I'm trying Jpublish4, basically I would like to include Ajax in an application that previously used JPublish 3.0b1.
I've already seen that RequestContext was replaced by JPublishContext, I would like to know if there is a doc with clues to do the migration, I know that Jpublish 4 is based on code from JPublish 2,
but I guess some changes are not registered in the new svn repository nor in the old cvs repository.
What I wonder now is why the helper method getSiteContext is not in JPublishContext, is it intentional or just because it was missed in the refactoring?
Another question, is the same storing jpublish application globals in the site context and in the ServletContext?

Best regards, and thank you in advance.

Andrés

Florin T.PATRASCU

unread,
Jun 30, 2007, 12:14:46 PM6/30/07
to jpubli...@googlegroups.com
Hi Andrés,

Regarding the helper method: getSiteContext(), it was a non
intentional omission. Is added now, and thanks for spotting it :)

Saving application globals in the SiteContext remained the same; we
are using a map to store the attributes.

On a different topic, are you planning to use the newly added
JPublish DWR support for Ajax?

Let us know if you believe there are more things we can add to
support your implementation and please don't forget: we're welcoming
any suggestions :)

Thanks,
-florin

PS
Andrés, looking at the subject, I wonder if you needed the missing
helper for a Velocity page/template? You may already know but we do
publish the "site" reference in the Page contexts. Accessing it is
very simple: $site

Andrés Alcarraz

unread,
Jun 30, 2007, 12:42:51 PM6/30/07
to jpubli...@googlegroups.com

Florin T.PATRASCU escribió:


> Hi Andrés,
>
> Regarding the helper method: getSiteContext(), it was a non
> intentional omission. Is added now, and thanks for spotting it :)

Thank ou I guessed that :)


>
> Saving application globals in the SiteContext remained the same; we
> are using a map to store the attributes.
>
> On a different topic, are you planning to use the newly added
> JPublish DWR support for Ajax?
>

Yes I'm planning to use it, I'm a newbie in Ajax, I only know what it is about,
but nothing of programming, so I welcome any suggestion about how and where to
start.

> Let us know if you believe there are more things we can add to
> support your implementation and please don't forget: we're welcoming
> any suggestions :)

Well I'll let you know, and even i would be glad to contribute with code, little
things like getSiteContext()


>
> Thanks,
> -florin
>
> PS
> Andrés, looking at the subject, I wonder if you needed the missing
> helper for a Velocity page/template? You may already know but we do
> publish the "site" reference in the Page contexts. Accessing it is
> very simple: $site
>

Well i was using it in java actions and I didn't like
context.(SiteContext)get("site"); yes I know I could make my Own helper, but I
guessed that the omission was not intentional, in fact I have more helper for
other things.

Best regards

Andrés

Reply all
Reply to author
Forward
0 new messages