NullpointerException in org.orbeon.oxf.xforms.XFormsModel.performDefaultAction(XFormsModel.java:754)

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

NullpointerException in org.orbeon.oxf.xforms.XFormsModel.performDefaultAction(XFormsModel.java:754)

Henrik Pettersen
All,

trying to set up a small user management application using OPS, but
having some problems with NullpointerException in
org.orbeon.oxf.xforms.XFormsModel.performDefaultAction(XFormsModel.java:754)

Here is my pageflow definition:
=======================
    <page   path-info="/users"
            id="users"
            xforms="oxf:/users/users.xforms.xml"
            view="oxf:/users/users.view.xsl"
            model="oxf:/users/users.model.xpl">
        <action when="/aspic:results/aspic:feedback/aspic:action = 'delete'"
                action="oxf:/users/delete.user.xpl">
            <result page="users"/>
        </action>
    </page>

(i.e. after deleting a user, re-run users.model.xpl and return to the same page)


Here is my XForms model:
=====================
<xforms:instance xmlns:xforms="http://www.w3.org/2002/xforms">
    <aspic:results xmlns:aspic="http://www.cruk.com/aspic/editor/v1">
        <aspic:feedback>
            <aspic:action/>
            <aspic:id/>
        </aspic:feedback>
        <aspic:users>
            <aspic:user>
                <aspic:email/>
                <aspic:firstname/>
                <aspic:lastname/>
                <aspic:username/>
                <aspic:id/>
            </aspic:user>
        </aspic:users>
        <request-security>
            <auth-type/>
            <secure/>
            <remote-user/>
            <role/>
        </request-security>
    </aspic:results>
</xforms:instance>

Here is my delete.user.xpl:
======================
<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
          xmlns:oxf="http://www.orbeon.com/oxf/processors"
          xmlns:aspic="http://www.cruk.com/aspic/editor/v1">

    <p:param name="data" type="input" debug="input.data.for.delete"/>

    <p:processor name="oxf:null-serializer"
xmlns:p="http://www.orbeon.com/oxf/pipeline">
        <p:input name="data" href="data"/>
    </p:processor>

</p:config>

(i.e. do nothing for now - will add code to delete user record)


And here is my view:
================
<xhtml:html xmlns=""
           xmlns:xhtml="http://www.w3.org/1999/xhtml"
           xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
           xmlns:f="http://orbeon.org/oxf/xml/formatting"
           xmlns:aspic="http://www.cruk.com/aspic/editor/v1"
           xmlns:xforms="http://www.w3.org/2002/xforms"
           xmlns:xi="http://orbeon.org/oxf/xml/xinclude"
           xmlns:ev="http://www.w3.org/2001/xml-events"
           xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns:test="http://test.org"
           xsl:version="2.0">
     <xhtml:head>
         <xhtml:meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" />
         <xhtml:title> xhtml:list all users </xhtml:title>
         <xforms:model>
             <xforms:instance>
                 <!--xi:include href="input:instance"/-->
                 <!--aspic:action>none</aspic:action-->
                 <xsl:copy-of select="/aspic:results/*"/>
             </xforms:instance>

             <!-- HP -->
             <xforms:submission id="main" ref="/" method="post"
action="/users"/>

         </xforms:model>
     </xhtml:head>

    <xhtml:body>
...
      <xforms:trigger>
          <xforms:label>Delete</xforms:label>
          <xforms:action ev:event="DOMActivate">
              <xforms:setvalue
ref="aspic:feedback/aspic:action">delete</xforms:setvalue>
              <xforms:setvalue ref="aspic:feedback/aspic:id"
value="/aspic:users/aspic:user[index('users-repeat')]"/>
              <xforms:send submission="main" />
          </xforms:action>
      </xforms:trigger>
      <xhtml:h2>Users</xhtml:h2>

      <xhtml:table width="50%">
          <xhtml:tr>
              <xhtml:td>
                  <xhtml:b>Username</xhtml:b>
              </xhtml:td>
              <xhtml:td>
                  <xhtml:b>Name</xhtml:b>
              </xhtml:td>
              <xhtml:td>
                  <xhtml:b>Email</xhtml:b>
              </xhtml:td>
          </xhtml:tr>

          <xforms:repeat nodeset="/aspic:users/aspic:user" id="users-repeat">
              <xhtml:tr>
                  <xhtml:td>
                      <xforms:output ref="aspic:username"/>
                  </xhtml:td>
                  <xhtml:td>
                      <xforms:output
ref="aspic:firstname"/>&#160;<xforms:output ref="aspic:lastname"/>
                  </xhtml:td>
                  <xhtml:td>
                      <xforms:output ref="aspic:email"/>
                  </xhtml:td>
              </xhtml:tr>
          </xforms:repeat>
      </xhtml:table>
.....

  </xhtml:body>
</xhtml:html>


And here is the stacktrace:
=========================
2006-07-20 17:31:22,367 INFO  org.orbeon.oxf.webapp.ProcessorService
- /users - Received request
2006-07-20 17:31:22,538 ERROR org.orbeon.oxf.webapp.ProcessorService
- Exception at oxf:/users/users.xforms.xml, line 1, column 63
java.lang.NullPointerException
        at org.orbeon.oxf.xforms.XFormsModel.performDefaultAction(XFormsModel.java:754)
        at org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:611)
        at org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchExternalEvent(XFormsContainingDocument.java:456)
        at org.orbeon.oxf.processor.xforms.input.XFormsInput$1.readImpl(XFormsInput.java:150)
        at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:987)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1170)
        at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:349)
        at org.orbeon.oxf.processor.pipeline.TeeProcessor.access$100(TeeProcessor.java:36)
        at org.orbeon.oxf.processor.pipeline.TeeProcessor$1.readImpl(TeeProcessor.java:57)
        at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:987)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1170)
        at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:349)
        at org.orbeon.oxf.processor.ProcessorImpl.readInputAsDOM4J(ProcessorImpl.java:404)
        at org.orbeon.oxf.processor.ProcessorImpl$4.read(ProcessorImpl.java:428)
        at org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsObject(ProcessorImpl.java:470)
        at org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsDOM4J(ProcessorImpl.java:426)
        at org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor.start(ConcreteChooseProcessor.java:185)
        at org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor$1.readImpl(ConcreteChooseProcessor.java:120)
        at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:987)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1170)
        at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:349)
        at org.orbeon.oxf.processor.ProcessorImpl.readInputAsDOM4J(ProcessorImpl.java:404)
        at org.orbeon.oxf.processor.ProcessorImpl$4.read(ProcessorImpl.java:428)
        at org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsObject(ProcessorImpl.java:470)
        at org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsDOM4J(ProcessorImpl.java:426)
        at org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor.start(ConcreteChooseProcessor.java:185)
        at org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor$1.readImpl(ConcreteChooseProcessor.java:120)
        at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:987)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1170)
        at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:349)
        at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:354)
        at org.orbeon.oxf.processor.IdentityProcessor$1.readImpl(IdentityProcessor.java:33)
        at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:987)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1170)
        at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:349)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor.access$000(PipelineProcessor.java:66)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$2.run(PipelineProcessor.java:96)
        at org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:515)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor.access$100(PipelineProcessor.java:66)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$1.readImpl(PipelineProcessor.java:94)
        at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:987)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1170)
        at org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor$1.readImpl(ConcreteChooseProcessor.java:122)
        at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:987)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1170)
        at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:349)
        at org.orbeon.oxf.processor.pipeline.TeeProcessor.access$100(TeeProcessor.java:36)
        at org.orbeon.oxf.processor.pipeline.TeeProcessor$1.readImpl(TeeProcessor.java:57)
        at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:987)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1170)
        at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:349)
        at org.orbeon.oxf.processor.ProcessorImpl.readInputAsDOM4J(ProcessorImpl.java:404)
        at org.orbeon.oxf.processor.ProcessorImpl$4.read(ProcessorImpl.java:428)
        at org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsObject(ProcessorImpl.java:470)
        at org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsDOM4J(ProcessorImpl.java:426)
        at org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor.start(ConcreteChooseProcessor.java:185)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$11.run(PipelineProcessor.java:652)
        at org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:515)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor.java:649)
        at org.orbeon.oxf.processor.PageFlowControllerProcessor.start(PageFlowControllerProcessor.java:416)
        at org.orbeon.oxf.pipeline.InitUtils.runProcessor(InitUtils.java:86)
        at org.orbeon.oxf.webapp.ProcessorService.service(ProcessorService.java:95)
        at org.orbeon.oxf.servlet.OPSServletDelegate.service(OPSServletDelegate.java:144)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.orbeon.oxf.servlet.OPSServlet.service(OPSServlet.java:74)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:595)


Can anyone tell me if I am missing something obvious here? The
NullplointerException does not give me very much to go on..... It's
worth noting that taking out the 'action' element from the pageflow
definition causes the page to render just fine.

Thanks!

Sincerely,
Henrik Pettersen
Advanced Computational Laboratory
Cancer Reasearch UK



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: NullpointerException in org.orbeon.oxf.xforms.XFormsModel.performDefaultAction(XFormsModel.java:754)

Ryan Puddephatt
Henrik,

>Here is my pageflow definition:
>=======================
>    <page   path-info="/users"
>            id="users"
>            xforms="oxf:/users/users.xforms.xml"

Did you want to use the classic engine here? The @xforms means classic will
be used, if your learning this from new, then I would learn NG, remove this,
if this is a @default-submission (i.e. XML in your instance to start with)
then, it should be the XML for your instance, not the xforms:instance itself

>            view="oxf:/users/users.view.xsl"
>            model="oxf:/users/users.model.xpl">

Where is this file? What does it do?

>        <action when="/aspic:results/aspic:feedback/aspic:action =
'delete'"
>                action="oxf:/users/delete.user.xpl">
>            <result page="users"/>
>        </action>
>    </page>
>
>(i.e. after deleting a user, re-run users.model.xpl and return to the same
page)

>
>Here is my XForms model:
>=====================
><xforms:instance xmlns:xforms="http://www.w3.org/2002/xforms">
>    <aspic:results xmlns:aspic="http://www.cruk.com/aspic/editor/v1">
>        <aspic:feedback>
>            <aspic:action/>
>            <aspic:id/>
>        </aspic:feedback>
>        <aspic:users>
>            <aspic:user>
>                <aspic:email/>
>                <aspic:firstname/>
>                <aspic:lastname/>
>                <aspic:username/>
>                <aspic:id/>
>            </aspic:user>
>        </aspic:users>
>        <request-security>
>            <auth-type/>
>            <secure/>
>            <remote-user/>
>            <role/>
>        </request-security>
>    </aspic:results>
></xforms:instance>
As I said above this XML should be stripped of the xforms:instance for the
your @default-submission

>Here is my delete.user.xpl:
>======================
><p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
>          xmlns:oxf="http://www.orbeon.com/oxf/processors"
>          xmlns:aspic="http://www.cruk.com/aspic/editor/v1">
>
>    <p:param name="data" type="input" debug="input.data.for.delete"/>

This should be @name="instance" to take data from the view

>    <p:processor name="oxf:null-serializer"
>xmlns:p="http://www.orbeon.com/oxf/pipeline">
>        <p:input name="data" href="data"/>
>    </p:processor>
>
></p:config>
>
>(i.e. do nothing for now - will add code to delete user record)
>
>
>And here is my view:
>================
><xhtml:html xmlns=""
>           xmlns:xhtml="http://www.w3.org/1999/xhtml"
>           xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>           xmlns:f="http://orbeon.org/oxf/xml/formatting"
>           xmlns:aspic="http://www.cruk.com/aspic/editor/v1"
>           xmlns:xforms="http://www.w3.org/2002/xforms"
>           xmlns:xi="http://orbeon.org/oxf/xml/xinclude"
>           xmlns:ev="http://www.w3.org/2001/xml-events"
>           xmlns:xs="http://www.w3.org/2001/XMLSchema"
>           xmlns:test="http://test.org"
>           xsl:version="2.0">
>     <xhtml:head>
>         <xhtml:meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" />
>         <xhtml:title> xhtml:list all users </xhtml:title>
>         <xforms:model>
>             <xforms:instance>
>                 <!--xi:include href="input:instance"/-->
                       
You should use the xi:include, the XSL below won't work with
default-instance, unless your model does anything interesting?

>                 <!--aspic:action>none</aspic:action-->
>                 <xsl:copy-of select="/aspic:results/*"/>
>             </xforms:instance>
>
>             <!-- HP -->
>             <xforms:submission id="main" ref="/" method="post"
>action="/users"/>
>
>         </xforms:model>
>     </xhtml:head>
>
>    <xhtml:body>
>...
>      <xforms:trigger>
>          <xforms:label>Delete</xforms:label>
>          <xforms:action ev:event="DOMActivate">
>              <xforms:setvalue
>ref="aspic:feedback/aspic:action">delete</xforms:setvalue>
>              <xforms:setvalue ref="aspic:feedback/aspic:id"
>value="/aspic:users/aspic:user[index('users-repeat')]"/>
>              <xforms:send submission="main" />
>          </xforms:action>
>      </xforms:trigger>
>      <xhtml:h2>Users</xhtml:h2>
>
>      <xhtml:table width="50%">
>          <xhtml:tr>
>              <xhtml:td>
>                  <xhtml:b>Username</xhtml:b>
>              </xhtml:td>
>              <xhtml:td>
>                  <xhtml:b>Name</xhtml:b>
>              </xhtml:td>
>              <xhtml:td>
>                  <xhtml:b>Email</xhtml:b>
>              </xhtml:td>
>          </xhtml:tr>
>
>          <xforms:repeat nodeset="/aspic:users/aspic:user"
id="users-repeat">

>              <xhtml:tr>
>                  <xhtml:td>
>                      <xforms:output ref="aspic:username"/>
>                  </xhtml:td>
>                  <xhtml:td>
>                      <xforms:output
>ref="aspic:firstname"/>&#160;<xforms:output ref="aspic:lastname"/>
>                  </xhtml:td>
>                  <xhtml:td>
>                      <xforms:output ref="aspic:email"/>
>                  </xhtml:td>
>              </xhtml:tr>
>          </xforms:repeat>
>      </xhtml:table>
>.....
>
>  </xhtml:body>
></xhtml:html>
>
>Can anyone tell me if I am missing something obvious here? The
NullplointerException does not give me very much to go on..... It's worth
noting that taking out the 'action' element from the pageflow definition
causes the page to >>render just fine.

Try those fixes and see what happens, the change to NG and input of the
delete.xpl might do the trick!

Ryan

Ryan Puddephatt
Software Engineer

Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP

e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108







--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: NullpointerException in org.orbeon.oxf.xforms.XFormsModel.performDefaultAction(XFormsModel.java:754)

Henrik Pettersen
Ryan, all,

thank you, that worked! I was not aware that the new version of OPS
had changed the syntax for the pageflow definitions and I/O
definitions of the pipeline language. Tell me, do I need to set the
name attribute for output like this:

    <p:param name="instance" type="output"/>

or like this?

    <p:param name="data" type="output"/>

Sorry, I have not seen this in the documentation anywhere.

Also, I am not able to get the instance into the view using
xi:include. Perhaps this is related to the question above? Here is how
I am trying to import the instance data with xi:include (and failing -
nothing is returned):

         <xforms:model>
             <xforms:instance>
                 <xi:include href="input:instance"/>
             </xforms:instance>
         </xforms:model>

Is my syntax correct here? The documentation shows at least 2 ways of
specifying the href attribute :-)

If anyone knows the answer to these last 2 questions, I would be
eternally grateful:

1. This page presents a list of user entities, using xforms:repeat.
however, I am not able to highlight the different rows in the table,
like the "To Do Lists" example shows. Is my syntax correct?

2.My 'Delete' button does not seem to do anything. I would like it to
send back the userid of the currently highlighted row in my user
entities table, where the pageflow calls the
"oxf:/users/delete.user.xpl" pipeline. Is my syntax correct?

Thank you, everyone!  Code follows below.

Sincerely,
Henrik Pettersen
Senior Developer
Advanced Computation Laboratory , Cancer Research UK
http://www.acl.icnet.uk/lab/index.html

Here is my new pageflow definition now (thanks, Ryan):
========================================
    <page   path-info="/users"
            id="users"
            view="oxf:/users/users.view.xsl"
            model="oxf:/users/users.model.xpl">
        <action when="/aspic:results/aspic:feedback/aspic:action = 'delete'"
                action="oxf:/users/delete.user.xpl">
        </action>
    </page>

Here is my view now:
===============
<xhtml:html xmlns=""
           xmlns:xhtml="http://www.w3.org/1999/xhtml"
           xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
           xmlns:f="http://orbeon.org/oxf/xml/formatting"
           xmlns:aspic="http://www.cruk.com/aspic/editor/v1"
           xmlns:xforms="http://www.w3.org/2002/xforms"
           xmlns:xi="http://orbeon.org/oxf/xml/xinclude"
           xmlns:ev="http://www.w3.org/2001/xml-events"
           xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns:test="http://test.org"
           xsl:version="2.0">
     <xhtml:head>
         <xhtml:meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" />
         <xhtml:title> User Administration </xhtml:title>
         <xforms:model>
             <xforms:instance>
                 <xsl:copy-of select="/aspic:results/*"/>
             </xforms:instance>

             <xforms:submission id="main" ref="/" method="post" action="users"/>

         </xforms:model>
     </xhtml:head>

    <xhtml:body>
        ...
        <xforms:trigger>
            <xforms:label>Delete</xforms:label>
            <xforms:action ev:event="DOMActivate">
                <xforms:setvalue
ref="aspic:feedback/aspic:action">delete</xforms:setvalue>
                <xforms:setvalue ref="aspic:feedback/aspic:id"
value="/aspic:users/aspic:user[index('users-repeat')]"/>
                <xforms:send submission="main" />
            </xforms:action>
        </xforms:trigger>

        <xhtml:h2>Users</xhtml:h2>

        <xhtml:table width="50%">
            <xhtml:tr>
                <xhtml:td>
                    <xhtml:b>Username</xhtml:b>
                </xhtml:td>
                <xhtml:td>
                    <xhtml:b>Name</xhtml:b>
                </xhtml:td>
                <xhtml:td>
                    <xhtml:b>Email</xhtml:b>
                </xhtml:td>
            </xhtml:tr>

            <xforms:repeat nodeset="/aspic:users/aspic:user" id="users-repeat">
                <xhtml:tr>
                    <xhtml:td>
                        <xforms:output ref="aspic:username"/>
                    </xhtml:td>
                    <xhtml:td>
                        <xforms:output
ref="aspic:firstname"/>&#160;<xforms:output ref="aspic:lastname"/>
                    </xhtml:td>
                    <xhtml:td>
                        <xforms:output ref="aspic:email"/>
                    </xhtml:td>
                </xhtml:tr>
            </xforms:repeat>
        </xhtml:table>
        ...
   </xhtml:body>
</xhtml:html>

And this is what my instance looks like (generated by
oxf:/users/users.model.xpl):
======================================================
<aspic:results xmlns:aspic="http://www.cruk.com/aspic/editor/v1">
    <aspic:users>
        <aspic:user>
            <aspic:email>[hidden email]</aspic:email>
            <aspic:firstname>Henrik</aspic:firstname>
            <aspic:lastname>Pettersen</aspic:lastname>
            <aspic:username>admin</aspic:username>
            <aspic:id>0</aspic:id>
        </aspic:user>
        <aspic:user>
            <aspic:email>[hidden email]</aspic:email>
            <aspic:firstname>Henrik</aspic:firstname>
            <aspic:lastname>Pettersen</aspic:lastname>
            <aspic:username>henrikp</aspic:username>
            <aspic:id>1</aspic:id>
        </aspic:user>
    </aspic:users>
    <request-security>
        <auth-type>FORM</auth-type>
        <secure>false</secure>
        <remote-user>admin</remote-user>
        <role>administrator</role>
    </request-security>
</aspic:results>

This is my oxf:/users/users.model.xpl):
============================
<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
          xmlns:oxf="http://www.orbeon.com/oxf/processors"
          xmlns:aspic="http://www.cruk.com/aspic/editor/v1">

    <p:param name="data" type="output"/>

    <p:processor name="oxf:java">
        <p:input name="config">
            <config sourcepath="oxf:/java"
class="org.cruk.aspic.editor.api.orbeon.GetAllUsers"/>
        </p:input>
        <p:output name="data" id="users"/>
    </p:processor>

    <p:processor name="oxf:request-security">
        <p:input name="config">
            <config>
                <role>administrator</role>
            </config>
        </p:input>
        <p:output name="data" id="request-security"/>
    </p:processor>

    <p:processor name="oxf:identity">
        <p:input name="data" href="aggregate('aspic:results',
#users#xpointer(/aspic:users), #request-security)"/>
        <p:output name="data" ref="data" debug="camp"/>
    </p:processor>

</p:config>

That's all, I think.

Thank you all!

Henrik


On 7/21/06, Ryan Puddephatt <[hidden email]> wrote:

> Henrik,
>
> >Here is my pageflow definition:
> >=======================
> >    <page   path-info="/users"
> >            id="users"
> >            xforms="oxf:/users/users.xforms.xml"
>
> Did you want to use the classic engine here? The @xforms means classic will
> be used, if your learning this from new, then I would learn NG, remove this,
> if this is a @default-submission (i.e. XML in your instance to start with)
> then, it should be the XML for your instance, not the xforms:instance itself
>
> >            view="oxf:/users/users.view.xsl"
> >            model="oxf:/users/users.model.xpl">
>
> Where is this file? What does it do?
>
> >        <action when="/aspic:results/aspic:feedback/aspic:action =
> 'delete'"
> >                action="oxf:/users/delete.user.xpl">
> >            <result page="users"/>
> >        </action>
> >    </page>
> >
> >(i.e. after deleting a user, re-run users.model.xpl and return to the same
> page)
> >
> >Here is my XForms model:
> >=====================
> ><xforms:instance xmlns:xforms="http://www.w3.org/2002/xforms">
> >    <aspic:results xmlns:aspic="http://www.cruk.com/aspic/editor/v1">
> >        <aspic:feedback>
> >            <aspic:action/>
> >            <aspic:id/>
> >        </aspic:feedback>
> >        <aspic:users>
> >            <aspic:user>
> >                <aspic:email/>
> >                <aspic:firstname/>
> >                <aspic:lastname/>
> >                <aspic:username/>
> >                <aspic:id/>
> >            </aspic:user>
> >        </aspic:users>
> >        <request-security>
> >            <auth-type/>
> >            <secure/>
> >            <remote-user/>
> >            <role/>
> >        </request-security>
> >    </aspic:results>
> ></xforms:instance>
>
> As I said above this XML should be stripped of the xforms:instance for the
> your @default-submission
>
> >Here is my delete.user.xpl:
> >======================
> ><p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
> >          xmlns:oxf="http://www.orbeon.com/oxf/processors"
> >          xmlns:aspic="http://www.cruk.com/aspic/editor/v1">
> >
> >    <p:param name="data" type="input" debug="input.data.for.delete"/>
>
> This should be @name="instance" to take data from the view
>
> >    <p:processor name="oxf:null-serializer"
> >xmlns:p="http://www.orbeon.com/oxf/pipeline">
> >        <p:input name="data" href="data"/>
> >    </p:processor>
> >
> ></p:config>
> >
> >(i.e. do nothing for now - will add code to delete user record)
> >
> >
> >And here is my view:
> >================
> ><xhtml:html xmlns=""
> >           xmlns:xhtml="http://www.w3.org/1999/xhtml"
> >           xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> >           xmlns:f="http://orbeon.org/oxf/xml/formatting"
> >           xmlns:aspic="http://www.cruk.com/aspic/editor/v1"
> >           xmlns:xforms="http://www.w3.org/2002/xforms"
> >           xmlns:xi="http://orbeon.org/oxf/xml/xinclude"
> >           xmlns:ev="http://www.w3.org/2001/xml-events"
> >           xmlns:xs="http://www.w3.org/2001/XMLSchema"
> >           xmlns:test="http://test.org"
> >           xsl:version="2.0">
> >     <xhtml:head>
> >         <xhtml:meta http-equiv="Content-Type" content="text/html;
> charset=UTF-8" />
> >         <xhtml:title> xhtml:list all users </xhtml:title>
> >         <xforms:model>
> >             <xforms:instance>
> >                 <!--xi:include href="input:instance"/-->
>
> You should use the xi:include, the XSL below won't work with
> default-instance, unless your model does anything interesting?
>
> >                 <!--aspic:action>none</aspic:action-->
> >                 <xsl:copy-of select="/aspic:results/*"/>
> >             </xforms:instance>
> >
> >             <!-- HP -->
> >             <xforms:submission id="main" ref="/" method="post"
> >action="/users"/>
> >
> >         </xforms:model>
> >     </xhtml:head>
> >
> >    <xhtml:body>
> >...
> >      <xforms:trigger>
> >          <xforms:label>Delete</xforms:label>
> >          <xforms:action ev:event="DOMActivate">
> >              <xforms:setvalue
> >ref="aspic:feedback/aspic:action">delete</xforms:setvalue>
> >              <xforms:setvalue ref="aspic:feedback/aspic:id"
> >value="/aspic:users/aspic:user[index('users-repeat')]"/>
> >              <xforms:send submission="main" />
> >          </xforms:action>
> >      </xforms:trigger>
> >      <xhtml:h2>Users</xhtml:h2>
> >
> >      <xhtml:table width="50%">
> >          <xhtml:tr>
> >              <xhtml:td>
> >                  <xhtml:b>Username</xhtml:b>
> >              </xhtml:td>
> >              <xhtml:td>
> >                  <xhtml:b>Name</xhtml:b>
> >              </xhtml:td>
> >              <xhtml:td>
> >                  <xhtml:b>Email</xhtml:b>
> >              </xhtml:td>
> >          </xhtml:tr>
> >
> >          <xforms:repeat nodeset="/aspic:users/aspic:user"
> id="users-repeat">
> >              <xhtml:tr>
> >                  <xhtml:td>
> >                      <xforms:output ref="aspic:username"/>
> >                  </xhtml:td>
> >                  <xhtml:td>
> >                      <xforms:output
> >ref="aspic:firstname"/>&#160;<xforms:output ref="aspic:lastname"/>
> >                  </xhtml:td>
> >                  <xhtml:td>
> >                      <xforms:output ref="aspic:email"/>
> >                  </xhtml:td>
> >              </xhtml:tr>
> >          </xforms:repeat>
> >      </xhtml:table>
> >.....
> >
> >  </xhtml:body>
> ></xhtml:html>
> >
> >Can anyone tell me if I am missing something obvious here? The
> NullplointerException does not give me very much to go on..... It's worth
> noting that taking out the 'action' element from the pageflow definition
> causes the page to >>render just fine.
>
> Try those fixes and see what happens, the change to NG and input of the
> delete.xpl might do the trick!
>
> Ryan
>
> Ryan Puddephatt
> Software Engineer
>
> Teleflex Group - IT UK
> 1 Michaelson Square
> Livingston
> West Lothian
> Scotland
> EH54 7DP
>
> e> [hidden email]
> t> +44(0)1506 407 110
> f> +44(0)1506 407 108
>
>
>
>
>
>
>
>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>


--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: NullpointerException in org.orbeon.oxf.xforms.XFormsModel.performDefaultAction(XFormsModel.java:754)

Henrik Pettersen
In reply to this post by Ryan Puddephatt
Ryan, all,

thank you, that worked! I was not aware that the new version of OPS
had changed the syntax for the pageflow definitions and I/O
definitions of the pipeline language. Tell me, do I need to set the
name attribute for output like this:

    <p:param name="instance" type="output"/>

or like this?

    <p:param name="data" type="output"/>

Sorry, I have not seen this in the documentation anywhere.

Also, I am not able to get the instance into the view using
xi:include. Perhaps this is related to the question above? Here is how
I am trying to import the instance data with xi:include (and failing -
nothing is returned):

         <xforms:model>
             <xforms:instance>
                 <xi:include href="input:instance"/>
             </xforms:instance>
         </xforms:model>

Is my syntax correct here? The documentation shows at least 2 ways of
specifying the href attribute :-)

If anyone knows the answer to these last 2 questions, I would be
eternally grateful:

1. This page presents a list of user entities, using xforms:repeat.
however, I am not able to highlight the different rows in the table,
like the "To Do Lists" example shows. Is my syntax correct?

2.My 'Delete' button does not seem to do anything. I would like it to
send back the userid of the currently highlighted row in my user
entities table, where the pageflow calls the
"oxf:/users/delete.user.xpl" pipeline. Is my syntax correct?

Thank you, everyone!  Code follows below.

Sincerely,
Henrik Pettersen
Senior Developer
Advanced Computation Laboratory , Cancer Research UK
http://www.acl.icnet.uk/lab/index.html

Here is my new pageflow definition now (thanks, Ryan):
========================================
    <page   path-info="/users"
            id="users"
            view="oxf:/users/users.view.xsl"
            model="oxf:/users/users.model.xpl">
        <action when="/aspic:results/aspic:feedback/aspic:action = 'delete'"
                action="oxf:/users/delete.user.xpl">
        </action>
    </page>

Here is my view now:
===============
<xhtml:html xmlns=""
           xmlns:xhtml="http://www.w3.org/1999/xhtml"
           xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
           xmlns:f="http://orbeon.org/oxf/xml/formatting"
           xmlns:aspic="http://www.cruk.com/aspic/editor/v1"
           xmlns:xforms="http://www.w3.org/2002/xforms"
           xmlns:xi="http://orbeon.org/oxf/xml/xinclude"
           xmlns:ev="http://www.w3.org/2001/xml-events"
           xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns:test="http://test.org"
           xsl:version="2.0">
     <xhtml:head>
         <xhtml:meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" />
         <xhtml:title> User Administration </xhtml:title>
         <xforms:model>
             <xforms:instance>
                 <xsl:copy-of select="/aspic:results/*"/>
             </xforms:instance>

             <xforms:submission id="main" ref="/" method="post" action="users"/>

         </xforms:model>
     </xhtml:head>

    <xhtml:body>
        ...
        <xforms:trigger>
            <xforms:label>Delete</xforms:label>
            <xforms:action ev:event="DOMActivate">
                <xforms:setvalue
ref="aspic:feedback/aspic:action">delete</xforms:setvalue>
                <xforms:setvalue ref="aspic:feedback/aspic:id"
value="/aspic:users/aspic:user[index('users-repeat')]"/>
                <xforms:send submission="main" />
            </xforms:action>
        </xforms:trigger>

        <xhtml:h2>Users</xhtml:h2>

        <xhtml:table width="50%">
            <xhtml:tr>
                <xhtml:td>
                    <xhtml:b>Username</xhtml:b>
                </xhtml:td>
                <xhtml:td>
                    <xhtml:b>Name</xhtml:b>
                </xhtml:td>
                <xhtml:td>
                    <xhtml:b>Email</xhtml:b>
                </xhtml:td>
            </xhtml:tr>

            <xforms:repeat nodeset="/aspic:users/aspic:user" id="users-repeat">
                <xhtml:tr>
                    <xhtml:td>
                        <xforms:output ref="aspic:username"/>
                    </xhtml:td>
                    <xhtml:td>
                        <xforms:output
ref="aspic:firstname"/>&#160;<xforms:output ref="aspic:lastname"/>
                    </xhtml:td>
                    <xhtml:td>
                        <xforms:output ref="aspic:email"/>
                    </xhtml:td>
                </xhtml:tr>
            </xforms:repeat>
        </xhtml:table>
        ...
   </xhtml:body>
</xhtml:html>

And this is what my instance looks like (generated by
oxf:/users/users.model.xpl):
============================================================
<aspic:results xmlns:aspic="http://www.cruk.com/aspic/editor/v1">
    <aspic:users>
        <aspic:user>
            <aspic:email>[hidden email]</aspic:email>
            <aspic:firstname>Henrik</aspic:firstname>
            <aspic:lastname>Pettersen</aspic:lastname>
            <aspic:username>admin</aspic:username>
            <aspic:id>0</aspic:id>
        </aspic:user>
        <aspic:user>
            <aspic:email>[hidden email]</aspic:email>
            <aspic:firstname>Henrik</aspic:firstname>
            <aspic:lastname>Pettersen</aspic:lastname>
            <aspic:username>henrikp</aspic:username>
            <aspic:id>1</aspic:id>
        </aspic:user>
    </aspic:users>
    <request-security>
        <auth-type>FORM</auth-type>
        <secure>false</secure>
        <remote-user>admin</remote-user>
        <role>administrator</role>
    </request-security>
</aspic:results>

This is my oxf:/users/users.model.xpl):
============================
<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
          xmlns:oxf="http://www.orbeon.com/oxf/processors"
          xmlns:aspic="http://www.cruk.com/aspic/editor/v1">

    <p:param name="data" type="output"/>

    <p:processor name="oxf:java">
        <p:input name="config">
            <config sourcepath="oxf:/java"
class="org.cruk.aspic.editor.api.orbeon.GetAllUsers"/>
        </p:input>
        <p:output name="data" id="users"/>
    </p:processor>

    <p:processor name="oxf:request-security">
        <p:input name="config">
            <config>
                <role>administrator</role>
            </config>
        </p:input>
        <p:output name="data" id="request-security"/>
    </p:processor>

    <p:processor name="oxf:identity">
        <p:input name="data" href="aggregate('aspic:results',
#users#xpointer(/aspic:users), #request-security)"/>
        <p:output name="data" ref="data" debug="camp"/>
    </p:processor>

</p:config>

That's all, I think.

Henrik

On 7/21/06, Ryan Puddephatt <[hidden email]> wrote:

> Henrik,
>
> >Here is my pageflow definition:
> >=======================
> >    <page   path-info="/users"
> >            id="users"
> >            xforms="oxf:/users/users.xforms.xml"
>
> Did you want to use the classic engine here? The @xforms means classic will
> be used, if your learning this from new, then I would learn NG, remove this,
> if this is a @default-submission (i.e. XML in your instance to start with)
> then, it should be the XML for your instance, not the xforms:instance itself
>
> >            view="oxf:/users/users.view.xsl"
> >            model="oxf:/users/users.model.xpl">
>
> Where is this file? What does it do?
>
> >        <action when="/aspic:results/aspic:feedback/aspic:action =
> 'delete'"
> >                action="oxf:/users/delete.user.xpl">
> >            <result page="users"/>
> >        </action>
> >    </page>
> >
> >(i.e. after deleting a user, re-run users.model.xpl and return to the same
> page)
> >
> >Here is my XForms model:
> >=====================
> ><xforms:instance xmlns:xforms="http://www.w3.org/2002/xforms">
> >    <aspic:results xmlns:aspic="http://www.cruk.com/aspic/editor/v1">
> >        <aspic:feedback>
> >            <aspic:action/>
> >            <aspic:id/>
> >        </aspic:feedback>
> >        <aspic:users>
> >            <aspic:user>
> >                <aspic:email/>
> >                <aspic:firstname/>
> >                <aspic:lastname/>
> >                <aspic:username/>
> >                <aspic:id/>
> >            </aspic:user>
> >        </aspic:users>
> >        <request-security>
> >            <auth-type/>
> >            <secure/>
> >            <remote-user/>
> >            <role/>
> >        </request-security>
> >    </aspic:results>
> ></xforms:instance>
>
> As I said above this XML should be stripped of the xforms:instance for the
> your @default-submission
>
> >Here is my delete.user.xpl:
> >======================
> ><p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
> >          xmlns:oxf="http://www.orbeon.com/oxf/processors"
> >          xmlns:aspic="http://www.cruk.com/aspic/editor/v1">
> >
> >    <p:param name="data" type="input" debug="input.data.for.delete"/>
>
> This should be @name="instance" to take data from the view
>
> >    <p:processor name="oxf:null-serializer"
> >xmlns:p="http://www.orbeon.com/oxf/pipeline">
> >        <p:input name="data" href="data"/>
> >    </p:processor>
> >
> ></p:config>
> >
> >(i.e. do nothing for now - will add code to delete user record)
> >
> >
> >And here is my view:
> >================
> ><xhtml:html xmlns=""
> >           xmlns:xhtml="http://www.w3.org/1999/xhtml"
> >           xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> >           xmlns:f="http://orbeon.org/oxf/xml/formatting"
> >           xmlns:aspic="http://www.cruk.com/aspic/editor/v1"
> >           xmlns:xforms="http://www.w3.org/2002/xforms"
> >           xmlns:xi="http://orbeon.org/oxf/xml/xinclude"
> >           xmlns:ev="http://www.w3.org/2001/xml-events"
> >           xmlns:xs="http://www.w3.org/2001/XMLSchema"
> >           xmlns:test="http://test.org"
> >           xsl:version="2.0">
> >     <xhtml:head>
> >         <xhtml:meta http-equiv="Content-Type" content="text/html;
> charset=UTF-8" />
> >         <xhtml:title> xhtml:list all users </xhtml:title>
> >         <xforms:model>
> >             <xforms:instance>
> >                 <!--xi:include href="input:instance"/-->
>
> You should use the xi:include, the XSL below won't work with
> default-instance, unless your model does anything interesting?
>
> >                 <!--aspic:action>none</aspic:action-->
> >                 <xsl:copy-of select="/aspic:results/*"/>
> >             </xforms:instance>
> >
> >             <!-- HP -->
> >             <xforms:submission id="main" ref="/" method="post"
> >action="/users"/>
> >
> >         </xforms:model>
> >     </xhtml:head>
> >
> >    <xhtml:body>
> >...
> >      <xforms:trigger>
> >          <xforms:label>Delete</xforms:label>
> >          <xforms:action ev:event="DOMActivate">
> >              <xforms:setvalue
> >ref="aspic:feedback/aspic:action">delete</xforms:setvalue>
> >              <xforms:setvalue ref="aspic:feedback/aspic:id"
> >value="/aspic:users/aspic:user[index('users-repeat')]"/>
> >              <xforms:send submission="main" />
> >          </xforms:action>
> >      </xforms:trigger>
> >      <xhtml:h2>Users</xhtml:h2>
> >
> >      <xhtml:table width="50%">
> >          <xhtml:tr>
> >              <xhtml:td>
> >                  <xhtml:b>Username</xhtml:b>
> >              </xhtml:td>
> >              <xhtml:td>
> >                  <xhtml:b>Name</xhtml:b>
> >              </xhtml:td>
> >              <xhtml:td>
> >                  <xhtml:b>Email</xhtml:b>
> >              </xhtml:td>
> >          </xhtml:tr>
> >
> >          <xforms:repeat nodeset="/aspic:users/aspic:user"
> id="users-repeat">
> >              <xhtml:tr>
> >                  <xhtml:td>
> >                      <xforms:output ref="aspic:username"/>
> >                  </xhtml:td>
> >                  <xhtml:td>
> >                      <xforms:output
> >ref="aspic:firstname"/>&#160;<xforms:output ref="aspic:lastname"/>
> >                  </xhtml:td>
> >                  <xhtml:td>
> >                      <xforms:output ref="aspic:email"/>
> >                  </xhtml:td>
> >              </xhtml:tr>
> >          </xforms:repeat>
> >      </xhtml:table>
> >.....
> >
> >  </xhtml:body>
> ></xhtml:html>
> >
> >Can anyone tell me if I am missing something obvious here? The
> NullplointerException does not give me very much to go on..... It's worth
> noting that taking out the 'action' element from the pageflow definition
> causes the page to >>render just fine.
>
> Try those fixes and see what happens, the change to NG and input of the
> delete.xpl might do the trick!
>
> Ryan
>
> Ryan Puddephatt
> Software Engineer
>
> Teleflex Group - IT UK
> 1 Michaelson Square
> Livingston
> West Lothian
> Scotland
> EH54 7DP
>
> e> [hidden email]
> t> +44(0)1506 407 110
> f> +44(0)1506 407 108
>
>
>
>
>
>
>
>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>


--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: NullpointerException in org.orbeon.oxf.xforms.XFormsModel.performDefaultAction(XFormsModel.java:754)

Ryan Puddephatt
In reply to this post by Henrik Pettersen
Henrik,

See my answers below

>
>Ryan, all,
>
>thank you, that worked! I was not aware that the new version
>of OPS had changed the syntax for the pageflow definitions and
>I/O definitions of the pipeline language. Tell me, do I need
>to set the name attribute for output like this:
>
>    <p:param name="instance" type="output"/>
>
>or like this?
>
>    <p:param name="data" type="output"/>
Both will work, data gives you input:data, instance gives you
input:instance. In a model you can use both, in a submission you must use
data.

>
>Sorry, I have not seen this in the documentation anywhere.
>
>Also, I am not able to get the instance into the view using
>xi:include. Perhaps this is related to the question above?
>Here is how I am trying to import the instance data with
>xi:include (and failing - nothing is returned):
>
>         <xforms:model>
>             <xforms:instance>
>                 <xi:include href="input:instance"/>
>             </xforms:instance>
>         </xforms:model>

You need an @id on your instance

How are you passing the data? Should be default-instance? Or use input:data
for the output of the model!

>
>Is my syntax correct here? The documentation shows at least 2
>ways of specifying the href attribute :-)
>
>If anyone knows the answer to these last 2 questions, I would
>be eternally grateful:
>
>1. This page presents a list of user entities, using xforms:repeat.
>however, I am not able to highlight the different rows in the
>table, like the "To Do Lists" example shows. Is my syntax correct?
This is done automatically by the javascript, unless you have a class on the
elements to change the background, perhaps a reproducible example would be
good.

>
>2.My 'Delete' button does not seem to do anything. I would
>like it to send back the userid of the currently highlighted
>row in my user entities table, where the pageflow calls the
>"oxf:/users/delete.user.xpl" pipeline. Is my syntax correct?
>

Ok your submission will have to look something like

<xforms:submission id="main" ref="instance('instance-id-to-send"
        method="post" action="users"
        replace="instance" instance="instance-id-to-replace"/>

Hope this helps

Ryan Puddephatt
Software Engineer

Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP

e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108





--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws