I am looking for a way to have an AjaxLink or a regular link do the
following:

 

User clicks on link

1.       If not logged in then show login page and allow user to login
and then continue with #2

2.       Perform some business logic

3.       Show a message [if ajaxlink] or send to a page [if regular
link]

 

 

I have #2 and #3 working without trying to do #1.  I can't seem to
figure out #1.   I tried the following in the onClick of my AjaxLink.
However after a successful login I am brought back to the page with the
AjaxLink and #2 and #3 are never executed unless I click on the link
again [since the user would already be authenticated on the second
click].

 

                // #1

if (not authenticated) {

                                throw new
RestartResponseAtInterceptPageException(Login.class);

                }

 

                // #2 

                // Do business logic

 

                // #3

                // show message

 

 

Login.java:

                

                // after successful login

if (!this.continueToOriginalDestination()) {

                                this.setResponsePage(HomePage.class);


                }

 

 

 

 

 

 

_______________________________________ 

Jeffrey A. Schneller

 

Envisa

End-to-End E-Commerce for the Multi-Channel Merchant

 

281 Pleasant Street

Framingham, MA  01701

P: (508) 405-1220 x115

C: (508) 954-8044

F: (508) 405-1219

 

Reply via email to