Preventing auto fire clicking

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Preventing auto fire clicking

Raymond Jones
Hi again

Clicking a trigger with a submission multiple times fast causes the
exception below... at least when running Orbeon in a portlet. What would
be the best way to prevent user using auto fire clicking with forms?

/Ray

2008-02-17 17:08:53,088 ERROR ProcessorService  - Exception at line 49,
column 57 of oxf:/ops/xforms/xforms-server.xpl (reading processor
output: name='data', id='xml-request')
java.lang.NullPointerException
        at org.orbeon.oxf.resources.URLFactory.createURL(URLFactory.java:45)
        at org.orbeon.oxf.resources.URLFactory.createURL(URLFactory.java:41)
        at
org.orbeon.oxf.processor.generator.URLGenerator$2.read(URLGenerator.java:323)
        at
org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsObject(ProcessorImpl.java:488)
        at
org.orbeon.oxf.processor.generator.URLGenerator.access$700(URLGenerator.java:56)
        at
org.orbeon.oxf.processor.generator.URLGenerator$1.readImpl(URLGenerator.java:259)
        at
org.orbeon.oxf.processor.ProcessorImpl$7.read(ProcessorImpl.java:1030)
        at
org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$ConcreteProcessorFilter$ForwarderProcessorOutput.read(ProcessorImpl.java:984)
        at
org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:348)
        at
org.orbeon.oxf.processor.validation.MSVValidationProcessor.access$700(MSVValidationProcessor.java:44)
        at
org.orbeon.oxf.processor.validation.MSVValidationProcessor$5.readImpl(MSVValidationProcessor.java:219)
        at
org.orbeon.oxf.processor.ProcessorImpl$7.read(ProcessorImpl.java:1030)
        at
org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1213)
        at
org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$ConcreteProcessorFilter.read(ProcessorImpl.java:1008)
        at
org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1213)
        at
org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:348)
        at
org.orbeon.oxf.processor.ProcessorImpl.readInputAsDOM4J(ProcessorImpl.java:403)
        at
org.orbeon.oxf.processor.ProcessorImpl.readInputAsDOM4J(ProcessorImpl.java:422)
        at
org.orbeon.oxf.xforms.processor.XFormsServer.doIt(XFormsServer.java:94)
        at
org.orbeon.oxf.xforms.processor.XFormsServer.access$000(XFormsServer.java:47)
        at
org.orbeon.oxf.xforms.processor.XFormsServer$1.readImpl(XFormsServer.java:73)
        at
org.orbeon.oxf.processor.ProcessorImpl$7.read(ProcessorImpl.java:1030)
        at
org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$ConcreteProcessorFilter$ForwarderProcessorOutput.read(ProcessorImpl.java:984)
        at
org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:348)
        at
org.orbeon.oxf.processor.validation.MSVValidationProcessor.access$700(MSVValidationProcessor.java:44)
        at
org.orbeon.oxf.processor.validation.MSVValidationProcessor$5.readImpl(MSVValidationProcessor.java:219)
        at
org.orbeon.oxf.processor.ProcessorImpl$7.read(ProcessorImpl.java:1030)
        at
org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1213)
        at
org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$ConcreteProcessorFilter.read(ProcessorImpl.java:1008)
        at
org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1213)
        at
org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:348)
        at
org.orbeon.oxf.processor.serializer.legacy.XMLSerializer.readInput(XMLSerializer.java:58)
        at
org.orbeon.oxf.processor.serializer.HttpTextSerializer.readInput(HttpTextSerializer.java:54)
        at
org.orbeon.oxf.processor.serializer.HttpSerializerBase$1.read(HttpSerializerBase.java:151)
        at
org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsObject(ProcessorImpl.java:488)
        at
org.orbeon.oxf.processor.serializer.HttpSerializerBase.start(HttpSerializerBase.java:142)
        at
org.orbeon.oxf.processor.pipeline.PipelineProcessor$11.run(PipelineProcessor.java:650)
        at
org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:554)
        at
org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor.java:647)
        at
org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor.start(ConcreteChooseProcessor.java:229)
        at
org.orbeon.oxf.processor.pipeline.PipelineProcessor$11.run(PipelineProcessor.java:650)
        at
org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:554)
        at
org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor.java:647)
        at org.orbeon.oxf.pipeline.InitUtils.runProcessor(InitUtils.java:95)
        at
org.orbeon.oxf.webapp.ProcessorService.service(ProcessorService.java:96)
        at
org.orbeon.oxf.servlet.OPSServletDelegate.service(OPSServletDelegate.java:148)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.orbeon.oxf.servlet.OPSServlet.service(OPSServlet.java:75)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
        at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
        at java.lang.Thread.run(Thread.java:619)%



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Preventing auto fire clicking

Alessandro Vernet
Administrator
Ray,

On Feb 17, 2008, at 9:17 AM, Raymond Jones wrote:

> Clicking a trigger with a submission multiple times fast causes the  
> exception below... at least when running Orbeon in a portlet. What  
> would be the best way to prevent user using auto fire clicking with  
> forms?


This is a capability we would like to add to Orbeon Forms. In the  
meantime, you can either write JavaScript that does this (not  
necessarily trivial as you ned to make sure that your code does not  
interfere badly with the Orbeon Forms code), or bind the trigger to a  
node and on DOMActivate:

1. Make the trigger read-only (that will disable the trigger in the  
page).
2. In an xxforms:script dispatch a custom event declared on the model.
3. In that event do the submission.

But of course you shouldn't have that NPE in the first place. Can you  
reproduce this outside of the portal, for instance in an example that  
runs in the XForms sandbox?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws