> Couldn't you save the invoice at each stage of the creation, with a flag
> like isComplete or isValid? Not only would it solve your problem, but
> someone could stop what they were doing and come back to it the next day.

Ha! That's it. I'll change my model. I've probably got too much used to use
the session store all the time.

> Similarly you can push the values along as hidden form fields which you
> read back in.

These would be single variables and single variables can be stored in
sessions too. I prefer session data and resort to hidden fields only if I
have to identify single elements within a bunch of them. Isn't this common
practice? Don't you store your volatile data in the session? Should I change
my habits here too?

Many thanks and best regards
Franz


> -----Ursprungliche Nachricht-----
> Von: Chuck Esterbrook [mailto:[EMAIL PROTECTED]]
> Gesendet: Freitag, 26. Oktober 2001 16:25
> An: [EMAIL PROTECTED]; Webware-discuss
> Betreff: Re: [Webware-discuss] Design Question
>
>
> At 03:50 PM 10/26/2001 +0200, F. GEIGER wrote:
> >How would you do? Would you clone ("reinvent") the Invoice class
> as - let's
> >say NonMkInvoice - for data acquisition and copy the data from
> it to Invoice
> >when it comes to save the Invoice to the db? Or is there a better
> >alternative?
>
> Couldn't you save the invoice at each stage of the creation, with a flag
> like isComplete or isValid? Not only would it solve your problem, but
> someone could stop what they were doing and come back to it the next day.
>
> Another potential solution, which I don't like nearly as much as
> the one I
> just mentioned, is to grab the __dict__, remove the _mk_foo attrs
> and save
> that dictionary. But if your invoice has a list of LineItems or
> something,
> I don't know how well that will work.
>
>          dict = invoice.__dict__
>          for key in dict.keys():
>                  if key.startswith('_mk_'):
>                          del dict[key]
>          print dict
>
>
> Similarly you can push the values along as hidden form fields which you
> read back in.
>
>
> -Chuck
>
>


_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to