Discussion:
[Erp5-dev] remembering listbox selection from Action button
Bartłomiej Górny
2006-03-07 14:01:25 UTC
Permalink
Hi

I thought, wouldn't it be useful if Base_doSelect, apart from applying a
filter, also remembered the selection a user has made manually, so that
it can be then used in exchange or report? So that I can check all, or
uncheck all, or check some items - record selection - then proceed to a
report or exchange tool?

I made such change for myself, with five lines of code, and it works. I
can share it if anyone is interested.

Bartek
--
"Software is largely a service industry operating under the persistent
but unfounded delusion that it is a manufacturing industry."
Eric S.Raymond, "The Magic Cauldron"
Jean-Paul Smets
2006-03-07 15:24:09 UTC
Permalink
Post by Bartłomiej Górny
Hi
I thought, wouldn't it be useful if Base_doSelect, apart from applying a
filter, also remembered the selection a user has made manually, so that
it can be then used in exchange or report? So that I can check all, or
uncheck all, or check some items - record selection - then proceed to a
report or exchange tool?
I made such change for myself, with five lines of code, and it works. I
can share it if anyone is interested.
Bartek
Normally, persistent selection already exists. (and is already used for
exchange, reports, rendering charts, etc.). Each time one views a listbox,
a selection object is created with persistent selection params which are
reusable. So, I do not understand what is added.

Can you explain more ?

JPS.
--
Jean-Paul Smets-Solanes, Nexedi CEO - Tel. +33(0)6 62 05 76 14
Nexedi: Consulting and Development of Libre / Open Source Software
http://www.nexedi.com
ERP5: Libre/ Open Source ERP Software for small and medium companies
http://www.erp5.org
Rentalinux: Desktop Linux Server
http://www.rentalinux.com
Bartek Gorny
2006-03-07 17:58:29 UTC
Permalink
Post by Jean-Paul Smets
Post by Bartłomiej Górny
Hi
I thought, wouldn't it be useful if Base_doSelect, apart from applying a
filter, also remembered the selection a user has made manually, so that
it can be then used in exchange or report? So that I can check all, or
uncheck all, or check some items - record selection - then proceed to a
report or exchange tool?
I made such change for myself, with five lines of code, and it works. I
can share it if anyone is interested.
Bartek
Normally, persistent selection already exists. (and is already used for
exchange, reports, rendering charts, etc.). Each time one views a listbox,
a selection object is created with persistent selection params which are
reusable. So, I do not understand what is added.
Can you explain more ?
When I view a listbox, then there is a persistent selection containing
what was in the listbox. But I want to select some of the items
manually, by clicking checkboxes, and then use this selection. The way
it works for copy or delete, I want it to work for export or printout.
Currently, if I select some items and then go to exchange or report
dialog, my manual selection is lost, I was looking for a way to keep
it.

Bartek
Post by Jean-Paul Smets
JPS.
--
Jean-Paul Smets-Solanes, Nexedi CEO - Tel. +33(0)6 29 02 44 25
Nexedi: Consulting and Development of Libre / Open Source Software
http://www.nexedi.com
ERP5: Libre/ Open Source ERP Software for small and medium companies
http://www.erp5.org
Rentalinux: Desktop Linux Server
http://www.rentalinux.com
_______________________________________________
Erp5-dev mailing list
Erp5-dev at erp5.org
http://erp5.org/mailman/listinfo/erp5-dev
Romain Courteaud
2006-03-07 18:48:30 UTC
Permalink
Post by Bartek Gorny
When I view a listbox, then there is a persistent selection containing
what was in the listbox. But I want to select some of the items
manually, by clicking checkboxes, and then use this selection. The way
it works for copy or delete, I want it to work for export or printout.
Currently, if I select some items and then go to exchange or report
dialog, my manual selection is lost, I was looking for a way to keep
it.
Correct me if I didn't understand, but I think you just need to use the
'Filter' button, after selected your items.
Then, the selection will be reduce to the list of the selected items.

Regards,
--
Romain
Bartłomiej Górny
2006-03-07 20:51:23 UTC
Permalink
Post by Romain Courteaud
Post by Bartek Gorny
When I view a listbox, then there is a persistent selection containing
what was in the listbox. But I want to select some of the items
manually, by clicking checkboxes, and then use this selection. The way
it works for copy or delete, I want it to work for export or printout.
Currently, if I select some items and then go to exchange or report
dialog, my manual selection is lost, I was looking for a way to keep
it.
Correct me if I didn't understand, but I think you just need to use the
'Filter' button, after selected your items.
Well, yes, that's exactly what I wanted. I would never have guessed that
'filter' button works like this... It is rather counterintuitive - the
little gear next to the select column seems to be a more obvious place
for it.

Bartek
Post by Romain Courteaud
Then, the selection will be reduce to the list of the selected items.
Regards,
--
"Software is largely a service industry operating under the persistent
but unfounded delusion that it is a manufacturing industry."
Eric S.Raymond, "The Magic Cauldron"
Jean-Paul Smets
2006-03-08 06:31:36 UTC
Permalink
Post by Bartek Gorny
Post by Jean-Paul Smets
Post by Bartłomiej Górny
Hi
I thought, wouldn't it be useful if Base_doSelect, apart from
applying a filter, also remembered the selection a user has made
manually, so that it can be then used in exchange or report? So that
I can check all, or uncheck all, or check some items - record
selection - then proceed to a report or exchange tool?
I made such change for myself, with five lines of code, and it works.
I can share it if anyone is interested.
Bartek
Normally, persistent selection already exists. (and is already used for
exchange, reports, rendering charts, etc.). Each time one views a
listbox, a selection object is created with persistent selection params
which are reusable. So, I do not understand what is added.
Can you explain more ?
When I view a listbox, then there is a persistent selection containing
what was in the listbox. But I want to select some of the items
manually, by clicking checkboxes, and then use this selection. The way
it works for copy or delete, I want it to work for export or printout.
Currently, if I select some items and then go to exchange or report
dialog, my manual selection is lost, I was looking for a way to keep
it.
As Jerome said, the filter button allows for doing that. However, it is true
that the general approach we have in other cases (ie. if lines are checks,
consider current lines, if not lines are check, take the whole list), could
be implemented for export and print.

JPS.
Post by Bartek Gorny
Bartek
Post by Jean-Paul Smets
JPS.
--
Jean-Paul Smets-Solanes, Nexedi CEO - Tel. +33(0)6 62 05 76 14
Nexedi: Consulting and Development of Libre / Open Source Software
http://www.nexedi.com
ERP5: Libre/ Open Source ERP Software for small and medium companies
http://www.erp5.org
Rentalinux: Desktop Linux Server
http://www.rentalinux.com
_______________________________________________
Erp5-dev mailing list
Erp5-dev at erp5.org
http://erp5.org/mailman/listinfo/erp5-dev
--
Jean-Paul Smets-Solanes, Nexedi CEO - Tel. +33(0)6 62 05 76 14
Nexedi: Consulting and Development of Libre / Open Source Software
http://www.nexedi.com
ERP5: Libre/ Open Source ERP Software for small and medium companies
http://www.erp5.org
Rentalinux: Desktop Linux Server
http://www.rentalinux.com
Loading...