简体   繁体   English

可拖动的输入组件PrimeFaces

[英]Draggable input components PrimeFaces

I tried to use draggable component https://www.primefaces.org/showcase/ui/dnd/draggable.xhtml for inputTextArea component but it does not work for me. 我尝试对inputTextArea组件使用可拖动组件https://www.primefaces.org/showcase/ui/dnd/draggable.xhtml ,但它对我不起作用。 Do you know any workarounds for making input components draggable? 您知道使输入组件可拖动的任何解决方法吗?

My code: 我的代码:

<p:outputPanel>
    <p:inputTextarea id="test">
    </p:inputTextarea>
</p:outputPanel>
<p:draggable for="test" containment="parent" />

I don't have any errors in console. 我的控制台没有任何错误。 But drag function does not work as it work for p:panel, for example. 但是拖动功能不起作用,例如对于p:panel起作用。

try to wrap the component in a panel and assign "for" to that panel. 尝试将组件包装在面板中并为该面板分配“ for”。

<p:outputPanel>
    <p:panel id="test">
        <p:inputTextarea />
    </p:panel>
    <p:draggable for="test" containment="parent"/>
</p:outputPanel>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM