Primefaces <p:graphicImage /> is throwing undefined function

谁说我不能喝 提交于 2019-12-11 15:03:02

问题


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

Problem:

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

And no preview, nothing - like it doesn't exist. But in the source code it does exist.

The generated source code is :

<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:


SOLVED

i was using a jquery library and it was conflicting with the primefaces jquery library removed the jquery library and i used only primefaces jquery library and it worked just fine



来源:https://stackoverflow.com/questions/23193568/primefaces-pgraphicimage-is-throwing-undefined-function

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!