• 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: What is the best way to handle invalid values from a WOTextField?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is the best way to handle invalid values from a WOTextField?


  • Subject: Re: What is the best way to handle invalid values from a WOTextField?
  • From: Chuck Hill <email@hidden>
  • Date: Tue, 15 Jul 2008 18:16:27 -0700


On Jul 15, 2008, at 6:03 PM, Lachlan Deck wrote:

On 16/07/2008, at 10:36 AM, Chuck Hill wrote:

On Jul 15, 2008, at 5:26 PM, Chuck Hill wrote:

On Jul 15, 2008, at 5:12 PM, Lachlan Deck wrote:

On 18/06/2008, at 3:32 AM, Chuck Hill wrote:

On Jun 17, 2008, at 10:04 AM, Ralf Schuchardt wrote:

Hi,

in the past (until WO 5.4) I often have used a WOTextField with a formatter to prevent errors like this:

"java.lang.IllegalArgumentException: While trying to invoke the set method "public void com.cx.harow.eos._ArztFolgedokLeistung $StorageClass.setAnzahl(java.lang.Short)" on an object of type com.cx.harow.arzt.dokumente.ArztFolgedokumentationContext $TempFolgedokLeistung we received an argument of type java.lang.String. This often happens if you forget to use a formatter."

When a value was invalid the formatter did not set an invalid value in my objects.

Now, in WO 5.4 this is no longer true. When the formatter fails to parse a string it still gets pushed into the target object. As this is documented is must somehow be considered "expected" behavior. Unfortunately this breaks all our apps, as no class handles those invalid strings.

Whoa! Where is this documented? I also depend on this.

I don't see this mentioned in the 5.4.2 release notes. Is there a bug report already? How is this meant to work now?

I just tested this now and got a class cast exception in the released version of 5.4.2 when I typed a string into a text field with a formatter on it:


java.lang.ClassCastException: java.lang.String
[2008-7-15 17:19:11 PDT] <WorkerThread13> java.lang.ClassCastException: java.lang.String
at net .foo .core .searchfields.DateSearchField.qualifyOnValue(DateSearchField.java: 64)


That is just an out and out bug. I don't see how it can be fixed other than by replacing WOTextField

Reported as 6078428.

AFAIK, this renders 5.4.2 worthless to me.

ugh.

My feeling exactly.


Well, unless someone patches it in Wonder. :-P I am not sure that I will bother yet.

In the words of some unnamed person: sounds very much like "I can't" :-P

LOL Throwing my own words back at me. I can and I will, but only if I don't flee back to 5.3.3



Also having major issues with posts and forms. I am not sure of the details, but it looks like takeValues and invokeAction both get called, but no values are taken and no action invoked.

Still working on this one.


I can't reproduce it in a stand alone app, so it is something in my app affecting this. It is something to do with enctype or method. Commenting either of those make it work (though the file upload is useless).

Form: WOForm {
    enctype = "multipart/form-data";
    method  = "post";
    multipleSubmit = true;
}


This one is a puzzler!


Chuck


--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
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


References: 
 >Re: What is the best way to handle invalid values from a WOTextField? (From: Lachlan Deck <email@hidden>)
 >Re: What is the best way to handle invalid values from a WOTextField? (From: Chuck Hill <email@hidden>)
 >Re: What is the best way to handle invalid values from a WOTextField? (From: Chuck Hill <email@hidden>)
 >Re: What is the best way to handle invalid values from a WOTextField? (From: Lachlan Deck <email@hidden>)

  • Prev by Date: Re: What is the best way to handle invalid values from a WOTextField?
  • Next by Date: Webobjects5.4.1 deploy on Linux
  • Previous by thread: Re: What is the best way to handle invalid values from a WOTextField?
  • Next by thread: Re: What is the best way to handle invalid values from a WOTextField?
  • Index(es):
    • Date
    • Thread