[Building Sakai] Redirecting in RSF on page load

Brian Baillargeon bbailla2 at uwo.ca
Tue Jan 7 14:01:47 PST 2014


Hi all,

Currently in account-validator, whether you're added as a participant or 
using reset-pass, you see the same form. This can be problematic because 
it's not always desirable to allow users to use reset-pass to change 
their first or last name, or use the 'login' button which transfers 
their memberships and deletes their account.

I would like to split these up such that validation tokens created by 
add participants get a form to enter their name/password or transfer 
memberships while validation tokens created by reset-pass can do nothing 
more than reset their password.

I have successfully split the pages up into separate producers. They 
work great, and they each have their own viewIDs. But users will still 
have old emails containing links such as:
http://localhost:8080/accountvalidator/faces/validate?tokenId=...
When users click on this link, I would like them to be redirected to the 
relevant view, which depends on the validation token (ie. reset-pass -> 
PasswordResetProducer, add participants -> NewUserProducer). I'm 
struggling to find a way to accomplish this redirect.

I've noticed that redirecting in RSF is usually done by implementing 
ActionResultInterceptor - you would set the ARIResult's resultingView to 
some ViewParameters object in the interceptActionResult() method. But 
interceptActionResult isn't invoked on page load, so I'm struggling to 
find a way. Does anybody know a way to make the relevant Producer 
respond when they click on 
"http://localhost:8080/accountvalidator/faces/validate?tokenId=..." ?

Thanks,
Brian Baillargeon


More information about the sakai-dev mailing list