[jboss-user] [JBoss Seam] - Unable to call a method on my statefull session bean
bytor99999
do-not-reply at jboss.com
Fri Oct 27 19:25:29 EDT 2006
Again, I must be overlooking something simple.
So I have a page that has a header/footer. menu on the left and content in the center right.
So the menu on the left is working with a stateless session bean, They click a link on the left and a form appears in the center, with two buttons a Begin and a Cancel button. The actions of these buttoms should call my statefull session bean, but it isn't.
Here is the start of my statefull session bean
| @Stateful
| @Local
| @Name("tripmanager")
| public class TripManagerImpl implements TripManager {
|
|
Here is the jsf tags in my xhtml page
| <tr>
| <td>
| <h:commandButton action="#{tripmanager.startRoadTrip}"
| value="Begin" />
| </td>
| <td>
| <h:commandButton action="#{tripmanager.cancel}"
| value="Cancel" />
| </td>
| </tr>
|
Here is the method that is linked to the Begin button
| @In (value="start", required=true, scope=ScopeType.SESSION)
| @Out (value="roadTrip", scope=ScopeType.SESSION)
| public String startRoadTrip(Location start) {
| System.out.println("Starting the startRoadTrip Method");
| TripLookup lookup = new TripLookup(start, null);
| try {
| RoadTrip roadTrip = lookup.getTripInformation();
| RoadTripDAO dao = new RoadTripDAO();
| dao.saveRoadTrip(roadTrip);
| } catch (RoadTripException e) {
| e.printStackTrace();
| return "failed";
| }
| System.out.println("***********************");
| System.out.println("Returning Entry from startRoadTrip");
| return "entry";
| }
|
And here is my navigation rule defined in the faces-config.xml
| <navigation-rule>
| <from-view-id>/*</from-view-id>
| <navigation-case>
| <from-outcome>entry</from-outcome>
| <to-view-id>/fullentry.xhtml</to-view-id>
| </navigation-case>
| <navigation-case>
| <from-outcome>cancel</from-outcome>
| <to-view-id>/index.xhtml</to-view-id>
| </navigation-case>
| <navigation-case>
| <from-outcome>start</from-outcome>
| <to-view-id>/roadtripentry.xhtml</to-view-id>
| </navigation-case>
| <navigation-case>
| <from-outcome>list</from-outcome>
| <to-view-id>/roadtripentry.xhtml</to-view-id>
| </navigation-case>
| <navigation-case>
| <from-outcome>cancel</from-outcome>
| <to-view-id>/index.xhtml</to-view-id>
| </navigation-case>
| <navigation-case>
| <from-outcome>failed</from-outcome>
| <to-view-id>/failed.xhtml</to-view-id>
| </navigation-case>
| </navigation-rule>
|
Any ideas where I might try to look. I have tried a lot of different things but have not had success.
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981467#3981467
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981467
More information about the jboss-user
mailing list