[CPS-users] Hidden values in a Select Widget

Florent Guillaume fg at nuxeo.com
Sun Aug 5 18:17:40 CEST 2007


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






This list archive provided by Nuxeo, the leaders of open source ECM. Check out the Nuxeo 5 open source, standards-based ECM project.