• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

JSF 2.0 and AJAX Problem

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

facing a strange problem for some days when build up a very simple General-Detail-View. I reproduce the issue with a (even more simple) demo application.

[The Idea]
- select from a list box an item
- a detail view appears. which edit the underlaying data-object
- save the date

[The Problem]
- selecting an item from a listbox and show the detail-data with ajax-request work.
- the FIRST time after changing the item-list i edit a field from the detail-data and submit the form, the changes are not saved in the bean (and the action-method isn't invoked)
- the SECOND time (without changing the item, just edit the field again) works (model-update and action-method)
>> Problem doesn't occurs when i deactivate the ajax-change event on the listbox and make a full request

[The Code]
Simple Java Bean:


the handler



the page:


I am out of ideas, maybe someone else can test it and see my mistake .

Thanks a lot
Dom
 
Dominik Müller
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

i have no ideas, removed ajax functions from my application for resolving the problem, but that isn't a real good solution.

To test it, i uploaded a little war file, including the sources, i hope somebody can test it and maybe find the solution.

http://rapidshare.com/files/423794519/AjaxBug.war

Thanks a lot again.
Dom
 
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just a guess, but maybe something to test.

You are updating a value in different form there. Is it possible to combine those two forms and send both requests (ajax and full) from the same form?
 
Get meta with me! What pursues us is our own obsessions! But not this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic