• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Bug in WOTextField?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in WOTextField?


  • Subject: Re: Bug in WOTextField?
  • From: Timo Hoepfner <email@hidden>
  • Date: Fri, 22 Feb 2008 13:28:29 +0100


Am 22.02.2008 um 10:34 schrieb Alexander Spohr:

It is a bug to deliver something in appendToResponse and not having it anymore in takeValuesFromRequest, or vice versa.
Never change a condition in takeValuesFromRequest. It leads to odd behavior of most WOClasses, as they can not know what you intended.

Ugh, yes of course you're right. I haven't run into this problem for such a long time now, that I actually forgot about it...


While the "WOTextFieldWithWorkaround" works around the problem when the field wasn't initially in the form, it doesn't help the other way around (entered text gets lost).

That also explains why that doesn't happen with a WOCollapsibleComponentContent, as there the state is changed in an action, not during takeValuesFromRequest.

Nevertheless I'm still wondering, why WOTextField happily sets the value to null on its binding, even though it's name doesn't appear in the formValueKeys...

For the record: PWO, page 190 reads

THE GOLDEN RULE
...
Don't modify anything that the component or dynamic elements depend on while in the sequence appendToResponse, takeValuesFromRequest, and invokeAction.


Timo


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Bug in WOTextField?
      • From: Mike Schrag <email@hidden>
References: 
 >Bug in WOTextField? (From: Timo Hoepfner <email@hidden>)
 >Re: Bug in WOTextField? (From: Alexander Spohr <email@hidden>)

  • Prev by Date: Re: java heap trouble after 5.4.1 upgrade, opensnoop to the rescue
  • Next by Date: Re: Rant: Why I hate Java Client
  • Previous by thread: Re: Bug in WOTextField?
  • Next by thread: Re: Bug in WOTextField?
  • Index(es):
    • Date
    • Thread