Changes between Initial Version and Version 1 of HowTos/HowToUseGenericDatabaseMessages/UsingmodelglueGenericDelete

Show
Ignore:
Timestamp:
04/15/09 19:43:28 (17 years ago)
Author:
trac (IP: 127.0.0.1)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HowTos/HowToUseGenericDatabaseMessages/UsingmodelglueGenericDelete

    v1 v1  
     1= Using modelglue.!GenericDelete = 
     2 
     3When this message is broadcast, the !DataController will attempt to delete a record from a given table. 
     4 
     5This message is configured by using the following <argument> tags: 
     6 
     7  1. Object (Required) - The name of the table from which to delete. 
     8  1. Criteria (Required) - A list of viewstate values to use as filters. Any value listed whose name matches a column in the target table will be used as a filter in the query's WHERE clause. 
     9 
     10== Examples == 
     11 
     12=== A Basic Generic Delete === 
     13 
     14To perform a basic delete on the Contact table, the following <message> tag could be added to an <event-handler>: 
     15 
     16{{{ 
     17<message name="modelglue.GenericDelete"> 
     18 
     19<argument name="object" value="Contact" /> 
     20 
     21<argument name="contactId" value="Contact" /> 
     22 
     23</message> 
     24}}} 
     25 
     26Assuming an event-handler name of "contact.delete", visiting the event handler with the following URL would result in deleting the contact with a !ContactId of 42. 
     27 
     28index.cfm?event=contact.delete&contactId=42