Hi,
I am upgrading my application from oxf2.6 to 2.7.2. I am facing problem in displaying serverside error in a popup. We populate the server side error message in instance. If there is any error message in instance, I created hidden fields capturing them. Then I accessed those hidden elements from _javascript_ and showed them in pop up. Following is the code in my xforms page:

<xforms:repeat nodeset="errors/error">
        <xxforms:hidden ref="@xxforms:error" xhtml:id="Error"/>
</xforms:repeat>

I did this in v2.6 and was working fine. In v2.7.2, it is throwing the following error:

Type class java.lang.NullPointerException
Message null
Location oxf:/form-demo/xforms-to-xhtml.xsl
Line 0
Column 0
Stack Trace java.lang.NullPointerException
                at org.orbeon.oxf.processor.xforms.output.element.XFormsElement.start(XFormsElement.java:121)
                at org.orbeon.oxf.processor.xforms.output.element.ViewContentHandler.startElement(ViewContentHandler.java:78)
                at org.orbeon.oxf.xml.SAXStore.replay(SAXStore.java(Compiled Code))
                at org.orbeon.oxf.processor.xforms.output.element.ViewContentHandler.endElement(ViewContentHandler.java:103)
                at org.orbeon.oxf.xml.TeeContentHandler.endElement(TeeContentHandler.java(Compiled Code))
                at org.orbeon.oxf.xml.SAXStore.endElement(SAXStore.java(Compiled Code))
                at org.orbeon.oxf.xml.SAXStore.replay(SAXStore.java(Compiled Code))
                at org.orbeon.oxf.processor.pipeline.TeeProcessor$1.readImpl(TeeProcessor.java:50)
                at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java(Compiled Code))
                at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java(Compiled Code))
                at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java(Compiled Code))
                at org.orbeon.oxf.processor.pipeline.PipelineProcessor.access$1500(PipelineProcessor.java:61)
                at org.orbeon.oxf.processor.pipeline.PipelineProcessor$6.run(PipelineProcessor.java:539)
                at org.orbeon.oxf.processor.ProcessorImpl.executeParents(ProcessorImpl.java(Compiled Code))
                at org.orbeon.oxf.processor.pipeline.PipelineProcessor.access$1600(PipelineProcessor.java:61)

What could be the reason?


Earlier Alex suggested me to use "dummy" element <global-validation> in instance. I tried that as well. Instance is getting populated properly as following.
<global-validation xxforms:valid="false"></global-validation>
<errors >
    <error value="Review the prospectus and privacy policy before proceeding"/>
</errors>

The code in xforms page is as follows:
<xsl:for-each select="$errors/error">
    <xxforms:hidden ref="../../global-validation">
        <xforms:alert><xsl:value-of select="."/></xforms:alert>
    </xxforms:hidden>
</xsl:for-each>

It is also throwing following error:

Type class org.orbeon.oxf.common.ValidationException
Message null, line -1, column -1 : Single-node binding _expression_ '../../global-validation' returned an empty nodeset : null, line -1, column -1: Single-node binding _expression_ '../../global-validation' returned an empty nodeset
Location null
Line -1
Column -1
Stack Trace org.orbeon.oxf.common.ValidationException: null, line -1, column -1 : Single-node binding _expression_ '../../global-validation' returned an empty nodeset : null, line -1, column -1: Single-node binding _expression_ '../../global-validation' returned an empty nodeset
                at org.orbeon.oxf.processor.xforms.output.element.XFormsElementContext.pushRelativeXPath(XFormsElementContext.java:78)
                at org.orbeon.oxf.processor.xforms.output.element.ViewContentHandler.startElement(ViewContentHandler.java:69)
                at org.orbeon.oxf.xml.TeeContentHandler.startElement(TeeContentHandler.java(Compiled Code))
                at org.orbeon.oxf.xml.SAXStore.startElement(SAXStore.java(Compiled Code))
                at org.orbeon.oxf.xml.SAXStore.replay(SAXStore.java(Compiled Code))
                at org.orbeon.oxf.processor.pipeline.TeeProcessor$1.readImpl(TeeProcessor.java:50)
                at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java(Compiled Code))
                at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java(Compiled Code))


What could be the problem?

Thanks
Anindita

----------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose.
----------------------------------------------------------------------------------------

Reply via email to