You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Rob Berens (JIRA)" <ji...@apache.org> on 2006/03/23 10:59:03 UTC
[jira] Created: (COCOON-1808) Allowing String labels in forms
StaticSelectionList
Allowing String labels in forms StaticSelectionList
---------------------------------------------------
Key: COCOON-1808
URL: http://issues.apache.org/jira/browse/COCOON-1808
Project: Cocoon
Type: Improvement
Components: Blocks: Forms
Versions: 2.2-dev (Current SVN), 2.1.9-dev (current SVN)
Reporter: Rob Berens
Priority: Minor
Attachments: StaticSelectionList.txt
The StaticSelectionList in the forms block only allows for XMLizable labels to the added items. In some cases it is handy to be able to supply String labels just like in e.g. AbstractJavaSelectionList. I therefore added an addItem(Object, String) method. Note that this makes calls like addItem(someValue, null) ambiguous. Therefore I also added an addItem(Object) method.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (COCOON-1808) Allowing String labels in forms
StaticSelectionList
Posted by "Jean-Baptiste Quenot (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/COCOON-1808?page=comments#action_12372895 ]
Jean-Baptiste Quenot commented on COCOON-1808:
----------------------------------------------
Interesting, how do you use it? Could you please copy/paste an example use case?
> Allowing String labels in forms StaticSelectionList
> ---------------------------------------------------
>
> Key: COCOON-1808
> URL: http://issues.apache.org/jira/browse/COCOON-1808
> Project: Cocoon
> Type: Improvement
> Components: Blocks: Forms
> Versions: 2.2-dev (Current SVN), 2.1.9-dev (current SVN)
> Reporter: Rob Berens
> Priority: Minor
> Attachments: StaticSelectionList.txt
>
> The StaticSelectionList in the forms block only allows for XMLizable labels to the added items. In some cases it is handy to be able to supply String labels just like in e.g. AbstractJavaSelectionList. I therefore added an addItem(Object, String) method. Note that this makes calls like addItem(someValue, null) ambiguous. Therefore I also added an addItem(Object) method.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (COCOON-1808) Allowing String labels in forms
StaticSelectionList
Posted by "Rob Berens (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/COCOON-1808?page=comments#action_12372919 ]
Rob Berens commented on COCOON-1808:
------------------------------------
An example use case.
In this use case I create a filter selection list to filter a subcollection based a single value for a certain property of the elements in that collection. To prepare this filtering the collection has been divided in so called subgroups beforehand. Those subgroups are iterated to retrieve the filter value and their count.
In the selection list the individual items are labeled by their value and between parentheses the number of times they occur in the collection. The following code fragment illustrates this:
StaticSelectionList list = new StaticSelectionList(filterField.getDatatype());
for (
Iterator i = subGroupIterator();
i.hasNext();
) {
Group subGroup = (Group)i.next();
String value = subGroup.getValue().asString();
list.addItem(value, value + " (" + subGroup.getElementCount() + ")");
}
filterField.setSelectionList(list);
> Allowing String labels in forms StaticSelectionList
> ---------------------------------------------------
>
> Key: COCOON-1808
> URL: http://issues.apache.org/jira/browse/COCOON-1808
> Project: Cocoon
> Type: Improvement
> Components: Blocks: Forms
> Versions: 2.2-dev (Current SVN), 2.1.9-dev (current SVN)
> Reporter: Rob Berens
> Priority: Minor
> Attachments: StaticSelectionList.txt
>
> The StaticSelectionList in the forms block only allows for XMLizable labels to the added items. In some cases it is handy to be able to supply String labels just like in e.g. AbstractJavaSelectionList. I therefore added an addItem(Object, String) method. Note that this makes calls like addItem(someValue, null) ambiguous. Therefore I also added an addItem(Object) method.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Closed: (COCOON-1808) Allowing String labels in forms
StaticSelectionList
Posted by "Jean-Baptiste Quenot (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/COCOON-1808?page=all ]
Jean-Baptiste Quenot closed COCOON-1808:
----------------------------------------
Fix Version: 2.2-dev (Current SVN)
2.1.9-dev (current SVN)
Resolution: Fixed
Assign To: Jean-Baptiste Quenot
Committed, thanks!
> Allowing String labels in forms StaticSelectionList
> ---------------------------------------------------
>
> Key: COCOON-1808
> URL: http://issues.apache.org/jira/browse/COCOON-1808
> Project: Cocoon
> Type: Improvement
> Components: Blocks: Forms
> Versions: 2.2-dev (Current SVN), 2.1.9-dev (current SVN)
> Reporter: Rob Berens
> Assignee: Jean-Baptiste Quenot
> Priority: Minor
> Fix For: 2.2-dev (Current SVN), 2.1.9-dev (current SVN)
> Attachments: StaticSelectionList.txt
>
> The StaticSelectionList in the forms block only allows for XMLizable labels to the added items. In some cases it is handy to be able to supply String labels just like in e.g. AbstractJavaSelectionList. I therefore added an addItem(Object, String) method. Note that this makes calls like addItem(someValue, null) ambiguous. Therefore I also added an addItem(Object) method.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira