How do you associate a view with a form?

How do you associate a view with a form and make it accessible in the form?
[82 byte] By [westhab1] at [2007-11-26 8:39:42]
# 1

A view is nothing but the sum of attributes and hidden fields that needs to shwon or calculated for a form. For example when you want to serch for a user with a partcular accountId, what you get is nothing but teh particular User view with the associated information.If you want to access the user view , the refer it like waveset.view.attrName or global.view.attributeName. Whenever we open a form , we are actually checking out the user view (if it is a User Form) and while submitting , we are actually check in the view. In workflows, with specific activities ,we do the chek out view and check in view. We pass the id for the type of view to be checked in and in teh same way for check out views.

I am a beginner in this field also. I just shared my understanding. For a better understanding go though the Identity Managere deployment guide.

Thanks,

Manila

walkin_java at 2007-7-6 22:15:21 > top of Java-index,Web & Directory Servers,Directory Servers...
# 2

I have been reading through all of the PDFs and have not found an answer to my question. I know what a view is. I need to gain access to the user view so that I can show some additional user attributes. The form I am on does not have that view visible when I use the BPE debugger to step through things.

What is the best approach? I haven't been able to find any examples anywhere thus far.

westhab1 at 2007-7-6 22:15:21 > top of Java-index,Web & Directory Servers,Directory Servers...
# 3

If you know the values of the previous fields, then assign them in <Derivation> tag, then you can call that field just using <ref> tag. Example

If you have to field2 is determined by what ever the field1 value, then in the field1 <Derivation> tag, set that value,and then you can call that field1 value by just doing <ref> tag in the field2, make sure you have field1 defined the form before field2

smokkala at 2007-7-6 22:15:21 > top of Java-index,Web & Directory Servers,Directory Servers...
# 4
i think your missing something here. I am on the Question Login form. I need to access the user view so that I can display an attribute value from one of the resource adapters. How do I gain access to the user view from this form?
westhab1 at 2007-7-6 22:15:21 > top of Java-index,Web & Directory Servers,Directory Servers...
# 5

> display an attribute value from one of the resource adapters

to get access to such an attribute I suppose you've included it in the attribute mapping of the RA, then you can get hold of it via

accounts[<your-RA-name>].<attribute_name>

or

accounts[Lighthouse].<attribute_name>

/u

UlfFeger at 2007-7-6 22:15:21 > top of Java-index,Web & Directory Servers,Directory Servers...
# 6
but accounts doesn't seem to be available to this form. I have access the attributes in question on other forms, however, this form doesn't have accounts or user available by default.
westhab1 at 2007-7-6 22:15:21 > top of Java-index,Web & Directory Servers,Directory Servers...
# 7

Define a field in the form in the <Derivation> tag use below code

<invoke name='getView'>

<ref>:display.session</ref>

<s>User:userid</s>

<map>

<s>authorized</s>

<s>true</s>

</map>

</invoke>

This will give you user view. I think !!!!!

ravi_72us at 2007-7-6 22:15:21 > top of Java-index,Web & Directory Servers,Directory Servers...
# 8

Thank you so much. That worked. Here is what I did:

<Field name='myview'>

<Derivation>

<invoke name='getView'>

<ref>:display.session</ref>

<s>User:someuserid</s>

<map>

<s>authorized</s>

<s>true</s>

</map>

</invoke>

</Derivation>

</Field>

Then I could use myview to reference the users view in later fields.

westhab1 at 2007-7-6 22:15:21 > top of Java-index,Web & Directory Servers,Directory Servers...
# 9

I am trying to dynamically generate a view from the logged in user using this code snippet:

<Derivation>

<invoke name='getView'>

<ref>:display.session</ref>

<concat>

<s>User:</s>

<invoke name='getUser'>

<ref>:display.session</ref>

</invoke>

</concat>

<map>

<s>authorized</s>

<s>true</s>

</map>

</invoke>

</Derivation>

But am getting this exception repeatedly until it finally gives me a StackOverflowError:

com.waveset.util.WavesetException: Can't call method getView on class com.waveset.session.LocalSession ==> com.waveset.util.WavesetException: XPRESS exception ==>

com.waveset.util.WavesetException: Can't call method getView on class com.waveset.session.LocalSession ==> java.lang.StackOverflowError:

Any ideas?

Thanks,

Mike K

mklugACN at 2007-7-6 22:15:21 > top of Java-index,Web & Directory Servers,Directory Servers...
# 10

Try this:

Derivation>

<invoke name='getView'>

<ref>:display.session</ref>

<concat>

<s>User:</s>

<ref>accountId</ref>

</concat>

<map>

<s>authorized</s>

<s>true</s>

</map>

</invoke>

</Derivation>

westhab1 at 2007-7-6 22:15:21 > top of Java-index,Web & Directory Servers,Directory Servers...
# 11
The accountId reference is resolving to null since I have not populated this variable. The context of the form I am using is during a Manual Create User for an Administrator. So - from the admin gui pages, new actions - new user.Thanks,Mike K
mklugACN at 2007-7-6 22:15:21 > top of Java-index,Web & Directory Servers,Directory Servers...
# 12

Hi westhab1,

When you have the view, how do you use it to display a certain attribute of the user?

I've created a label with the following:

<Field name='waveset.email'>

<Display class='Label'>

<Property name='title' value='MyLabel'/>

</Display>

<Derivation>

<invoke name='getView'>

<ref>:display.session</ref>

<concat>

<s>User:</s>

<ref>accountId</ref>

</concat>

<map>

<s>authorized</s>

<s>true</s>

</map>

</invoke>

</Derivation>

</Field>

I wanted to display the email address but in the form generated, its showing the below:

MyLabel:com.waveset.object.GenericObject@10ce397

Any idea?

naxdorf at 2007-7-6 22:15:21 > top of Java-index,Web & Directory Servers,Directory Servers...