title: Rotate and Resize image
body: <p>I use JSF 2 , primefaces 5.3 and i try to use rotate and resize images like Jpg, png or any other image format. But this error occurs. 
   Unable to attach behavior to non-ClientBehaviorHolder parent jsf - file preview </p>
  
  <p>here is my code. 
  </p>
  
  <pre><code>                    &lt;pe:imageAreaSelect id="areaSelect"  
                                          for="myImage"  
                                          widgetVar="areaSelectWidget"  
                                          autoHide="true"  
                                          handles="false"  
                                          movable="false"  
                                          persistent="false"  
                                          resizable="false"  
                                          parentSelector="#imageWrapper"&gt;  
                          &lt;p:ajax event="selectEnd" listener="#{fileViewer.selectEndListener}" update="growl"/&gt;  
                      &lt;/pe:imageAreaSelect&gt;  
  
                      &lt;pe:imageRotateAndResize id="rotateAndResize" for="myImage" widgetVar="rotateAndResizeWidget"&gt;  
                          &lt;p:ajax event="rotate" listener="#{fileViewer.rotateListener}"  
                                  update="growl" oncomplete="PF('areaSelectWidget').reload();"/&gt;  
                          &lt;pe:javascript event="resize" execute="PF('areaSelectWidget').reload();"/&gt;  
                      &lt;/pe:imageRotateAndResize&gt; 
  
                      &lt;p:commandButton type="button" icon="ui-icon-arrowreturnthick-1-w"
                                       value="Rotate" onclick="PF('rotateAndResizeWidget').rotateLeft(90);
                                               return false;"/&gt;
                      &lt;p:commandButton type="button" icon="ui-icon-arrowreturnthick-1-e" 
                                       value="Rotate" onclick="PF('rotateAndResizeWidget').rotateRight(90);
                                               return false;"/&gt; 
                      &lt;p:commandButton type="button" icon="ui-icon-zoomin" 
                                       value="+"  onclick="PF('rotateAndResizeWidget').scale(1.05);
                                               return false;"/&gt;
                      &lt;p:commandButton type="button" icon="ui-icon-zoomout"
                                       value="-" onclick="PF('rotateAndResizeWidget').scale(0.95);
                                               return false;"/&gt;
                  &lt;/p:panelGrid&gt;
  </code></pre>
  
  <p>public void rotateListener(final RotateEvent e) {
          final FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, "Image rotated",  + e.getDegree() + " Degree:");</p>
  
  <pre><code>    FacesContext.getCurrentInstance().addMessage(null, msg);
  }
  
  public void resizeListener(final ResizeEvent e) {  
      final FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, "Image resized", "Width:" + e.getWidth() + ", Height: " + e.getHeight());  
  
      FacesContext.getCurrentInstance().addMessage(null, msg);  
  }  
  
  public void selectEndListener(final ImageAreaSelectEvent e) {
      final FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, "Area selected",
              "X1: " + e.getX1()
              + ", X2: " + e.getX2()
              + ", Y1: " + e.getY1()
              + ", Y2: " + e.getY2()
              + ", Image width: " + e.getImgWidth()
              + ", Image height: " + e.getImgHeight());
  
      FacesContext.getCurrentInstance().addMessage(null, msg);
  }
  </code></pre>
  
  <p>How can I solve it?</p>