Problem with selecting default value with DropDownChoice

2007-11-05 Thread James Perry
I have a problem with the DropDownChoice. More specifically, I have a Product class which is like: public class Product implements Serializable { private static final long serialVersionUID = 1L; private Manufacturer manufacturer; //other states //getters and setters } I have

Re: Problem with selecting default value with DropDownChoice

2007-11-05 Thread Dmitry Kandalov
On Monday 05 November 2007 16:39:02 James Perry wrote: I have a problem with the DropDownChoice. More specifically, I have a Product class which is like: public class Product implements Serializable { private static final long serialVersionUID = 1L; private Manufacturer

Re: Problem with selecting default value with DropDownChoice

2007-11-05 Thread Frank Bille
Provide a ChoiceRenderer to the DropDownChoice constructor. It's in the ID part of it. Frank On 11/5/07, James Perry [EMAIL PROTECTED] wrote: I have a problem with the DropDownChoice. More specifically, I have a Product class which is like: public class Product implements Serializable {

Re: Problem with selecting default value with DropDownChoice

2007-11-05 Thread Gwyn Evans
Hi James, While the implementation's not a big deal, and you'll probably want one, Choose One is the default for when the selected (or pre-selected) item's not found in the DDC list of values, so I don't think it's directly that. I'd be tempted to double-check (either via logging or via a

Re: Problem with selecting default value with DropDownChoice

2007-11-05 Thread Dmitry Kandalov
On Monday 05 November 2007 18:55:07 James Perry wrote: Also what about wrapping the List in a PropertyModel; would that help? On 11/5/07, James Perry [EMAIL PROTECTED] wrote: Hello Dima, That was my initial assumption but I already have overrided my equals()/hashCode() methods for

Re: Problem with selecting default value with DropDownChoice

2007-11-05 Thread James Perry
Hello all, Thanks for the replies so far. Well I have taken the feedback and my manufacturer object and category object are certainly are there when it passed to my form. It is really bizarre as if I select a manufactuer and persist the product obejct upon the form's onSubmit, it's correctly

Re: Problem with selecting default value with DropDownChoice

2007-11-05 Thread James Perry
Some notes I have observed. * All my objects within the list are correctly in the DDC * All my objects within the list have an implemented equals/hashcode. * It doesn't correctly pre-select both my Manufacturer associations within Product; it just goes to 'Choose One' * It correctly sets

Re: Problem with selecting default value with DropDownChoice

2007-11-05 Thread Gwyn Evans
Hi James, Monday, November 5, 2007, 8:05:58 PM, you wrote: JP Some notes I have observed. * All my objects within the list are JP correctly in the DDC * All my objects within the list have an JP implemented equals/hashcode. * It doesn't correctly pre-select JP both my Manufacturer associations

Re: Problem with selecting default value with DropDownChoice

2007-11-05 Thread Dmitry Kandalov
On Tuesday 06 November 2007 00:55:23 James Perry wrote: I empirically found out what the solution was to the problem of not selecting the correct default choice of the Manufacturer within Product! I added a ChoiceRendered to the constructor of DDC and it did the trick! It seems like equals()