[
https://jira.nuxeo.org/browse/NXP-4935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Anahide Tchertchian updated NXP-4935:
-------------------------------------
Description:
2.5.1 Selectionwidgettypes
For now there are no widget types using simple selection components (expect the
boolean checkbox widget type). There are 6 JSF components of interest in this
mat -
ter:
- h:selectManyCheckbox
- h:selectManyListbox
- h:selectManyMenu
- h:selectOneRadio
- h:selectOneListbox
- h:selectOneMenu
Each of these components could be mapped to generic widget types. The difficulty
is about expressing available values.
There are two standard ways of declaring available values on these components.
Using tag "f:selectItem" for each available selection:
<h:selectOneRadio value="#{field_0}">
<f:selectItem itemValue="imap" itemLabel="IMAP"
itemDisabled="true"/>
<f:selectItem itemValue="pop3" itemLabel="POP3" />
</h:selectOneRadio>
Using tag "f:selectItems" for all available selections:
<h:selectOneRadio value="#{field_0}">
<f:selectItems value="#{mySelections}" />
</h:selectOneRadio>
Any number of these tags can be combined to add selection values to the global
se -
lect. Nuxeo add two kinds of tags to these standard select items.
A first one makes it possible to build selections from any kind of object list
(and not
only a map for instance):
<h:selectOneRadio value="#{field_0}">
<nxu:selectItems value="#{myDocumentList}"
var="document"
itemValue="#{document.ref}"
itemLabel="#{document.dublincore.title}" />
</h:selectOneRadio>
A second one makes it possible to take into account directory values. It also
support
filter of obsolete entries, and usage of a sort criterion:
<!-- show the subject directory entries -->
<nxir:selectItems directoryName="subject"
var="item"
itemValue="#{item.id}"
itemLabel="#{item.vocabulary.label}" />
<!-- show the subject directory entries filtered by given list -->
<nxdir:selectItems directoryName="subject"
value="#{document.dublincore.subjects}"
showAll="false"
var="item"
itemValue="#{item.id}"
itemLabel="#{item.vocabulary.label}" />
These ways to declare selections should be made available through XML
configuration.
Syntax is still to discuss.
> Rewrite selection/directory widget types
> ----------------------------------------
>
> Key: NXP-4935
> URL: https://jira.nuxeo.org/browse/NXP-4935
> Project: Nuxeo Enterprise Platform
> Issue Type: Sub-task
> Reporter: Anahide Tchertchian
>
> 2.5.1 Selectionwidgettypes
>
> For now there are no widget types using simple selection components (expect
> the
> boolean checkbox widget type). There are 6 JSF components of interest in this
> mat -
> ter:
> - h:selectManyCheckbox
> - h:selectManyListbox
> - h:selectManyMenu
> - h:selectOneRadio
> - h:selectOneListbox
> - h:selectOneMenu
> Each of these components could be mapped to generic widget types. The
> difficulty
> is about expressing available values.
> There are two standard ways of declaring available values on these components.
> Using tag "f:selectItem" for each available selection:
> <h:selectOneRadio value="#{field_0}">
> <f:selectItem itemValue="imap" itemLabel="IMAP"
> itemDisabled="true"/>
> <f:selectItem itemValue="pop3" itemLabel="POP3" />
> </h:selectOneRadio>
> Using tag "f:selectItems" for all available selections:
> <h:selectOneRadio value="#{field_0}">
> <f:selectItems value="#{mySelections}" />
> </h:selectOneRadio>
> Any number of these tags can be combined to add selection values to the
> global se -
> lect. Nuxeo add two kinds of tags to these standard select items.
> A first one makes it possible to build selections from any kind of object
> list (and not
> only a map for instance):
> <h:selectOneRadio value="#{field_0}">
> <nxu:selectItems value="#{myDocumentList}"
> var="document"
> itemValue="#{document.ref}"
> itemLabel="#{document.dublincore.title}" />
> </h:selectOneRadio>
> A second one makes it possible to take into account directory values. It also
> support
> filter of obsolete entries, and usage of a sort criterion:
> <!-- show the subject directory entries -->
> <nxir:selectItems directoryName="subject"
> var="item"
> itemValue="#{item.id}"
> itemLabel="#{item.vocabulary.label}" />
> <!-- show the subject directory entries filtered by given list -->
> <nxdir:selectItems directoryName="subject"
> value="#{document.dublincore.subjects}"
> showAll="false"
> var="item"
> itemValue="#{item.id}"
> itemLabel="#{item.vocabulary.label}" />
> These ways to declare selections should be made available through XML
> configuration.
> Syntax is still to discuss.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets