[jboss-user] [JBoss Seam] - Re: Triggering page action if the URL comes with parameters
hstang
do-not-reply at jboss.com
Mon Jul 2 22:57:48 EDT 2007
Use a page actions. Here I quickly wrote this thing very quickly, so hopefuly you get the idea:
So someone lets say you the email contains the following url:
http://a.b.com/app/activate.seam?emailId=2&code=RABOOF
|
|
| <page view="/activate.xhtml">
| <action execute="#{myComponent.activate}"/>
| <navigation>
| <rule if="#{myComponent.successful}>
| <redirect view="/successfulActivation.xhtml">
| <message>Successful</message>
| </redirect>
| </rule>
| </navigation>
| </page>
|
| @Name("myComponent")
| public class MyComponent {
| @RequestParameter String emailId;
| @RequestParameter String code
|
| boolean successful = false;
| public void activate() {
| if (activateIsSuccessful) {
| successful = true;
| }
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059781#4059781
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059781
More information about the jboss-user
mailing list