Title: Newbie Custom Rules Question
This is just a guess, but did you updated your app after you deployed the custom rule? I think you may need to do this after making changes to the COAPI. (To update your application scope append udateapp=1 to your URL.)
 
--Nathan
 
 
 
 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ora Martindale
Sent: Wednesday, June 16, 2004 4:53 PM
To: FarCry Developers
Subject: [farcry-dev] Newbie Custom Rules Question

I've attempted to create a custom rule using the How-To guide on the subject. I copied the update code pretty closely from the How-To guides CFC (see code at bottom). I placed the rule CFC in the <application name>/packages/rules/ directory and sucessfully deployed it.

When I attempt to to add the rule to a container's list it adds it okay, but when I go to the "Configure Content" tab, I get the following error:

"Element OBJECTID is undefined in STOBJ."

It appears that arguments.objectId has a UUID value, but an empty structure gets returned to stObj when the this.getData function is called.

Can anyone tell me what I'm doing wrong?

Code:

  <cffunction access="public" name="update" output="true" hint="Edit/Update method. Shows an edit form then passes structure to update method">

    <cfargument name="objectID" required="Yes" type="uuid" default="">

    <!--- import tag library --->
    <cfimport taglib="/farcry/fourq/tags/" prefix="q4">
    <cfimport taglib="/farcry/farcry_core/tags/navajo/" prefix="nj">

    <cfset stObj = this.getData(arguments.objectid)>

    <cfif isDefined("form.updateRule")>
      <!--- create structure for update --->
      <cfscript>
        stObj.displayMethod = form.displayMethod;
        stObj.zipCode = form.zipCode;
      </cfscript>

      <!--- update object --->
      <q4:contentobjectdata typename="#application.custompackagepath#.rules.ruleJhaWeather" stProperties="#stObj#" objectID="#stObj.objectID#">

      <!--- display success message --->
      <div align="center"><strong>Update Successful</strong></div>
    </cfif>

    <!--- get the display methods for jhaWeather type--->
    <nj:listTemplates typename="jhaWeather" prefix="displayJha" r_qMethods="qDisplayTypes">

    <!--- show form --->
    <form action="" method="POST">
    <input type="hidden" name="ruleID" value="#stObj.objectID#">
    <table width="100%" align="center" border="0">

    <tr>
      <td width="20%" colspan="1" align="right"><b>Display method:</b></td>
      <td>
        <select name="displayMethod" size="1" class="field">
          <!--- show available display methods --->
          <cfloop query="qDisplayTypes">
            <option value="#methodName#" <cfif methodName is stObj.displayMethod>selected</cfif>>#displayName#</option>
          </cfloop>
        </select>
      </td>
    </tr>
    <tr>
        <td align="right"><b>Zip Code:</b></td>
        <td><input type="text" name="zipCode" size="6" maxlength="5">#stObj.zipCode#</textarea></td>
    </tr>
    </table>

    <div align="center"><input class="normalbttnstyle" type="submit" value="Update" name="updateRule"></div>
    </form>
  </cffunction>


Sincerely,

Ora Martindale
Jack Henry & Assoc.
913.341.3434

---
You are currently subscribed to farcry-dev as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/



NOTICE: This electronic mail message and any files transmitted with it are intended exclusively for the individual or entity to which it is addressed. The message, together with any attachment, may contain confidential and/or privileged information. Any unauthorized review, use, printing, saving, copying, disclosure or distribution is strictly prohibited. If you have received this message in error, please immediately advise the sender by reply email and delete all copies.

 


 

---
You are currently subscribed to farcry-dev as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to