Re: [Architecture] Improving clint-side rendering support in UUF

2016-12-20 Thread SajithAR Ariyarathna
This is how you access propertise in the 'templateFillingObject' (e.g. {name: "Saman", age: 10}) In the Handlebars template, {{@params.name}} Inside the 'onRequest(env)' function (serverside) env.params.name With that in mind, I think your requirement can be done. Refer following example.

Re: [Architecture] Improving clint-side rendering support in UUF

2016-12-20 Thread Indunil Upeksha Rathnayake
Hi Sajith, This will be very useful since currently a fragment can be invoked only from a page or another fragment. Need to know what will happen if we implemented to get the JSON object (which will be used to fill the fragment's template) by calling an OSGI service, in the onRequest() method of

Re: [Architecture] Improving clint-side rendering support in UUF

2016-12-14 Thread SajithAR Ariyarathna
Jo, Lasantha, CSS selectors e.g. div > p won't work if we forcefully insert a div in the middle. Therefore we shouldn't use divs (or spans) to wrap the content of a zone. Also, there is no need to wrap the content of a zone with anything. We just need to know the start and the end of the zone's

Re: [Architecture] Improving clint-side rendering support in UUF

2016-12-13 Thread Lasantha Samarakoon
​Agreeing with Jo. Plus the comments have different meaning rather than marking sections, I don't think it's a good practice to use comments to replace DIVs and other block elements. ​If we can go ahead with DIVs other than comments we don't need to filter nodes in the DOM to identify comment

Re: [Architecture] Improving clint-side rendering support in UUF

2016-12-13 Thread Joseph Fonseka
Hi Sajith On Wed, Dec 14, 2016 at 8:44 AM, SajithAR Ariyarathna wrote: > > 2. Why did we use comments to propagate Zones to the client side instead >> of Divs. >> > divs clashes with CSS selectors (same goes for spans). These zone markers > should be invisible (which means

Re: [Architecture] Improving clint-side rendering support in UUF

2016-12-13 Thread SajithAR Ariyarathna
Hi Chanaka, What will be the location of these fragments? If it's the same as server > side fragments it will give control over different UUF components IMO. These are normal fragments that you use in the server-side. Its not like giving control to a different component, instead we are re-using

Re: [Architecture] Improving clint-side rendering support in UUF

2016-12-13 Thread SajithAR Ariyarathna
On Wed, Dec 14, 2016 at 9:01 AM, Irunika Weeraratne wrote: > Hi, > Can't we use standard JS libraries approach for this one? > Here we have used zone names. > eg : UUF.renderFragment(fragmentFullyQualifedName, templateFillingObject, > *zoneName*, mode) > > But AFAIK in standard

Re: [Architecture] Improving clint-side rendering support in UUF

2016-12-13 Thread Chanaka Jayasena
Hi Sajith, This will be very useful for the developers. Now we are maintaining client side templates in public folder and doing ajax calls to fetch them and render. What will be the location of these fragments? If it's the same as server side fragments it will give control over different UUF

Re: [Architecture] Improving clint-side rendering support in UUF

2016-12-13 Thread Irunika Weeraratne
Hi, Can't we use standard JS libraries approach for this one? Here we have used zone names. eg : UUF.renderFragment(fragmentFullyQualifedName, templateFillingObject, *zoneName*, mode) But AFAIK in standard JS this is done using Classes or IDs of elements. For an example can't we have something

Re: [Architecture] Improving clint-side rendering support in UUF

2016-12-13 Thread SajithAR Ariyarathna
Hi Jo, 1. I guess the default mode will be OVERWRITE. > Yes, we decided to add other modes for completeness. > 2. Why did we use comments to propagate Zones to the client side instead > of Divs. > divs clashes with CSS selectors (same goes for spans). These zone markers should be invisible

Re: [Architecture] Improving clint-side rendering support in UUF

2016-12-13 Thread Joseph Fonseka
Hi +1, few clarifications bellow. 1. I guess the default mode will be OVERWRITE. 2. Why did we use comments to propagate Zones to the client side instead of Divs. Thanks Jo On Tue, Dec 13, 2016 at 10:37 PM, SajithAR Ariyarathna wrote: > Hi All, > > To do $subject, we are

[Architecture] Improving clint-side rendering support in UUF

2016-12-13 Thread SajithAR Ariyarathna
Hi All, To do $subject, we are hoping to give a UUF client JS library. With the client-side library, webapp developers will be able to render fragments and push to zones similar to the server-side. Functions in the library: UUF.renderFragment(fragmentFullyQualifedName, templateFillingObject,