Jsf 2 pe:imageRotateAndResize不使用p:graphicImage缓存=false
我正在使用primefaces扩展来缩放和旋转图像:Jsf 2 pe:imageRotateAndResize不使用p:graphicImage缓存=false,jsf-2,primefaces,jsf-2.2,primefaces-extensions,Jsf 2,Primefaces,Jsf 2.2,Primefaces Extensions,我正在使用primefaces扩展来缩放和旋转图像: <p:graphicImage id="imageViewerId" value="#{contentBL.inlineContent}" cache="false" /> <pe:imageRotateAndResize id="rotateAndResizeImageId" for="imageViewerId" widgetVar="rotateAndResizeVar" /> <p:commandBut
<p:graphicImage id="imageViewerId" value="#{contentBL.inlineContent}" cache="false" />
<pe:imageRotateAndResize id="rotateAndResizeImageId" for="imageViewerId" widgetVar="rotateAndResizeVar" />
<p:commandButton title="Rotate Left" icon="fa fa-mail-reply"
onclick="PF('rotateAndResizeVar').rotateLeft(90); adjustContentViewerSize(); return false;" />
<p:commandButton icon="fa fa-mail-forward" title="Rotate Right"
onclick="PF('rotateAndResizeVar').rotateRight(90); adjustContentViewerSize(); return false;" />
<p:commandButton icon="fa fa-plus-circle" title="Scale +"
onclick="PF('rotateAndResizeVar').scale(1.1); adjustContentViewerSize(); return false;" />
<p:commandButton icon="fa fa-minus-circle" title="Scale -"
onclick="PF('rotateAndResizeVar').scale(0.9); adjustContentViewerSize(); return false;" />
不幸的是,只有当
p:graphicImage
的属性cache
为true
时,这才有效。如果设置为false
,则单击旋转或缩放按钮时不会发生任何事情<代码>{contentBL.inlineContent}提供StreamedContent
。有没有一种方法可以在不缓存图像的情况下使其正常工作?我正在使用primefaces 5.3.0和primefaces extensions 4.0.0以及mojarra 2.2.12。使用f:param
作为解决方法,使url唯一:
<p:graphicImage id="imageViewerId" value="#{contentBL.inlineContent}" cache="true">
<f:param name="customid" value="#{contentBL.generateUuid()}" />
</p:graphicImage>
正确。不应缓存图像。但是pe:imageRotateAndResize
当时不起作用。啊,对不起,双重否定。将删除我的评论!很抱歉,我再也无法访问该代码了。