[
https://issues.apache.org/jira/browse/SLING-3292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13852955#comment-13852955
]
Lars Trieloff commented on SLING-3292:
--
It looks like buffering is a common appr
Lars Trieloff created SLING-3292:
Summary: Web Hooks for Resource Observation
Key: SLING-3292
URL: https://issues.apache.org/jira/browse/SLING-3292
Project: Sling
Issue Type: New Feature
ESP is Embedded ECMAScript (Javascript). Inside <% and %> you can use any
ECMAScript statement you want, including if, else if, switch and case.
Lars
On Fri, Aug 13, 2010 at 11:59 AM, Clemens Wyss wrote:
> e.g. is there an "else if" or "elsif"? How about a swi
[
https://issues.apache.org/jira/browse/SLING-1594?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lars Trieloff updated SLING-1594:
-
Attachment: SLING-1594.patch
This patch implements common.js modules. You can try by putting a
classes and it is not possible to inject
real objects or functions like the require function and exports object
that would be needed for CommonJS modules support. Is this intended
behavior, and what should an extension of this interface look like to
support this use case?
regards,
Lars
--
Lars
: Scripting
Reporter: Lars Trieloff
Priority: Minor
SLING-320 already allows calling functions in external scripts, so implementing
the full-blown modules spec to allow interoperability with other CommonJS
modules should be possible.
http://wiki.commonjs.org/wiki/Modules/1.1.1
t;>>>>>>which is basically this:
> >>>>>>>
> >>>>>>><%= request.getParameter("jsonp") %>(<%
> >>>>>>>sling.include(resource.getPath(), "replaceSuffix=json") %>)
> >>>>>>>
> >>>>>>>Justin
> >>>>>>>
> >>>>>>>On 4/7/10 4:52 PM, Luca Masini wrote:
> >>>>>>>> Yes, that can be great, but I don't want to change Sling
> >>>>>>>> sources, only
> >>>>>>>> reuse them, that's why I asked about best practices.
> >>>>>>>>
> >>>>>>>> On Wed, Apr 7, 2010 at 9:58 PM, Justin Edelson
> >>>>>>>mailto:justinedel...@gmail.com>
> >>>>>>>> <mailto:justinedel...@gmail.com
> >>>>>>>> <mailto:justinedel...@gmail.com>>>
> >>>>>>>wrote:
> >>>>>>>>
> >>>>>>>>We should probably just support jsonp natively in these
> >>>>>>>> servlets.
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>On 4/7/10 2:05 PM, Luca Masini wrote:
> >>>>>>>>> Hi guys, I need an advice from Sling experts.
> >>>>>>>>>
> >>>>>>>>> I need a JSONP renderer for Sling, initially I thought I had to
> >>>>>>>>develop only
> >>>>>>>>> one, but after I discovered that in effect Sling has two
> >>>>>>>renderer
> >>>>>>>>for JSON,
> >>>>>>>>> one for plain resources and one for query.
> >>>>>>>>>
> >>>>>>>>> These two renderer are in private packages in a Sling
> >>>>>>>Bundle, and
> >>>>>>>>because
> >>>>>>>>> JSONP and JSON are quite equals and I wanted to reuse as much
> >>>>>>>>> as
> >>>>>>>>possible, I
> >>>>>>>>> started thinking about strategies to call them.
> >>>>>>>>>
> >>>>>>>>> The JsonQueryServlet is deployed as an OSGi Component, so I was
> >>>>>>>>able to
> >>>>>>>>> inject it using Felix SCR Annotation (querying for his
> >>>>>>>>properties), and then
> >>>>>>>>> I called his service() method inside my doGet:
> >>>>>>>>>
> >>>>>>>>> servlet.service(req, resp);
> >>>>>>>>>
> >>>>>>>>> For the JsonRendererServlet instead I used another strategy.
> >>>>>>>>>
> >>>>>>>>> I extracted the RequestPathInfo from the
> >>>>>>>>> SlingHttpServletRequest
> >>>>>>>>and the I
> >>>>>>>>> included it using RequestDispatcher:
> >>>>>>>>>
> >>>>>>>>> String jsonPath = calculateIt(req);
> >>>>>>>>>
> >>>>>>>>> req.getRequestDispatcher(jsonPath).include(req, resp);
> >>>>>>>>>
> >>>>>>>>> Now both of these two are working, but I have a bad taste.
> >>>>>>>>>
> >>>>>>>>> Which of this is the best approach ?? The first ?? The
> >>>>>>>>> second ??
> >>>>>>>>None of
> >>>>>>>>> them ???
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> --
> >>>>>>>>
> >>>>>>>> http://www.lucamasini.net
> >>>>>>>> http://twitter.com/lmasini
> >>>>>>>> http://www.linkedin.com/pub/luca-masini/7/10/2b9
> >>>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> --
> >>>>>>>
> >>>>>>> http://www.lucamasini.net
> >>>>>>> http://twitter.com/lmasini
> >>>>>>> http://www.linkedin.com/pub/luca-masini/7/10/2b9
> >>>>>>>
> >>>>>>
> >>>>>>
> >>>>
> >>>>
> >
>
--
Lars Trieloff - http://lars.mp - Day Software - http://www.day.com
[
https://issues.apache.org/jira/browse/SLING-1468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lars Trieloff updated SLING-1468:
-
Summary: Scala script engine: rename bindings wrapper from ...Vars to
...Args (was: Scala scrip
: Lars Trieloff
Priority: Minor
Sling's WebDAV servlet currently has its own Mime Type detection mechanism.
Given that Tika is a dependency of the soon to be added Jackrabbit 2.0 we can
re-use Tika's Mime Type detection mechanism for greater accuracy and a better
maintain