Code Monkey home page Code Monkey logo

Comments (2)

greetingsFromPoland avatar greetingsFromPoland commented on August 16, 2024

In version 3.2 below, the code included was able to find a view of any plug-in from the entire application.
In version 3.3, the following code can find the view only contained in the same plugin as the controller.

class VueTemplateController {

    GroovyPageLocator groovyPageLocator

    def index(String id) {
       if(groovyPageLocator.findPage('/vue/'+id+'.gsp')){
            render(view: '/vue/'+id)
        }else{
            render(status: 404)
        }
    }
}

from grails-gsp.

Chaguala avatar Chaguala commented on August 16, 2024

I just need your help!
I try run app Grails app a i find this error! ---

"C:\Program Files\Java\jdk1.7.0_51\bin\java" -Dgrails.home=C:\CHAGUALA\Grails\grails-2.4.4 "-Dtools.jar=C:\Program Files\Java\jdk1.7.0_51\lib\tools.jar" -Dgroovy.starter.conf=C:\CHAGUALA\Grails\grails-2.4.4/conf/groovy-starter.conf -Xmx768M -Xms768M -XX:MaxPermSize=256m -XX:PermSize=256m -Djline.WindowsTerminal.directConsole=false -javaagent:C:\CHAGUALA\Grails\grails-2.4.4\lib\org.springframework\springloaded\jars\springloaded-1.2.1.RELEASE.jar -noverify -Dspringloaded=profile=grails;cacheDir=. -Dbase.dir=C:\Users\ccsadmin\SIGEM -Dgrails.project.fork.run.debugArgs= -Dfile.encoding=UTF-8 -classpath C:\CHAGUALA\Grails\grails-2.4.4\lib\org.codehaus.groovy\groovy-all\jars\groovy-all-2.3.7.jar;C:\CHAGUALA\Grails\grails-2.4.4\dist\grails-bootstrap-2.4.4.jar org.codehaus.groovy.grails.cli.support.GrailsStarter --main org.codehaus.groovy.grails.cli.GrailsScriptRunner --conf C:\CHAGUALA\Grails\grails-2.4.4/conf/groovy-starter.conf "run-app -plain-output"
|Loading Grails 2.4.4
|Configuring classpath
.
|Environment set to development
.................................
|Packaging Grails application
...........
|Compiling 1 source files
......................
|Running Grails application
|Server running. Browse to http://localhost:8080/SIGEM
....Error
|
2017-12-10 19:30:50,919 [http-bio-8080-exec-1] ERROR errors.GrailsExceptionResolver - IllegalStateException occurred when processing request: [GET] /SIGEM/requerente/create
Method on class [SIGEM.Requerente] was used outside of a Grails application. If running in the context of a test using the mocking API or bootstrap Grails correctly.. Stacktrace follows:
Message: Error processing GroovyPageView: Error executing tag <g:form>: Method on class [SIGEM.Requerente] was used outside of a Grails application. If running in the context of a test using the mocking API or bootstrap Grails correctly.
Line | Method
->> 527 | runWorker in C:\Users\ccsadmin\SIGEM\grails-app\views\requerente\create.gsp


Caused by GrailsTagException: Error executing tag <g:form>: Method on class [SIGEM.Requerente] was used outside of a Grails application. If running in the context of a test using the mocking API or bootstrap Grails correctly.
->> 35 | doCall in C:/Users/ccsadmin/SIGEM/grails-app/views/requerente/create.gsp


Caused by IllegalStateException: Method on class [SIGEM.Requerente] was used outside of a Grails application. If running in the context of a test using the mocking API or bootstrap Grails correctly.
->> 78 | doCall in C__Users_ccsadmin_SIGEM_grails_app_views_requerente_create_gsp$_run_closure2


| 81 | run in C__Users_ccsadmin_SIGEM_grails_app_views_requerente_create_gsp
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 744 | run . . . in java.lang.Thread

Process finished with exit code 1

from grails-gsp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.