Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jsf 2 pe:imageRotateAndResize不使用p:graphicImage缓存=false_Jsf 2_Primefaces_Jsf 2.2_Primefaces Extensions - Fatal编程技术网

Jsf 2 pe:imageRotateAndResize不使用p:graphicImage缓存=false

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

我正在使用primefaces扩展来缩放和旋转图像:

<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
当时不起作用。啊,对不起,双重否定。将删除我的评论!很抱歉,我再也无法访问该代码了。