掲示板

Accessing screen name in IFrame URL Field

13年前 に Niraj . によって更新されました。

Accessing screen name in IFrame URL Field

New Member 投稿: 2 参加年月日: 10/08/02 最新の投稿
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.
thumbnail
13年前 に Sampsa Sohlman によって更新されました。

RE: Accessing screen name in IFrame URL Field

Regular Member 投稿: 230 参加年月日: 07/09/27 最新の投稿
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
12年前 に Niraj . によって更新されました。

RE: Accessing screen name in IFrame URL Field

New Member 投稿: 2 参加年月日: 10/08/02 最新の投稿
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.
12年前 に Mark Oliver Delos Reyes によって更新されました。

RE: Accessing screen name in IFrame URL Field

New Member 投稿: 1 参加年月日: 12/02/14 最新の投稿
Is there any help around this area? I'm stuck with the same problem