This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

@PostCostruct problems.  RSS feed

christian leclerc
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello guy's. I've got a problem here that I think is something like a catch 22 ...

Well here my case.

I have an object lets call an ApplicationContext that take something in the get and initialize with the query.

After a post on a form , i need to refresh manually the view to view the change.
Is like the object is re-init before the job's is done on the database or something.

I search over the internet for that ( and yes on this forum too ) but im unable to find a solution for my problems.

What I need is the simple scenario that the object is init on every request.
If I put the init method on the <f:event type="preRenderView" listener="#{applicationsController.init()}" />;
The job's is done well but all my other

@ManagedProperty(value = "#{currentApplicationContext}")
private CurrentApplicationContext currentApplicationContext;

Well if someone have any clue on that kind of behaviours please give me some advices im kind of new in JSF and im more a backend developers.


Tim Holloway
Posts: 18531
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want something that gets re-initialized on every request, you should consider a Request-scope backing bean.

Reading between the lines, however, I suspect that you are doing "programming" on the JSF View definition (xhtml); passing parameters and "calling methods". That's a big :thumbdown:

Leave the logic for the backing bean and the JSF framework. Use the View definition as a template, not as a place to hold code.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!