bondvita / dojo-json-rest-store Goto Github PK
View Code? Open in Web Editor NEWThis project forked from jeremyg484/dojo-json-rest-store
Example of backing dojo.store.JsonRest with Spring @MVC controllers
This project forked from jeremyg484/dojo-json-rest-store
Example of backing dojo.store.JsonRest with Spring @MVC controllers
Demo: Connecting DataGrid to a Store backed by Spring @MVC This is a simple demo app to show connecting the new dojo.store.JsonRest object store to a Spring @MVC RESTful controller. The main source files of interest are: https://github.com/jeremyg484/dojo-json-rest-store/blob/master/src/main/webapp/demo.html <- The Dojo grid client https://github.com/jeremyg484/dojo-json-rest-store/blob/master/src/main/java/org/springsource/tutorial/web/USStateController.java <- The Spring @MVC controller backing the JsonRest store This is a WIP intended to test how easily we can support JsonStore with Spring MVC. There are a couple of issues at the moment: 1. JsonStore doesn't set an Accept header when is issues PUT and POST requests, thus the wrong handler method (the one that produces HTML) is getting selected. 2. JsonStore sends its "sort" parameter in the form of "sort(+fieldName1,+fieldName2,-fieldName3,...)", thus the entire thing becomes the parameter key. This is inconvenient to handle in Spring MVC as it requires dropping down to HttpServletRequest and iterating through parameter keys to find the one beginning with "sort", as opposed to being able to use the @RequestParam handler argument annotation. The configured Maven setup should allow the full WAR to be built via 'mvn install', and optionally to be run in an embedded Tomcat instance via 'mvn tomcat:run'. When running locally on Tomcat, the Dojo grid demo page is accessed at http://localhost:8080/dojo-json-rest-store/demo.html Running the app locally requires a local MySql instance with a database named 'dojoTest'. See /src/main/resources/database.properties to edit connection settings for MySql. This app can also be run on Cloud Foundry without any required changes. Just run 'mvn install' and then 'vmc push {app_name} --path target/', and bind a MySql service to the app when given the choice. The base application was generated with Spring Roo, thus it also includes the usual Roo HTML scaffolding. The JsonRest store operations are supported in this case by explicitly adding more specific @RequestMappings to handle them.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.