• 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

Wicket: form issue - modelObject does not get updated

 
Ranch Hand
Posts: 114
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a page with 2 textfields (with validation as mandatory textfields). Both the text fields have their own save button for some reason.
Steps to reproduce my error :
1. Delete all the pre-populated data of textfield #1. Click Save #1.
[ Validation fails. Error message is received. As expected.]
2. Use Cancel button and reder to the previous page.
3. Use Edit button and again render to the original page with 2 textfields.
4. Delete the data from textfield #2.
5. Hit save #2.
6. Save is successful whereas expected is like before validation should fail.

I tried debugging. It seems that the modelobject contains the same old data before my textfield #2 data deletion.

Why ?



After trying to save textfield #2 : page.getModelObject still contains old value of textfield #2 and not the new

Whereas after trying to save textfield # 1 :
FEConfigEntry entry contains new model.

Why?
 
Well THAT's new! Comfort me, reliable tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic