[Opensource] workflow using addStatePairing - not quite getti ng it

Gene McCullough genemcc at swbell.net
Mon Dec 9 10:11:47 PST 2002


I am experiencing the same thing.  I get to my validation state, and the 
form has been reset (my values are what I've defined in the 
resetController() method).  Same thing when I get to the Final state.  I've 
seen no examples or indications of how to access the controller form data 
(except that one code snippet renamed the object reference to 
controllerForm instead of stateForm in the final state) as opposed to the 
state form data.

hope someone can help, and thanks in advance

gene

On Fri, 6 Dec 2002 14:14:48 -0600, Mike Traum <mtraum at cirnetwork.org> wrote:

> OK, I am still not understanding this.
>
> If I use null for the StateForm in addStatePairing(), my understanding is
> that the data will be stored in the Controller form persistently. But, I
> can't seem to access that data - response.getFormCache() is an empty
> hashtable, State.getFormCache("parameterName") is null, and the StateForm 
> is
> null.
>
> I've even scoured the session and request objects in my debugger and 
> can't
> seem to find the info, other that in the request parameters, but then 
> you're
> losing out on the whole ActionForm thing...
>
> Mike
>
> -----Original Message-----
> From: Helga Wyns [mailto:helgawyns at hotmail.com]
> Sent: Friday, November 22, 2002 3:24 AM
> To: opensource at jcorporate.com
> Subject: RE: [Opensource] workflow using addStatePairing - not quite
> getting it
>
>
> Yes indeed, I am using a Controller form. The way I understand it, the 
> state
>
> forms are made up of subsets of the attributes on the controller form 
> (which
>
> could be interesting in wizard controllers), and the controller form 
> holds all the data.
> I don't think I lose a lot of the functionality? Are am I missing 
> something?
>>
>> Yes, it looks better, but I can't seem to get it to work.
>>
>> How do you use the DefaultForm? It doesn't implement StateForm, so
>> Controller.loadStateForm throws a ClassCastException. Are you only using 
>> a
>> Controller form, and not a State form by using:
>> addStatePairing(State, State, null) ?
>>
>> If so, don't you lose a lot of the functionality? The way I understand 
>> it,
>> if you use StateForm's, all of the data for your states will be stored
>> persistently, but if you use a ControllerForm, you will only have the
>> previous state. If that's the case, then really all you gain from using
>> addStatePairing is a better structure for transitioning but still have 
>> to
>> handle all of the persistence.
>>
>> The code example at
>> http://mail.jcorporate.com/pipermail/opensource/2002-April/010725.html 
>> gave
>> me some more insight, but leaves out crucial details.
>>
>> mike
>>
>> -----Original Message-----
>> From: Helga Wyns [mailto:helgawyns at hotmail.com]
>> Sent: Wednesday, November 20, 2002 8:04 AM
>> To: opensource at jcorporate.com
>> Subject: Re: [Opensource] workflow using addStatePairing - not quite
>> getting it
>>
>>
>> I'm also using the new workflow methodology, but I don't create my own
>> StateForms: I use the expresso DefaultForm. So there's no extra work.
>> Furthermore, I think the new methodology is much better and more 
>> flexible
>> than the old one!
>> >
>> >I'm writing a new Controller and was going to use the new workflow
>> >methodology, but I can't quite figure it out from the Worflow document.
>> >
>> >I'm having problems understanding the StateForm. Is this supposed to be an 
>> >object with a bunch of getters and setters for all of the data we want 
>> to
>> >collect in the state? If so, can you use different data types (for example, 
>> >boolean for a checkbox data field), or is it all String based?
>> >
>> >If the above is the case, it seems like a lot of extra work for some stuff 
>> >that has been automated through DBObject until now. I assume the plan 
>> is to
>> >have a dynamic StateForm for DBObjects?
>> >
>> >tia,
>> >mike
>>
>>
>> _________________________________________________________________
>> MSN Zoeken, voor duidelijke zoekresultaten!
>> http://search.msn.nl/worldwide.asp
>>
>> _______________________________________________
>> Opensource mailing list
>> Opensource at jcorporate.com
>> http://mail.jcorporate.com/mailman/listinfo/opensource
>> Archives: http://mail.jcorporate.com/pipermail/opensource/
>> _______________________________________________
>> Opensource mailing list
>> Opensource at jcorporate.com
>> http://mail.jcorporate.com/mailman/listinfo/opensource
>> Archives: http://mail.jcorporate.com/pipermail/opensource/
>
>
> _________________________________________________________________
> Direct chatten met je vrienden met MSN Messenger  http://messenger.msn.nl
>
> _______________________________________________
> Opensource mailing list
> Opensource at jcorporate.com
> http://mail.jcorporate.com/mailman/listinfo/opensource
> Archives: http://mail.jcorporate.com/pipermail/opensource/
> _______________________________________________
> Opensource mailing list
> Opensource at jcorporate.com
> http://mail.jcorporate.com/mailman/listinfo/opensource
> Archives: http://mail.jcorporate.com/pipermail/opensource/
>



-- 
gene




More information about the Opensource mailing list