Ok so you can use several ft:object tags combined when using the same
objectid, that binds them to one object:
objectid="#stobj.objectid#"
But what is the key and how to set it, does that enable me to bind the
object values from different types to one (sort of) object?
Based on your earlier advice I now indeed use
application.security.getCurrentUserID(), now used:
<cfif application.security.isLoggedIn() EQ true>
<cfset userid=application.security.getCurrentUserID()>
<cfelse>
<cfset userid="nosession">
</cfif>
Although this code wouldn't be accessible without a session, just in
case.
Thanks again
On Dec 2, 11:48 pm, "Blair McKenzie" <[EMAIL PROTECTED]> wrote:
> All the submitted values for an object are available in stProperties. This
> is true even if you use several ft:object tags - ft:processformobjects will
> combine them, as long as each ft:object has the same objectid or key
> attribute.
>
> Editing the stProperties inside ft:processformobjects is a simple way to
> edit those values before the object is actually written to the database.
>
> Also, instead of session.dmSec.authentication.userid, you should be using
> application.security.getCurrentUserID().
>
> On Wed, Dec 3, 2008 at 4:26 AM, Marco van den Oever <
>
> [EMAIL PROTECTED]> wrote:
>
> > Thanks so much, i got it working, only run into a problem or question.
>
> > When i try to set the ticketanswers object values with:
>
> > <ft:processformobjects typename="ticketanswers" bSessionOnly="true">
>
> > <cfset stProperties.ticketobjectid = stTicket.objectid />
>
> > </ft:processformobjects>
>
> > I can't (i think) grab the generated ticketanswers object values and
> > use them inside the object and set them with <cfset
> > stProperties.answer = stTicketanswers.answer /> etc, as i only can
> > retrieve the values with lSavedObjectIDs after the object is
> > generated, so that's not yet so inside the object.
>
> > Am i right that for this to work i still have to use a obj.setData for
> > the ticketanswers object?
>
> > Right now i use:
>
> > <ft:processForm action="Save">
>
> > <ft:processFormObjects typename="tickets" bSessionOnly="true" />
>
> > <cfif len(lSavedObjectIDs)>
>
> > <cfset stTicket = getData(objectid=lSavedObjectIDs) />
>
> > <ft:processformobjects typename="ticketanswers" bSessionOnly="true" />
>
> > <cfset stTicketanswers = getData(objectid=lSavedObjectIDs) />
>
> > <cfif len(stTicketanswers.answer)>
>
> > <cfset obj = createObject
> > ('component',application.stcoapi.ticketanswers.typePath) />
> > <cfset stprops = {} />
> > <cfset stprops.objectid = lSavedObjectIDs />
> > <cfset stprops.ticketobjectid = stTicket.objectid />
> > <cfset stprops.answer = stTicketanswers.answer />
> > <cfset stprops.operator = session.dmsec.AUTHENTICATION.userid />
> > <cfset obj.setData(stProperties=stprops) />
>
> > </cfif>
>
> > </cfif>
>
> > </ft:processForm>
>
> > Thank you
>
> > On Dec 2, 3:52 am, "Blair McKenzie" <[EMAIL PROTECTED]> wrote:
> > > <ft:processForm action="Save">
> > > <ft:processFormObjects typename="tickets" bSessionOnly="true" />
>
> > > <cfif len(lSavedObjectIDs)>
> > > <cfset stTicket = getData(objectid=lSavedObjectIDs) /><!--- getData also
> > > retrieves temporary objects --->
>
> > > <ft:processformobjects typename="ticketanswers" bSessionOnly="true">
> > > <cfset stProperties.ticketobjectid = stTicket.objectid /><!--- to
> > validate
> > > or change an object before it gets saved, used the stProperties struct
> > > inside processformobjects --->
> > > </ft:processformobjects>
> > > </cfif>
> > > </ft:processForm>
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---