Results 1 to 2 of 2

Thread: Add function in Controller

  1. #1
    Join Date
    Dec 2011
    Posts
    3

    Default Add function in Controller

    I am new to ROO project. I have looked a lot but unable to find "How can I manually add function in one of my controller"? Suppose my controller looks like:

    Code:
      
    package ch.epfl.psytest.web;
    
    import org.springframework.roo.addon.web.mvc.controller.RooWebScaffold;
    import org.springframework.stereotype.Controller;
    import org.springframework.web.bind.annotation.RequestMapping;
    
    import ch.epfl.psytest.domain.Slide;
    
    @RooWebScaffold(path = "slides", formBackingObject = Slide.class)
    @RequestMapping("/slides")
    @Controller
    public class SlideController {
    
    }
    To add function in SlideController: Can I manually add function like this? (please also tell if I have to something in other files also)

    Code:
     
    public void addSilde(Slide s) {   
      .
      .    
      . }
    or is there any way to add function using ROO command shell? and How can I access this function?

    Thanks in advance!

  2. #2
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    747

    Default

    Better off asking this question in the roo forum.
    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

Posting Permissions

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