Re: If I've made a class for an EO entity, can I use it to add data to?
Re: If I've made a class for an EO entity, can I use it to add data to?
- Subject: Re: If I've made a class for an EO entity, can I use it to add data to?
- From: Amorya North <email@hidden>
- Date: Tue, 20 Jul 2004 16:16:36 +0100
On 20 Jul 2004, at 1:57 pm, Amorya North wrote:
> I'm implementing a registration page for users on my site.
>
> I have an EO Entity called Members. This maps onto a Java class called
> Members (class generated by EOModeller).
>
>
> What I want to do is add data directly to a new Members object...
>
OK, I've sort of managed it...
I added this to the code that runs when the Register page is opened:
public Register(WOContext context) {
super(context);
creatingMember = (Members) EOUtilities.createAndInsertInstance(ec,
"Members");
}
I still reckon that's bad practise though... What if a user goes to the
page, but doesn't click submit? There'd be a random record hanging
around. Or what happens if they go to it multiple times, then
eventually submit - they'd add more than one record!
Any tips?
Amorya
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.