Accessing RenderRequest in a processor

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

Accessing RenderRequest in a processor

Mikko Wuokko
Hi.

I would need to somehow access the RenderRequest inside a processor or
somehow get the value of a certain attribute from there.

I got this kind of a processor

<p:processor name="oxf:sql" xmlns:sql="http://orbeon.org/oxf/xml/sql">
     <p:input name="config">
     <sql:config xmlns:sql="http://orbeon.org/oxf/xml/sql">
         <result>
         <sql:connection>
             <sql:datasource>users</sql:datasource>
             <sql:execute>
                 <sql:update>
                     UPDATE users SET timestamp = NOW()
                                  WHERE username = <theLoggedInUsername>
                 </sql:update>
             </sql:execute>
             </sql:connection>
         </result>
         </sql:config>
     </p:input>
     <p:output name="data" ref="data" />
</p:processor>

So I would like to get the logged in username in the place of
<theLoggedInUsername> so that I can update the table with a proper
timestamp. In a .jsp page inside a portlet I can get the renderRequest
with portlet tag library and then the username like this

<portlet:defineObjects />
<% String username = renderRequest.getUserPrincipal().getName(); %>

How can I achieve the same in OPS or this even possible at the moment as
the implementations are incomplete. I tried to figure something from the
source or the docs but no luck there. Can this be done in a separate
Java-processor and then use that as a input. If like that, then how that
would be done?

I'm using the Jetspeed portal if that matters.

Regards,

Mikko



--
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: Accessing RenderRequest in a processor

Stephen Bayliss
Try looking at the oxf:request processor
(http://www.orbeon.com/ops/doc/processors-generators-request ) -- this
will give you request/remote-user

-----Original Message-----
From: Mikko Wuokko [mailto:[hidden email]]
Sent: 01 March 2006 10:32
To: [hidden email]
Subject: [ops-users] Accessing RenderRequest in a processor

Hi.

I would need to somehow access the RenderRequest inside a processor or
somehow get the value of a certain attribute from there.

I got this kind of a processor

<p:processor name="oxf:sql" xmlns:sql="http://orbeon.org/oxf/xml/sql">
     <p:input name="config">
     <sql:config xmlns:sql="http://orbeon.org/oxf/xml/sql">
         <result>
         <sql:connection>
             <sql:datasource>users</sql:datasource>
             <sql:execute>
                 <sql:update>
                     UPDATE users SET timestamp = NOW()
                                  WHERE username = <theLoggedInUsername>
                 </sql:update>
             </sql:execute>
             </sql:connection>
         </result>
         </sql:config>
     </p:input>
     <p:output name="data" ref="data" />
</p:processor>

So I would like to get the logged in username in the place of
<theLoggedInUsername> so that I can update the table with a proper
timestamp. In a .jsp page inside a portlet I can get the renderRequest
with portlet tag library and then the username like this

<portlet:defineObjects />
<% String username = renderRequest.getUserPrincipal().getName(); %>

How can I achieve the same in OPS or this even possible at the moment as

the implementations are incomplete. I tried to figure something from the

source or the docs but no luck there. Can this be done in a separate
Java-processor and then use that as a input. If like that, then how that

would be done?

I'm using the Jetspeed portal if that matters.

Regards,

Mikko





--
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: Accessing RenderRequest in a processor

Erik Bruchez
Administrator
In reply to this post by Mikko Wuokko
Mikko,

You are asking for a particular answer to a question which in fact has
another answer ;-)

You should be able to get the user principal without using Java, by
using the Request generator:

   http://www.orbeon.com/ops/doc/processors-generators-request

Just filter on the /request/remote-user name.

Then, pass that information to the SQL processor.

-Erik

Mikko Wuokko wrote:

> Hi.
>
> I would need to somehow access the RenderRequest inside a processor or
> somehow get the value of a certain attribute from there.
>
> I got this kind of a processor
>
> <p:processor name="oxf:sql" xmlns:sql="http://orbeon.org/oxf/xml/sql">
>     <p:input name="config">
>     <sql:config xmlns:sql="http://orbeon.org/oxf/xml/sql">
>         <result>
>         <sql:connection>
>             <sql:datasource>users</sql:datasource>
>             <sql:execute>
>                 <sql:update>
>                     UPDATE users SET timestamp = NOW()
>                                  WHERE username = <theLoggedInUsername>
>                 </sql:update>
>             </sql:execute>
>             </sql:connection>
>         </result>
>         </sql:config>
>     </p:input>
>     <p:output name="data" ref="data" />
> </p:processor>
>
> So I would like to get the logged in username in the place of
> <theLoggedInUsername> so that I can update the table with a proper
> timestamp. In a .jsp page inside a portlet I can get the renderRequest
> with portlet tag library and then the username like this
>
> <portlet:defineObjects />
> <% String username = renderRequest.getUserPrincipal().getName(); %>
>
> How can I achieve the same in OPS or this even possible at the moment as
> the implementations are incomplete. I tried to figure something from the
> source or the docs but no luck there. Can this be done in a separate
> Java-processor and then use that as a input. If like that, then how that
> would be done?
>
> I'm using the Jetspeed portal if that matters.
>
> Regards,
>
> Mikko
>
>
> ------------------------------------------------------------------------
>
>
> --
> 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: Accessing RenderRequest in a processor

Mikko Wuokko
Thanks, didn't thought that it could be found from there.

But now I'm puzzled with thing of getting it to the another processor.
I've tried this (and couple of other things too) and it doesn't work:

<p:param name="data" type="output" />
<p:processor name="oxf:request"
xmlns:p="http://www.orbeon.com/oxf/pipeline">
     <p:input name="config">
         <config>
             <include>/request</include>
         </config>
         </p:input>
     <p:output name="data" id="request"/>
</p:processor>
<p:processor name="oxf:sql" xmlns:sql="http://orbeon.org/oxf/xml/sql">
     <p:input name="data" href="#request" />
     <p:input name="config">
     <sql:config xmlns:sql="http://orbeon.org/oxf/xml/sql">
         <sql-results>
         <sql:connection>
             <sql:datasource>users</sql:datasource>
             <sql:execute>
                 <sql:update>
                     UPDATE users SET timestamp = NOW() WHERE id =
'<sql:param type="xs:string" select="/request/remote-user"/>'
                 </sql:update>
             </sql:execute>
             </sql:connection>
         </sql-results>
         </sql:config>
     </p:input>
     <p:output name="data" id="sql-data" />
</p:processor>

So I'm first outputting the stuff as data and then inputting it in the
sql processor. Apparently I can't access it with that sql:param as it
would work with XForms as input. Is there again something small that I'm
missing?

-Mikko

Erik Bruchez wrote:
 > Mikko,
 >
 > You are asking for a particular answer to a question which in fact has
 > another answer ;-)
 >
 > You should be able to get the user principal without using Java, by
 > using the Request generator:
 >
 >   http://www.orbeon.com/ops/doc/processors-generators-request
 >
 > Just filter on the /request/remote-user name.
 >
 > Then, pass that information to the SQL processor.
 >
 > -Erik
 >
 > Mikko Wuokko wrote:
 >> Hi.
 >>
 >> I would need to somehow access the RenderRequest inside a processor or
 >> somehow get the value of a certain attribute from there.
 >>
 >> I got this kind of a processor
 >>
 >> <p:processor name="oxf:sql" xmlns:sql="http://orbeon.org/oxf/xml/sql">
 >>     <p:input name="config">
 >>     <sql:config xmlns:sql="http://orbeon.org/oxf/xml/sql">
 >>         <result>
 >>         <sql:connection>
 >>             <sql:datasource>users</sql:datasource>
 >>             <sql:execute>
 >>                 <sql:update>
 >>                     UPDATE users SET timestamp = NOW()
 >>                                  WHERE username = <theLoggedInUsername>
 >>                 </sql:update>
 >>             </sql:execute>
 >>             </sql:connection>
 >>         </result>
 >>         </sql:config>
 >>     </p:input>
 >>     <p:output name="data" ref="data" />
 >> </p:processor>
 >>
 >> So I would like to get the logged in username in the place of
 >> <theLoggedInUsername> so that I can update the table with a proper
 >> timestamp. In a .jsp page inside a portlet I can get the renderRequest
 >> with portlet tag library and then the username like this
 >>
 >> <portlet:defineObjects />
 >> <% String username = renderRequest.getUserPrincipal().getName(); %>
 >>
 >> How can I achieve the same in OPS or this even possible at the moment
 >> as the implementations are incomplete. I tried to figure something
 >> from the source or the docs but no luck there. Can this be done in a
 >> separate Java-processor and then use that as a input. If like that,
 >> then how that would be done?
 >>
 >> I'm using the Jetspeed portal if that matters.
 >>
 >> Regards,
 >>
 >> Mikko
 >>
 >>
 >> ------------------------------------------------------------------------
 >>
 >>
 >> --
 >> 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



--
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: Accessing RenderRequest in a processor

Stephen Bayliss
In reply to this post by Mikko Wuokko
Use an intermediate XSLT processor to generate the config input for the
oxf:sql processor, something like:

<p:processor name="oxf:xslt">
   <p:input name="data" href="#request"/>
   <p:input name="config">
      <xsl:stylesheet version="2.0"
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
         xmlns:sql="http://orbeon.org/oxf/xml/sql">
            <xsl:template match="/">
               <sql:config xmlns:sql="http://orbeon.org/oxf/xml/sql">
                  <sql-results>
                     <sql:connection>
                        <sql:datasource>users</sql:datasource>
                        <sql:execute>
                           <sql:update>
                              UPDATE users SET timestamp = NOW() WHERE
id =
'<xsl:value-of select="/request/remote-user"/>'
                           </sql:update>
                        </sql:execute>
                     </sql:connection>
                  </sql-results>
               </sql:config>
            </xsl:template>
         </xsl:stylesheet>
      </p:input>
      <p:output name="data" id="sql-command"/>
   </p:processor>

Then use href="#sql-command" as the config input to your oxf:sql
processor.

(The above is typed free-hand so you'll have to watch for typos and
dodgy syntax errors!)

Steve

-----Original Message-----
From: Mikko Wuokko [mailto:[hidden email]]
Sent: 02 March 2006 07:17
To: [hidden email]
Subject: Re: [ops-users] Accessing RenderRequest in a processor

Thanks, didn't thought that it could be found from there.

But now I'm puzzled with thing of getting it to the another processor.
I've tried this (and couple of other things too) and it doesn't work:

<p:param name="data" type="output" />
<p:processor name="oxf:request"
xmlns:p="http://www.orbeon.com/oxf/pipeline">
     <p:input name="config">
         <config>
             <include>/request</include>
         </config>
         </p:input>
     <p:output name="data" id="request"/>
</p:processor>
<p:processor name="oxf:sql" xmlns:sql="http://orbeon.org/oxf/xml/sql">
     <p:input name="data" href="#request" />
     <p:input name="config">
     <sql:config xmlns:sql="http://orbeon.org/oxf/xml/sql">
         <sql-results>
         <sql:connection>
             <sql:datasource>users</sql:datasource>
             <sql:execute>
                 <sql:update>
                     UPDATE users SET timestamp = NOW() WHERE id =
'<sql:param type="xs:string" select="/request/remote-user"/>'
                 </sql:update>
             </sql:execute>
             </sql:connection>
         </sql-results>
         </sql:config>
     </p:input>
     <p:output name="data" id="sql-data" />
</p:processor>

So I'm first outputting the stuff as data and then inputting it in the
sql processor. Apparently I can't access it with that sql:param as it
would work with XForms as input. Is there again something small that I'm

missing?

-Mikko

Erik Bruchez wrote:
 > Mikko,
 >
 > You are asking for a particular answer to a question which in fact
has
 > another answer ;-)
 >
 > You should be able to get the user principal without using Java, by
 > using the Request generator:
 >
 >   http://www.orbeon.com/ops/doc/processors-generators-request
 >
 > Just filter on the /request/remote-user name.
 >
 > Then, pass that information to the SQL processor.
 >
 > -Erik
 >
 > Mikko Wuokko wrote:
 >> Hi.
 >>
 >> I would need to somehow access the RenderRequest inside a processor
or
 >> somehow get the value of a certain attribute from there.
 >>
 >> I got this kind of a processor
 >>
 >> <p:processor name="oxf:sql"
xmlns:sql="http://orbeon.org/oxf/xml/sql">
 >>     <p:input name="config">
 >>     <sql:config xmlns:sql="http://orbeon.org/oxf/xml/sql">
 >>         <result>
 >>         <sql:connection>
 >>             <sql:datasource>users</sql:datasource>
 >>             <sql:execute>
 >>                 <sql:update>
 >>                     UPDATE users SET timestamp = NOW()
 >>                                  WHERE username =
<theLoggedInUsername>
 >>                 </sql:update>
 >>             </sql:execute>
 >>             </sql:connection>
 >>         </result>
 >>         </sql:config>
 >>     </p:input>
 >>     <p:output name="data" ref="data" />
 >> </p:processor>
 >>
 >> So I would like to get the logged in username in the place of
 >> <theLoggedInUsername> so that I can update the table with a proper
 >> timestamp. In a .jsp page inside a portlet I can get the
renderRequest
 >> with portlet tag library and then the username like this
 >>
 >> <portlet:defineObjects />
 >> <% String username = renderRequest.getUserPrincipal().getName(); %>
 >>
 >> How can I achieve the same in OPS or this even possible at the
moment
 >> as the implementations are incomplete. I tried to figure something
 >> from the source or the docs but no luck there. Can this be done in a
 >> separate Java-processor and then use that as a input. If like that,
 >> then how that would be done?
 >>
 >> I'm using the Jetspeed portal if that matters.
 >>
 >> Regards,
 >>
 >> Mikko
 >>
 >>
 >>
------------------------------------------------------------------------
 >>
 >>
 >> --
 >> 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





--
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: Accessing RenderRequest in a processor

Alessandro  Vernet
Administrator
In reply to this post by Mikko Wuokko
Mikko,

You should be able to access the output of the request generator from
the SQL processor. I see in your code that you have quotes around the
<sql:param>, which you shouldn't have. The SQL processor will
automatically add quotes and escape the string if it contains quotes
as necessary.

If removing the quotes does not solve the problem, can you be more
specific about the error you are getting?

Alex

On 3/1/06, Mikko Wuokko <[hidden email]> wrote:

> Thanks, didn't thought that it could be found from there.
>
> But now I'm puzzled with thing of getting it to the another processor.
> I've tried this (and couple of other things too) and it doesn't work:
>
> <p:param name="data" type="output" />
> <p:processor name="oxf:request"
> xmlns:p="http://www.orbeon.com/oxf/pipeline">
>      <p:input name="config">
>          <config>
>              <include>/request</include>
>          </config>
>          </p:input>
>      <p:output name="data" id="request"/>
> </p:processor>
> <p:processor name="oxf:sql" xmlns:sql="http://orbeon.org/oxf/xml/sql">
>      <p:input name="data" href="#request" />
>      <p:input name="config">
>      <sql:config xmlns:sql="http://orbeon.org/oxf/xml/sql">
>          <sql-results>
>          <sql:connection>
>              <sql:datasource>users</sql:datasource>
>              <sql:execute>
>                  <sql:update>
>                      UPDATE users SET timestamp = NOW() WHERE id =
> '<sql:param type="xs:string" select="/request/remote-user"/>'
>                  </sql:update>
>              </sql:execute>
>              </sql:connection>
>          </sql-results>
>          </sql:config>
>      </p:input>
>      <p:output name="data" id="sql-data" />
> </p:processor>
>
> So I'm first outputting the stuff as data and then inputting it in the
> sql processor. Apparently I can't access it with that sql:param as it
> would work with XForms as input. Is there again something small that I'm
> missing?
>
> -Mikko
>
> Erik Bruchez wrote:
>  > Mikko,
>  >
>  > You are asking for a particular answer to a question which in fact has
>  > another answer ;-)
>  >
>  > You should be able to get the user principal without using Java, by
>  > using the Request generator:
>  >
>  >   http://www.orbeon.com/ops/doc/processors-generators-request
>  >
>  > Just filter on the /request/remote-user name.
>  >
>  > Then, pass that information to the SQL processor.
>  >
>  > -Erik
>  >
>  > Mikko Wuokko wrote:
>  >> Hi.
>  >>
>  >> I would need to somehow access the RenderRequest inside a processor or
>  >> somehow get the value of a certain attribute from there.
>  >>
>  >> I got this kind of a processor
>  >>
>  >> <p:processor name="oxf:sql" xmlns:sql="http://orbeon.org/oxf/xml/sql">
>  >>     <p:input name="config">
>  >>     <sql:config xmlns:sql="http://orbeon.org/oxf/xml/sql">
>  >>         <result>
>  >>         <sql:connection>
>  >>             <sql:datasource>users</sql:datasource>
>  >>             <sql:execute>
>  >>                 <sql:update>
>  >>                     UPDATE users SET timestamp = NOW()
>  >>                                  WHERE username = <theLoggedInUsername>
>  >>                 </sql:update>
>  >>             </sql:execute>
>  >>             </sql:connection>
>  >>         </result>
>  >>         </sql:config>
>  >>     </p:input>
>  >>     <p:output name="data" ref="data" />
>  >> </p:processor>
>  >>
>  >> So I would like to get the logged in username in the place of
>  >> <theLoggedInUsername> so that I can update the table with a proper
>  >> timestamp. In a .jsp page inside a portlet I can get the renderRequest
>  >> with portlet tag library and then the username like this
>  >>
>  >> <portlet:defineObjects />
>  >> <% String username = renderRequest.getUserPrincipal().getName(); %>
>  >>
>  >> How can I achieve the same in OPS or this even possible at the moment
>  >> as the implementations are incomplete. I tried to figure something
>  >> from the source or the docs but no luck there. Can this be done in a
>  >> separate Java-processor and then use that as a input. If like that,
>  >> then how that would be done?
>  >>
>  >> I'm using the Jetspeed portal if that matters.
>  >>
>  >> Regards,
>  >>
>  >> Mikko
>  >>
>  >>
>  >> ------------------------------------------------------------------------
>  >>
>  >>
>  >> --
>  >> 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
>
>
>
>
> --
> 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
>
>
>

--
Blog (XML, Web apps, Open Source):
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Accessing RenderRequest in a processor

Mikko Wuokko
Hi.

I've been few days away got only now change to test these these stuffs.

Thanks to you all because both the one by Eric and Stephen and also the
one by Alessandro worked. I think I'll use the XSLT approach even though
it is bit more complex because it could be wise always to quote the
input with sql. Otherwise I think I could run into problems if I'll have
data with spaces in them. With this username info only it works just
fine though using the sql:param.

Thanks to you all again.

-Mikko

Alessandro Vernet wrote:

> Mikko,
>
> You should be able to access the output of the request generator from
> the SQL processor. I see in your code that you have quotes around the
> <sql:param>, which you shouldn't have. The SQL processor will
> automatically add quotes and escape the string if it contains quotes
> as necessary.
>
> If removing the quotes does not solve the problem, can you be more
> specific about the error you are getting?
>
> Alex
>
> On 3/1/06, Mikko Wuokko <[hidden email]> wrote:
>> Thanks, didn't thought that it could be found from there.
>>
>> But now I'm puzzled with thing of getting it to the another processor.
>> I've tried this (and couple of other things too) and it doesn't work:
>>
>> <p:param name="data" type="output" />
>> <p:processor name="oxf:request"
>> xmlns:p="http://www.orbeon.com/oxf/pipeline">
>>      <p:input name="config">
>>          <config>
>>              <include>/request</include>
>>          </config>
>>          </p:input>
>>      <p:output name="data" id="request"/>
>> </p:processor>
>> <p:processor name="oxf:sql" xmlns:sql="http://orbeon.org/oxf/xml/sql">
>>      <p:input name="data" href="#request" />
>>      <p:input name="config">
>>      <sql:config xmlns:sql="http://orbeon.org/oxf/xml/sql">
>>          <sql-results>
>>          <sql:connection>
>>              <sql:datasource>users</sql:datasource>
>>              <sql:execute>
>>                  <sql:update>
>>                      UPDATE users SET timestamp = NOW() WHERE id =
>> '<sql:param type="xs:string" select="/request/remote-user"/>'
>>                  </sql:update>
>>              </sql:execute>
>>              </sql:connection>
>>          </sql-results>
>>          </sql:config>
>>      </p:input>
>>      <p:output name="data" id="sql-data" />
>> </p:processor>
>>
>> So I'm first outputting the stuff as data and then inputting it in the
>> sql processor. Apparently I can't access it with that sql:param as it
>> would work with XForms as input. Is there again something small that I'm
>> missing?
>>
>> -Mikko
>>
>> Erik Bruchez wrote:
>>  > Mikko,
>>  >
>>  > You are asking for a particular answer to a question which in fact has
>>  > another answer ;-)
>>  >
>>  > You should be able to get the user principal without using Java, by
>>  > using the Request generator:
>>  >
>>  >   http://www.orbeon.com/ops/doc/processors-generators-request
>>  >
>>  > Just filter on the /request/remote-user name.
>>  >
>>  > Then, pass that information to the SQL processor.
>>  >
>>  > -Erik
>>  >
>>  > Mikko Wuokko wrote:
>>  >> Hi.
>>  >>
>>  >> I would need to somehow access the RenderRequest inside a processor or
>>  >> somehow get the value of a certain attribute from there.
>>  >>
>>  >> I got this kind of a processor
>>  >>
>>  >> <p:processor name="oxf:sql" xmlns:sql="http://orbeon.org/oxf/xml/sql">
>>  >>     <p:input name="config">
>>  >>     <sql:config xmlns:sql="http://orbeon.org/oxf/xml/sql">
>>  >>         <result>
>>  >>         <sql:connection>
>>  >>             <sql:datasource>users</sql:datasource>
>>  >>             <sql:execute>
>>  >>                 <sql:update>
>>  >>                     UPDATE users SET timestamp = NOW()
>>  >>                                  WHERE username = <theLoggedInUsername>
>>  >>                 </sql:update>
>>  >>             </sql:execute>
>>  >>             </sql:connection>
>>  >>         </result>
>>  >>         </sql:config>
>>  >>     </p:input>
>>  >>     <p:output name="data" ref="data" />
>>  >> </p:processor>
>>  >>
>>  >> So I would like to get the logged in username in the place of
>>  >> <theLoggedInUsername> so that I can update the table with a proper
>>  >> timestamp. In a .jsp page inside a portlet I can get the renderRequest
>>  >> with portlet tag library and then the username like this
>>  >>
>>  >> <portlet:defineObjects />
>>  >> <% String username = renderRequest.getUserPrincipal().getName(); %>
>>  >>
>>  >> How can I achieve the same in OPS or this even possible at the moment
>>  >> as the implementations are incomplete. I tried to figure something
>>  >> from the source or the docs but no luck there. Can this be done in a
>>  >> separate Java-processor and then use that as a input. If like that,
>>  >> then how that would be done?
>>  >>
>>  >> I'm using the Jetspeed portal if that matters.
>>  >>
>>  >> Regards,
>>  >>
>>  >> Mikko
>>  >>
>>  >>
>>  >> ------------------------------------------------------------------------
>>  >>
>>  >>
>>  >> --
>>  >> 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
>>
>>
>>
>>
>> --
>> 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
>>
>>
>>
>
>
> --
> Blog (XML, Web apps, Open Source):
> 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


--
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