Resize and Rotate Image in a dialog box

Community Driven Extensions Project
Post Reply
aysegulP
Posts: 19
Joined: 22 Apr 2014, 15:38

02 Jun 2016, 13:32

Hello everybody,

I need a solution that resize and rotate image in a dialog box. Here is my code

Code: Select all

<p:dataTable id="fileList" value="#{userBean.listResim4YeniBelge}" var="file1"   emptyMessage="Herhangi bir kayıt bulunmamaktadır." rowIndexVar="rowIndex">
            <f:facet name="header">
                Ekler
            </f:facet>
            
            <p:column headerText="Seç" rendered="#{!file1.uzanti.equals('application/pdf')}"> 
                <p:commandButton id="secImage"  value="Göster" actionListener="#{userBean.ataID(rowIndex+1)}"  process="@this"    update=":indexForm:big"oncomplete="PF('dialogImage').show();"/>
            </p:column>
        </p:dataTable>

        <h:panelGrid id="big" >
            <p:dialog widgetVar="dialogImage" id="dialogImage" closable="true" resizable="true" maximizable="true">
                <p:graphicImage id="newImage"  width="600" height="600" value="#{imageBean.image4YeniBelge}" cache="false">
                    <f:param name="id1" value="#{userBean.id}"/>
                </p:graphicImage>
                <pe:imageRotateAndResize id="rotateAndResize" for="newImage" widgetVar="rotateAndResizeWidget" />  
                <p:commandButton icon="ui-icon-arrowreturnthick-1-w" value="Rotate Left"  
                                 onclick="PF('rotateAndResizeWidget').rotateLeft(90);
                                         return false;"/>  
                <p:commandButton icon="ui-icon-arrowreturnthick-1-e" value="Rotate Right"  
                                 onclick="PF('rotateAndResizeWidget').rotateRight(90);
                                         return false;"/>  
                <p:commandButton icon="ui-icon-zoomin" value="Scale +"  
                                 onclick="PF('rotateAndResizeWidget').scale(1.05);
                                         return false;"/>  
                <p:commandButton icon="ui-icon-zoomout" value="Scale -"  
                                 onclick="PF('rotateAndResizeWidget').scale(0.95);
                                         return false;"/>  

            </p:dialog>
       
        </h:panelGrid>
But nothing change and there is no error on console. Any suggestion?

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests