[Kss-devel] getKssUIDClass and its (lack of) use
Hedley Roos
hedley at upfrontsystems.co.za
Mon Jul 14 16:38:14 CEST 2008
Hi all
In fields.py I notice a method called getKssUIDClass. It is a "sister"
method of getKssClasses. The latter is used in all Archetypes field widgets.
In validation.py in method kssValidateField the instance to be validated
can be retrieved by uid (default behaviour if uid is supplied), else the
instance is aq_inner(self.context).
This brings me to my point: I really want that uid to be present, but
for that to happen it must:
a) Be explicitly added in every Archetypes widget Page Template
b) Just be added as part of getKssClasses
Why do I need it present?
I'm developing a solution where any Archetype can be created / edited
while another item is in context. The "popup" is in fact a floating div
which renders the instance's edit screen.
The classical example is while looking at folder_contents I decide I
want to edit an item without leaving folder contents at all.
I've tried playing around with adjusting the context only for my
floating div, but that is quite difficult since I have to do some magic
with <link rel="kss-base-url"> and then I might have to change kukit.js
where it resolves the base.
It seems that the code in archetypes.kss is ready to use uid to override
the context, so I want to go that way.
Any thoughts?
Thanks
Hedley
More information about the Kss-devel
mailing list