RE: DropDownChoice throws IllegalArgumentException with Integer values

2008-05-12 Thread Michael Mehrle
7:13 PM To: users@wicket.apache.org Subject: Re: DropDownChoice throws IllegalArgumentException with Integer values On Fri, May 09, 2008 at 06:42:11PM -0700, Michael Mehrle wrote: Thanks for the input, John - but I the plot thickens here. It seems that there is actually a Wicket bug that needs

RE: DropDownChoice throws IllegalArgumentException with Integer values

2008-05-12 Thread Michael Mehrle
: DropDownChoice throws IllegalArgumentException with Integer values And thats why i think the wiki example is a bad one. It points people in the wrong way. On 5/10/08, John Krasnay [EMAIL PROTECTED] wrote: On Fri, May 09, 2008 at 06:42:11PM -0700, Michael Mehrle wrote: Thanks for the input, John

Re: DropDownChoice throws IllegalArgumentException with Integer values

2008-05-09 Thread John Krasnay
On Fri, May 09, 2008 at 08:25:05AM -0700, Michael Mehrle wrote: Anyone? Was hoping for some input here ;-) http://cwiki.apache.org/WICKET/another-dropdownchoice-example-by-adam.ht ml The only change I made to SelectOption is to set the 'value' field to an Integer (which I need for my

Re: DropDownChoice throws IllegalArgumentException with Integer values

2008-05-09 Thread John Krasnay
On Fri, May 09, 2008 at 11:53:30AM -0400, John Krasnay wrote: On Fri, May 09, 2008 at 08:25:05AM -0700, Michael Mehrle wrote: Anyone? Was hoping for some input here ;-) http://cwiki.apache.org/WICKET/another-dropdownchoice-example-by-adam.ht ml The only change I made to SelectOption

RE: DropDownChoice throws IllegalArgumentException with Integer values

2008-05-09 Thread Michael Mehrle
[mailto:[EMAIL PROTECTED] Sent: Friday, May 09, 2008 9:02 AM To: users@wicket.apache.org Subject: Re: DropDownChoice throws IllegalArgumentException with Integer values On Fri, May 09, 2008 at 11:53:30AM -0400, John Krasnay wrote: On Fri, May 09, 2008 at 08:25:05AM -0700, Michael Mehrle wrote

RE: DropDownChoice throws IllegalArgumentException with Integer values

2008-05-09 Thread Doug Donohoe
input here ;-) -Original Message- From: Michael Mehrle [mailto:[EMAIL PROTECTED] Sent: Thursday, May 08, 2008 6:35 PM To: users@wicket.apache.org Subject: RE: DropDownChoice throws IllegalArgumentException with Integer values Okay, I just stepped through this and getting

Re: DropDownChoice throws IllegalArgumentException with Integer values

2008-05-09 Thread John Krasnay
On Fri, May 09, 2008 at 09:15:50AM -0700, Michael Mehrle wrote: Great input and you're forgiven for jumping the gun with SelectOption ;-) I didn't even know there was a wicket SelectOption, which puts a new spin on things. Regarding the conversion back to the model: Yes, I was following the

RE: DropDownChoice throws IllegalArgumentException with Integer values

2008-05-09 Thread Doug Donohoe
Donohoe [mailto:[EMAIL PROTECTED] Sent: Friday, May 09, 2008 9:30 AM To: users@wicket.apache.org Subject: RE: DropDownChoice throws IllegalArgumentException with Integer values I posted on my wiki how I solved this problem. Hopefully it will help you: http://wiki.donohoedigital.com

RE: DropDownChoice throws IllegalArgumentException with Integer values

2008-05-09 Thread Michael Mehrle
Any ideas that work with 1.3.3? ;-) -Original Message- From: Doug Donohoe [mailto:[EMAIL PROTECTED] Sent: Friday, May 09, 2008 9:30 AM To: users@wicket.apache.org Subject: RE: DropDownChoice throws IllegalArgumentException with Integer values I posted on my wiki how I solved

RE: DropDownChoice throws IllegalArgumentException with Integer values

2008-05-09 Thread Michael Mehrle
Message- From: Doug Donohoe [mailto:[EMAIL PROTECTED] Sent: Friday, May 09, 2008 2:23 PM To: users@wicket.apache.org Subject: RE: DropDownChoice throws IllegalArgumentException with Integer values Yes, I'm on 1.4-m1. However, you can remove all the generic stuff and it will still work. I just

RE: DropDownChoice throws IllegalArgumentException with Integer values

2008-05-09 Thread Michael Mehrle
, May 09, 2008 2:23 PM To: users@wicket.apache.org Subject: RE: DropDownChoice throws IllegalArgumentException with Integer values Yes, I'm on 1.4-m1. However, you can remove all the generic stuff and it will still work. I just migrated to generics yesterday, so the code does work on 1.3.3. Or you

Re: DropDownChoice throws IllegalArgumentException with Integer values

2008-05-09 Thread John Krasnay
On Fri, May 09, 2008 at 03:39:07PM -0700, Michael Mehrle wrote: I like your solution, but you are using an IntegerSelectChoice as your model, which won't work for me. I need to set my model to a regular Integer since that's what's being persisted on the backend. Michael Quite right. I

RE: DropDownChoice throws IllegalArgumentException with Integer values

2008-05-09 Thread Doug Donohoe
You can get at the underlying Integer by calling getKey() on the IntegerSelectChoice object the model holds. If that doesn't work, you'll have to figure out an alternative on your own. The good news is that you have working code to start from. -Doug Michael Mehrle wrote: I like your

RE: DropDownChoice throws IllegalArgumentException with Integer values

2008-05-09 Thread Michael Mehrle
-Original Message- From: John Krasnay [mailto:[EMAIL PROTECTED] Sent: Friday, May 09, 2008 6:27 PM To: users@wicket.apache.org Subject: Re: DropDownChoice throws IllegalArgumentException with Integer values On Fri, May 09, 2008 at 03:39:07PM -0700, Michael Mehrle wrote: I like your

RE: DropDownChoice throws IllegalArgumentException with Integer values

2008-05-09 Thread Michael Mehrle
@wicket.apache.org Subject: RE: DropDownChoice throws IllegalArgumentException with Integer values You can get at the underlying Integer by calling getKey() on the IntegerSelectChoice object the model holds. If that doesn't work, you'll have to figure out an alternative on your own. The good news is that you

Re: DropDownChoice throws IllegalArgumentException with Integer values

2008-05-09 Thread John Krasnay
On Fri, May 09, 2008 at 06:42:11PM -0700, Michael Mehrle wrote: Thanks for the input, John - but I the plot thickens here. It seems that there is actually a Wicket bug that needs to get fixed. After a lot of tinkering I figured out why I was getting this error. The VERY FIRST TIME my renderer

Re: DropDownChoice throws IllegalArgumentException with Integer values

2008-05-09 Thread Johan Compagner
And thats why i think the wiki example is a bad one. It points people in the wrong way. On 5/10/08, John Krasnay [EMAIL PROTECTED] wrote: On Fri, May 09, 2008 at 06:42:11PM -0700, Michael Mehrle wrote: Thanks for the input, John - but I the plot thickens here. It seems that there is actually a

RE: DropDownChoice throws IllegalArgumentException with Integer values

2008-05-08 Thread Michael Mehrle
Okay, I just stepped through this and getting the feeling that 'somehow' the label is being passed on to the model. Now, if the label is '1' it works fine, but if it's '1 day', then I get that error. The question here is: why is the label being passed back to the model? Doesn't make any sense -