Alexey Shakov created RF-13563:
----------------------------------
Summary: rich:pickList: add new items after last selected one
Key: RF-13563
URL:
https://issues.jboss.org/browse/RF-13563
Project: RichFaces
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: component-selects
Affects Versions: 4.3.5
Reporter: Alexey Shakov
Sometimes it is preferable, that the newly added item(s) are positioned directly after
already selected item in the right pane.
With current implementation, one needs first add the item and then move it to desired
position. It is inconvinient in the case of large lists.
This functionality makes sense only with orderable lists and only if something selected in
the right pane. This functionality can be optional.
Possible implementation :
{code:title=list.js|borderStyle=solid}
addItems: function(items) {
var parentContainer = this.scrollContainer;
//new items are added after last selected item (if any)
var selection = $("." + this.selectItemCssMarker,
parentContainer);
if (selection.length) {
selection.last().after(items);
} else {
parentContainer.append(items);
}
this.__updateItemsList();
rf.Event.fire(this, "additems", items);
},
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira