Vue combinée Vue Plate Arborescence
Sujets [ Précédent | Suivant ]
toggle
ingvar sjöö
User data in portlet
27 janvier 2014 03:19
Réponse

ingvar sjöö

Rang: New Member

Publications: 1

Date d'inscription: 17 février 2011

Publications Récentes

Hi!

I am integrating a zk spreadsheet app in Liferay and want to set the data source (src=) in the portlet depending on the users group or organization belongings in Liferay. How can I accomplish this?

I am a beginner in this fiels so please exampels and snippets.

Regards

Ingvar
Pankaj Kathiriya
RE: User data in portlet
27 janvier 2014 04:10
Réponse

Pankaj Kathiriya

Rang: Liferay Master

Publications: 548

Date d'inscription: 4 août 2010

Publications Récentes

You can fetch zkSession object from Executions.getCurrent().getSession(), and from it get themeDisplay object by zkSession.getAttribute("THEME_DISPLAY").

For Example: Executions.getCurrent().getSession().getAttribute("THEME_DISPLAY")

You could get userId/user object from themeDisplay and can get to know which Organizations/User groups user belongs .

Hope this would help.


Regards,
Pankaj
Vernon Singleton
RE: User data in portlet
27 janvier 2014 05:40
Réponse

Vernon Singleton

LIFERAY STAFF

Rang: Regular Member

Publications: 168

Date d'inscription: 14 janvier 2013

Publications Récentes

ingvar sjöö:
I am integrating a zk spreadsheet app in Liferay and want to set the data source (src=) in the portlet depending on the users group or organization belongings in Liferay. How can I accomplish this?


Hi ingvar,

You posted in the Liferay Faces forum.
Are you using JSF for your application?
If you are, you can just use the Liferay Faces portal jar and then use:

1LiferayFacesContext.getInstance().getThemeDisplay()

in your backing bean. Or you can simply use expressions such as:

1<c:if test="#{liferay.themeDisplay.signedIn}">

in your views.

There are quite a few of the kinds of things you are looking for that you can get off of the ThemeDisplay:

  1isAddSessionIdToURL
  2isAjax
  3isFacebook
  4isFreeformLayout
  5isI18n
  6isImpersonated
  7isIncludedJs
  8isIncludePortletCssJs
  9isIsolated
 10isLifecycleAction
 11isLifecycleEvent
 12isLifecycleRender
 13isLifecycleResource
 14isSecure
 15isShowAddContentIcon
 16isShowAddContentIconPermission
 17isShowControlPanelIcon
 18isShowHomeIcon
 19isShowLayoutTemplatesIcon
 20isShowManageSiteMembershipsIcon
 21isShowMyAccountIcon
 22isShowPageCustomizationIcon
 23isShowPageSettingsIcon
 24isShowPortalIcon
 25isShowSignInIcon
 26isShowSignOutIcon
 27isShowSiteAdministrationIcon
 28isShowSiteContentIcon
 29isShowSiteMapSettingsIcon
 30isShowSiteSettingsIcon
 31isShowStagingIcon
 32isSignedIn
 33isStateExclusive
 34isStateMaximized
 35isStatePopUp
 36isThemeCssFastLoad
 37isThemeImagesFastLoad
 38isThemeJsBarebone
 39isThemeJsFastLoad
 40isTilesSelectable
 41isWapTheme
 42isWidget
 43Account
 44CDNBaseURL
 45CDNDynamicResourcesHost
 46CDNHost
 47ColorScheme
 48ColorSchemeId
 49Company
 50CompanyGroupId
 51CompanyId
 52CompanyLogo
 53CompanyLogoHeight
 54CompanyLogoWidth
 55Contact
 56ControlPanelCategory
 57DefaultUser
 58DefaultUserId
 59Device
 60DoAsGroupId
 61DoAsUserId
 62DoAsUserLanguageId
 63FacebookCanvasPageURL
 64I18nLanguageId
 65I18nPath
 66LanguageId
 67Layout
 68Layouts
 69LayoutSet
 70LayoutSetLogo
 71LayoutTypePortlet
 72Lifecycle
 73Locale
 74MDRRuleGroupInstance
 75ParentGroup
 76ParentGroupId
 77ParentGroupName
 78PathApplet
 79PathCms
 80PathColorSchemeImages
 81PathContext
 82PathFlash
 83PathFriendlyURLPrivateGroup
 84PathFriendlyURLPrivateUser
 85PathFriendlyURLPublic
 86PathImage
 87PathJavaScript
 88PathMain
 89PathSound
 90PathThemeCss
 91PathThemeImage
 92PathThemeImages
 93PathThemeJavaScript
 94PathThemeRoot
 95PathThemeTemplates
 96PermissionChecker
 97Plid
 98PortalURL
 99PortletDisplay
100PortletGroupId
101Ppid
102RealCompanyLogo
103RealCompanyLogoHeight
104RealCompanyLogoWidth
105RealUser
106RealUserId
107RefererGroupId
108RefererPlid
109Request
110ScopeGroup
111ScopeGroupId
112ScopeGroupIdOrLiveGroupId
113ScopeGroupName
114ScopeLayout
115ServerName
116ServerPort
117SessionId
118SiteDefaultLocale
119SiteGroup
120SiteGroupId
121SiteGroupIdOrLiveGroupId
122SiteGroupName
123Theme
124ThemeId
125ThemeSetting
126ThemeSettings
127TilesContent
128TilesTitle
129TimeZone
130UnfilteredLayouts
131URLAddContent
132URLControlPanel
133URLCurrent
134URLHome
135URLLayoutTemplates
136URLManageSiteMemberships
137URLMyAccount
138URLPageSettings
139URLPortal
140URLPublishToLive
141URLSignIn
142URLSignOut
143URLSiteAdministration
144URLSiteContent
145URLSiteMapSettings
146URLSiteSettings
147URLUpdateManager
148User
149UserId