Results 1 to 5 of 5

Thread: Spring Roo 1.2.0.RELEASE still not generate .jsp when add finder

  1. #1
    Join Date
    Jul 2010
    Location
    BKK Thailand
    Posts
    12

    Default Spring Roo 1.2.0.RELEASE still not generate .jsp when add finder

    i try Spring Roo 1.2.0.RELEASE and create simple application
    after i use "controller --class xxx.xxx " spring generate all web file then
    i use command "finder list" for list finder method finally i use "finder add xxxxFinderMethod".
    Roo generate only .aj not generate .jsp for web. Any body help ????

  2. #2
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Posts
    434

    Default

    What do you mean? Adding a Finder doesn't generate a specific jsp. It adds a Finder and you have to use this in your code. Are you expecting an update in a jsp file because of adding this Finder?
    Read up on JPA Finders if you're not familiar with them.

  3. #3
    Join Date
    Jul 2010
    Location
    BKK Thailand
    Posts
    12

    Default

    Quote Originally Posted by MiB View Post
    What do you mean? Adding a Finder doesn't generate a specific jsp. It adds a Finder and you have to use this in your code. Are you expecting an update in a jsp file because of adding this Finder?
    Read up on JPA Finders if you're not familiar with them.
    this is my .roo file what's wrong

    // Spring Roo 1.2.0.RELEASE [rev 39eb957] log opened at 2011-12-20 09:59:32
    project --topLevelPackage com.spt --java 6 --projectName roo12sample
    persistence setup --provider HIBERNATE --database DERBY_EMBEDDED
    entity jpa --class ~.base.domain.BaseEntity --abstract --inheritanceType TABLE_PER_CLASS
    field string code --unique
    field string description
    field string localDescription
    field string status
    field string createUser
    field date --fieldName createdDate --type java.util.Date --dateFormat SHORT
    field string updateUser
    field date --fieldName updatedDate --type java.util.Date --dateFormat SHORT
    entity jpa --class ~.base.domain.Application --extends ~.base.BaseEntity --testAutomatically
    perform tests
    entity jpa --class ~.base.domain.Application --extends ~.base.domain.BaseEntity --testAutomatically
    field string url
    perform tests
    controller scaffold --class ~.base.web.ApplicationController --entity ~.base.domain.Application
    finder add --finderName findApplicationsByCodeEquals
    finder add --finderName findApplicationsByDescriptionLike
    finder add --finderName findApplicationsByLocalDescriptionLike
    finder add --finderName findApplicationsByUrlLike
    perform tests
    exit

  4. #4
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Posts
    434

    Default

    You're not setting up your project as a web project. You need the command web mvc setup prior to your controller command, which is deprecated in 1.2, use web mvc scaffold .
    Do yourself a favour and read the manual in the "docs" folder of Spring Roo (in the "springsource" folder). Start on page 1 and read to the end. You can do it in 2 nights. Why wait?

    I also suggested the book Getting Started with Roo but Spring Roo is moving too quickly and the commands in there are not for Roo 1.2. For an overall view it might be useful though.
    Last edited by MiB; Dec 21st, 2011 at 06:43 AM.

  5. #5
    Join Date
    Jul 2010
    Location
    BKK Thailand
    Posts
    12

    Default

    thankz MiB i will try.

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
  •