I'll check, but I don't think that's the case.
When I cfdump participantRecord.getID(), I do get a value of 0. So I
think it is loading a new record.
(I> haven't used Reactor in a while, so I forget the exact method name, but it'sI can find any of these methods, so not sure what to do here.
> something like getMemento() or getInstanceMemento().)
>
> Does your load() method in the DAO simply always do a load(ID=whatever),
> regardless of whether the ID is 0 or not?
Yes.
I'm always doing a load(ID=something)
Or is there logic that, for
> instance, creates the Reactor object, then calls load() *only* if the ID is
> not 0? This shouldn't make any difference, though, as long as you create the
> object first.
For kicks, I changed my participant.edit event to a 'generic read'.
A blank record loads correctly when ID=0. So there must be something
weird in my participantController.cfc or participantService.cfc
<cffunction
name="getAllFaculty" access="public" returntype="query" output="false" hint="I
return the Faculty Profiles from the database">
<cfscript>
Faculty =
application.reactor.createGateway("adm_EmployeeBios");
query = Faculty.CreateQuery();
query.returnObjectFields("adm_EmployeeBios","rank");
where = query.getWhere();
where.IsNotEqual("adm_EmployeeBios","Rank","3");
order = query.getOrder();
order.setAsc("adm_EmployeeBios","lastname");
qryFaculy = Faculty.getByQuery(query);
</cfscript>
<cfreturn qryFaculy>
</cffunction>
I would suggest that you do this in your form:
...page here...
<cfdump var="#ViewState.getAllValues()#" />
</body>
</html>
This will show you what's in the ViewState, and if you want to see
what's in your participant, you could do several things:
<cfset participant = ViewState.getValue("participant")>
<cfloop collection="#participant#" item="i">
<cfif left(3,i) IS "get">
<cfinvoke component="#participant#"
method="#i#"
returnvariable="retVar" />
<cfdump var="#retVar#" />
</cfif>
</cfloop>
This should help you compare the contents of your ViewState with the
values in your form...
J
On Feb 12, 2008, at 5:47 PM, byron wrote:
>
> I have an app running MG 2.0 (2.0.304), Coldspring, and Reactor
> (428). I'm running into the following problem. ...
Glad you got that sorted Byron. I was beginning to think this one would go
on forever.. ;)
The joys of Model-Glue..