Have a <sj:tabbedppanel>
on a page.
After session timeout trying to click on another tab of tabbed panel should redirect the user to login poage.
<sj:tabbed>
panel not firing the onErrorTopics
. Please see below and guide me on how to fix this issue. I am seeing in fire bug that the 403 error is thrown but I am unable to catch it in jsp. Need help with the same.
struts.xml
<action name="secondPanel" class="com.xxx.secondPanelAction">
<interceptor-ref name="sampleDefaultStack" />
<result>/jsp/secondPanel.jsp</result>
<result name="login" type="httpheader">
<param name="error">403</param>
<param name="errorMessage">User session expired </param>
</result>
</action>
jsp
<sj:tabbedpanel id="remotetabs" selectedTab="0" show="true" hide="'fade'" collapsible="true" sortable="true" onErrorTopics="loadError">
<sj:tab id="tab2" href="%{createUrl}" key="label.create" onErrorTopics="loadError"/>
<sj:tab id="tab1" href="%{updateUrl}" key="label.update" onErrorTopics="loadError"/>
</sj:tabbedpanel>
<script type="text/javascript" >
$(document).ready(function() {
$.subscribe('loadError', function(event, data) { alert('in error');
var status = event.originalEvent.status;
if(status == 403 ) {
window.location.href = "/Sample/login.action";
}
});
</script>