Manipulate the inactivity session time out in liferay [duplicate] - liferay

This question already has an answer here:
Sign Out link in the session inactivity pop up
(1 answer)
Closed 9 years ago.
I want to manipulate the inactivity session timeout in the warning pop up in liferay
but not sure how to do that. I'm new to liferay so seeking your help.
Thanks,
Sourav

I think you want to know where to update the time after which pop up appears in Liferay when being idle.
# Specify the number of minutes before a warning is sent to the user
# informing the user of the session expiration. Specify 0 to disable any
# warnings.
#
session.timeout.warning=1
You can override the above value in your portal-ext.properties and set to 0 if you don't want to get the warning pop up.
Not related to your question : The place where this check happens is in ..deploy/ROOT.war/html/common/themes -> session_timeout.jspf page in Liferay 6.0
You can set the session-timeout interval in ..deploy/ROOT.war/WEB-INF/web.xml file.
Below is where you need to change,
<session-config>
<session-timeout>30</session-timeout>
</session-config>
This indicates that after 30 minutes if User is inactive then your session will get destroyed.

Related

p:timeline changed event action delay [duplicate]

This question already has answers here:
primefaces keyup or other ajax event delay
(4 answers)
Closed 3 years ago.
I set up a PrimeFaces p:timeline, after each zoom in or zoom (event : changed) start method that read some database. i have a issue with this operation, users mostly zoom fiew levels in. So they click button for example several times in a row. For example they would like zoom from days to minutes, so they click button 4, 5 times in a row. After every click starts methods that read a database, and this is an issue for me. This causes system delays. Is it possible somehow to wait with event :changed until user stops zooming?
Problem solved, solution: add a ajax delay to rangechanged event:
<p:ajax event="rangechanged" delay="#{schedulerControler.delay}" listener="#{schedulerControler.update}" />
Bean:
private long delay = ((long) (100 * 10));

How to implement language toggle in jsf? [duplicate]

This question already has answers here:
Localization in JSF, how to remember selected locale per session instead of per request/view
(5 answers)
Closed 6 years ago.
I have set up internationalizing in my web page,however, language button toggles by it self after clicking different menu on the menubar. I want to display one language in whole web page unless user changes to a different language.I looked for post related to this but couldn't get one.
Any link, idea or book recommendation would be highly appreciated.
Thanks
tag is needed before the beginning of the and tag before closing tag in JSF and PrimeFaces.This is needed only in Facelets Template file and not needed in Facelets Template Client file.

Extending Liferay 6.1 session

I would like to extend Liferay 6.1 session, I thought about dialog showing up when session is about to expire or something like that. I know that Liferay has something similar, I can set f.e.
session.timeout.warning = 5
And when it would be 5 minutes to expire session there would be a message and a button to extend session for another 5 minutes.
Now, the question is : Is it possible to change the extending value (instead of 5 minutes I would like to extend it to 30 min) but still I want warning message to be shown 5 minutes before expiration ?
edit : Not sure it really matters, I'm using Liferay 6.1
UPDATE
In the end it turned out that Rushikesh was right all along. There is a bug in Liferay 6.1.1 which causes showing incorrect message about extending session by timeout.session.warning value instead of timeout.session. It was fixed in Liferay 6.1.3, see here
You can certainly extend Liferay session, and also show session expiry warning, but not by just using session.timeout.warning = 5 property.
Liferay's session timeout is 30 minutes by default, which is controlled through its web.xml file.
As described here, portal-ext.properties file has below settings for configuring session timeout warning. They are solely for the javascript that pops up the session timeout warning message on the top:
#
# Specify the number of minutes before a session expires. This value is
# always overridden by the value set in web.xml.
#
session.timeout=30
#
# Specify the number of minutes before a warning is sent to the user
# informing the user of the session expiration. Specify 0 to disable any
# warnings.
#
session.timeout.warning=5
When a user clicks on 'Extend' button on the warning message, Lifeary's session is extended by 'session-timout' value (e.g. 30 minutes in this case).
HTH!

IceFaces: inputRichText - session timeout while typing

I'm using the inputRichText component for composing HTML-formatted messages in a system I'm working on.
I've encountered a problem, however. It seems the session times out, even when the user is working in the editor.
I tried setting the session timeout parameter in web.xml to 1 minute and started typing in the editor. After 1 minute the "User session expired" dialog box appeared. Is there any way to make the rich text editor component keep the session alive? It's pretty annoying to work on something for a while only to loose it to a session time out, event though you haven't been inactive.
This is the code I use to display the component in the page:
<ice:inputRichText height="250" toolbar="MyToolbar" customConfigPath="/FCKconfig.js" id="messageBody" value="#{bean.messageBody}" language="sv" saveOnSubmit="true" />
Thanks!
Edit:
I solved it using a periodic JavaScript calling into a servlet implementing the stuff outlined in this IceFaces JIRA report
If there's a better way, please let me know :)
I solved it using a periodic JavaScript calling into a servlet implementing the stuff outlined in this IceFaces JIRA report.
It basically allows a servlet to "touch" the session and hence keep it alive.
If there's a better way, please let me know :)

Forcing a save as dialogue from any web browser from JSF application [duplicate]

This question already has answers here:
Forcing a save as dialogue from any web browser from JSF application [duplicate]
(3 answers)
Closed 9 years ago.
I have a modal that will be shown and then I have an export button which should bring up the save dialog, if I have use h:commandButton, the validation checks are bypassed , but works well. If I use a4j:commandButton, validations are done perfectly but I dont see the save file dialog.
Can somebody help me.
thanks
I don't do RichFaces, so I can't tell from top of head, but Google learns me that a4j:htmlCommandLink may help. If it does and you'd rather like to have a button, then just throw some CSS in to make the link look like a button.

Resources