Re: Custom class with D2W

2005-11-09 Thread Robert Walker
Pete,Are you sure you have the value set as a "Class Property" in the model.  Your EOGenericRecord subclass should have a setValue(BigDecimal value) method.  This is only generated by EOModeler if the attribute is set as a class property.  That would be the column with the diamond symbol in it.  Al

Re: Custom class with D2W

2005-11-08 Thread David Teran
Yes, I realised after I sent it that I had omitted to say that I had already created the EOGenericRecord custom class, named "Idea" through EOModeller. "Idea" is the entity and "value" is the attribute. I have gone back and corrected a few lines of code but I am now just have one remaining error:Id

Custom class with D2W

2005-11-08 Thread Pete Rive
Thanks a lot Robert,Yes, I realised after I sent it that I had omitted to say that I had already created the EOGenericRecord custom class, named "Idea" through EOModeller. "Idea" is the entity and "value" is the attribute. I have gone back and corrected a few lines of code but I am now just have on

Re: Custom class with D2W

2005-11-08 Thread Robert Walker
However, I can't work out whether this code is appropriate for a Direct to Web app and what Java file to annotate eg Application.Java, DirectAction.Java etc ? I have started to try and learn Java to work it out but it could take awhile.Sorry for the additional reply, but I just noticed this line. 

Re: Custom class with D2W

2005-11-07 Thread Robert Walker
public void awakeFromInsertion(EOEditingContext context) {        super.awakeFromInsertion(context);        if (value() == null) {            setValue(new BigDecimal("500"));        } }}This is very appropriate for setting default values in any WebObjects application, no matter the type.  For D2W t

Custom class with D2W

2005-11-07 Thread Pete Rive
Hi to all you WO masters of the universe,I am a newbie trying to build a D2W app. I started out looking at a Java Client app but decided to change to a D2W.I am trying to customise some business logic that will allow automatically include  a value when a new record is added to the database. In Dire