Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Niraj .
Accessing screen name in IFrame URL Field
13. Dezember 2010 19:34
Antwort

Niraj .

Rang: New Member

Nachrichten: 2

Eintrittsdatum: 1. August 2010

Neue Beiträge

Hi

I wish to access the value of the screen name of the currently logged in user in the URL Field of an iFrame. How can I achieve this? Please help.

More context of my problem: I am trying to use Oracle Application Express (APEX) Pages in an iFrame. The APEX URL allows passing parameters to the application in its own format:

http://<hostname>/apex/f?p=<application_id>:<page no>:::::<parameter name>:<parameter value>

I want to use the screen name in the parameter value field.
Sampsa Sohlman
RE: Accessing screen name in IFrame URL Field
13. Dezember 2010 22:03
Antwort

Sampsa Sohlman

LIFERAY STAFF

Rang: Regular Member

Nachrichten: 183

Eintrittsdatum: 27. September 2007

Neue Beiträge

Hi

You are propably talking about using portal page type "Embedded". Anyway I think you could solve your problem by using Web Content.

Quickly I could imagine following steps:

  • Create web content strucuture which as field iframeurl and has somekind of substitute for screen name.
  • Then create web content template which replaces that substitute to screen name in iframeurl and prints out iframe html fragment.
  • Create web content and bind that web content to your portal page


and that's it.

- Sampsa
Niraj .
RE: Accessing screen name in IFrame URL Field
3. Mai 2011 02:47
Antwort

Niraj .

Rang: New Member

Nachrichten: 2

Eintrittsdatum: 1. August 2010

Neue Beiträge

Hi Sampsa

I have created a structure screenname defined as:

<root>
<dynamic-element name='screenname' type='text' index-type='text' repeatable='false'></dynamic-element>
</root>


And I am using a velocity script to assign to the structure the screen name value:
----------------------------------------------------------------------
#set ($userLocalService = $serviceLocator.findService("com.liferay.portal.service.UserLocalService"))
#set ($user_id = $request.getAttribute("USER_ID"))
#set ($user = $userLocalService.getUserById($user_id))

#set($screenname = $user.getScreenName())

$screenname
----------------------------------------------------------------------

The output I am getting for this is:

----------------------------------------------------------------------
{name=screenname, data=, type=text, options=[]}
----------------------------------------------------------------------
I have also set the following variable in portal-ext-properties:

journal.template.velocity.restricted.variables=

I am still not getting the screen name through. Where is my mistake?

Thanks for the help.
Mark Oliver Delos Reyes
RE: Accessing screen name in IFrame URL Field
16. Februar 2012 21:06
Antwort

Mark Oliver Delos Reyes

Rang: New Member

Nachrichten: 1

Eintrittsdatum: 13. Februar 2012

Neue Beiträge

Is there any help around this area? I'm stuck with the same problem