Primefaces< p:graphicImage/>抛出未定义的函数 [英] Primefaces <p:graphicImage /> is throwing undefined function
本文介绍了Primefaces< p:graphicImage/>抛出未定义的函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<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
没有预览,没有任何内容-就像它不存在一样.但是在源代码中确实存在.
And no preview, nothing - like it doesn't exist. But in the source code it does exist.
生成的源代码为:
<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>
推荐答案
已解决
我使用的是jquery库,并且与primefaces jquery库发生冲突,因此删除了jquery库,而我只使用了primefaces jquery库,所以效果很好
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
这篇关于Primefaces< p:graphicImage/>抛出未定义的函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文