フォーラム

ホーム » Liferay Portal » English » 6. Portal Framework

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
Niraj .
Accessing screen name in IFrame URL Field
2010/12/13 19:34
答え

Niraj .

ランク: New Member

投稿: 2

参加年月日: 2010/08/01

最近の投稿

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
2010/12/13 22:03
答え

Sampsa Sohlman

LIFERAY STAFF

ランク: Regular Member

投稿: 218

参加年月日: 2007/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
Niraj .
RE: Accessing screen name in IFrame URL Field
2011/05/03 2:47
答え

Niraj .

ランク: New Member

投稿: 2

参加年月日: 2010/08/01

最近の投稿

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
2012/02/16 21:06
答え

Mark Oliver Delos Reyes

ランク: New Member

投稿: 1

参加年月日: 2012/02/13

最近の投稿

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