Tribune

Home » Liferay Portal » English » 3. Development

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Chris Chan
WSRP UserContext Custom Attributes
1 febbraio 2011 12.10
Risposta

Chris Chan

Punteggio: Junior Member

Messaggi: 39

Data di Iscrizione: 23 luglio 2010

Messaggi recenti

Hi,

I'm using the 6.0EE SP1 WSRP portlet and had some questions around how the userContext object is created and used.

In our portal, we have added a custom User attribute that we would like added to the userContext object. According to the WSRP 2.0 Spec, the userContext object contains a userProfile object and an array of extensions.

The userProfile object also seems to contain an extensions array.

Does anyone know how to set the extensions for either the userContext or userProfile objects with custom attributes in Liferay?

Thanks in advance,
Chris
Chris Chan
RE: WSRP UserContext Custom Attributes
8 febbraio 2011 8.33
Risposta

Chris Chan

Punteggio: Junior Member

Messaggi: 39

Data di Iscrizione: 23 luglio 2010

Messaggi recenti

Can anyone help with this?
There must be a way to be able to add extensions into the userContext object but I just haven't seen any docs around.
Jonas Yuan
RE: WSRP UserContext Custom Attributes
8 febbraio 2011 12.07
Risposta

Jonas Yuan

Punteggio: Liferay Master

Messaggi: 993

Data di Iscrizione: 26 aprile 2007

Messaggi recenti

Hi Chris,

Would you be able to share your requirements here? Thus we can discuss in details.

Thanks

Jonas Yuan
==================
The Author of Liferay Books:
Liferay User Interface Development
Liferay Portal 6 Enterprise Intranets
Liferay Portal 5.2 Systems Development
Liferay Portal Enterprise Intranets
Chris Chan
RE: WSRP UserContext Custom Attributes
8 febbraio 2011 12.08
Risposta

Chris Chan

Punteggio: Junior Member

Messaggi: 39

Data di Iscrizione: 23 luglio 2010

Messaggi recenti

Hi Jonas,

Within our implementation, we require the passing of many user attributes via the WSRP's userContext object.

From what I've seen in the WSRP 2.0 specification, this can be done using an array of extensions in the user profile within the userContext (http://docs.oasis-open.org/wsrp/v2/wsrp-2.0-spec-os-01.html#_UserProfile).

However, it's not quite clear to us how we populate this array of extensions within Liferay, whether it be within our portlets, or within the WSRP portlet.

Is there any documentation or samples that could help us with the population of this array?

Thanks,
Chris