The fact that there needs to be two separate ways of defining the start page, and are both
mutually exclusive is a bit of a pain. It forces you to choose a method that you will be
using to start pageflows (either in the link, or in the @begin annotation) unless you want
to start maintaining two separate versions of the pageflow, one with start-state and the
other with start-page.
Personally, I never use @Begin annotations, I always start conversations in pages.xml
(mostly based on Pete Muirs comments from a year ago). Which is odd because it seems like
99% of Seam users go for the @Begin annotation. I find using pages.xml for conversation
management lets you create more RESTful style URLs, and lets you decouple your app a bit
more. I also never use things like <s:link
action="WidgetBean.editWidget(v_widget)"/> on the basis that it also clutters
up the url.
If you need to call methods to edit the widget, there's no way to create a URL the
user can enter to edit or view the widget, except maybe writing a wrapper page that they
can enter the URL for, which calls editWidget and redirects, but then, how do they get the
URL since it never appears to them in the address bar for them to copy/bookmark.
Also, you don't have to use the datamodel and data model selection business since you
grab the id once for the URL, and don't need it again letting you introduce a little
more statelessness into the app.
I've been meaning to ask for a while why everyone was using @Begin annotations in case
there's some mystical magical reason that I wasn't aware of. I know it's nice
calling bean methods and passing objects around instead of string IDs, but it just feels
wrong to me.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077435#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...