At 04:51 PM 10/26/2001 +0200, F. GEIGER wrote:
>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?
The only thing that comes to mind is if the user were to open 2 browser
windows to perform the same type of operation with different data at the
same time. The form fields method would work fine. I think with the session
method, the competing servers would clobber each other's data.
Make sense?
But instead of carrying all the fields in your multi-form process, making a
new instance in each should work fine. Then in the form, you just pass a
reference to the object that is being edited:
<input hidden name=object value=Invoice.8>
BTW I mix-in the following methods to MiddleObject for my WebKit
applications. The "value=..." above comes from invoice.formArg().
class MiddleObjectMixIn:
def formRef(self):
return '"%s.%i"' % (self.klass().name(), self.serialNum())
def formArg(self):
return 'value=%s' % self.formRef()
def urlRef(self):
return '%s.%i' % (self.klass().name(), self.serialNum())
def urlArg(self):
return 'object=%s' % self.urlRef()
from MiddleKit.Run.MiddleObject import MiddleObject
from MiscUtils.MixIn import MixIn
MixIn(MiddleObject, MiddleObjectMixIn)
-Chuck
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss