Feb 26th, 2013, 12:06 AM
Building RestFul web application in Spring 3.1
We are in a process of building RestFul web application.We are using Spring3.1 for providing the Rest controllers. The idea is for having only html pages as views and no JSPs. The HTML pages are having rich UI widgets built on Dojo. Now there are few scenarios we would like to get some answers.
How to populate the dynamic content of the HTML page for the initial load ? i.e. Assume that, there is a dashboard view which has 4 sections. I can create a dashboard.html which has corresponding dojo widgets . If I type [http://localhost/dashboardapp/home], Controller can give back a HTML view which is dashboard.html . But how to set some meta data to this page (eg:-taskId or userID) so that ajax calls can be fired after the dashboard.html is rendered (to pouplate the widgets section by passing the task ID and userID).
I read that, we can use sessionStorage for storing the data in browser. But is there any impact , if I have multiple windows opened at sametime with two different data set.
i.e. After rendering dashboard.html, there is a widget for poplauting the task details. Since I have task ID in my browser storage, I can invoke an ajax call by passing that task ID. Assume that I am currently viewing the task details in one window and If I open another window with the same URL whether sessionStorage will be shared with that window also ?
Apart from that, can I return a HTML view from my controller ?
Thanks Aneesh K
Tags for this Thread