I'm no expert on Seam-Gen generated edit pages, but I think it goes like this : 

The edit pages edits a Widget called "widget", it doesn't matter if it is a new 
one, or an existing one.

You create a factory method for "widget" which in the same bean, injects the 
parameter widgetId. The factory method says "If I have an ID, load the widget, 
otherwise create a new one". Either way, it outjects a Widget called "widget", 
new or loaded.  

So, you load the edit page, which requests a bean called "widget" so seam calls 
the factory method on the bean, injecting the parameters beforehand. Your 
factory method checks the parameter, loads or creates a new widget, and returns 
it to Seam, which passes it to the page for editing.







View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4081536#4081536

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4081536
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to