Akmal,

That was it I can't believe I missed that. Thanks for taking the time to
help.

Regards,

Stuart Townhill.

-----Original Message-----
From: Akmal Sarhan [mailto:[EMAIL PROTECTED] 
Sent: 08 March 2003 19:16
To: Turbine Users List
Subject: Re: Intake Part 2

make that: retrieveByPK
instead of retrieveByPk

Akmal
----- Original Message ----- 
From: "Stuart Townhill" <[EMAIL PROTECTED]>
To: "'Turbine Users List'" <[EMAIL PROTECTED]>
Sent: Saturday, March 08, 2003 6:42 PM
Subject: RE: Intake Part 2


> Akmal,
> 
> Thanks for the response I get the following error when implementing "
>
customer=(Customer)CustomerPeer.retrieveByPk(data.getParameters().getInt
> ("cu
> stomerentry"));" within my doUpdate method, I do have the following
> within my class:
> 
> import soundideas.covert.om.Customer;
> import soundideas.covert.om.CustomerPeer;
> 
> 
> compile:
>     [javac] Compiling 52 source files to
> C:\turbine\webapps\covert\WEB-INF\classes
>     [javac]
>
C:\turbine\webapps\covert\WEB-INF\src\java\soundideas\covert\modules\act
> ions\doInsertCustomer.java:86: cannot resolve symbol
>     [javac] symbol  : method retrieveByPk (int)
>     [javac] location: class soundideas.covert.om.CustomerPeer
>     [javac] Customer customer =
>
(Customer)CustomerPeer.retrieveByPk(data.getParameters().getInt("custome
> rentry"));
>     [javac]               ^
>     [javac] 1 error
> 
> BUILD FAILED
> 
> I haven't really seen this a lot within the mailing lists, I have seen
a
> lot to do with queryKeys what is the correct way to be doing this?
> 
> Many thanks, Regards,
> 
> Stuart.
> 
> 
> 
> -----Original Message-----
> From: Akmal Sarhan [mailto:[EMAIL PROTECTED] 
> Sent: 08 March 2003 16:39
> To: Turbine Users List
> Subject: Re: Intake Part 2
> 
> ...validation stuff...
> Customer
>
customer=(Customer)CustomerPeer.retrieveByPk(data.getParameters().getInt
> ("cu
> stomerentry"));
> group.setProperties(customer);
> customer.save();
> 
> regards
> Akmal
> ----- Original Message -----
> From: "Stuart Townhill" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, March 08, 2003 4:15 PM
> Subject: Intake Part 2
> 
> 
> > To anyone who can help,
> >
> > Last weekend I managed to successfully use intake to validate and
> empty
> > form i.e. a new record in the database. Now I have managed to use
> > criteria to select a certain record from the database and insert it
> into
> > context and then map the values to the form (This is so I can edit a
> > record in the database and still use intake to validate). Where I am
> > having problems is with the Update I have copied and my method
below.
> I
> > noticed in the html that the $intake.declareGroups() method adds a
> > hidden field with the value being the primary key of the record
being
> > updated so I used that for the "intake.get" method. Everything seems
> to
> > execute smoothly but no update goes through to the database.
> >
> > public void doUpdate(RunData data, Context context)
> >     throws Exception
> > {
> >     IntakeTool intake = (IntakeTool)context.get("intake");
> >     Group group = intake.get("Customerentry",
> > data.getParameters().getString("customerentry"));
> >     if (group.isAllValid())
> >     {
> >         Customer customer = new Customer();
> >         group.setProperties(customer);
> >         customer.setModified(true);
> >         customer.setNew(false);
> >         customer.save();
> >
> >
>
data.setScreenTemplate(data.getParameters().getString("nextTemplate"));
> >     }
> > }
> >
> > Any help is much appreciated.
> >
> > Regards,
> >
> > Stuart Townhill.
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to