All,
I'm getting an NPE when specifiying an invalid model in @model of xforms
controls. This is in a version from 28th August
Ryan
Ryan
Puddephatt -- 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 |
Hi,
I have
added this to my modified address-book model.xpl:
<p:processor
name="oxf:request">
<p:input name="config"> <config><include>/request/remote-user</include></config> </p:input> <p:output name="data" id="remote-user"/> </p:processor> Is
this the right way to pull the remote_user from the request so I can view it and
use it in my forms? Or should I use request-security, as I have seen in
some posts? And what do I use in my view.xsl to make it visible? I
have looked on the list and the archive, but haven't found what I
needed.
Thanks
for your help,
Paul -- 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 |
Paul,
here is how I did it. Note that I am retrieving the user details based on the username using a java processor, but you can perfectly well skip this step. I've also attached the source for you. <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:aspic="http://www.cruk.com/aspic/editor/v1" xmlns=""> <p:param name="data" type="output" /> <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:xslt" xmlns:p="http://www.orbeon.com/oxf/pipeline"> <p:input name="config"> <aspic:user xsl:version="2.0"> <aspic:username> <xsl:value-of select="/request-security/remote-user"/> </aspic:username> </aspic:user> </p:input> <p:input name="data" href="#request-security"/> <p:output name="data" id="getuser.input" /> </p:processor> <p:processor name="oxf:java"> <p:input name="config"> <config sourcepath="oxf:/java" class="org.cruk.aspic.editor.api.orbeon.GetUserByUsername"/> </p:input> <p:input name="data" href="#getuser.input" /> <p:output name="data" ref="data" /> </p:processor> Henrik On 8/30/06, Paul Warner <[hidden email]> wrote: > > > Hi, > > I have added this to my modified address-book model.xpl: > > <p:processor name="oxf:request"> > <p:input name="config"> > > <config><include>/request/remote-user</include></config> > </p:input> > <p:output name="data" id="remote-user"/> > </p:processor> > > Is this the right way to pull the remote_user from the request so I can view > it and use it in my forms? Or should I use request-security, as I have seen > in some posts? And what do I use in my view.xsl to make it visible? I have > looked on the list and the archive, but haven't found what I needed. > > Thanks for your help, > Paul > > -- > 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 get.logged.in.user.xpl (1K) Download Attachment |
Administrator
|
In reply to this post by Ryan Puddephatt
Ryan,
Thanks. I have added a better error message in this case. -Erik Ryan Puddephatt wrote: > All, > I'm getting an NPE when specifiying an invalid model in @model of > xforms controls. This is in a version from 28th August > > Ryan > > > Ryan Puddephatt > Software Engineer > > > Teleflex Group - IT UK > 1 Michaelson Square > Livingston > West Lothian > Scotland > EH54 7DP > > e> [hidden email] <mailto:[hidden email]> > t> +44(0)1506 407 110 > f> +44(0)1506 407 108 > w> www.teleflex.com <http://www.teleflex.com/> Orbeon - XForms Everywhere: http://www.orbeon.com/blog/ -- 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 |
Administrator
|
In reply to this post by Paul Warner-2
Paul,
> I have added this to my modified address-book model.xpl: > > <p:processor name="oxf:request"> > <p:input name="config"> > <config><include>/request/remote-user</include></config> > </p:input> > <p:output name="data" id="remote-user"/> > </p:processor> > Is this the right way to pull the remote_user from the request so I can > view it and use it in my forms? Or should I use request-security, as I > have seen in some posts? Both will do. oxf:request-security in addition allows you to check for roles. > And what do I use in my view.xsl to make it visible? I have looked > on the list and the archive, but haven't found what I needed. You need your page model to create a model document that is passed to the page view using the page model's "data" output. Then an XSLT page view can access the model document as its main input. -Erik -- Orbeon - XForms Everywhere: http://www.orbeon.com/blog/ -- 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 |
Free forum by Nabble | Edit this page |