I replied yesterday but something has gone wrong and my posts aren't
showing :-( I think it's the 'Helgi' factor though, I have stuffed
up. Here's hoping this post gets through.
First, thanks for the help guys, especially with limited caffiene
intake! I really appreciate it... I am acheiving some kind of
understanding now and seem to be getting closer to the finish line with
this one. I am looking at doing some official training in FarCry since
I'm in Sydney, I need it, but I think with just a little more help from
you I can get this case closed.
Here's where I'm at now:
+ I now understand I need to override the edit function call in my
dmhtml.cfc file... below are the complete contents of that file now....
<cfcomponent extends="farcry.farcry_core.packages.types.dmhtml"
displayname="html" hint="HTML Page Content" bSchedule="1"
bUseInTree="1">
<cfproperty name="MoreInfo" type="longchar" hint="More information
content - right hand column" required="No">
<cffunction name="edit" access="public">
<cfargument name="objectid" required="yes"
type="UUID">
<!--- getData for object edit --->
<cfset stObj = this.getData(arguments.objectid)>
<cfinclude template="_dmhtml/edit.cfm">
</cffunction>
</cfcomponent>
+ As previously posted, I have succesfully deployed my new type
attribute 'MoreInfo' via the FarCry admin interface
+ So, as defined in the above file I have my own template
_dmthml/edit.cfm This file is a direct copy of the original (farcry
core) file
+ By looking around in that file I see that there are these things
called plp steps that are contained within a plp widget (I say 'things'
because I am not entirely sure what they are / do... but the structure
and flow is intuitive so I can kind of understand)
+ I need to add a new step to the edit flow so I figured I'd drop one
in middle of the plp step that already exist... I learnt that I can
leave the widget and other steps pointing to the core system files, but
add my new step pointing to my new step template file.... below is the
line I added in the middle of the existing steps....
<widgets:plpstep
stepDir="/farcry/#application.applicationname#/packages/types/_dmhtml/plpEdit"
name="More Information" template="moreinfo.cfm">
+ My understanding is that the new plp step I added above is
co-ordinated by the widget thingy (some part of the core of farcry) and
will use the template file 'moreinfo.cfm' in my
project/types/_dmhtml/plpEdit directory
+ The file 'moreinfo.cfm' that is referenced by the new plp step I
added is a copy of the step file for the body edit flow (I am trying to
extend so I have two 'body' attributes for the HTML type). The file is
a copy, but I changed the rich text editor field reference from
<widgets:richTextEditor value="#output.body#"> to
<widgets:richTextEditor value="#output.moreinfo#">
Here is the behaviour I now experience:
1. I am able to see the new step in the FarCry admin area BUT FOR NEW
HTML PAGES ONLY... I do not see my new step when I go to make and
editable draft version of an HTML page that was created before I
started on this extending the core type adventure. Why is this
happening? I would have thought changed would be global... or is there
an 'add' and an 'edit' flow that needs to be handled seperately? (I
cannot see a distinction when looking at the core files directory... I
see only files related to 'display' and 'edit')
2. When I can see the step (by adding a new HTML file) I can go through
the flow of adding my new page to get to the new field I've added....
BUT, the weird thing is it shows the content for the 'body' html that I
added in the previous step (my new field comes wight after the 'body'
step when adding an HTML page).
- I have confirmed that the admin flow is using my new file
'moreinfo.cfm' instead of the core 'body.cfm' by rendering some
meaningless debug text.... it appears on the page when adding my new
step.
- I have double checked that I changed the line
<widgets:richTextEditor value="#output.body#"> to
<widgets:richTextEditor value="#output.moreinfo#">
Why is this strange behaviour happening?
Also, I note (and this may be related) that there is a hidden text
field in the FORM being submitted.... <input type="hidden"
name="bBodySubmit" value="1"/> Does that tell the receiver page /
widget (target of the HTTP POST) that it's dealing with the body
field... what's happening there?
Sorry for the long post... but thought I would be as clear as possible
(please ask for more detail if I am not clear)... it will help anyone
else looking to extend a core type... I find there are posts that
almost get there with the explanation but not as verbose as newbies may
need.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---