Dear Fellow developers,
I am brand new to Spectra but I am a coldfusion developer. I am also new to object
oriented programming so the terminology used in Spectra may not register to me right
away. So if anybody is kind enough to respond to me, please also keep in mind that
"plain English" along with Spectra technical terms is also appreciated for clarity.
Currently I am trying to add an input text field in the edit handler for meta
description tag. Currently there are meta tag information already in place when the
objects are created, such as the keywords meta tag. However, we don't have the meta
description tag so I am trying to add a field for it so user can enter the meta
description information when they edit the object.
I've read references on how to do it and sort of understand how Spectra processes the
input from the form handler and how it saves the object in the contentobject database.
At this point, I am able to pass the data that users enter in the form.metadescription
field as they navigate through the edit pages. But when they hit 'Finish' or 'Save'
button, the data is not saved in the database. Normally when the user edits an object,
after hitting the finish button the user gets a confirmation page and their changes
does in fact save in db. But when I add the new field, upon hitting the save button,
it displays the object iformation in a <cfdump> tag instead of a confirmation page.
The form.metadescription information is there as well but is not saved in the
database. What could I possibly have missed doing or not doing right? Any help is
greatly appreciated.
Here are the steps I did:
1. Create a property definition for the object:
<cfa_propertyDefinition
action="Create"
dataSource = "#request.cfa.objectstore.dsn#"
label="metaDescription"
description="Property for description meta tag"
dataType="Char"
inputType="text"
bRequired="No"
bSearchable="No"
bIndexed="No"
defaultValue=""
>
2. add the input field in the edit handler:
<cfparam name="output.metaDescription" default="">
<tr>
<td>
<input name="metaDescription" type="Text" size="50"
value="#Trim(output.metaDescription)#" maxlength="255">
</td>
</tr>
3. put it in output scope (DDO):
<CFSET output.metaDescription=Trim(metaDescription)>
4. save the data:
<cfa_contentObjectData
dataSource = "#request.cfa.objectstore.dsn#"
objectID = "#id#"
>
<!--- update the following properties --->
<cfa_contentObjectProperty name="metaDescription"
value="#output.metaDescription#">
</cfa_contentObjectData>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX 6.1, now 2.5 times faster.
http://www.macromedia.com/software/coldfusion/productinfo/upgrade/jump/introducing.html?trackingid=ColdFusion_468x60g_HouseofFusion_carat_082803
Message: http://www.houseoffusion.com/lists.cfm?link=i:17:5446
Archives: http://www.houseoffusion.com/lists.cfm?link=t:17
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:17
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=<:emailid:>.<:userid:>.<:listid:>
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.