Hi Rajith, It seems like Caramel client library has a dependency that I don't know about. I have found out that following scripts (libraries) are required to run Caramel in the client-side.
async.min.js caramel-client.js caramel.handlebars.client.js Can we add about these dependencies to the README [1] file in the Caramel repo, so that everyone can see it. [1] https://github.com/wso2/caramel/blob/master/README.md Thanks. On Fri, Aug 7, 2015 at 12:36 PM, Rajith Roshan <[email protected]> wrote: > Hi Sajith, > > You can write a new partial hbs file (for ex: update.hbs) inside the > publisher/themes/appm/partials with the content you want to display. The > display content should be set to a variable (for ex : output) with the > content you have in your JSON object. Then add these values to caramel > renderer as follows. > > caramel.render(output); > > Then in the main hbs file you can refer the partial page as follows. > > {{>update }} > > > Please refer the following doc [1] for the additional information. (Read > "Overriding part of a view") > > [1] - > https://docs.google.com/a/wso2.com/document/d/1_blb4u8aFn-6jTpHx6fynTgohAI4KQgUaEE-so5IxSg/edit?usp=sharing > > > Thanks, > > Rajith > > > > On Fri, Aug 7, 2015 at 8:19 AM, Sajith Ariyarathna <[email protected]> > wrote: > >> Hi All, >> >> I want to update a portion of the web page using Caramel. Necessary data >> (JSON) is obtained through an AJAX call. How do I accomplish this task? Any >> examples will be very helpful. >> >> PS: caramel.handlebars.client.js [1] and handlebars-1.1.2.js [2] acripts >> are included in the page. >> >> Thanks. >> >> [1] >> https://github.com/wso2/carbon-appmgt/blob/master/features/appmgt/org.wso2.carbon.appmgt.publisher.feature/src/main/resources/publisher/themes/mobileapp/js/caramel.handlebars.client.js >> [2] >> https://github.com/wso2/carbon-appmgt/blob/master/features/appmgt/org.wso2.carbon.appmgt.publisher.feature/src/main/resources/publisher/themes/appm/js/handlebars-1.1.2.js >> -- >> Sajith Ariyarathna >> Software Engineer; WSO2, Inc.; http://wso2.com/ >> mobile: +94 77 6602284, +94 71 3951048 >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Rajith Roshan > Software Engineer, WSO2 Inc. > Mobile: +94-72-642-8350 <%2B94-71-554-8430> > -- Sajith Ariyarathna Software Engineer; WSO2, Inc.; http://wso2.com/ mobile: +94 77 6602284, +94 71 3951048
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
