无法使用鼠标将上下文粘贴到Primefaces Extension pe:inputNumber中 [英] Unable to paste the context in Primefaces Extension pe:inputNumber using mouse

查看:91
本文介绍了无法使用鼠标将上下文粘贴到Primefaces Extension pe:inputNumber中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们的项目中,我们一直在使用Primefaces(v 3.5)和Primefaces Extensions(v 0.7.0),它非常棒,为开发人员和社区欢呼!

We've been using Primefaces (v 3.5) and Primefaces Extensions (v 0.7.0) in our project and it's been great, cheers for the developers and community!

inputNumber组件在处理十进制字段时几乎满足了我们的所有需求.

The inputNumber component takes care of pretty much all of our needs when dealing with decimal fields.

isn't working的一件事是用户将值粘贴到字段using the mouse right button then paste option中.

The one thing that isn't working is when the user paste a value into the field using the mouse right button then paste option.

发生这种情况时,似乎这些值都没有被处理,因为当我提交表单时,无论是有效值还是无效值,这些值都被清除了.

When that happens, it seems these values aren't processed, since when I submit the form they are cleared, no matter it's a valid or unvalid value.

用户甚至可以将文本粘贴到pe:inputNumber中.控件c +控件v可以按预期工作,完全没有问题.

The user can even paste a text into the pe:inputNumber. The control c + control v works as expected, no problem at all.

我们正在使用的代码如下:

The code we are using is like this:

 <pe:inputNumber id="AmtInTxt" value="#{myController.amtField}" symbol="$ "/>

关于如何使上下文菜单粘贴的任何想法都类似于控件c +控件v?

Any ideas of how can we make the context menu paste works like the control c + control v?

社区信息

推荐答案

这个解决了吗?对于将来的查看者-使用鼠标时,这似乎是一个问题,没有将数据发布到Bean中.尝试在输入字段中放入ajax事件处理程序.

Was this ever solved? For future viewers - this looks like an issue with not posting the data to the bean when using the mouse. Try putting an ajax event handler in your input field.

<pe:inputNumber ...> <p:ajax event="blur"/> </pe:inputNumber>

<pe:inputNumber ...> <p:ajax event="blur"/> </pe:inputNumber>

这篇关于无法使用鼠标将上下文粘贴到Primefaces Extension pe:inputNumber中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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