cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Joseph <pjos...@gmail.com>
Subject Re: has anyone seen this issue with the paging repeater widget?
Date Tue, 13 Oct 2009 20:19:59 GMT
I solved it by changing the getCustomPageWidgetValue function in  
EnhancedRepeater.java to the following, but can't say its the best solution.

    public int getCustomPageWidgetValue() {
        if (this.customPageField.getValue() == null) {
            return 0;
        }
        else {
            return ((Integer)this.customPageField.getValue()).intValue();
        }
    }


Paul Joseph wrote:
> Hi there,
>
> I have a repeater widget with the "size" set to 10 rows.
>
> All works well with say 15 rows shown on two pages, 10 rows on the 
> first and 5 on the second.
>
> However, if I have 11 rows, 10 on the first page and 1 on the second, 
> then if I edit the 11th row (first row on page 2) to not satisfy my 
> query i.e. there are now only 10 rows that apply,  on refreshing the 
> page i get the following error.
>
> Has anyone seen this before and would there be a patch for it?  or 
> should I file this as a bug.
>
> thx
> Paul
>
> java.lang.NullPointerException
>     at 
> org.apache.cocoon.forms.formmodel.EnhancedRepeater.getCustomPageWidgetValue(EnhancedRepeater.java:145)

>
>     at 
> org.apache.cocoon.forms.formmodel.RepeaterActionDefinition$4.actionPerformed(RepeaterActionDefinition.java:298)

>
>     at 
> org.apache.cocoon.forms.formmodel.ActionDefinition.fireActionEvent(ActionDefinition.java:69)

>
>     at 
> org.apache.cocoon.forms.formmodel.Action.broadcastEvent(Action.java:149)
>     at org.apache.cocoon.forms.formmodel.Form.fireEvents(Form.java:174)
>     at org.apache.cocoon.forms.formmodel.Form.process(Form.java:358)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>     at java.lang.reflect.Method.invoke(Unknown Source)
>     at 
> org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:230)
>     at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)
>     at 
> org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:1134)

>
>     at 
> org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:190)

>
>     at 
> org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:138)

>
>     at 
> org.mozilla.javascript.continuations.InterpretedFunctionImpl.call(InterpretedFunctionImpl.java:121)

>
>     at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)
>     at 
> org.mozilla.javascript.ScriptableObject.callMethod(ScriptableObject.java:1591) 
>
>     at 
> org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.handleContinuation(FOM_JavaScriptInterpreter.java:841)

>
>     at 
> org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:124)

>
>     at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)

>
>     at 
> org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)

>
>     at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)

>
>     at 
> org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)

>
>     at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)

>
>     at 
> org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)

>
>     at 
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:235)

>
>     at 
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:177)

>
>     at 
> org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254)

>
>     at 
> org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118)

>
>     at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)

>
>     at 
> org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)

>
>     at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)

>
>     at 
> org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)

>
>     at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)

>
>     at 
> org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)

>
>     at 
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:235)

>
>     at 
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:177)

>
>     at 
> org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254)

>
>     at 
> org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118)

>
>     at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)

>
>     at 
> org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)

>
>     at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)

>
>     at 
> org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)

>
>     at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)

>
>     at 
> org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)

>
>     at 
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:235)

>
>     at 
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:177)

>
>     at 
> org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254)

>
>     at org.apache.cocoon.Cocoon.process(Cocoon.java:699)
>     at 
> org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1154)
>     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(Unknown Source)
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message