[Product-Developers] Can KSS help in my use case ?
Giovanni Toffoli
toffoli at uni.net
Thu Feb 12 00:57:25 UTC 2009
In a product, I have a portlet providing a tree-like visualization of a
taxonomic data structure (say, a thesaurus).
A number of tree manipulation functions (e.g. sub-tree expanding and
collapsing) are implemented with ad-hoc AJAX programming that I did in the
Plone 2.1 version of said product.
Those functions still work unchanged in the porting to Plone 3 that I'm
doing, although I plan to re-implementing them using KSS.
Moreover
- the tree in the portlet is included in an HTML form
- there is a checkbox beside each visible node in the tree, so that the user
can select a subset of the nodes by checking the associated boxes.
Here is may use case: in the content area of the page, as a separate HTML
form, I have a search form for searching Plone contents; the search should
take into account:
a) the context
b) obviously, the values that the user puts inside the input controls of the
search form
c) the tree nodes selected (checked) in the portlet.
In the 2.1 version of the product, when the "search" button was pressed, I
managed to get the current node selection by doing a horrible customization
of the main template: the tree appeared to be inside a portlet, but in fact
it was inside the same HTML form as the (other) input controls of the search
form.
In the Plone 3 version, where the tree is inside a true portlet, and a
separate HTML form, which strategy would you suggest to be able to exploit
the node selection in the search?
1) use KSS to build incrementally a server-side image of the current
selection
2) associate a KSS event to the pressing of the "search" button; but in this
case should I define an ad hoc client-side command and implement it as a
plugin ?
3) other (please specify).
Thank you very much for any advice.
Giovanni Toffoli
More information about the Product-Developers
mailing list