Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Documentation Incomplete

These are notes during the beta cycle only and are not complete – examples may not reflect best practice with respect to the final release of the 4.0 code base.

Wizard Markup

wiz:wizard

  • referenceid; objectid of primary edited object. Lookup to database for object, by profile, by session.

wiz:step

  • name

wiz:object

Very similar to ft:object

  • stobject
  • legend
  • format; edit/display

wiz:processWizard

wiz:processWizardObjects

Sample Implementation

Similar in approach to ft:form.

wizard form structure
<!--- PROCESS WIZARD SUBMISSION --->
<wiz:processWizard step="Actions">
   <!--- Save any Action Types submitted (including any new ones) --->
   <wiz:processWizardObjects typename="action">
      <!--- Do not save the action if their is no title. --->
      <cfif NOT structKeyExists(stProperties,'title') OR NOT len(stProperties.title)>
         <wiz:break />
      </cfif>
   </wiz:processWizardObjects>
</wiz:processWizard>

<!--- RENDER THE WIZARD --->
<wiz:wizard ReferenceID="#stobj.objectid#" r_stWizard="stWizard">

   <wiz:step name="Report Details">
      <wiz:object stobject="#stobj#" wizardID="#stWizard.ObjectID#" lfields="title,meetingtime,meetingplace,aContacts,projectid" format="edit" intable="false" legend="Meeting Details" />
      <wiz:object stobject="#stobj#" wizardID="#stWizard.ObjectID#" lfields="description" format="edit" intable="false" legend="Minutes" />
   </wiz:step>

   <wiz:step name="Actions">

      <cfset qActions=getContactReportActions(stobj.objectid) />

      <cfoutput><h3>Current Actions</h3></cfoutput>
      <cfloop query="qActions">
         <wiz:object objectid="#qActions.objectid#" wizardID="#stWizard.ObjectID#" lfields="title" r_stFields="stAction" />
         <cfoutput><div>#stAction.title.html#</div></cfoutput>
      </cfloop>

      <!--- Render 3 new empty actions. Allows adding 3 actions at a time.  --->
      <cfoutput><h3>New Actions Arising</h3></cfoutput>
      <cfloop from="1" to="3" index="i">
         <cfset stDefault=structNew() />
         <cfset stdefault.projectid=stobj.projectid />
         <cfset stdefault.contactreportid=stobj.objectid />
         <wiz:object
            typename="action"
            wizardID="#stWizard.ObjectID#"
            format="edit"
            lfields="title"
            lhiddenfields="projectid,contactreportid"
            bvalidation="false"
            stPropValues="#stDefault#" />

         <cfoutput><hr /></cfoutput>

      </cfloop>

   </wiz:step>
</wiz:wizard>
  • No labels