• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Repitive calls to the Backing Beans on Submit

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I solved my triplicate request by setting ajaxSingle=true on the a4j:commandLink and on the rich:panelMenuItem
reply
    Bookmark Topic Watch Topic
  • New Topic