List Info

Thread: Hidden values in a Select Widget




Hidden values in a Select Widget
country flaguser name
United States
2007-07-27 03:16:22

Hi,

 

In a CPSDocument, I need a special behaviour for a Select widget:

 

The elements in the vocabulary can be deactivated by the admin, such that they cannot be selected anymore, but the documents that already use them should still display the associated labels.

Is there a way to achieve this with the existing Select Widget / CPS Vocabulary?

 

I suspect I’ll have to extend these classes, any suggestions on how I should go with this?

 

 

Thanks a lot,

Jonathan Winterflood – Concepteur Réalisateur Intégrateur
Capgemini Ouest – Agence de Brest
10, Quai du Commandant Malbert
29 200 Brest
l  : (+33) (0)2 98 33 32 35
Fax : (+33) (0)2 98 33 32 57

capgemini.com" title="mailto:jonathan.wintefloodcapgemini.com">jonathan.wintefloodcapgemini.com

 

Re: Hidden values in a Select Widget
country flaguser name
France
2007-08-05 11:17:40
On 27 Jul 2007, at 10:16, Winterflood, Jonathan wrote:
> In a CPSDocument, I need a special behaviour for a
Select widget:
>
> The elements in the vocabulary can be deactivated by
the admin,  
> such that they cannot be selected anymore, but the
documents that  
> already use them should still display the associated
labels.
>
> Is there a way to achieve this with the existing Select
Widget /  
> CPS Vocabulary?
>
No.
>  I suspect I’ll have to extend these classes, any
suggestions on  
> how I should go with this?
>
You'd have to add an extra "deactivated" flag to
vocabulary entries.  
So you need a new vocabulary class.
Then you need to write a new vocabulary widget that takes
those into  
account.
But all this is rather straightforward code.

Florent

-- 
Florent Guillaume, Director of R&D, Nuxeo
Open Source Enterprise Content Management (ECM)
http://www.nuxeo.com   http://www.nuxeo.org   +33 1
40 33 79 87



_______________________________________________
cps-users mailing list
cps-userslists.nuxeo.com
htt
p://lists.nuxeo.com/mailman/listinfo/cps-users

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )