Results 1 to 3 of 3

Thread: Spring Roo ExtJS PetClinic Example

  1. #1
    Sencha User
    Join Date
    Dec 2010
    Posts
    7
    Vote Rating
    0
      0  

    Default Spring Roo ExtJS PetClinic Example

    Not sure if anyone would benefit from this but thought I would post it just in case:

    https://github.com/btlife/Spring-Roo-PetClinic-ExtJS


    I put it the source code up on github.

    This is the attached README in the root of the source code:
    Changes to PetClinic Roo Example
    Spring ROO 1.1.1.RELEASE

    1. clinic.roo
    1.1 add json all to end of script
    1.2 change employedSince to java.util.Date from java.util.Calendar (was getting an error when deserializing the json into a Calendar type, didn't have time to debug)
    2. created new tiles template src/main/webapp/WEB-INF/layouts/extjs.jspx
    3. added new template to tiles config src/main/webapp/WEB-INF/layouts/views.xml
    4. created new index_extjs.jpx that uses above template : src/main/webapp/WEB-INF/views/index_extjs.jspx
    5. added new configuration for index_extjs.jspx to use new template : src/main/webapp/WEB-INF/views/views.xml
    6. added static view for index_extjs.jspx : src/main/webapp/WEB-INF/spring/webmvc-config.xml
    7. installed ExtJS : src/main/webapp/js/extjs-3.1.1
    8. created ExtJS application : src/main/webapp/js/overrides, src/main/webapp/js/PetCompany, src/main/webapp/js/PetClinic
    9. Added JsonObjectResponse.java wrapper : src/main/java/com/springsource/petclinic/extjs
    10. Modified all Controllers to wrap their responses using JsonObjectResponse

    I didn't have time to put any code in the finders, but I am using one of the finders to link the Owners to pets, so there is an example in there.

    I barely made any changes to the ROO generated code, basically just what I mentioned in the README.

    I also didn't touch any of the ROO generated front end, I made the Banner Link (which by default goes to the root of the application) to switch between the ExtJS front-end and the ROO generated front end.

    So if you got to http://localhost:8080/petclinic you see the normal PetClinic frontend. If you click on the ROO banner, or go to http://localhost:8080/petclinic/index_extjs it will switch to the ExtJS front end.

    Also note, I threw this together pretty fast, and I didn't worry about formatting.

    This should be a good starting point for anyone looking into ExtJS and Spring Roo. I found it rather straight forward, once you get used to ExtJS.

    I pulled information from the following sources:

    ExtJS In Action by Jesus Garcia http://extjsinaction.com/
    Jesus Garcia's Blog http://tdg-i.com/
    Saki's Blog : http://blog.extjs.eu/
    ExtJS Api Documentation : http://dev.sencha.com/deploy/dev/examples/
    ExtJS Samples & Demos : http://dev.sencha.com/deploy/dev/examples/
    Spring Roo Forum :http://forum.springsource.org/forumdisplay.php?f=67
    Sencha ExtJS Forum : http://www.sencha.com/forum/forumdis...ity-Forums-3.x


    Hope this helps

  2. #2
    Sencha User
    Join Date
    May 2011
    Posts
    3
    Vote Rating
    0
      0  

    Default

    Hi i need help in creating a dynamic JS file. In the above petclinic example i see a common jspx file but with differenct JS file when i use in Spring Roo. As Spring Roo creates its own Controller, jspx files when we select a scafold controller, Can u please help me creating a dynamic JS file so that the project becomes more dyanamic with less maintainence of code.

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Posts
    133
    Vote Rating
    -4
      0  

    Default

    This is good. Thanks for posting. I am working on Sencha Touch application with json proxys.Can I reuse anything from this app or do you have any quick tips to develop the interface faster.

    This is what I am thinking.
    • I will stick to scaffold controllers now for entity CRUD operations
    • Will use json add.
    • I am not sure if json addon will support all sencha touch store apis as is without any changes. Any tricks you know ?

    Thanks in advance

Similar Threads

  1. ExtJs with Spring Framework
    By jimmy.honeycutt in forum Community Discussion
    Replies: 23
    Last Post: 19 Feb 2013, 5:20 AM
  2. ExtJS and Spring Security 3
    By Shining77 in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 8 Feb 2011, 4:26 AM
  3. Spring-js and ExtJS integration
    By jbeaven in forum Ext 3.x: Help & Discussion
    Replies: 5
    Last Post: 3 Sep 2010, 9:37 AM
  4. spring integration with ExtJs
    By eclipse3.4ide in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 2 Sep 2010, 10:17 AM
  5. i18n in ExtJS & Spring MVC
    By geekinfo in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 23 Mar 2009, 5:14 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •