[jboss-user] [JBoss Seam] - Re: view vs action attribute (Explanation needed)

2007-02-07 Thread SmokingAPipe
Action can be a call to a method in a session bean.  If that method returns a 
string, that string is used as the view identifier.  If that method has no 
return (void) or it returns null, then the view specified by view= is used as 
the view.  If the action returns null AND there is no view=, then the same 
page is just redisplayed.

So, it is a bit confusing, but here's how I use it:

Most of my session beans are SFSBs, conversation scoped.  They have a 
@Begin(join=true) method.  I make this @Begin method return void, and when I 
want to navigate to one of them, I use that @Begin method as the action and 
then specify view=/foo.  That way I make sure there is an active conversation 
when the /foo page is first rendered, so I don't get LazyInitializationErrors.  
I'm not enough of a Seam pro to know if this is the absolutely right way to do 
this but it certainly does work.


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4012577#4012577

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4012577
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: view vs action attribute (Explanation needed)

2007-02-07 Thread petemuir
view takes a view-id to navigate to.  action takes an action method (el) or a 
string which specifies a logical (navigation) outcome (either JSF 
faces-config.xml or pages.xml).

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4012613#4012613

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4012613
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: view vs action attribute (Explanation needed)

2007-02-07 Thread baz
Thanks to all of you.
What is your opinion with my example code?
Should it even render /editUser.xhtml?

With your explanation, i think NO
But it does.
Ciao,
Carsten

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4012866#4012866

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4012866
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: view vs action attribute (Explanation needed)

2007-02-07 Thread SmokingAPipe
Of course it should render editUser.xhtml in your example.  That is the action 
you have specified.  In most cases the action is a snip of EL that gets called, 
and the string that results from that call is used as the next view.  In your 
case, you have used a static string instead of EL.  It's doing what we expect 
it would do.


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4012869#4012869

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4012869
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user