primefaces 4:多个自动完成功能在已添加项目的中间添加一个元素 [英] primefaces 4: Multiple autocomplete add an element in middle of eneterd items

查看:82
本文介绍了primefaces 4:多个自动完成功能在已添加项目的中间添加一个元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用多个自动完成功能.我在多自动填充框中添加了4-5个项目.是否可以在中间添加一个项目(例如第二个和第三个项目之间)

I am using a multiple autocomplete. I add some 4-5 items in multi autocomplete box. Is it possible to add an item in the middle (say between 2nd & 3rd item)

正如我们在gmail中看到的那样,当我们指定多个电子邮件时,在收件人"字段中,可以将电子邮件ID项目拖到列表中的任何位置.

As we see in gmail, in the To field when we specify multiple emails, its possible to drag an email id item to any where in the list.

我在PF Showcase中尝试了多个自动完成功能,在该功能中不可能拖动或添加项目,相反,我们需要将所有项目删除到需要添加新项目的位置.

I tried in PF Showcase for multi-autocomplete where its not possible to drag or add an item between, instead we need to remove all items to the position where we need to add the new one.

请回复. 预先感谢.

推荐答案

PrimeFaces 4(也不适用于更新版本的afaik)是不可能的

No this is not possible th PrimeFaces 4 (nor with newer releases afaik)

我查看了生成的html,看是否有一个简单的解决方法,但没有.可以做到,但是需要大量的JavaScript覆盖...捕获左/右移动,鼠标单击,将选择内容置于隐藏"选项列表中的正确位置,等等...我)为你做...

I took a look at the generated html to see if there was an easy workaround, but there is not. It can be done, but requires a fair amount of javascript overriding... capturing left/right movement, mouse clicks, putting the selection at the right place in the 'hidden' options list etc... To much work (at least for me) to do for you...

这篇关于primefaces 4:多个自动完成功能在已添加项目的中间添加一个元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆