Re: Sightly :: JavaScript Use-API :: what property to use instead of "granite.resource" to access the current resource in JS?

2015-10-17 Thread Vlad Bailescu
Hi Sandro, I started putting together some documentation at [2] but it's stil WIP. Vlad [2] - https://github.com/vladbailescu/sling-sightly-docs/blob/master/use-api.md On Sunday, October 18, 2015, Sandro Boehme wrote: > Hello, > > I would like to access the current

Re: Exception when trying out the fling sample

2016-04-30 Thread Vlad Bailescu
Hi Roy, It seems Thymeleaf is not handling the HTML scripts, they get processed by Sightly instead. You could check the configured service ranking of Thymeleaf, as suggested in https://sling.apache.org/documentation/bundles/scripting/scripting-thymeleaf.html Best, Vlad On Saturday, 30 April

Re: Exception when trying out the fling sample

2016-04-30 Thread Vlad Bailescu
On Saturday, 30 April 2016, Oliver Lietz wrote: > (service ranking is not honored by Sling's script engine manager, no need > to try). Any idea why this is not a bug? https://issues.apache.org/jira/browse/SLING-4330 > > I was under the impression SLING-4330 is about

Re: Including attributes with Sightly/HTL

2016-10-28 Thread Vlad Bailescu
Hi Roy, HTL does not allow arbitrary inclusion of scripts output. The scripts output for data-sly-include is appended to the current element content. The proper way to add attributes would be to use data-sly-attribute and provide the attributes from a Use API object and not from an external

Re: JS Use API usability or limitations

2017-01-11 Thread Vlad Bailescu
Hi Lance! The problem is not the JS Use API but the way the JS Iterator is used. One should do: for (var [key, res] in Iterator(children)) { returnObj.content += res.name; } Also, Robert is right, you should strive to keep your business logic (use objects) as light as possible do the

Re: Best Sling samples for a beginner to look at?

2017-03-29 Thread Vlad Bailescu
Hi Greg, There's also Nate Yolles' Publick blog [5] Best, Vlad [5] https://github.com/nateyolles/publick-sling-blog On Wed, Mar 29, 2017 at 10:41 AM, Greg Fullard wrote: > Tx Chris, Bertrand, Andreas > > I think that gives me a good starting point. > > I'll keep a

Re: Flexible adaptable not resulting in instantiation of correct model

2019-06-12 Thread Vlad Bailescu
Hi Liam, AFAIK, the mentioned pattern is not designed to work with Sling Models. It simply uses the adaptTo pattern to transform the adaptable to the given class. Best, Vlad On Tue, Jun 11, 2019 at 9:00 PM Liam C wrote: > Hello, > > Is anyone able to replicate this, or to confirm that they