build.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

build.xml

Dierk König
Jetty start is now working again being kept open when started with
 'grails run-app'
and being opened only while testing and stopped thereafter with
 'grails run-webtest'
. Trick was to use a magic system property to suppress web.xml validation
that fails although other validators take no issue with it.

However, Jetty start currently show a lot of errors.
Xerces missing in cp when grails is started?
See stacktrace below.

cheers
Mittie

   [groovy] Root WebApplicationContext: initialization completed in 3535 ms
   [groovy] Initializing servlet 'grails'
   [groovy] FrameworkServlet 'grails': initialization started
   [groovy] Loading WebApplicationContext for Spring FrameworkServlet
'grails'
   [groovy] [SpringConfig] Configuring i18n support
   [groovy] [SpringConfig] Configuring Grails data source
   [groovy] [SpringConfig] Configuring Grails domain
   [groovy] [SpringConfig] Configuring Grails services
   [groovy] [SpringConfig] Configuring Grails page flows
   [groovy] [SpringConfig] Configuring Grails controllers
   [groovy] [SpringConfig] Configuring Grails scaffolding
   [groovy] Context initialization failed
   [groovy]
org.springmodules.beans.factory.drivers.xml.XmlApplicationContextUtils$3:
Could not load [com.sun.org.apache
.xerces.internal.dom.DocumentImpl] or [org.apache.xerces.dom.DocumentImpl]!
   [groovy]     at
org.springmodules.beans.factory.drivers.xml.XmlApplicationContextUtils.getNe
wDocument(XmlApplicationC
ontextUtils.java:85)
   [groovy]     at
org.springmodules.beans.factory.drivers.xml.XmlApplicationContextUtils.conve
rt2xml(XmlApplicationCont
extUtils.java:195)
   [groovy]     at
org.springmodules.beans.factory.drivers.xml.XmlApplicationContextDriver.getA
pplicationContext(XmlAppl
icationContextDriver.java:20)
   [groovy]     at
org.springmodules.beans.factory.drivers.xml.XmlWebApplicationContextDriver.g
etWebApplicationContext(X
mlWebApplicationContextDriver.java:48)
   [groovy]     at
org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet.createWebAppl
icationContext(GrailsDisp
atcherServlet.java:82)
   [groovy]     at
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(F
rameworkServlet.java:250)

   [groovy]     at
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkSe
rvlet.java:219)
   [groovy]     at
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:11
2)
   [groovy]     at
javax.servlet.GenericServlet.init(GenericServlet.java:168)
   [groovy]     at
org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:383)
   [groovy]     at
org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:243)
   [groovy]     at
org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.j
ava:446)
   [groovy]     at
org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplic
ationHandler.java:321)
   [groovy]     at
org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationContex
t.java:511)
   [groovy]     at org.mortbay.util.Container.start(Container.java:72)
   [groovy]     at org.mortbay.http.HttpServer.doStart(HttpServer.java:753)
   [groovy]     at org.mortbay.util.Container.start(Container.java:72)
   [groovy]     at
gjdk.org.mortbay.jetty.Server_GroovyReflector.invoke(Unknown Source)
   [groovy]     at groovy.lang.MetaMethod.invoke(MetaMethod.java:111)
   [groovy]     at
org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.j
ava:636)
   [groovy]     at
groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:345)
   [groovy]     at
org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:144)
   [groovy]     at
org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:10
4)
   [groovy]     at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(ScriptBytecod
eAdapter.java:85)
   [groovy]     at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNoArgumentsMethod(Sc
riptBytecodeAdapter.java:
175)
   [groovy]     at Script1.run(Script1.groovy:11)
   [groovy]     at
org.codehaus.groovy.ant.Groovy.execGroovy(Groovy.java:455)
   [groovy]     at org.codehaus.groovy.ant.Groovy.execute(Groovy.java:349)
   [groovy]     at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
   [groovy]     at org.apache.tools.ant.Task.perform(Task.java:364)
   [groovy]     at org.apache.tools.ant.Target.execute(Target.java:341)
   [groovy]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
   [groovy]     at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
   [groovy]     at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckEx
ecutor.java:37)
   [groovy]     at
org.apache.tools.ant.Project.executeTargets(Project.java:1068)
   [groovy]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
   [groovy]     at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
   [groovy]     at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
   [groovy]     at org.apache.tools.ant.Task.perform(Task.java:364)
   [groovy]     at org.apache.tools.ant.Target.execute(Target.java:341)
   [groovy]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
   [groovy]     at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
   [groovy]     at
org.apache.tools.ant.Project.executeTarget(Project.java:1185)
   [groovy]     at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.j
ava:40)
   [groovy]     at
org.apache.tools.ant.Project.executeTargets(Project.java:1068)
   [groovy]     at org.apache.tools.ant.Main.runBuild(Main.java:668)
   [groovy]     at org.apache.tools.ant.Main.startAnt(Main.java:187)
   [groovy]     at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
   [groovy]     at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
   [groovy] Started SocketListener on 0.0.0.0:8080
   [groovy]
org.mortbay.util.MultiException[org.springmodules.beans.factory.drivers.xml.
XmlApplicationContextUtils$3: Co
uld not load [com.sun.org.apache.xerces.internal.dom.DocumentImpl] or
[org.apache.xerces.dom.DocumentImpl]!]
   [groovy]     at org.mortbay.http.HttpServer.doStart(HttpServer.java:731)
   [groovy]     at org.mortbay.util.Container.start(Container.java:72)
   [groovy]     at
gjdk.org.mortbay.jetty.Server_GroovyReflector.invoke(Unknown Source)
   [groovy]     at groovy.lang.MetaMethod.invoke(MetaMethod.java:111)
   [groovy]     at
org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.j
ava:636)
   [groovy]     at
groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:345)
   [groovy]     at
org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:144)
   [groovy]     at
org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:10
4)
   [groovy]     at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(ScriptBytecod
eAdapter.java:85)
   [groovy]     at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNoArgumentsMethod(Sc
riptBytecodeAdapter.java:
175)
   [groovy]     at Script1.run(Script1.groovy:11)
   [groovy]     at
org.codehaus.groovy.ant.Groovy.execGroovy(Groovy.java:455)
   [groovy]     at org.codehaus.groovy.ant.Groovy.execute(Groovy.java:349)
   [groovy]     at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
   [groovy]     at org.apache.tools.ant.Task.perform(Task.java:364)
   [groovy]     at org.apache.tools.ant.Target.execute(Target.java:341)
   [groovy]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
   [groovy]     at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
   [groovy]     at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckEx
ecutor.java:37)
   [groovy]     at
org.apache.tools.ant.Project.executeTargets(Project.java:1068)
   [groovy]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
   [groovy]     at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
   [groovy]     at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
   [groovy]     at org.apache.tools.ant.Task.perform(Task.java:364)
   [groovy]     at org.apache.tools.ant.Target.execute(Target.java:341)
   [groovy]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
   [groovy]     at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
   [groovy]     at
org.apache.tools.ant.Project.executeTarget(Project.java:1185)
   [groovy]     at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.j
ava:40)
   [groovy]     at
org.apache.tools.ant.Project.executeTargets(Project.java:1068)
   [groovy]     at org.apache.tools.ant.Main.runBuild(Main.java:668)
   [groovy]     at org.apache.tools.ant.Main.startAnt(Main.java:187)
   [groovy]     at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
   [groovy]     at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
   [groovy]
org.springmodules.beans.factory.drivers.xml.XmlApplicationContextUtils$3:
Could not load [com.sun.org.apache
.xerces.internal.dom.DocumentImpl] or [org.apache.xerces.dom.DocumentImpl]!
   [groovy]     at
org.springmodules.beans.factory.drivers.xml.XmlApplicationContextUtils.getNe
wDocument(XmlApplicationC
ontextUtils.java:85)
   [groovy]     at
org.springmodules.beans.factory.drivers.xml.XmlApplicationContextUtils.conve
rt2xml(XmlApplicationCont
extUtils.java:195)
   [groovy]     at
org.springmodules.beans.factory.drivers.xml.XmlApplicationContextDriver.getA
pplicationContext(XmlAppl
icationContextDriver.java:20)
   [groovy]     at
org.springmodules.beans.factory.drivers.xml.XmlWebApplicationContextDriver.g
etWebApplicationContext(X
mlWebApplicationContextDriver.java:48)
   [groovy]     at
org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet.createWebAppl
icationContext(GrailsDisp
atcherServlet.java:82)
   [groovy]     at
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(F
rameworkServlet.java:250)

   [groovy]     at
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkSe
rvlet.java:219)
   [groovy]     at
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:11
2)
   [groovy]     at
javax.servlet.GenericServlet.init(GenericServlet.java:168)
   [groovy]     at
org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:383)
   [groovy]     at
org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:243)
   [groovy]     at
org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.j
ava:446)
   [groovy]     at
org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplic
ationHandler.java:321)
   [groovy]     at
org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationContex
t.java:511)
   [groovy]     at org.mortbay.util.Container.start(Container.java:72)
   [groovy]     at org.mortbay.http.HttpServer.doStart(HttpServer.java:753)
   [groovy]     at org.mortbay.util.Container.start(Container.java:72)
   [groovy]     at
gjdk.org.mortbay.jetty.Server_GroovyReflector.invoke(Unknown Source)
   [groovy]     at groovy.lang.MetaMethod.invoke(MetaMethod.java:111)
   [groovy]     at
org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.j
ava:636)
   [groovy]     at
groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:345)
   [groovy]     at
org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:144)
   [groovy]     at
org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:10
4)
   [groovy]     at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(ScriptBytecod
eAdapter.java:85)
   [groovy]     at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNoArgumentsMethod(Sc
riptBytecodeAdapter.java:
175)
   [groovy]     at Script1.run(Script1.groovy:11)
   [groovy]     at
org.codehaus.groovy.ant.Groovy.execGroovy(Groovy.java:455)
   [groovy]     at org.codehaus.groovy.ant.Groovy.execute(Groovy.java:349)
   [groovy]     at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
   [groovy]     at org.apache.tools.ant.Task.perform(Task.java:364)
   [groovy]     at org.apache.tools.ant.Target.execute(Target.java:341)
   [groovy]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
   [groovy]     at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
   [groovy]     at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckEx
ecutor.java:37)
   [groovy]     at
org.apache.tools.ant.Project.executeTargets(Project.java:1068)
   [groovy]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
   [groovy]     at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
   [groovy]     at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
   [groovy]     at org.apache.tools.ant.Task.perform(Task.java:364)
   [groovy]     at org.apache.tools.ant.Target.execute(Target.java:341)
   [groovy]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
   [groovy]     at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
   [groovy]     at
org.apache.tools.ant.Project.executeTarget(Project.java:1185)
   [groovy]     at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.j
ava:40)
   [groovy]     at
org.apache.tools.ant.Project.executeTargets(Project.java:1068)
   [groovy]     at org.apache.tools.ant.Main.runBuild(Main.java:668)
   [groovy]     at org.apache.tools.ant.Main.startAnt(Main.java:187)
   [groovy]     at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
   [groovy]     at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
   [groovy]
org.springmodules.beans.factory.drivers.xml.XmlApplicationContextUtils$3:
Could not load [com.sun.org.apache
.xerces.internal.dom.DocumentImpl] or [org.apache.xerces.dom.DocumentImpl]!
   [groovy]     at
org.springmodules.beans.factory.drivers.xml.XmlApplicationContextUtils.getNe
wDocument(XmlApplicationC
ontextUtils.java:85)
   [groovy]     at
org.springmodules.beans.factory.drivers.xml.XmlApplicationContextUtils.conve
rt2xml(XmlApplicationCont
extUtils.java:195)
   [groovy]     at
org.springmodules.beans.factory.drivers.xml.XmlApplicationContextDriver.getA
pplicationContext(XmlAppl
icationContextDriver.java:20)
   [groovy]     at
org.springmodules.beans.factory.drivers.xml.XmlWebApplicationContextDriver.g
etWebApplicationContext(X
mlWebApplicationContextDriver.java:48)
   [groovy]     at
org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet.createWebAppl
icationContext(GrailsDisp
atcherServlet.java:82)
   [groovy]     at
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(F
rameworkServlet.java:250)

   [groovy]     at
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkSe
rvlet.java:219)
   [groovy]     at
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:11
2)
   [groovy]     at
javax.servlet.GenericServlet.init(GenericServlet.java:168)
   [groovy]     at
org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:383)
   [groovy]     at
org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:243)
   [groovy]     at
org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.j
ava:446)
   [groovy]     at
org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplic
ationHandler.java:321)
   [groovy]     at
org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationContex
t.java:511)
   [groovy]     at org.mortbay.util.Container.start(Container.java:72)
   [groovy]     at org.mortbay.http.HttpServer.doStart(HttpServer.java:753)
   [groovy]     at org.mortbay.util.Container.start(Container.java:72)
   [groovy]     at
gjdk.org.mortbay.jetty.Server_GroovyReflector.invoke(Unknown Source)
   [groovy]     at groovy.lang.MetaMethod.invoke(MetaMethod.java:111)
   [groovy]     at
org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.j
ava:636)
   [groovy]     at
groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:345)
   [groovy]     at
org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:144)
   [groovy]     at
org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:10
4)
   [groovy]     at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(ScriptBytecod
eAdapter.java:85)
   [groovy]     at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNoArgumentsMethod(Sc
riptBytecodeAdapter.java:
175)
   [groovy]     at Script1.run(Script1.groovy:11)
   [groovy]     at
org.codehaus.groovy.ant.Groovy.execGroovy(Groovy.java:455)
   [groovy]     at org.codehaus.groovy.ant.Groovy.execute(Groovy.java:349)
   [groovy]     at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
   [groovy]     at org.apache.tools.ant.Task.perform(Task.java:364)
   [groovy]     at org.apache.tools.ant.Target.execute(Target.java:341)
   [groovy]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
   [groovy]     at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
   [groovy]     at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckEx
ecutor.java:37)
   [groovy]     at
org.apache.tools.ant.Project.executeTargets(Project.java:1068)
   [groovy]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
   [groovy]     at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
   [groovy]     at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
   [groovy]     at org.apache.tools.ant.Task.perform(Task.java:364)
   [groovy]     at org.apache.tools.ant.Target.execute(Target.java:341)
   [groovy]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
   [groovy]     at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
   [groovy]     at
org.apache.tools.ant.Project.executeTarget(Project.java:1185)
   [groovy]     at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.j
ava:40)
   [groovy]     at
org.apache.tools.ant.Project.executeTargets(Project.java:1068)
   [groovy]     at org.apache.tools.ant.Main.runBuild(Main.java:668)
   [groovy]     at org.apache.tools.ant.Main.startAnt(Main.java:187)
   [groovy]     at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
   [groovy]     at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
   [groovy] statements executed successfully

wait-forever:




Reply | Threaded
Open this post in threaded view
|

Re: build.xml

graemer
This error is being displayed because xercesImpl.jar is not on the
classpath it should be... I will have a look

Graeme

On 21/02/06, Dierk Koenig <[hidden email]> wrote:

> Jetty start is now working again being kept open when started with
>  'grails run-app'
> and being opened only while testing and stopped thereafter with
>  'grails run-webtest'
> . Trick was to use a magic system property to suppress web.xml validation
> that fails although other validators take no issue with it.
>
> However, Jetty start currently show a lot of errors.
> Xerces missing in cp when grails is started?
> See stacktrace below.
>
> cheers
> Mittie
>
>    [groovy] Root WebApplicationContext: initialization completed in 3535 ms
>    [groovy] Initializing servlet 'grails'
>    [groovy] FrameworkServlet 'grails': initialization started
>    [groovy] Loading WebApplicationContext for Spring FrameworkServlet
> 'grails'
>    [groovy] [SpringConfig] Configuring i18n support
>    [groovy] [SpringConfig] Configuring Grails data source
>    [groovy] [SpringConfig] Configuring Grails domain
>    [groovy] [SpringConfig] Configuring Grails services
>    [groovy] [SpringConfig] Configuring Grails page flows
>    [groovy] [SpringConfig] Configuring Grails controllers
>    [groovy] [SpringConfig] Configuring Grails scaffolding
>    [groovy] Context initialization failed
>    [groovy]
> org.springmodules.beans.factory.drivers.xml.XmlApplicationContextUtils$3:
> Could not load [com.sun.org.apache
> .xerces.internal.dom.DocumentImpl] or [org.apache.xerces.dom.DocumentImpl]!
>    [groovy]     at
> org.springmodules.beans.factory.drivers.xml.XmlApplicationContextUtils.getNe
> wDocument(XmlApplicationC
> ontextUtils.java:85)
>    [groovy]     at
> org.springmodules.beans.factory.drivers.xml.XmlApplicationContextUtils.conve
> rt2xml(XmlApplicationCont
> extUtils.java:195)
>    [groovy]     at
> org.springmodules.beans.factory.drivers.xml.XmlApplicationContextDriver.getA
> pplicationContext(XmlAppl
> icationContextDriver.java:20)
>    [groovy]     at
> org.springmodules.beans.factory.drivers.xml.XmlWebApplicationContextDriver.g
> etWebApplicationContext(X
> mlWebApplicationContextDriver.java:48)
>    [groovy]     at
> org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet.createWebAppl
> icationContext(GrailsDisp
> atcherServlet.java:82)
>    [groovy]     at
> org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(F
> rameworkServlet.java:250)
>
>    [groovy]     at
> org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkSe
> rvlet.java:219)
>    [groovy]     at
> org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:11
> 2)
>    [groovy]     at
> javax.servlet.GenericServlet.init(GenericServlet.java:168)
>    [groovy]     at
> org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:383)
>    [groovy]     at
> org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:243)
>    [groovy]     at
> org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.j
> ava:446)
>    [groovy]     at
> org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplic
> ationHandler.java:321)
>    [groovy]     at
> org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationContex
> t.java:511)
>    [groovy]     at org.mortbay.util.Container.start(Container.java:72)
>    [groovy]     at org.mortbay.http.HttpServer.doStart(HttpServer.java:753)
>    [groovy]     at org.mortbay.util.Container.start(Container.java:72)
>    [groovy]     at
> gjdk.org.mortbay.jetty.Server_GroovyReflector.invoke(Unknown Source)
>    [groovy]     at groovy.lang.MetaMethod.invoke(MetaMethod.java:111)
>    [groovy]     at
> org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.j
> ava:636)
>    [groovy]     at
> groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:345)
>    [groovy]     at
> org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:144)
>    [groovy]     at
> org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:10
> 4)
>    [groovy]     at
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(ScriptBytecod
> eAdapter.java:85)
>    [groovy]     at
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNoArgumentsMethod(Sc
> riptBytecodeAdapter.java:
> 175)
>    [groovy]     at Script1.run(Script1.groovy:11)
>    [groovy]     at
> org.codehaus.groovy.ant.Groovy.execGroovy(Groovy.java:455)
>    [groovy]     at org.codehaus.groovy.ant.Groovy.execute(Groovy.java:349)
>    [groovy]     at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>    [groovy]     at org.apache.tools.ant.Task.perform(Task.java:364)
>    [groovy]     at org.apache.tools.ant.Target.execute(Target.java:341)
>    [groovy]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
>    [groovy]     at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
>    [groovy]     at
> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckEx
> ecutor.java:37)
>    [groovy]     at
> org.apache.tools.ant.Project.executeTargets(Project.java:1068)
>    [groovy]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
>    [groovy]     at
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
>    [groovy]     at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>    [groovy]     at org.apache.tools.ant.Task.perform(Task.java:364)
>    [groovy]     at org.apache.tools.ant.Target.execute(Target.java:341)
>    [groovy]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
>    [groovy]     at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
>    [groovy]     at
> org.apache.tools.ant.Project.executeTarget(Project.java:1185)
>    [groovy]     at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.j
> ava:40)
>    [groovy]     at
> org.apache.tools.ant.Project.executeTargets(Project.java:1068)
>    [groovy]     at org.apache.tools.ant.Main.runBuild(Main.java:668)
>    [groovy]     at org.apache.tools.ant.Main.startAnt(Main.java:187)
>    [groovy]     at
> org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
>    [groovy]     at
> org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
>    [groovy] Started SocketListener on 0.0.0.0:8080
>    [groovy]
> org.mortbay.util.MultiException[org.springmodules.beans.factory.drivers.xml.
> XmlApplicationContextUtils$3: Co
> uld not load [com.sun.org.apache.xerces.internal.dom.DocumentImpl] or
> [org.apache.xerces.dom.DocumentImpl]!]
>    [groovy]     at org.mortbay.http.HttpServer.doStart(HttpServer.java:731)
>    [groovy]     at org.mortbay.util.Container.start(Container.java:72)
>    [groovy]     at
> gjdk.org.mortbay.jetty.Server_GroovyReflector.invoke(Unknown Source)
>    [groovy]     at groovy.lang.MetaMethod.invoke(MetaMethod.java:111)
>    [groovy]     at
> org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.j
> ava:636)
>    [groovy]     at
> groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:345)
>    [groovy]     at
> org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:144)
>    [groovy]     at
> org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:10
> 4)
>    [groovy]     at
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(ScriptBytecod
> eAdapter.java:85)
>    [groovy]     at
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNoArgumentsMethod(Sc
> riptBytecodeAdapter.java:
> 175)
>    [groovy]     at Script1.run(Script1.groovy:11)
>    [groovy]     at
> org.codehaus.groovy.ant.Groovy.execGroovy(Groovy.java:455)
>    [groovy]     at org.codehaus.groovy.ant.Groovy.execute(Groovy.java:349)
>    [groovy]     at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>    [groovy]     at org.apache.tools.ant.Task.perform(Task.java:364)
>    [groovy]     at org.apache.tools.ant.Target.execute(Target.java:341)
>    [groovy]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
>    [groovy]     at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
>    [groovy]     at
> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckEx
> ecutor.java:37)
>    [groovy]     at
> org.apache.tools.ant.Project.executeTargets(Project.java:1068)
>    [groovy]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
>    [groovy]     at
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
>    [groovy]     at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>    [groovy]     at org.apache.tools.ant.Task.perform(Task.java:364)
>    [groovy]     at org.apache.tools.ant.Target.execute(Target.java:341)
>    [groovy]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
>    [groovy]     at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
>    [groovy]     at
> org.apache.tools.ant.Project.executeTarget(Project.java:1185)
>    [groovy]     at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.j
> ava:40)
>    [groovy]     at
> org.apache.tools.ant.Project.executeTargets(Project.java:1068)
>    [groovy]     at org.apache.tools.ant.Main.runBuild(Main.java:668)
>    [groovy]     at org.apache.tools.ant.Main.startAnt(Main.java:187)
>    [groovy]     at
> org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
>    [groovy]     at
> org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
>    [groovy]
> org.springmodules.beans.factory.drivers.xml.XmlApplicationContextUtils$3:
> Could not load [com.sun.org.apache
> .xerces.internal.dom.DocumentImpl] or [org.apache.xerces.dom.DocumentImpl]!
>    [groovy]     at
> org.springmodules.beans.factory.drivers.xml.XmlApplicationContextUtils.getNe
> wDocument(XmlApplicationC
> ontextUtils.java:85)
>    [groovy]     at
> org.springmodules.beans.factory.drivers.xml.XmlApplicationContextUtils.conve
> rt2xml(XmlApplicationCont
> extUtils.java:195)
>    [groovy]     at
> org.springmodules.beans.factory.drivers.xml.XmlApplicationContextDriver.getA
> pplicationContext(XmlAppl
> icationContextDriver.java:20)
>    [groovy]     at
> org.springmodules.beans.factory.drivers.xml.XmlWebApplicationContextDriver.g
> etWebApplicationContext(X
> mlWebApplicationContextDriver.java:48)
>    [groovy]     at
> org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet.createWebAppl
> icationContext(GrailsDisp
> atcherServlet.java:82)
>    [groovy]     at
> org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(F
> rameworkServlet.java:250)
>
>    [groovy]     at
> org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkSe
> rvlet.java:219)
>    [groovy]     at
> org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:11
> 2)
>    [groovy]     at
> javax.servlet.GenericServlet.init(GenericServlet.java:168)
>    [groovy]     at
> org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:383)
>    [groovy]     at
> org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:243)
>    [groovy]     at
> org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.j
> ava:446)
>    [groovy]     at
> org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplic
> ationHandler.java:321)
>    [groovy]     at
> org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationContex
> t.java:511)
>    [groovy]     at org.mortbay.util.Container.start(Container.java:72)
>    [groovy]     at org.mortbay.http.HttpServer.doStart(HttpServer.java:753)
>    [groovy]     at org.mortbay.util.Container.start(Container.java:72)
>    [groovy]     at
> gjdk.org.mortbay.jetty.Server_GroovyReflector.invoke(Unknown Source)
>    [groovy]     at groovy.lang.MetaMethod.invoke(MetaMethod.java:111)
>    [groovy]     at
> org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.j
> ava:636)
>    [groovy]     at
> groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:345)
>    [groovy]     at
> org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:144)
>    [groovy]     at
> org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:10
> 4)
>    [groovy]     at
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(ScriptBytecod
> eAdapter.java:85)
>    [groovy]     at
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNoArgumentsMethod(Sc
> riptBytecodeAdapter.java:
> 175)
>    [groovy]     at Script1.run(Script1.groovy:11)
>    [groovy]     at
> org.codehaus.groovy.ant.Groovy.execGroovy(Groovy.java:455)
>    [groovy]     at org.codehaus.groovy.ant.Groovy.execute(Groovy.java:349)
>    [groovy]     at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>    [groovy]     at org.apache.tools.ant.Task.perform(Task.java:364)
>    [groovy]     at org.apache.tools.ant.Target.execute(Target.java:341)
>    [groovy]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
>    [groovy]     at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
>    [groovy]     at
> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckEx
> ecutor.java:37)
>    [groovy]     at
> org.apache.tools.ant.Project.executeTargets(Project.java:1068)
>    [groovy]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
>    [groovy]     at
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
>    [groovy]     at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>    [groovy]     at org.apache.tools.ant.Task.perform(Task.java:364)
>    [groovy]     at org.apache.tools.ant.Target.execute(Target.java:341)
>    [groovy]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
>    [groovy]     at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
>    [groovy]     at
> org.apache.tools.ant.Project.executeTarget(Project.java:1185)
>    [groovy]     at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.j
> ava:40)
>    [groovy]     at
> org.apache.tools.ant.Project.executeTargets(Project.java:1068)
>    [groovy]     at org.apache.tools.ant.Main.runBuild(Main.java:668)
>    [groovy]     at org.apache.tools.ant.Main.startAnt(Main.java:187)
>    [groovy]     at
> org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
>    [groovy]     at
> org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
>    [groovy]
> org.springmodules.beans.factory.drivers.xml.XmlApplicationContextUtils$3:
> Could not load [com.sun.org.apache
> .xerces.internal.dom.DocumentImpl] or [org.apache.xerces.dom.DocumentImpl]!
>    [groovy]     at
> org.springmodules.beans.factory.drivers.xml.XmlApplicationContextUtils.getNe
> wDocument(XmlApplicationC
> ontextUtils.java:85)
>    [groovy]     at
> org.springmodules.beans.factory.drivers.xml.XmlApplicationContextUtils.conve
> rt2xml(XmlApplicationCont
> extUtils.java:195)
>    [groovy]     at
> org.springmodules.beans.factory.drivers.xml.XmlApplicationContextDriver.getA
> pplicationContext(XmlAppl
> icationContextDriver.java:20)
>    [groovy]     at
> org.springmodules.beans.factory.drivers.xml.XmlWebApplicationContextDriver.g
> etWebApplicationContext(X
> mlWebApplicationContextDriver.java:48)
>    [groovy]     at
> org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet.createWebAppl
> icationContext(GrailsDisp
> atcherServlet.java:82)
>    [groovy]     at
> org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(F
> rameworkServlet.java:250)
>
>    [groovy]     at
> org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkSe
> rvlet.java:219)
>    [groovy]     at
> org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:11
> 2)
>    [groovy]     at
> javax.servlet.GenericServlet.init(GenericServlet.java:168)
>    [groovy]     at
> org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:383)
>    [groovy]     at
> org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:243)
>    [groovy]     at
> org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.j
> ava:446)
>    [groovy]     at
> org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplic
> ationHandler.java:321)
>    [groovy]     at
> org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationContex
> t.java:511)
>    [groovy]     at org.mortbay.util.Container.start(Container.java:72)
>    [groovy]     at org.mortbay.http.HttpServer.doStart(HttpServer.java:753)
>    [groovy]     at org.mortbay.util.Container.start(Container.java:72)
>    [groovy]     at
> gjdk.org.mortbay.jetty.Server_GroovyReflector.invoke(Unknown Source)
>    [groovy]     at groovy.lang.MetaMethod.invoke(MetaMethod.java:111)
>    [groovy]     at
> org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.j
> ava:636)
>    [groovy]     at
> groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:345)
>    [groovy]     at
> org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:144)
>    [groovy]     at
> org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:10
> 4)
>    [groovy]     at
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(ScriptBytecod
> eAdapter.java:85)
>    [groovy]     at
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNoArgumentsMethod(Sc
> riptBytecodeAdapter.java:
> 175)
>    [groovy]     at Script1.run(Script1.groovy:11)
>    [groovy]     at
> org.codehaus.groovy.ant.Groovy.execGroovy(Groovy.java:455)
>    [groovy]     at org.codehaus.groovy.ant.Groovy.execute(Groovy.java:349)
>    [groovy]     at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>    [groovy]     at org.apache.tools.ant.Task.perform(Task.java:364)
>    [groovy]     at org.apache.tools.ant.Target.execute(Target.java:341)
>    [groovy]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
>    [groovy]     at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
>    [groovy]     at
> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckEx
> ecutor.java:37)
>    [groovy]     at
> org.apache.tools.ant.Project.executeTargets(Project.java:1068)
>    [groovy]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
>    [groovy]     at
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
>    [groovy]     at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>    [groovy]     at org.apache.tools.ant.Task.perform(Task.java:364)
>    [groovy]     at org.apache.tools.ant.Target.execute(Target.java:341)
>    [groovy]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
>    [groovy]     at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
>    [groovy]     at
> org.apache.tools.ant.Project.executeTarget(Project.java:1185)
>    [groovy]     at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.j
> ava:40)
>    [groovy]     at
> org.apache.tools.ant.Project.executeTargets(Project.java:1068)
>    [groovy]     at org.apache.tools.ant.Main.runBuild(Main.java:668)
>    [groovy]     at org.apache.tools.ant.Main.startAnt(Main.java:187)
>    [groovy]     at
> org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
>    [groovy]     at
> org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
>    [groovy] statements executed successfully
>
> wait-forever:
>
>
>
>
>
Reply | Threaded
Open this post in threaded view
|

scaffolded detail view

Dierk König
In reply to this post by Dierk König
Hi,

I like to jot down a few observations about the generated HTML.

When testing the detail view, I couldn't easily use
 clickButton(label:'Edit')
since the underlying HtmlUnit would not find the button.
This was because the button is not nested inside a <form>
element but uses JavaScript to jump to a new location.

I could go around this issue by using
 clickElement(xpath:...)
but a bit of bad taste remains since I'm not sure we produce
valid HTML in the view with 'standalone' button elements.

So, what to do?

There are several combinations with one or multiple form
element around the buttons, with and without JS to achieve
the same effect while staying HTML compliant.

Some forces that move us through the design space:
- operations are triggered by URLs without parameters
- requests are GET requests
  -> no double-click protection
- user expects links for navigation, buttons for operations
  (currently violated with [delete] link in list view)
- produce valid HTML
- JS should not be needed for basic operations
  (so they work behind strict proxies, disabled JS, etc.)

I currently see no way of resolving all forces.
If we have to compromise one of them, I'd suggest
to make a deliberate decision and keep the rest consistent.

cheers
Mittie
Reply | Threaded
Open this post in threaded view
|

RE: build.xml

Dierk König
In reply to this post by graemer
ok, I just solved it..

thanks
Mittie

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]On Behalf
> Of Graeme Rocher
> Sent: Mittwoch, 22. Februar 2006 8:46
> To: [hidden email]
> Subject: Re: [grails-dev] build.xml
>
>
> This error is being displayed because xercesImpl.jar is not on the
> classpath it should be... I will have a look
>
> Graeme
>
> On 21/02/06, Dierk Koenig <[hidden email]> wrote:
> > Jetty start is now working again being kept open when started with
> >  'grails run-app'
> > and being opened only while testing and stopped thereafter with
> >  'grails run-webtest'
> > . Trick was to use a magic system property to suppress web.xml
> validation
> > that fails although other validators take no issue with it.
> >
> > However, Jetty start currently show a lot of errors.
> > Xerces missing in cp when grails is started?
> > See stacktrace below.
> >
> > cheers
> > Mittie
> >
> >    [groovy] Root WebApplicationContext: initialization
> completed in 3535 ms
> >    [groovy] Initializing servlet 'grails'
> >    [groovy] FrameworkServlet 'grails': initialization started
> >    [groovy] Loading WebApplicationContext for Spring FrameworkServlet
> > 'grails'
> >    [groovy] [SpringConfig] Configuring i18n support
> >    [groovy] [SpringConfig] Configuring Grails data source
> >    [groovy] [SpringConfig] Configuring Grails domain
> >    [groovy] [SpringConfig] Configuring Grails services
> >    [groovy] [SpringConfig] Configuring Grails page flows
> >    [groovy] [SpringConfig] Configuring Grails controllers
> >    [groovy] [SpringConfig] Configuring Grails scaffolding
> >    [groovy] Context initialization failed
> >    [groovy]
> >
> org.springmodules.beans.factory.drivers.xml.XmlApplicationContextUtils$3:
> > Could not load [com.sun.org.apache
> > .xerces.internal.dom.DocumentImpl] or
> [org.apache.xerces.dom.DocumentImpl]!
> >    [groovy]     at
> >
> org.springmodules.beans.factory.drivers.xml.XmlApplicationContextU
> tils.getNe
> > wDocument(XmlApplicationC
> > ontextUtils.java:85)
> >    [groovy]     at
> >
> org.springmodules.beans.factory.drivers.xml.XmlApplicationContextU
> tils.conve
> > rt2xml(XmlApplicationCont
> > extUtils.java:195)
> >    [groovy]     at
> >
> org.springmodules.beans.factory.drivers.xml.XmlApplicationContextD
> river.getA
> > pplicationContext(XmlAppl
> > icationContextDriver.java:20)
> >    [groovy]     at
> >
> org.springmodules.beans.factory.drivers.xml.XmlWebApplicationConte
> xtDriver.g
> > etWebApplicationContext(X
> > mlWebApplicationContextDriver.java:48)
> >    [groovy]     at
> >
> org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet.cre
> ateWebAppl
> > icationContext(GrailsDisp
> > atcherServlet.java:82)
> >    [groovy]     at
> >
> org.springframework.web.servlet.FrameworkServlet.initWebApplicatio
> nContext(F
> > rameworkServlet.java:250)
> >
> >    [groovy]     at
> >
> org.springframework.web.servlet.FrameworkServlet.initServletBean(F
> rameworkSe
> > rvlet.java:219)
> >    [groovy]     at
> >
> org.springframework.web.servlet.HttpServletBean.init(HttpServletBe
> an.java:11
> > 2)
> >    [groovy]     at
> > javax.servlet.GenericServlet.init(GenericServlet.java:168)
> >    [groovy]     at
> >
> org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.
> java:383)
> >    [groovy]     at
> > org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:243)
> >    [groovy]     at
> >
> org.mortbay.jetty.servlet.ServletHandler.initializeServlets(Servle
> tHandler.j
> > ava:446)
> >    [groovy]     at
> >
> org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets
> (WebApplic
> > ationHandler.java:321)
> >    [groovy]     at
> >
> org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplica
> tionContex
> > t.java:511)
> >    [groovy]     at org.mortbay.util.Container.start(Container.java:72)
> >    [groovy]     at
> org.mortbay.http.HttpServer.doStart(HttpServer.java:753)
> >    [groovy]     at org.mortbay.util.Container.start(Container.java:72)
> >    [groovy]     at
> > gjdk.org.mortbay.jetty.Server_GroovyReflector.invoke(Unknown Source)
> >    [groovy]     at groovy.lang.MetaMethod.invoke(MetaMethod.java:111)
> >    [groovy]     at
> >
> org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaCla
> ssHelper.j
> > ava:636)
> >    [groovy]     at
> > groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:345)
> >    [groovy]     at
> > org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:144)
> >    [groovy]     at
> >
> org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelp
> er.java:10
> > 4)
> >    [groovy]     at
> >
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(Scr
> iptBytecod
> > eAdapter.java:85)
> >    [groovy]     at
> >
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNoArgument
> sMethod(Sc
> > riptBytecodeAdapter.java:
> > 175)
> >    [groovy]     at Script1.run(Script1.groovy:11)
> >    [groovy]     at
> > org.codehaus.groovy.ant.Groovy.execGroovy(Groovy.java:455)
> >    [groovy]     at
> org.codehaus.groovy.ant.Groovy.execute(Groovy.java:349)
> >    [groovy]     at
> > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> >    [groovy]     at org.apache.tools.ant.Task.perform(Task.java:364)
> >    [groovy]     at org.apache.tools.ant.Target.execute(Target.java:341)
> >    [groovy]     at
> org.apache.tools.ant.Target.performTasks(Target.java:369)
> >    [groovy]     at
> > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
> >    [groovy]     at
> >
> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(Sin
> gleCheckEx
> > ecutor.java:37)
> >    [groovy]     at
> > org.apache.tools.ant.Project.executeTargets(Project.java:1068)
> >    [groovy]     at
> org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
> >    [groovy]     at
> > org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
> >    [groovy]     at
> > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> >    [groovy]     at org.apache.tools.ant.Task.perform(Task.java:364)
> >    [groovy]     at org.apache.tools.ant.Target.execute(Target.java:341)
> >    [groovy]     at
> org.apache.tools.ant.Target.performTasks(Target.java:369)
> >    [groovy]     at
> > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
> >    [groovy]     at
> > org.apache.tools.ant.Project.executeTarget(Project.java:1185)
> >    [groovy]     at
> >
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(Default
> Executor.j
> > ava:40)
> >    [groovy]     at
> > org.apache.tools.ant.Project.executeTargets(Project.java:1068)
> >    [groovy]     at org.apache.tools.ant.Main.runBuild(Main.java:668)
> >    [groovy]     at org.apache.tools.ant.Main.startAnt(Main.java:187)
> >    [groovy]     at
> > org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
> >    [groovy]     at
> > org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
> >    [groovy] Started SocketListener on 0.0.0.0:8080
> >    [groovy]
> >
> org.mortbay.util.MultiException[org.springmodules.beans.factory.dr
> ivers.xml.
> > XmlApplicationContextUtils$3: Co
> > uld not load [com.sun.org.apache.xerces.internal.dom.DocumentImpl] or
> > [org.apache.xerces.dom.DocumentImpl]!]
> >    [groovy]     at
> org.mortbay.http.HttpServer.doStart(HttpServer.java:731)
> >    [groovy]     at org.mortbay.util.Container.start(Container.java:72)
> >    [groovy]     at
> > gjdk.org.mortbay.jetty.Server_GroovyReflector.invoke(Unknown Source)
> >    [groovy]     at groovy.lang.MetaMethod.invoke(MetaMethod.java:111)
> >    [groovy]     at
> >
> org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaCla
> ssHelper.j
> > ava:636)
> >    [groovy]     at
> > groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:345)
> >    [groovy]     at
> > org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:144)
> >    [groovy]     at
> >
> org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelp
> er.java:10
> > 4)
> >    [groovy]     at
> >
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(Scr
> iptBytecod
> > eAdapter.java:85)
> >    [groovy]     at
> >
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNoArgument
> sMethod(Sc
> > riptBytecodeAdapter.java:
> > 175)
> >    [groovy]     at Script1.run(Script1.groovy:11)
> >    [groovy]     at
> > org.codehaus.groovy.ant.Groovy.execGroovy(Groovy.java:455)
> >    [groovy]     at
> org.codehaus.groovy.ant.Groovy.execute(Groovy.java:349)
> >    [groovy]     at
> > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> >    [groovy]     at org.apache.tools.ant.Task.perform(Task.java:364)
> >    [groovy]     at org.apache.tools.ant.Target.execute(Target.java:341)
> >    [groovy]     at
> org.apache.tools.ant.Target.performTasks(Target.java:369)
> >    [groovy]     at
> > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
> >    [groovy]     at
> >
> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(Sin
> gleCheckEx
> > ecutor.java:37)
> >    [groovy]     at
> > org.apache.tools.ant.Project.executeTargets(Project.java:1068)
> >    [groovy]     at
> org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
> >    [groovy]     at
> > org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
> >    [groovy]     at
> > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> >    [groovy]     at org.apache.tools.ant.Task.perform(Task.java:364)
> >    [groovy]     at org.apache.tools.ant.Target.execute(Target.java:341)
> >    [groovy]     at
> org.apache.tools.ant.Target.performTasks(Target.java:369)
> >    [groovy]     at
> > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
> >    [groovy]     at
> > org.apache.tools.ant.Project.executeTarget(Project.java:1185)
> >    [groovy]     at
> >
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(Default
> Executor.j
> > ava:40)
> >    [groovy]     at
> > org.apache.tools.ant.Project.executeTargets(Project.java:1068)
> >    [groovy]     at org.apache.tools.ant.Main.runBuild(Main.java:668)
> >    [groovy]     at org.apache.tools.ant.Main.startAnt(Main.java:187)
> >    [groovy]     at
> > org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
> >    [groovy]     at
> > org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
> >    [groovy]
> >
> org.springmodules.beans.factory.drivers.xml.XmlApplicationContextUtils$3:
> > Could not load [com.sun.org.apache
> > .xerces.internal.dom.DocumentImpl] or
> [org.apache.xerces.dom.DocumentImpl]!
> >    [groovy]     at
> >
> org.springmodules.beans.factory.drivers.xml.XmlApplicationContextU
> tils.getNe
> > wDocument(XmlApplicationC
> > ontextUtils.java:85)
> >    [groovy]     at
> >
> org.springmodules.beans.factory.drivers.xml.XmlApplicationContextU
> tils.conve
> > rt2xml(XmlApplicationCont
> > extUtils.java:195)
> >    [groovy]     at
> >
> org.springmodules.beans.factory.drivers.xml.XmlApplicationContextD
> river.getA
> > pplicationContext(XmlAppl
> > icationContextDriver.java:20)
> >    [groovy]     at
> >
> org.springmodules.beans.factory.drivers.xml.XmlWebApplicationConte
> xtDriver.g
> > etWebApplicationContext(X
> > mlWebApplicationContextDriver.java:48)
> >    [groovy]     at
> >
> org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet.cre
> ateWebAppl
> > icationContext(GrailsDisp
> > atcherServlet.java:82)
> >    [groovy]     at
> >
> org.springframework.web.servlet.FrameworkServlet.initWebApplicatio
> nContext(F
> > rameworkServlet.java:250)
> >
> >    [groovy]     at
> >
> org.springframework.web.servlet.FrameworkServlet.initServletBean(F
> rameworkSe
> > rvlet.java:219)
> >    [groovy]     at
> >
> org.springframework.web.servlet.HttpServletBean.init(HttpServletBe
> an.java:11
> > 2)
> >    [groovy]     at
> > javax.servlet.GenericServlet.init(GenericServlet.java:168)
> >    [groovy]     at
> >
> org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.
> java:383)
> >    [groovy]     at
> > org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:243)
> >    [groovy]     at
> >
> org.mortbay.jetty.servlet.ServletHandler.initializeServlets(Servle
> tHandler.j
> > ava:446)
> >    [groovy]     at
> >
> org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets
> (WebApplic
> > ationHandler.java:321)
> >    [groovy]     at
> >
> org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplica
> tionContex
> > t.java:511)
> >    [groovy]     at org.mortbay.util.Container.start(Container.java:72)
> >    [groovy]     at
> org.mortbay.http.HttpServer.doStart(HttpServer.java:753)
> >    [groovy]     at org.mortbay.util.Container.start(Container.java:72)
> >    [groovy]     at
> > gjdk.org.mortbay.jetty.Server_GroovyReflector.invoke(Unknown Source)
> >    [groovy]     at groovy.lang.MetaMethod.invoke(MetaMethod.java:111)
> >    [groovy]     at
> >
> org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaCla
> ssHelper.j
> > ava:636)
> >    [groovy]     at
> > groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:345)
> >    [groovy]     at
> > org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:144)
> >    [groovy]     at
> >
> org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelp
> er.java:10
> > 4)
> >    [groovy]     at
> >
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(Scr
> iptBytecod
> > eAdapter.java:85)
> >    [groovy]     at
> >
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNoArgument
> sMethod(Sc
> > riptBytecodeAdapter.java:
> > 175)
> >    [groovy]     at Script1.run(Script1.groovy:11)
> >    [groovy]     at
> > org.codehaus.groovy.ant.Groovy.execGroovy(Groovy.java:455)
> >    [groovy]     at
> org.codehaus.groovy.ant.Groovy.execute(Groovy.java:349)
> >    [groovy]     at
> > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> >    [groovy]     at org.apache.tools.ant.Task.perform(Task.java:364)
> >    [groovy]     at org.apache.tools.ant.Target.execute(Target.java:341)
> >    [groovy]     at
> org.apache.tools.ant.Target.performTasks(Target.java:369)
> >    [groovy]     at
> > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
> >    [groovy]     at
> >
> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(Sin
> gleCheckEx
> > ecutor.java:37)
> >    [groovy]     at
> > org.apache.tools.ant.Project.executeTargets(Project.java:1068)
> >    [groovy]     at
> org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
> >    [groovy]     at
> > org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
> >    [groovy]     at
> > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> >    [groovy]     at org.apache.tools.ant.Task.perform(Task.java:364)
> >    [groovy]     at org.apache.tools.ant.Target.execute(Target.java:341)
> >    [groovy]     at
> org.apache.tools.ant.Target.performTasks(Target.java:369)
> >    [groovy]     at
> > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
> >    [groovy]     at
> > org.apache.tools.ant.Project.executeTarget(Project.java:1185)
> >    [groovy]     at
> >
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(Default
> Executor.j
> > ava:40)
> >    [groovy]     at
> > org.apache.tools.ant.Project.executeTargets(Project.java:1068)
> >    [groovy]     at org.apache.tools.ant.Main.runBuild(Main.java:668)
> >    [groovy]     at org.apache.tools.ant.Main.startAnt(Main.java:187)
> >    [groovy]     at
> > org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
> >    [groovy]     at
> > org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
> >    [groovy]
> >
> org.springmodules.beans.factory.drivers.xml.XmlApplicationContextUtils$3:
> > Could not load [com.sun.org.apache
> > .xerces.internal.dom.DocumentImpl] or
> [org.apache.xerces.dom.DocumentImpl]!
> >    [groovy]     at
> >
> org.springmodules.beans.factory.drivers.xml.XmlApplicationContextU
> tils.getNe
> > wDocument(XmlApplicationC
> > ontextUtils.java:85)
> >    [groovy]     at
> >
> org.springmodules.beans.factory.drivers.xml.XmlApplicationContextU
> tils.conve
> > rt2xml(XmlApplicationCont
> > extUtils.java:195)
> >    [groovy]     at
> >
> org.springmodules.beans.factory.drivers.xml.XmlApplicationContextD
> river.getA
> > pplicationContext(XmlAppl
> > icationContextDriver.java:20)
> >    [groovy]     at
> >
> org.springmodules.beans.factory.drivers.xml.XmlWebApplicationConte
> xtDriver.g
> > etWebApplicationContext(X
> > mlWebApplicationContextDriver.java:48)
> >    [groovy]     at
> >
> org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet.cre
> ateWebAppl
> > icationContext(GrailsDisp
> > atcherServlet.java:82)
> >    [groovy]     at
> >
> org.springframework.web.servlet.FrameworkServlet.initWebApplicatio
> nContext(F
> > rameworkServlet.java:250)
> >
> >    [groovy]     at
> >
> org.springframework.web.servlet.FrameworkServlet.initServletBean(F
> rameworkSe
> > rvlet.java:219)
> >    [groovy]     at
> >
> org.springframework.web.servlet.HttpServletBean.init(HttpServletBe
> an.java:11
> > 2)
> >    [groovy]     at
> > javax.servlet.GenericServlet.init(GenericServlet.java:168)
> >    [groovy]     at
> >
> org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.
> java:383)
> >    [groovy]     at
> > org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:243)
> >    [groovy]     at
> >
> org.mortbay.jetty.servlet.ServletHandler.initializeServlets(Servle
> tHandler.j
> > ava:446)
> >    [groovy]     at
> >
> org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets
> (WebApplic
> > ationHandler.java:321)
> >    [groovy]     at
> >
> org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplica
> tionContex
> > t.java:511)
> >    [groovy]     at org.mortbay.util.Container.start(Container.java:72)
> >    [groovy]     at
> org.mortbay.http.HttpServer.doStart(HttpServer.java:753)
> >    [groovy]     at org.mortbay.util.Container.start(Container.java:72)
> >    [groovy]     at
> > gjdk.org.mortbay.jetty.Server_GroovyReflector.invoke(Unknown Source)
> >    [groovy]     at groovy.lang.MetaMethod.invoke(MetaMethod.java:111)
> >    [groovy]     at
> >
> org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaCla
> ssHelper.j
> > ava:636)
> >    [groovy]     at
> > groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:345)
> >    [groovy]     at
> > org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:144)
> >    [groovy]     at
> >
> org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelp
> er.java:10
> > 4)
> >    [groovy]     at
> >
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(Scr
> iptBytecod
> > eAdapter.java:85)
> >    [groovy]     at
> >
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNoArgument
> sMethod(Sc
> > riptBytecodeAdapter.java:
> > 175)
> >    [groovy]     at Script1.run(Script1.groovy:11)
> >    [groovy]     at
> > org.codehaus.groovy.ant.Groovy.execGroovy(Groovy.java:455)
> >    [groovy]     at
> org.codehaus.groovy.ant.Groovy.execute(Groovy.java:349)
> >    [groovy]     at
> > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> >    [groovy]     at org.apache.tools.ant.Task.perform(Task.java:364)
> >    [groovy]     at org.apache.tools.ant.Target.execute(Target.java:341)
> >    [groovy]     at
> org.apache.tools.ant.Target.performTasks(Target.java:369)
> >    [groovy]     at
> > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
> >    [groovy]     at
> >
> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(Sin
> gleCheckEx
> > ecutor.java:37)
> >    [groovy]     at
> > org.apache.tools.ant.Project.executeTargets(Project.java:1068)
> >    [groovy]     at
> org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
> >    [groovy]     at
> > org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
> >    [groovy]     at
> > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> >    [groovy]     at org.apache.tools.ant.Task.perform(Task.java:364)
> >    [groovy]     at org.apache.tools.ant.Target.execute(Target.java:341)
> >    [groovy]     at
> org.apache.tools.ant.Target.performTasks(Target.java:369)
> >    [groovy]     at
> > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
> >    [groovy]     at
> > org.apache.tools.ant.Project.executeTarget(Project.java:1185)
> >    [groovy]     at
> >
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(Default
> Executor.j
> > ava:40)
> >    [groovy]     at
> > org.apache.tools.ant.Project.executeTargets(Project.java:1068)
> >    [groovy]     at org.apache.tools.ant.Main.runBuild(Main.java:668)
> >    [groovy]     at org.apache.tools.ant.Main.startAnt(Main.java:187)
> >    [groovy]     at
> > org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
> >    [groovy]     at
> > org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
> >    [groovy] statements executed successfully
> >
> > wait-forever:
> >
> >
> >
> >
> >
Reply | Threaded
Open this post in threaded view
|

Re: scaffolded detail view

graemer
In reply to this post by Dierk König
Hi Dierk,

You make valid points, but the I see now way to get round the issue
without some use of javascript. There are 2 techniques you can use.
You can either:

- catch the onsubmit event of the form and change the action depending
on the button clicked
- use onclicks on the buttons themselves (which is what i have done)

The traditional way to get around this is it to be handled by the
controller and you have the inputs pass a parameter like this:

<input type="submit" name="action" value="Delete" />
<input type="submit" name="action" value="Edit" />

But i'm not sure how to get this to work with Grails, maybe we could
have the form submit to the controller and then the action is picked
up by the "action" request parameter


On 22/02/06, Dierk Koenig <[hidden email]> wrote:

> Hi,
>
> I like to jot down a few observations about the generated HTML.
>
> When testing the detail view, I couldn't easily use
>  clickButton(label:'Edit')
> since the underlying HtmlUnit would not find the button.
> This was because the button is not nested inside a <form>
> element but uses JavaScript to jump to a new location.
>
> I could go around this issue by using
>  clickElement(xpath:...)
> but a bit of bad taste remains since I'm not sure we produce
> valid HTML in the view with 'standalone' button elements.
>
> So, what to do?
>
> There are several combinations with one or multiple form
> element around the buttons, with and without JS to achieve
> the same effect while staying HTML compliant.
>
> Some forces that move us through the design space:
> - operations are triggered by URLs without parameters
> - requests are GET requests
>   -> no double-click protection
> - user expects links for navigation, buttons for operations
>   (currently violated with [delete] link in list view)

We can change the "show" and "delete" link to be buttons or we can
drop the delete link from the list view and only have it on the show
view.. maybe better anyway

> - produce valid HTML
> - JS should not be needed for basic operations
>   (so they work behind strict proxies, disabled JS, etc.)
>
> I currently see no way of resolving all forces.
> If we have to compromise one of them, I'd suggest
> to make a deliberate decision and keep the rest consistent.
>
> cheers
> Mittie
>
Reply | Threaded
Open this post in threaded view
|

RE: scaffolded detail view

Dierk König
Hi,

I just talked to Marc (see cc) a webtest teammate and HTML expert.

He proposed a solution where all controls are links with a dedicated
style class.

It is possible to give a link a 'button' style :-)

This would allow grails users to decide how they want their controls
to appear. It would even allow all 'edit' controls to appear
identically and possibly different from 'save' or so.
With using the 'cascade' of CSS, lots of combinations are possible.

-> no JS needed
-> valid HTML
-> full flexibility

cheers
Mittie

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]On Behalf
> Of Graeme Rocher
> Sent: Mittwoch, 22. Februar 2006 10:19
> To: [hidden email]
> Subject: Re: [grails-dev] scaffolded detail view
>
>
> Hi Dierk,
>
> You make valid points, but the I see now way to get round the issue
> without some use of javascript. There are 2 techniques you can use.
> You can either:
>
> - catch the onsubmit event of the form and change the action depending
> on the button clicked
> - use onclicks on the buttons themselves (which is what i have done)
>
> The traditional way to get around this is it to be handled by the
> controller and you have the inputs pass a parameter like this:
>
> <input type="submit" name="action" value="Delete" />
> <input type="submit" name="action" value="Edit" />
>
> But i'm not sure how to get this to work with Grails, maybe we could
> have the form submit to the controller and then the action is picked
> up by the "action" request parameter
>
>
> On 22/02/06, Dierk Koenig <[hidden email]> wrote:
> > Hi,
> >
> > I like to jot down a few observations about the generated HTML.
> >
> > When testing the detail view, I couldn't easily use
> >  clickButton(label:'Edit')
> > since the underlying HtmlUnit would not find the button.
> > This was because the button is not nested inside a <form>
> > element but uses JavaScript to jump to a new location.
> >
> > I could go around this issue by using
> >  clickElement(xpath:...)
> > but a bit of bad taste remains since I'm not sure we produce
> > valid HTML in the view with 'standalone' button elements.
> >
> > So, what to do?
> >
> > There are several combinations with one or multiple form
> > element around the buttons, with and without JS to achieve
> > the same effect while staying HTML compliant.
> >
> > Some forces that move us through the design space:
> > - operations are triggered by URLs without parameters
> > - requests are GET requests
> >   -> no double-click protection
> > - user expects links for navigation, buttons for operations
> >   (currently violated with [delete] link in list view)
>
> We can change the "show" and "delete" link to be buttons or we can
> drop the delete link from the list view and only have it on the show
> view.. maybe better anyway
>
> > - produce valid HTML
> > - JS should not be needed for basic operations
> >   (so they work behind strict proxies, disabled JS, etc.)
> >
> > I currently see no way of resolving all forces.
> > If we have to compromise one of them, I'd suggest
> > to make a deliberate decision and keep the rest consistent.
> >
> > cheers
> > Mittie
> >
Reply | Threaded
Open this post in threaded view
|

Re: scaffolded detail view

graemer
Sounds like a plan, my only concern is accessibility I guess as form
controls are implicity accessible. I guess if we make then hyperlinks
as long as you can tab to them it should be fine. Does Mark have an
example of the CSS needed to make it look like a button?

Cheers
Graeme


On 22/02/06, Dierk Koenig <[hidden email]> wrote:

> Hi,
>
> I just talked to Marc (see cc) a webtest teammate and HTML expert.
>
> He proposed a solution where all controls are links with a dedicated
> style class.
>
> It is possible to give a link a 'button' style :-)
>
> This would allow grails users to decide how they want their controls
> to appear. It would even allow all 'edit' controls to appear
> identically and possibly different from 'save' or so.
> With using the 'cascade' of CSS, lots of combinations are possible.
>
> -> no JS needed
> -> valid HTML
> -> full flexibility
>
> cheers
> Mittie
>
> > -----Original Message-----
> > From: [hidden email] [mailto:[hidden email]]On Behalf
> > Of Graeme Rocher
> > Sent: Mittwoch, 22. Februar 2006 10:19
> > To: [hidden email]
> > Subject: Re: [grails-dev] scaffolded detail view
> >
> >
> > Hi Dierk,
> >
> > You make valid points, but the I see now way to get round the issue
> > without some use of javascript. There are 2 techniques you can use.
> > You can either:
> >
> > - catch the onsubmit event of the form and change the action depending
> > on the button clicked
> > - use onclicks on the buttons themselves (which is what i have done)
> >
> > The traditional way to get around this is it to be handled by the
> > controller and you have the inputs pass a parameter like this:
> >
> > <input type="submit" name="action" value="Delete" />
> > <input type="submit" name="action" value="Edit" />
> >
> > But i'm not sure how to get this to work with Grails, maybe we could
> > have the form submit to the controller and then the action is picked
> > up by the "action" request parameter
> >
> >
> > On 22/02/06, Dierk Koenig <[hidden email]> wrote:
> > > Hi,
> > >
> > > I like to jot down a few observations about the generated HTML.
> > >
> > > When testing the detail view, I couldn't easily use
> > >  clickButton(label:'Edit')
> > > since the underlying HtmlUnit would not find the button.
> > > This was because the button is not nested inside a <form>
> > > element but uses JavaScript to jump to a new location.
> > >
> > > I could go around this issue by using
> > >  clickElement(xpath:...)
> > > but a bit of bad taste remains since I'm not sure we produce
> > > valid HTML in the view with 'standalone' button elements.
> > >
> > > So, what to do?
> > >
> > > There are several combinations with one or multiple form
> > > element around the buttons, with and without JS to achieve
> > > the same effect while staying HTML compliant.
> > >
> > > Some forces that move us through the design space:
> > > - operations are triggered by URLs without parameters
> > > - requests are GET requests
> > >   -> no double-click protection
> > > - user expects links for navigation, buttons for operations
> > >   (currently violated with [delete] link in list view)
> >
> > We can change the "show" and "delete" link to be buttons or we can
> > drop the delete link from the list view and only have it on the show
> > view.. maybe better anyway
> >
> > > - produce valid HTML
> > > - JS should not be needed for basic operations
> > >   (so they work behind strict proxies, disabled JS, etc.)
> > >
> > > I currently see no way of resolving all forces.
> > > If we have to compromise one of them, I'd suggest
> > > to make a deliberate decision and keep the rest consistent.
> > >
> > > cheers
> > > Mittie
> > >
>
Reply | Threaded
Open this post in threaded view
|

RE: scaffolded detail view

Dierk König
Here's an example of a german site that shows the concept:
http://www.1ngo.de/web/imenu.html
Could be a bit slicker, though...

Accessiblity would be like for links, e.g. tabbing etc. should work.
One could also use 'labelfor' etc.

My concern is more that we don't have the 'native' look&feel of the
browser.

cheers
Mittie


> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]On Behalf
> Of Graeme Rocher
> Sent: Mittwoch, 22. Februar 2006 11:08
> To: [hidden email]
> Cc: Marc Guillemot
> Subject: Re: [grails-dev] scaffolded detail view
>
>
> Sounds like a plan, my only concern is accessibility I guess as form
> controls are implicity accessible. I guess if we make then hyperlinks
> as long as you can tab to them it should be fine. Does Mark have an
> example of the CSS needed to make it look like a button?
>
> Cheers
> Graeme
>
>
> On 22/02/06, Dierk Koenig <[hidden email]> wrote:
> > Hi,
> >
> > I just talked to Marc (see cc) a webtest teammate and HTML expert.
> >
> > He proposed a solution where all controls are links with a dedicated
> > style class.
> >
> > It is possible to give a link a 'button' style :-)
> >
> > This would allow grails users to decide how they want their controls
> > to appear. It would even allow all 'edit' controls to appear
> > identically and possibly different from 'save' or so.
> > With using the 'cascade' of CSS, lots of combinations are possible.
> >
> > -> no JS needed
> > -> valid HTML
> > -> full flexibility
> >
> > cheers
> > Mittie
> >
> > > -----Original Message-----
> > > From: [hidden email]
> [mailto:[hidden email]]On Behalf
> > > Of Graeme Rocher
> > > Sent: Mittwoch, 22. Februar 2006 10:19
> > > To: [hidden email]
> > > Subject: Re: [grails-dev] scaffolded detail view
> > >
> > >
> > > Hi Dierk,
> > >
> > > You make valid points, but the I see now way to get round the issue
> > > without some use of javascript. There are 2 techniques you can use.
> > > You can either:
> > >
> > > - catch the onsubmit event of the form and change the action depending
> > > on the button clicked
> > > - use onclicks on the buttons themselves (which is what i have done)
> > >
> > > The traditional way to get around this is it to be handled by the
> > > controller and you have the inputs pass a parameter like this:
> > >
> > > <input type="submit" name="action" value="Delete" />
> > > <input type="submit" name="action" value="Edit" />
> > >
> > > But i'm not sure how to get this to work with Grails, maybe we could
> > > have the form submit to the controller and then the action is picked
> > > up by the "action" request parameter
> > >
> > >
> > > On 22/02/06, Dierk Koenig <[hidden email]> wrote:
> > > > Hi,
> > > >
> > > > I like to jot down a few observations about the generated HTML.
> > > >
> > > > When testing the detail view, I couldn't easily use
> > > >  clickButton(label:'Edit')
> > > > since the underlying HtmlUnit would not find the button.
> > > > This was because the button is not nested inside a <form>
> > > > element but uses JavaScript to jump to a new location.
> > > >
> > > > I could go around this issue by using
> > > >  clickElement(xpath:...)
> > > > but a bit of bad taste remains since I'm not sure we produce
> > > > valid HTML in the view with 'standalone' button elements.
> > > >
> > > > So, what to do?
> > > >
> > > > There are several combinations with one or multiple form
> > > > element around the buttons, with and without JS to achieve
> > > > the same effect while staying HTML compliant.
> > > >
> > > > Some forces that move us through the design space:
> > > > - operations are triggered by URLs without parameters
> > > > - requests are GET requests
> > > >   -> no double-click protection
> > > > - user expects links for navigation, buttons for operations
> > > >   (currently violated with [delete] link in list view)
> > >
> > > We can change the "show" and "delete" link to be buttons or we can
> > > drop the delete link from the list view and only have it on the show
> > > view.. maybe better anyway
> > >
> > > > - produce valid HTML
> > > > - JS should not be needed for basic operations
> > > >   (so they work behind strict proxies, disabled JS, etc.)
> > > >
> > > > I currently see no way of resolving all forces.
> > > > If we have to compromise one of them, I'd suggest
> > > > to make a deliberate decision and keep the rest consistent.
> > > >
> > > > cheers
> > > > Mittie
> > > >
> >

Reply | Threaded
Open this post in threaded view
|

Re: scaffolded detail view

graemer
On 22/02/06, Dierk Koenig <[hidden email]> wrote:
> Here's an example of a german site that shows the concept:
> http://www.1ngo.de/web/imenu.html
> Could be a bit slicker, though...
>
> Accessiblity would be like for links, e.g. tabbing etc. should work.
> One could also use 'labelfor' etc.
>
> My concern is more that we don't have the 'native' look&feel of the
> browser.

Yes that is a problem in my view
Maybe I should try implement support for passing the action to execute
as a request parameter

Graeme

>
> cheers
> Mittie
>
>
> > -----Original Message-----
> > From: [hidden email] [mailto:[hidden email]]On Behalf
> > Of Graeme Rocher
> > Sent: Mittwoch, 22. Februar 2006 11:08
> > To: [hidden email]
> > Cc: Marc Guillemot
> > Subject: Re: [grails-dev] scaffolded detail view
> >
> >
> > Sounds like a plan, my only concern is accessibility I guess as form
> > controls are implicity accessible. I guess if we make then hyperlinks
> > as long as you can tab to them it should be fine. Does Mark have an
> > example of the CSS needed to make it look like a button?
> >
> > Cheers
> > Graeme
> >
> >
> > On 22/02/06, Dierk Koenig <[hidden email]> wrote:
> > > Hi,
> > >
> > > I just talked to Marc (see cc) a webtest teammate and HTML expert.
> > >
> > > He proposed a solution where all controls are links with a dedicated
> > > style class.
> > >
> > > It is possible to give a link a 'button' style :-)
> > >
> > > This would allow grails users to decide how they want their controls
> > > to appear. It would even allow all 'edit' controls to appear
> > > identically and possibly different from 'save' or so.
> > > With using the 'cascade' of CSS, lots of combinations are possible.
> > >
> > > -> no JS needed
> > > -> valid HTML
> > > -> full flexibility
> > >
> > > cheers
> > > Mittie
> > >
> > > > -----Original Message-----
> > > > From: [hidden email]
> > [mailto:[hidden email]]On Behalf
> > > > Of Graeme Rocher
> > > > Sent: Mittwoch, 22. Februar 2006 10:19
> > > > To: [hidden email]
> > > > Subject: Re: [grails-dev] scaffolded detail view
> > > >
> > > >
> > > > Hi Dierk,
> > > >
> > > > You make valid points, but the I see now way to get round the issue
> > > > without some use of javascript. There are 2 techniques you can use.
> > > > You can either:
> > > >
> > > > - catch the onsubmit event of the form and change the action depending
> > > > on the button clicked
> > > > - use onclicks on the buttons themselves (which is what i have done)
> > > >
> > > > The traditional way to get around this is it to be handled by the
> > > > controller and you have the inputs pass a parameter like this:
> > > >
> > > > <input type="submit" name="action" value="Delete" />
> > > > <input type="submit" name="action" value="Edit" />
> > > >
> > > > But i'm not sure how to get this to work with Grails, maybe we could
> > > > have the form submit to the controller and then the action is picked
> > > > up by the "action" request parameter
> > > >
> > > >
> > > > On 22/02/06, Dierk Koenig <[hidden email]> wrote:
> > > > > Hi,
> > > > >
> > > > > I like to jot down a few observations about the generated HTML.
> > > > >
> > > > > When testing the detail view, I couldn't easily use
> > > > >  clickButton(label:'Edit')
> > > > > since the underlying HtmlUnit would not find the button.
> > > > > This was because the button is not nested inside a <form>
> > > > > element but uses JavaScript to jump to a new location.
> > > > >
> > > > > I could go around this issue by using
> > > > >  clickElement(xpath:...)
> > > > > but a bit of bad taste remains since I'm not sure we produce
> > > > > valid HTML in the view with 'standalone' button elements.
> > > > >
> > > > > So, what to do?
> > > > >
> > > > > There are several combinations with one or multiple form
> > > > > element around the buttons, with and without JS to achieve
> > > > > the same effect while staying HTML compliant.
> > > > >
> > > > > Some forces that move us through the design space:
> > > > > - operations are triggered by URLs without parameters
> > > > > - requests are GET requests
> > > > >   -> no double-click protection
> > > > > - user expects links for navigation, buttons for operations
> > > > >   (currently violated with [delete] link in list view)
> > > >
> > > > We can change the "show" and "delete" link to be buttons or we can
> > > > drop the delete link from the list view and only have it on the show
> > > > view.. maybe better anyway
> > > >
> > > > > - produce valid HTML
> > > > > - JS should not be needed for basic operations
> > > > >   (so they work behind strict proxies, disabled JS, etc.)
> > > > >
> > > > > I currently see no way of resolving all forces.
> > > > > If we have to compromise one of them, I'd suggest
> > > > > to make a deliberate decision and keep the rest consistent.
> > > > >
> > > > > cheers
> > > > > Mittie
> > > > >
> > >
>
>
Reply | Threaded
Open this post in threaded view
|

Re: scaffolded detail view

graemer
I've added action dispatching via a request parameter to Grails so to
get around this you can now do:

<g:form controller="book">
       <input name="id" value="1" />
       <g:actionSubmit value="List" />
       <g:actionSubmit value="Show" />
       <g:actionSubmit value="Delete" />
</g:form>

It has some intelligence in that it will convert it into the property
name representation of the action so "List" becomes "list" .. "List
People" becomes  "listPeople" etc.

Graeme

On 22/02/06, Graeme Rocher <[hidden email]> wrote:

> On 22/02/06, Dierk Koenig <[hidden email]> wrote:
> > Here's an example of a german site that shows the concept:
> > http://www.1ngo.de/web/imenu.html
> > Could be a bit slicker, though...
> >
> > Accessiblity would be like for links, e.g. tabbing etc. should work.
> > One could also use 'labelfor' etc.
> >
> > My concern is more that we don't have the 'native' look&feel of the
> > browser.
>
> Yes that is a problem in my view
> Maybe I should try implement support for passing the action to execute
> as a request parameter
>
> Graeme
>
> >
> > cheers
> > Mittie
> >
> >
> > > -----Original Message-----
> > > From: [hidden email] [mailto:[hidden email]]On Behalf
> > > Of Graeme Rocher
> > > Sent: Mittwoch, 22. Februar 2006 11:08
> > > To: [hidden email]
> > > Cc: Marc Guillemot
> > > Subject: Re: [grails-dev] scaffolded detail view
> > >
> > >
> > > Sounds like a plan, my only concern is accessibility I guess as form
> > > controls are implicity accessible. I guess if we make then hyperlinks
> > > as long as you can tab to them it should be fine. Does Mark have an
> > > example of the CSS needed to make it look like a button?
> > >
> > > Cheers
> > > Graeme
> > >
> > >
> > > On 22/02/06, Dierk Koenig <[hidden email]> wrote:
> > > > Hi,
> > > >
> > > > I just talked to Marc (see cc) a webtest teammate and HTML expert.
> > > >
> > > > He proposed a solution where all controls are links with a dedicated
> > > > style class.
> > > >
> > > > It is possible to give a link a 'button' style :-)
> > > >
> > > > This would allow grails users to decide how they want their controls
> > > > to appear. It would even allow all 'edit' controls to appear
> > > > identically and possibly different from 'save' or so.
> > > > With using the 'cascade' of CSS, lots of combinations are possible.
> > > >
> > > > -> no JS needed
> > > > -> valid HTML
> > > > -> full flexibility
> > > >
> > > > cheers
> > > > Mittie
> > > >
> > > > > -----Original Message-----
> > > > > From: [hidden email]
> > > [mailto:[hidden email]]On Behalf
> > > > > Of Graeme Rocher
> > > > > Sent: Mittwoch, 22. Februar 2006 10:19
> > > > > To: [hidden email]
> > > > > Subject: Re: [grails-dev] scaffolded detail view
> > > > >
> > > > >
> > > > > Hi Dierk,
> > > > >
> > > > > You make valid points, but the I see now way to get round the issue
> > > > > without some use of javascript. There are 2 techniques you can use.
> > > > > You can either:
> > > > >
> > > > > - catch the onsubmit event of the form and change the action depending
> > > > > on the button clicked
> > > > > - use onclicks on the buttons themselves (which is what i have done)
> > > > >
> > > > > The traditional way to get around this is it to be handled by the
> > > > > controller and you have the inputs pass a parameter like this:
> > > > >
> > > > > <input type="submit" name="action" value="Delete" />
> > > > > <input type="submit" name="action" value="Edit" />
> > > > >
> > > > > But i'm not sure how to get this to work with Grails, maybe we could
> > > > > have the form submit to the controller and then the action is picked
> > > > > up by the "action" request parameter
> > > > >
> > > > >
> > > > > On 22/02/06, Dierk Koenig <[hidden email]> wrote:
> > > > > > Hi,
> > > > > >
> > > > > > I like to jot down a few observations about the generated HTML.
> > > > > >
> > > > > > When testing the detail view, I couldn't easily use
> > > > > >  clickButton(label:'Edit')
> > > > > > since the underlying HtmlUnit would not find the button.
> > > > > > This was because the button is not nested inside a <form>
> > > > > > element but uses JavaScript to jump to a new location.
> > > > > >
> > > > > > I could go around this issue by using
> > > > > >  clickElement(xpath:...)
> > > > > > but a bit of bad taste remains since I'm not sure we produce
> > > > > > valid HTML in the view with 'standalone' button elements.
> > > > > >
> > > > > > So, what to do?
> > > > > >
> > > > > > There are several combinations with one or multiple form
> > > > > > element around the buttons, with and without JS to achieve
> > > > > > the same effect while staying HTML compliant.
> > > > > >
> > > > > > Some forces that move us through the design space:
> > > > > > - operations are triggered by URLs without parameters
> > > > > > - requests are GET requests
> > > > > >   -> no double-click protection
> > > > > > - user expects links for navigation, buttons for operations
> > > > > >   (currently violated with [delete] link in list view)
> > > > >
> > > > > We can change the "show" and "delete" link to be buttons or we can
> > > > > drop the delete link from the list view and only have it on the show
> > > > > view.. maybe better anyway
> > > > >
> > > > > > - produce valid HTML
> > > > > > - JS should not be needed for basic operations
> > > > > >   (so they work behind strict proxies, disabled JS, etc.)
> > > > > >
> > > > > > I currently see no way of resolving all forces.
> > > > > > If we have to compromise one of them, I'd suggest
> > > > > > to make a deliberate decision and keep the rest consistent.
> > > > > >
> > > > > > cheers
> > > > > > Mittie
> > > > > >
> > > >
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

RE: scaffolded detail view

Dierk König
cool :-)

Mittie

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]On Behalf
> Of Graeme Rocher
> Sent: Mittwoch, 22. Februar 2006 18:47
> To: Dierk Koenig
> Cc: [hidden email]; Marc Guillemot
> Subject: Re: [grails-dev] scaffolded detail view
>
>
> I've added action dispatching via a request parameter to Grails so to
> get around this you can now do:
>
> <g:form controller="book">
>        <input name="id" value="1" />
>        <g:actionSubmit value="List" />
>        <g:actionSubmit value="Show" />
>        <g:actionSubmit value="Delete" />
> </g:form>
>
> It has some intelligence in that it will convert it into the property
> name representation of the action so "List" becomes "list" .. "List
> People" becomes  "listPeople" etc.
>
> Graeme
>
> On 22/02/06, Graeme Rocher <[hidden email]> wrote:
> > On 22/02/06, Dierk Koenig <[hidden email]> wrote:
> > > Here's an example of a german site that shows the concept:
> > > http://www.1ngo.de/web/imenu.html
> > > Could be a bit slicker, though...
> > >
> > > Accessiblity would be like for links, e.g. tabbing etc. should work.
> > > One could also use 'labelfor' etc.
> > >
> > > My concern is more that we don't have the 'native' look&feel of the
> > > browser.
> >
> > Yes that is a problem in my view
> > Maybe I should try implement support for passing the action to execute
> > as a request parameter
> >
> > Graeme
> >
> > >
> > > cheers
> > > Mittie
> > >
> > >
> > > > -----Original Message-----
> > > > From: [hidden email]
> [mailto:[hidden email]]On Behalf
> > > > Of Graeme Rocher
> > > > Sent: Mittwoch, 22. Februar 2006 11:08
> > > > To: [hidden email]
> > > > Cc: Marc Guillemot
> > > > Subject: Re: [grails-dev] scaffolded detail view
> > > >
> > > >
> > > > Sounds like a plan, my only concern is accessibility I guess as form
> > > > controls are implicity accessible. I guess if we make then
> hyperlinks
> > > > as long as you can tab to them it should be fine. Does Mark have an
> > > > example of the CSS needed to make it look like a button?
> > > >
> > > > Cheers
> > > > Graeme
> > > >
> > > >
> > > > On 22/02/06, Dierk Koenig <[hidden email]> wrote:
> > > > > Hi,
> > > > >
> > > > > I just talked to Marc (see cc) a webtest teammate and HTML expert.
> > > > >
> > > > > He proposed a solution where all controls are links with
> a dedicated
> > > > > style class.
> > > > >
> > > > > It is possible to give a link a 'button' style :-)
> > > > >
> > > > > This would allow grails users to decide how they want
> their controls
> > > > > to appear. It would even allow all 'edit' controls to appear
> > > > > identically and possibly different from 'save' or so.
> > > > > With using the 'cascade' of CSS, lots of combinations are
> possible.
> > > > >
> > > > > -> no JS needed
> > > > > -> valid HTML
> > > > > -> full flexibility
> > > > >
> > > > > cheers
> > > > > Mittie
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: [hidden email]
> > > > [mailto:[hidden email]]On Behalf
> > > > > > Of Graeme Rocher
> > > > > > Sent: Mittwoch, 22. Februar 2006 10:19
> > > > > > To: [hidden email]
> > > > > > Subject: Re: [grails-dev] scaffolded detail view
> > > > > >
> > > > > >
> > > > > > Hi Dierk,
> > > > > >
> > > > > > You make valid points, but the I see now way to get
> round the issue
> > > > > > without some use of javascript. There are 2 techniques
> you can use.
> > > > > > You can either:
> > > > > >
> > > > > > - catch the onsubmit event of the form and change the
> action depending
> > > > > > on the button clicked
> > > > > > - use onclicks on the buttons themselves (which is what
> i have done)
> > > > > >
> > > > > > The traditional way to get around this is it to be
> handled by the
> > > > > > controller and you have the inputs pass a parameter like this:
> > > > > >
> > > > > > <input type="submit" name="action" value="Delete" />
> > > > > > <input type="submit" name="action" value="Edit" />
> > > > > >
> > > > > > But i'm not sure how to get this to work with Grails,
> maybe we could
> > > > > > have the form submit to the controller and then the
> action is picked
> > > > > > up by the "action" request parameter
> > > > > >
> > > > > >
> > > > > > On 22/02/06, Dierk Koenig <[hidden email]> wrote:
> > > > > > > Hi,
> > > > > > >
> > > > > > > I like to jot down a few observations about the
> generated HTML.
> > > > > > >
> > > > > > > When testing the detail view, I couldn't easily use
> > > > > > >  clickButton(label:'Edit')
> > > > > > > since the underlying HtmlUnit would not find the button.
> > > > > > > This was because the button is not nested inside a <form>
> > > > > > > element but uses JavaScript to jump to a new location.
> > > > > > >
> > > > > > > I could go around this issue by using
> > > > > > >  clickElement(xpath:...)
> > > > > > > but a bit of bad taste remains since I'm not sure we produce
> > > > > > > valid HTML in the view with 'standalone' button elements.
> > > > > > >
> > > > > > > So, what to do?
> > > > > > >
> > > > > > > There are several combinations with one or multiple form
> > > > > > > element around the buttons, with and without JS to achieve
> > > > > > > the same effect while staying HTML compliant.
> > > > > > >
> > > > > > > Some forces that move us through the design space:
> > > > > > > - operations are triggered by URLs without parameters
> > > > > > > - requests are GET requests
> > > > > > >   -> no double-click protection
> > > > > > > - user expects links for navigation, buttons for operations
> > > > > > >   (currently violated with [delete] link in list view)
> > > > > >
> > > > > > We can change the "show" and "delete" link to be
> buttons or we can
> > > > > > drop the delete link from the list view and only have
> it on the show
> > > > > > view.. maybe better anyway
> > > > > >
> > > > > > > - produce valid HTML
> > > > > > > - JS should not be needed for basic operations
> > > > > > >   (so they work behind strict proxies, disabled JS, etc.)
> > > > > > >
> > > > > > > I currently see no way of resolving all forces.
> > > > > > > If we have to compromise one of them, I'd suggest
> > > > > > > to make a deliberate decision and keep the rest consistent.
> > > > > > >
> > > > > > > cheers
> > > > > > > Mittie
> > > > > > >
> > > > >
> > >
> > >
> >