| Author |
connection b/w Two pages
|
Reshma Reddy
Ranch Hand
Joined: Dec 21, 2006
Posts: 197
|
|
Hi, I want to link between two jsp's in jsf how can i do this.In my page one CommandButton (New Booking Button)is there on clicking this button i need to redirect my control to Result.jsp page i am prety confusing with this connection Please help me to slove this problem. Regards, Vardhan
|
 |
Venkat Sadasivam
Ranch Hand
Joined: May 10, 2008
Posts: 139
|
|
You can find nice examples here. In simple you have create a navigation rule for your action and <redirect/> for the specific navigation case.
|
“Any fool can write code that a computer can understand. Good programmers write code that humans can understand. ”<br>
-Martin Fowler
|
 |
Reshma Reddy
Ranch Hand
Joined: Dec 21, 2006
Posts: 197
|
|
Hi Venkatachalam, thanks for your reply i done this by configaring in faces-config.xml and calling jsf page...but it is not working fine here i am pasting my code have a look and let me know.. what is the problem //this is my jsf page button <tr> <td><h:commandButton value="#{msg.button_lable1}" action="#{TemplateBooking.result}"/></td> </tr> //faces-config.xml <managed-bean> <managed-bean-name>TemplateBooking</managed-bean-name> <managed-bean-class>TemplateBookingBean</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </managed-bean> <navigation-rule> <from-view-id>/TemplateBooking.jsp</from-view-id> <navigation-case> <from-outcome>result</from-outcome> <to-view-id>/Result.jsp</to-view-id> </navigation-case> </navigation-rule> //java class public String result(){ return "result"; } Regards, vardhan
|
 |
 |
|
|
subject: connection b/w Two pages
|
|
|