0

OrderListPrimeFaces v 3.5 ライブラリから使用しようとしています。

<p:orderList 
    id="outputMapId" 
    value="#{JobMgmtBean.selectedStreamNames}" 
    var="stream" 
    valueChangeListener="#{JobMgmtBean.listenerListChanged}" 
    controlsLocation="none" 
    itemLabel="#{stream}" 
    itemValue="#{stream}">
 </p:orderList>

public void listenerListChanged( )
{
    ..
}

アイテムをドラッグ アンド ドロップした後、値の変更イベントを取得できないようですlistenerListChanged。実行されることはありません。私は何を間違っていますか?

編集: このスクリプトを試す:

<h:head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1"/>
<title>#{txt.TXT_TITLE_TRANSCODING}</title>
<link rel="stylesheet" type="text/css" href="scripts/styles.css"/>
<link rel="shortcut icon" href="./images/favicon.ico"></link>
<script src="./scripts/scripts.js" type="text/javascript"/>

<script>
$(document).ready(function() {
        console.log("Entered script!");
        var isDragging = false;
        $(".ui-orderlist-item")
        .mousedown(function () {
            $(window).mousemove(function () {
                isDragging = true;
                        console.log("Mouse down!");
            });
         })
         .mouseup(function () {
             var wasDragging = isDragging;
             isDragging = false;
                     console.log("Mouse up!");
             triggerBackEnd();
          }); 
    }); 
</script>
</h:head>
    <h:body>
    <f:view>
    <h:form>
        <p:remoteCommand name="triggerBackEnd" actionListener="#{JobMgmtBean.listenerListChanged}"></p:remoteCommand>
    ...

しかし、これはまだ機能しません。私は決して得ませんconsole.log("Mouse down!");

PrimeFaces 3.5.0 に付属する jQuery v1.8.3 を使用しています。

4

1 に答える 1