aspose file tools*
The moose likes JSF and the fly likes Repitive calls to the Backing Beans on Submit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Repitive calls to the Backing Beans on Submit" Watch "Repitive calls to the Backing Beans on Submit" New topic
Author

Repitive calls to the Backing Beans on Submit

Marius Snyman
Greenhorn

Joined: May 04, 2006
Posts: 14
I have faces page called myworklist.xhtml.

On this page I use a richfaces datatable to display available work objects.

When a user clicks on a hyperlink the specific work item is retrieved from the database.

I notice the following:
During the initial load the backing bean reads the database 3 times before the pages is rendered. The same data is therefore retrieved 3 times from the database.

When the user selects an item the database is again read 3 times before the work item is displayed.

On the workpage, a button allows the user to take ownership of the workitem. At this time a jbpm process is updated with the task being assigned to the user.

Because 3 trips are made during each call, the jbpm process is asked to assign the task to the user thrice. On call 2 the jbpm process will throw an error.

I have been unable to determine why my backing bean methods are called multiple times and wondered if any hand on the ranch can maybe shed some light on this.
Marius Snyman
Greenhorn

Joined: May 04, 2006
Posts: 14
I solved my triplicate request by setting ajaxSingle=true on the a4j:commandLink and on the rich:panelMenuItem
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Repitive calls to the Backing Beans on Submit
 
Similar Threads
Exeception Handeling problem in JBPM
initial page event
Best Practices for JSF-Spring-Hibernate
Datatable Question
how to initialize a backing bean before a page loads