Primefaces <p:graphicimage>抛出未定义的函数</p:graphicimage>

时间:2014-04-21 08:18:26

标签: function jsf-2 primefaces undefined galleria

<p:galleria id="gal" value="#{homeBean.images}" var="image" 
        panelWidth="600" panelHeight="300" >
    <p:graphicImage value="#{image.imagePath}" width="600" height="300" />  
</p:galleria>

问题:

Uncaught TypeError: undefined is not a function galleria.js?ln=primefaces&v=4.0:1

没有预览,没有 - 就像它不存在一样。但在源代码中确实存在。

生成的源代码是:

<div id="gal" class="ui-galleria ui-widget ui-widget-content ui-corner-all">
    <ul class="ui-galleria-panel-wrapper">
        <li class="ui-galleria-panel ui-helper-hidden">
            <img id="j_idt8" 
                src="/FindHostpital/images/ib-haytham-1.jpg?pfdrid_c=true" 
                alt="" width="600" height="300" />
        </li>
        <li class="ui-galleria-panel ui-helper-hidden">
            <img id="j_idt8" src="/FindHostpital/images/ibn-haytham-2.jpg?pfdrid_c=true"
                alt="" width="600" height="300" />
        </li>
        <li class="ui-galleria-panel ui-helper-hidden">
            <img id="j_idt8" src="/FindHostpital/images/ibn-haytham-3.jpg?pfdrid_c=true"
                alt="" width="600" height="300" />
        </li>
    </ul>
</div>
<script id="gal_s" type="text/javascript">
    $(window).load(function(){PrimeFaces.cw('Galleria','widget_gal',
        {id:'gal',panelWidth:600,panelHeight:300,custom:false},'galleria');});
</script>

1 个答案:

答案 0 :(得分:0)

已解决

我正在使用一个jquery库,它与primefaces jquery库冲突删除了jquery库,我只使用了primefaces jquery库,它运行得很好