掲示板

Suggestion to implement servlet event Hooks

thumbnail
7年前 に Nithin KV によって更新されました。

Suggestion to implement servlet event Hooks

Junior Member 投稿: 56 参加年月日: 12/07/23 最新の投稿
Hi,
Which Event is better to customize using Hooks ? Can anybody explain me the advantages and disadvantages of hooking these servlet service events ?
ServicePostAction or ServicePreAction
I need to get themeDisplay object during login.
thumbnail
7年前 に David H Nebinger によって更新されました。

RE: Suggestion to implement servlet event Hooks

Liferay Legend 投稿: 14918 参加年月日: 06/09/02 最新の投稿
The only difference between the two is when they are called, either before the service or after.

The ThemeDisplay object is available in the request, you shouldn't have to go after those in service pre or post action.
thumbnail
7年前 に Nithin KV によって更新されました。

RE: Suggestion to implement servlet event Hooks

Junior Member 投稿: 56 参加年月日: 12/07/23 最新の投稿
Thanks for the suggestion but i do not get themedisplay object from request or from any attribute in my postlogin hook.
thumbnail
7年前 に Olaf Kock によって更新されました。

RE: Suggestion to implement servlet event Hooks

Liferay Legend 投稿: 6403 参加年月日: 08/09/23 最新の投稿
When you need to do stuff during Login, note that there's a PreLogin and PostLogin Action as well. It makes sense to take the most specific one for this purpose. Also, I doubt that you need themeDisplay - you probably need at least one of the values that it provides access to. May I ask which one that is?
thumbnail
7年前 に Nithin KV によって更新されました。

RE: Suggestion to implement servlet event Hooks

Junior Member 投稿: 56 参加年月日: 12/07/23 最新の投稿
Hi , yes i want to get themename and theme settings from theme display object of the theme applied to login page at the time of login !
thumbnail
7年前 に Nithin KV によって更新されました。

RE: Suggestion to implement servlet event Hooks

Junior Member 投稿: 56 参加年月日: 12/07/23 最新の投稿
Pls Suggest !
thumbnail
7年前 に Olaf Kock によって更新されました。

RE: Suggestion to implement servlet event Hooks

Liferay Legend 投稿: 6403 参加年月日: 08/09/23 最新の投稿
If I'm translating the business requirement "applied to login page at the time of login" to technical language, I don't really understand how to do this:

"during log in" technically means either just before or just after validating the name/password of the user. Just showing the login page has nothing to do with the log in process, you'll have all the information for the login page while displaying that page. It's a page like any other page.

You might need to implement a customization for the login portlet, but that depends on what you actually want to do. We don't know anything other than that you want to access some data to do something. Maybe you should let us know of these actual requirements instead of your proposed solution.
thumbnail
7年前 に David H Nebinger によって更新されました。

RE: Suggestion to implement servlet event Hooks

Liferay Legend 投稿: 14918 参加年月日: 06/09/02 最新の投稿
Nithin KV:
Hi , yes i want to get themename and theme settings from theme display object of the theme applied to login page at the time of login !


I'm trying to understand what the theme name and theme settings have to do with completing a login. Login success is binary - either you are logged in or you are not. The theme info doesn't really play a part in that decision.
thumbnail
7年前 に Nithin KV によって更新されました。

RE: Suggestion to implement servlet event Hooks

Junior Member 投稿: 56 参加年月日: 12/07/23 最新の投稿
Hi,
I have a requirement to load custom theme settings of login page from theme display object during login so that I can use these settings to perform some action in the different theme after login. I have different login pages for different sites. Hope you got it.
thumbnail
7年前 に David H Nebinger によって更新されました。

RE: Suggestion to implement servlet event Hooks

Liferay Legend 投稿: 14918 参加年月日: 06/09/02 最新の投稿
but your different site will have a different theme assigned, so again the login doesn't really play any role?

If I understand correctly, it sounds like you want the login to actually affect change to the theme that is applied to a page - that's not really going to be possible and honestly those changes will not flow forward as the user navigates around in the site.

The theme styles a page, but the user does not style the theme.
thumbnail
7年前 に Nithin KV によって更新されました。

RE: Suggestion to implement servlet event Hooks

Junior Member 投稿: 56 参加年月日: 12/07/23 最新の投稿
Hi , I agree what you said but here the requirement is different. currently I am using one theme for login page of all sites with different look and feel and one theme after login with different color schemes for each site ! So like I said earlier I have a login page in each site with the same theme and settings.. I want to load these settings at the time of login so that when I go to the actual theme after login I can use these settings to perform some actions ! Here when I say settings , it means like to hide or show few portlets , to hide or show footer for each site, to change site title etc. !