Latest developments, i see that the below code is also throwing a
objectid is required error while the objectid is available, the error
states the last line is producing the error.
What is wrong with the <cfset obj.delete(argumentCollection=stprops) /
> code?
<cfset stprops = {} />
<cfset stprops.dsn = application.dsn />
<cfset stprops.conditions.objectid='5E9BBAAB-E55D-
EC9C-01C303A5CE0A0151' />
<cfset stprops.conditions.pollingobjectid='5DDA0CD2-C0FB-
FA6B-83BDAB20122A164E' />
<cfset obj.delete(argumentCollection=stprops) />
On Nov 2, 4:33 pm, Marco van den Oever <[EMAIL PROTECTED]>
wrote:
> Ok, this is the current situation, when i use the below code i get an
> "objectid required" error, also when i set a variable with the
> arguments.objectID and place the pollingvotesdeleteaction outside
> the function and use that variable value todeletepollingvotes,
> nothing happens, what do i miss here???:
>
> <cffunction name="delete" access="public" hint="Basicdeletemethod
> for all objects. Deletes content item and removes Verity entries."
> returntype="struct" output="false">
>
> <cfargument name="objectid" required="yes" type="UUID" hint="Object ID
> of the object being deleted" default="">
> <cfargument name="user" type="string" required="true" hint="Username
> for object creator" default="">
> <cfargument name="auditNote" type="string" required="true" hint="Note
> for audit trail" default="">
>
> <cfset stObj = getData(arguments.objectID)>
>
> <cfset stResult = super.delete(objectid=arguments.objectID)>
>
> <cfif stResult.bSuccess>
>
> <!---deletepollingvotes --->
> <cfset obj =
> createObject('component',application.stcoapi.pollingvotes.typePath)>
> <cfset obj.delete(pollingobjectid=stobj.objectid)>
>
> </cfif>
>
> <cfreturn stResult>
>
> </cffunction>
>
> On Nov 1, 6:47 pm, Marco van den Oever <[EMAIL PROTECTED]>
> wrote:
>
> > Hi guys thanks for all support, think I'm heading in the right
> > direction but still some questions. If i run the below code i get an
> > "The OBJECTID parameter to thedeletefunction is required but was not
> > passed in.", which i don't understand as i (think) i am using my own
> >deletefunction now which has <cfargument name="objectid"
> > required="no".
>
> > Bit confused right now, so super.deleteuses the coredeletefunction
> > despite your own defineddeletefunction, and with using
> > obj.delete( it should be using the customized function?
>
> > Thanks for your patience.
>
> > Example:
>
> > <cffunction name="delete" access="public" hint="Basicdeletemethod
> > for all objects. Deletes content item and removes Verity entries."
> > returntype="struct" output="false">
>
> > <cfargument name="objectid" required="no" type="UUID" hint="Object ID
> > of the object being deleted">
> > <cfargument name="user" type="string" required="true" hint="Username
> > for object creator" default="">
> > <cfargument name="auditNote" type="string" required="true" hint="Note
> > for audit trail" default="">
>
> > <cfset stObj = getData(arguments.objectID)>
>
> > <cfset stResult = super.delete(objectid=arguments.objectID)>
>
> > <cfif stResult.bSuccess>
>
> > <!---deletepollingvotes --->
> > <cfset obj =
> > createObject('component',application.stcoapi.pollingvotes.typePath) />
> > <cfset stprops = {} />
> > <cfset stprops.dsn = application.dsn />
> > <cfset stprops.conditions.pollingobjectid='#stobj.objectid#' />
> > <cfset obj.delete(argumentCollection=stprops) />
>
> > </cfif>
>
> > <cfreturn stResult>
> > </cffunction>
>
> > On Nov 1, 4:43 pm, Fritz Dimmel <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
> > > the simplest way in my opinion is the following:
>
> > > Go to the types.cfc / or fourq.cfc and copy the method declaration
> > > (header) and the cfargument tags of thedeletefunction to your
> > > component:
>
> > > <cffunction name="delete" ...>
> > > <cfargument name"...">
> > > <cfargument ...>
>
> > > Then load the object for later processing and call thedeletemethod
> > > of the parent class:
> > > <cfset stObj = getData(arguments.objectID)>
> > > <cfset stResult = super.delete(argument1=arguments.argument1,
> > > argument2=arguments.argument2, ...)>
>
> > > <cfif stResult.bSuccess>
> > > <!---
> > > here goes the code for the deletion
> > > --->
> > > </cfif>
>
> > > <cfreturn stReturn>
> > > </cffunction>
>
> > > Hope that helps!
>
> > > Bye,
> > > Fritz
>
> > > °================================
> > > | Fritz Dimmel
> > > | Gassnergasse 14
> > > | 2020 Hollabrunn
> > > | -------------------------------
> > > | Porzellangasse 44-46/14
> > > | 1090 Wien
> > > | -------------------------------
> > > | +43-1-3101365
> > > | +43-660-6000069
> > > | [EMAIL PROTECTED]
> > > |www.dimmel.at
> > > | -------------------------------
> > > | Check this out:http://www.nickthal.com
> > > °================================
>
> > > Am 01.11.2008 um 13:07 schrieb Marco van den Oever:
>
> > > > Could one of you provide a sample code to check on? Before i go and do
> > > > it the wrong (or way to difficult) way?
>
> > > > Thanks
>
> > > > On Nov 1, 2:17 am, "AJ Mercer" <[EMAIL PROTECTED]> wrote:
> > > >> you may need to call
> > > >> super.delete()
> > > >> as well to ensure all the farcry stuff still happens (if that is
> > > >> what is
> > > >> required)
>
> > > >> On Sat, Nov 1, 2008 at 9:23 AM, Tomek Kott <[EMAIL PROTECTED]>
> > > >> wrote:
> > > >>> yup, just copy/paste in your extended type and it will override
> > > >>> the default
> > > >>> function. Works for me!
>
> > > >>> Tomek
>
> > > >>> On Fri, Oct 31, 2008 at 4:59 PM, Marco van den Oever <
> > > >>> [EMAIL PROTECTED]> wrote:
>
> > > >>>> So as i understand this properly, just copy paste and adjust the
> > > >>>>deletefunction down below your type and include your own content?
>
> > > >>>> On Sep 12, 8:26 am, "AJ Mercer" <[EMAIL PROTECTED]> wrote:
> > > >>>>> cool - that is exactly what I am doing right now.
> > > >>>>> Thanks for the confirmation.
>
> > > >>>>> On Fri, Sep 12, 2008 at 4:19 PM, "Jørgen M. Skogås"
> > > >>>>> <[EMAIL PROTECTED]
> > > >>>>> wrote:
>
> > > >>>>>> Hi AJ,
> > > >>>>>> Yes they have(in core types.cfc your find thedelete() method),
> > > >>>>>> the
> > > >>>>>> types.cfc is located in farcry/core/packages/types/ you find
> > > >>>>>> all the
> > > >>>> methods
> > > >>>>>> thats availabe there. The types.cfc extends
> > > >>>>>> the farcry.core.packages.fourq.fourq.
>
> > > >>>>>> J~
>
> > > >>>>>> Den 12. sep.. 2008 kl. 09.05 skrev AJ Mercer:
>
> > > >>>>>> Components have a BeforeSave method, is there an equivalent for
> > > >>>> deleting?
> > > >>>>>> I have a component that uploads a file
> > > >>>>>> I would like todeletethe file when the record is deleted.
>
> > > >>>>>> --
> > > >>>>>> AJ Mercer
> > > >>>>>> Web Log:http://webonix.net
>
> > > >>>>>> Once you come to the realisation that everyone is crazy,
> > > >>>>>> You will never be surprised or disappointed ever again.
> > > >>>>>> AJM 2008
>
> > > >>>>> --
> > > >>>>> AJ Mercer
> > > >>>>> Web Log:http://webonix.net
>
> > > >>>>> Once you come to the realisation that everyone is crazy,
> > > >>>>> You will never be surprised or disappointed ever again.
> > > >>>>> AJM 2008
>
> > > >> --
> > > >> AJ Mercer
> > > >> Web Log:http://webonix.net
>
> > > >> Once you come to the realisation that everyone is crazy,
> > > >> You will never be surprised or disappointed ever again.
> > > >> AJM 2008
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"farcry-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/farcry-dev?hl=en
-~----------~----~----~----~------~----~------~--~---