voyent
Messages posted by: deepakpn  XML
Profile for deepakpn -> Messages posted by deepakpn [10]
Author Message
I followed the example for sorting tables by columns at
http://icefaces-showcase.icesoft.org/showcase.jsf?grp=compatMenu&exp=dataTable

While the sorting works now, I don't see the arrows rendered.
It seems like the 'arrow' attribute is deprecated for commandSortHeader.
I manually added "iceCmdSrtHdrAsc" and "iceCmdSrtHdrDesc" containing background-image: url(...) pointing to the ascending and descending images, but even that wouldn't help.

Anything else I could try?

Thanks,
Deepak

for ice.push.browser cookie, it can easily be fixed by setting the Secure and HttpOnly flags in icepush/core/src/main/java/org/icepush/PushContext.java (around line 83). Could someone patch it up please?
I tried setting the session-config in web.xml to be:
<cookie-config>
<http-only>true</http-only>
<secure>true</secure>
</cookie-config>

This does not help in setting the desired httpOnly and secure flags for icefaces generated cookies such as
ice.push.browser
ice.connection.contextpath
ice.connection.lease
ice.pushids

Any method to set the flags on these cookies? If there is none, icefaces should probably provide a way to do this.
Any solution?
Although it is not clear why the page is reinitialized when one is no longer interested in it (i.e., when navigating away from it), I fixed the exception that occurred within the reinitialization. Apparently this happens in a newly created session (i.e., not in the one that just expired). Fixing this, I got the custom exception handler working. So in this case, the exception in reinitialization was masking the ViewExpiredException.
A follow-up question. I have a @ViewScoped bean marked with @WindowDisposed annotation. I have some code for clean up in a method marked with @PreDestroy annotation. For the most part, the clean up method is invoked (e.g., when I navigate away, close the browser), however when the
session expires, I see that the method is not invoked on the bean. Any fix or work-around for this?
I have the following in web.xml
<context-param>
<param-name>org.icefaces.sessionExpiredRedirectURI</param-name>
<param-value>'/auth/login.html'</param-value>
</context-param>

If I'm on a page which doesn't add itself for push notifications using PushRenderer.addCurrentView, and if the session expires then clicking on a different page takes me to the redirected login page, as expected.

If I'm on a page which uses PushRenderer.addCurrentView, then the redirect
doesn't work upon session expiry. I initially suspected that I might also have to configure the org.icefaces.strictSessionTimeout, so I added:
<context-param>
<param-name>org.icefaces.strictSessionTimeout</param-name>
<param-value>true</param-value>
</context-param>

But the redirect after session timeout still doesn't work.

When the session expires, and I try navigating to a different page, the page which I was on when the session expires seems to get reinitialized (i.e., I can see its @PostConstruct being invoked). This seems strange, given that I don't see why a page needs to be initialized when navigating away from it.
The reason I mention this is that this method throws an exception when the session expires, and I am not sure if it has anything to do with the session redirects not working.

I also tried a custom exception handler as described in http://www.nofluffjuststuff.com/blog/ed_burns/2009/09/dealing_gracefully_with_viewexpiredexception_in_jsf2

but I get similar results.

- Any ideas on why a page needs to be initialized when one is no longer interested in it (i.e., while navigating away from it)?

- Any tests/work-arounds to try for the redirects to work upon session expiry when on a page that uses PushRenderer.addCurrentView?
Thanks, this seems to work for us!
I tried the auction sample, but I get this error:

javax.servlet.ServletException: /auction.xhtml @65,54 <util:columnSorter> Tag Library supports namespace: http://java.sun.com/jsf/composite/components, but no tag was defined for name: columnSorter


Otherwise, we do use PushRenderer.addCurrentSession/addCurrentView and request rendering through the renderer got through PushRenderer.getPortableRenderer().

Is there a way to hook up Java code to execute when the "org.icepush.pushIdTimeout" expires? We need some way of knowing when a user is no longer interested in the page (e.g., clicked some other link, closed the tab, closed the browser etc.)

We have tried a custom heartbeat mechanism, but that is getting in the way of session expiry (i.e., the ping requests from JavaScript tend to extend the session and keep it from expiring). See http://stackoverflow.com/questions/19257548/jsf-heartbeat-disables-session-timeout
I tried the following in web.xml

<context-param>
<param-name>org.icepush.pushIdTimeout</param-name>
<param-value>3000</param-value>
</context-param>

and added the following to log4j properties:

log4j.logger.com.icesoft=FINE
log4j.logger.org.icepush=FINE
log4j.logger.org.icepush.LocalPushGroupManager=FINE
log4j.logger.org.apache=FINE
log4j.logger.com.sun.faces=FINE

However when I hit a JSF page which uses push features, nothing in the logs related to pushId appears. And also there's no observable change with regards to the supposedly configured 3s timeout (e.g., after closing the page, browser, etc.)

Am I configuring the pushIdTimeout correctly. Is there anything else I need to do to get it working? Any other test to try out?
 
Profile for deepakpn -> Messages posted by deepakpn [10]
Go to:   
Powered by JForum 2.1.7ice © JForum Team