Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question for Micheal Yuan and Thomas Heute: PageLoad and IsPostBack

 
Chris Perrin
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys,

Two features that I loved from .NET that JSF does not seem to supply are an onPageLoad event handler which is called after all the setters, but before any action methods and before the response is rendered.

Does/will Seam offer that?

Also, .NET has an IsPostBack boolean which is set to true if the page is a post back. Could Seam provide that information?
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
onPageLoad is well supported in Seam. You can use the pages.xml file to invoke any backend method when any page is loaded.

I am not sure about isPostBack ...
 
J.J. Jackson
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shale provides an isPostBack() method that's very useful. However, Seam's @Factory or @Create methods already address a common use case for isPostBack(); that is, "Do I need to initialize the data for this bean or is a postback occurring?"

--
jj
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic