You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Carsten Ziegeler <cz...@apache.org> on 2008/05/08 14:02:20 UTC
SLING-247: Provide Scripting variables as request attributes for
JSP
Hi,
I'm currently working on SLING-247 and I've two questions:
a) should we really support the "flush" information in the jsp?
b) should we really add the bindings as request attributes? This makes
writing jsps easier *if* you don't want to use the taglib. Currently I
would people suggest to use the taglib instead.
However if we want to add the bindings as request attributes, what names
do we use? The interface names or the scripting variable names?
(o.a.s.api.SlingHttpServletRequest vs slingRequest)
Carsten
--
Carsten Ziegeler
cziegeler@apache.org
Re: SLING-247: Provide Scripting variables as request attributes
for JSP
Posted by Carsten Ziegeler <cz...@apache.org>.
Felix Meschberger wrote:
>
> Rethinking it, I wthink we should not add all SlingBindungs as request
> attributes. If we place anything in a request attribute it would be the
> complete SlingBindings object (map).
>
The javax.script.Bindings is currently set as a request attribute. I
think I'll change that to the SlingBindings object.
> We should then try to enhance the sling:defineObjects tag to support
> mapping more properties from the SlingBindings object as local variables
> in the script. The most notable such object would be the
> SlingScriptHelper, which we should define as a variable of name "sling"
> as in the other scripting languages.
That's already implemented :)
>
> Conversely we might drop support for object mapping from the
> sling:defineObjects tag. WDYT ?
Yes, I think this doesn't provide that much help. So I'll remove it.
Carsten
--
Carsten Ziegeler
cziegeler@apache.org
Re: SLING-247: Provide Scripting variables as request attributes
for JSP
Posted by Felix Meschberger <fm...@gmail.com>.
Hi,
Am Donnerstag, den 08.05.2008, 14:02 +0200 schrieb Carsten Ziegeler:
> a) should we really support the "flush" information in the jsp?
The flush attribute is really a workaround for non-JSP scriptings. The
JSP tags support this attribute out of the box.
+1 for not adding.
> b) should we really add the bindings as request attributes? This makes
> writing jsps easier *if* you don't want to use the taglib. Currently I
> would people suggest to use the taglib instead.
> However if we want to add the bindings as request attributes, what names
> do we use? The interface names or the scripting variable names?
> (o.a.s.api.SlingHttpServletRequest vs slingRequest)
Rethinking it, I wthink we should not add all SlingBindungs as request
attributes. If we place anything in a request attribute it would be the
complete SlingBindings object (map).
We should then try to enhance the sling:defineObjects tag to support
mapping more properties from the SlingBindings object as local variables
in the script. The most notable such object would be the
SlingScriptHelper, which we should define as a variable of name "sling"
as in the other scripting languages.
Conversely we might drop support for object mapping from the
sling:defineObjects tag. WDYT ?
Regards
Felix
Re: SLING-247: Provide Scripting variables as request attributes for JSP
Posted by Bertrand Delacretaz <bd...@apache.org>.
On Thu, May 8, 2008 at 2:02 PM, Carsten Ziegeler <cz...@apache.org> wrote:
> ... b) should we really add the bindings as request attributes? This makes
> writing jsps easier *if* you don't want to use the taglib. Currently I would
> people suggest to use the taglib instead....
Agreed, encouraging the use of the taglib allows us to make more stuff
easily accessible later on.
-Bertrand