Comments (2)
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.
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)
- Rendering a JSP view in a Grails 3 application
- Dependency Dashboard
- checkbox doesn't respect form parameter.
- GroovyPageCompilerForkTask ignores config
- Reloading not enabled in GroovyPagesTemplateRenderer HOT 1
- select tag missing required boolean attribute and inconsistency in defaults HOT 1
- MetaClass Updates on TagLibs with missing properties causing thread blocks under load
- Support custom namespace when invoking TagLib of GroovyPage
- From the tag select, when using dataAttrs I'm getting can't getAt on null value
- Render template with relative paths work in dev but not in prod
- IncrementalTaskInputs has been deprecated - On method 'GroovyPageForkCompileTask.execute'
- Decouple Grails from GSP
- BUG: GroovyPageParser config loaded too late therefore ignored
- Decouple SiteMesh 2 Final Phase - remove GroovyPageLayoutFinder requirement
- g:javascript documentation has dead link referring to resource plugin tag r:script
- include tag param values change from boolean to string
- Gradle - Apache Groovy 4 - Incompatible because this component declares a platform and the consumer needed a library HOT 3
- Migrate to Develocity build cache connector HOT 2
- g:formatDate doesn't fully support LocalDate HOT 2
- grails-web-taglib:4.1.0.M3 bad JAR file structure breaks sitemesh layouts when running via JAR HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grails-gsp.