You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Lenny Primak (JIRA)" <ji...@apache.org> on 2011/09/08 03:44:09 UTC
[jira] [Created] (TAP5-1634) Grid, inPlace Update and expired
Sessions - Redirect to Login
Grid, inPlace Update and expired Sessions - Redirect to Login
-------------------------------------------------------------
Key: TAP5-1634
URL: https://issues.apache.org/jira/browse/TAP5-1634
Project: Tapestry 5
Issue Type: Improvement
Components: tapestry-core
Affects Versions: 5.3, 5.4
Reporter: Lenny Primak
Priority: Minor
I have a basic Grid pulling data from an Entity bean. inPlace = true.
Obviously, when session expires, I get the "there is no data to display" message.
What I really want to do is to redirect to the current page, so the user gets to relogin and session
gets re-established.
Here's what I tried:
@SuppressWarnings("unused")
@OnEvent(value="inplaceUpdate", component="usersGrid")
private Object ajaxPageChanged()
{
if(request.getSession(false) != null)
{
return null;
}
else
{
return ps.createPageRenderLink(LoginPage.class).;
}
}
I get an exception:
Caused by: java.lang.IllegalArgumentException: Event 'inplaceupdate' from test/TapPage:usersgrid.pager received an event handler method return value of /com.bettaway_baw-website_war_1.2/loginpage. This type of event does not support return values from event handler methods.
at org.apache.tapestry5.internal.util.NotificationEventCallback.handleResult(NotificationEventCallback.java:39)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1634) Grid, inPlace Update and expired
Sessions - Redirect to Login
Posted by "Lenny Primak (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13127022#comment-13127022 ]
Lenny Primak commented on TAP5-1634:
------------------------------------
Introduced a workaround for this.
Created an @AJAX(requireSession = true) annotation.
In case there is no session, the annotation processing logic redirects to the same page.
The code is in FlowLogix module at http://code.google.com/p/flowlogix/
> Grid, inPlace Update and expired Sessions - Redirect to Login
> -------------------------------------------------------------
>
> Key: TAP5-1634
> URL: https://issues.apache.org/jira/browse/TAP5-1634
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.3, 5.4
> Reporter: Lenny Primak
> Priority: Minor
>
> I have a basic Grid pulling data from an Entity bean. inPlace = true.
> Obviously, when session expires, I get the "there is no data to display" message.
> What I really want to do is to redirect to the current page, so the user gets to relogin and session
> gets re-established.
> Here's what I tried:
> @SuppressWarnings("unused")
> @OnEvent(value="inplaceUpdate", component="usersGrid")
> private Object ajaxPageChanged()
> {
> if(request.getSession(false) != null)
> {
> return null;
> }
> else
> {
> return ps.createPageRenderLink(LoginPage.class).;
> }
> }
> I get an exception:
> Caused by: java.lang.IllegalArgumentException: Event 'inplaceupdate' from test/TapPage:usersgrid.pager received an event handler method return value of /com.bettaway_baw-website_war_1.2/loginpage. This type of event does not support return values from event handler methods.
> at org.apache.tapestry5.internal.util.NotificationEventCallback.handleResult(NotificationEventCallback.java:39)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1634) Grid, inPlace Update and expired
Sessions - Redirect to Login
Posted by "Lenny Primak (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13127022#comment-13127022 ]
Lenny Primak commented on TAP5-1634:
------------------------------------
Introduced a workaround for this.
Created an @AJAX(requireSession = true) annotation.
In case there is no session, the annotation processing logic redirects to the same page.
The code is in FlowLogix module at http://code.google.com/p/flowlogix/
> Grid, inPlace Update and expired Sessions - Redirect to Login
> -------------------------------------------------------------
>
> Key: TAP5-1634
> URL: https://issues.apache.org/jira/browse/TAP5-1634
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.3, 5.4
> Reporter: Lenny Primak
> Priority: Minor
>
> I have a basic Grid pulling data from an Entity bean. inPlace = true.
> Obviously, when session expires, I get the "there is no data to display" message.
> What I really want to do is to redirect to the current page, so the user gets to relogin and session
> gets re-established.
> Here's what I tried:
> @SuppressWarnings("unused")
> @OnEvent(value="inplaceUpdate", component="usersGrid")
> private Object ajaxPageChanged()
> {
> if(request.getSession(false) != null)
> {
> return null;
> }
> else
> {
> return ps.createPageRenderLink(LoginPage.class).;
> }
> }
> I get an exception:
> Caused by: java.lang.IllegalArgumentException: Event 'inplaceupdate' from test/TapPage:usersgrid.pager received an event handler method return value of /com.bettaway_baw-website_war_1.2/loginpage. This type of event does not support return values from event handler methods.
> at org.apache.tapestry5.internal.util.NotificationEventCallback.handleResult(NotificationEventCallback.java:39)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1634) Grid, inPlace Update and expired
Sessions - Redirect to Login
Posted by "Lenny Primak (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13168531#comment-13168531 ]
Lenny Primak commented on TAP5-1634:
------------------------------------
This library fixes this issue:
http://code.google.com/p/flowlogix/wiki/TapestryLibrary
> Grid, inPlace Update and expired Sessions - Redirect to Login
> -------------------------------------------------------------
>
> Key: TAP5-1634
> URL: https://issues.apache.org/jira/browse/TAP5-1634
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.3, 5.4
> Reporter: Lenny Primak
> Priority: Minor
>
> I have a basic Grid pulling data from an Entity bean. inPlace = true.
> Obviously, when session expires, I get the "there is no data to display" message.
> What I really want to do is to redirect to the current page, so the user gets to relogin and session
> gets re-established.
> Here's what I tried:
> @SuppressWarnings("unused")
> @OnEvent(value="inplaceUpdate", component="usersGrid")
> private Object ajaxPageChanged()
> {
> if(request.getSession(false) != null)
> {
> return null;
> }
> else
> {
> return ps.createPageRenderLink(LoginPage.class).;
> }
> }
> I get an exception:
> Caused by: java.lang.IllegalArgumentException: Event 'inplaceupdate' from test/TapPage:usersgrid.pager received an event handler method return value of /com.bettaway_baw-website_war_1.2/loginpage. This type of event does not support return values from event handler methods.
> at org.apache.tapestry5.internal.util.NotificationEventCallback.handleResult(NotificationEventCallback.java:39)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1634) Grid, inPlace Update and expired
Sessions - Redirect to Login
Posted by "Lenny Primak (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13168531#comment-13168531 ]
Lenny Primak commented on TAP5-1634:
------------------------------------
This library fixes this issue:
http://code.google.com/p/flowlogix/wiki/TapestryLibrary
> Grid, inPlace Update and expired Sessions - Redirect to Login
> -------------------------------------------------------------
>
> Key: TAP5-1634
> URL: https://issues.apache.org/jira/browse/TAP5-1634
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.3, 5.4
> Reporter: Lenny Primak
> Priority: Minor
>
> I have a basic Grid pulling data from an Entity bean. inPlace = true.
> Obviously, when session expires, I get the "there is no data to display" message.
> What I really want to do is to redirect to the current page, so the user gets to relogin and session
> gets re-established.
> Here's what I tried:
> @SuppressWarnings("unused")
> @OnEvent(value="inplaceUpdate", component="usersGrid")
> private Object ajaxPageChanged()
> {
> if(request.getSession(false) != null)
> {
> return null;
> }
> else
> {
> return ps.createPageRenderLink(LoginPage.class).;
> }
> }
> I get an exception:
> Caused by: java.lang.IllegalArgumentException: Event 'inplaceupdate' from test/TapPage:usersgrid.pager received an event handler method return value of /com.bettaway_baw-website_war_1.2/loginpage. This type of event does not support return values from event handler methods.
> at org.apache.tapestry5.internal.util.NotificationEventCallback.handleResult(NotificationEventCallback.java:39)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira