Displaying current logged user attributes in create user form

I'm using a custom user form for an administrator and I need to get some attributes from this administrator (current logged user) into this form. My first attempt, was creating a rule like this:

<block>

<get>

<invoke name='getView'>

<ref>context</ref>

<concat>

<s>User:</s>

<ref>param.supervisor</ref>

</concat>

<map>

<s>authorized</s>

<s>true</s>

</map>

</invoke>

<s>Supervisor</s>

</get>

</block>

Then, inside the form, in the derivation value, I'm calling my rule like this:

<cond>

<notnull>

<ref>global.Supervisor</ref>

</notnull>

<rule name='getSupervisor'>

<argument name='param.supervisor' value='$(global.Supervisor)'/>

</rule>

</cond>

Unfortunatelly, I'm not getting the current logged user attribute I need. Any ideas?

Thanks in advance.

[1223 byte] By [LpzYlnd] at [2007-11-26 11:06:35]
# 1

Hi. I do much the same thing -- retrieve attributes about the logged in user (requestor in my context). The code below works fine. Although I'm not quite sure its what your after -- I dont think this will give you access to any attributes outside of IdM itself; ie, populated in the user view from external resources.

<Field name="Requester">

<Display class="Label">

<Property name="title" value="Requestor:"/>

<Property name="value">

<expression>

<block>

<defvar name="requestorObj">

<invoke name='getObject' class='com.waveset.ui.FormUtil'>

<ref>:display.session</ref>

<s>User</s>

<select>

<ref>requester</ref>

<ref>WF_CASE_OWNER</ref>

</select>

</invoke>

</defvar>

<concat>

<invoke name="getAttribute">

<ref>requestorObj</ref>

<s>fullname</s>

</invoke>

<s> [</s>

<get>

<ref>requestorObj</ref>

<s>accountId</s>

</get>

<s>]</s>

</concat>

</block>

</expression>

</Property>

</Display>

</Field>

c732345 at 2007-7-7 3:20:43 > top of Java-index,Web & Directory Servers,Directory Servers...