title: JSF Panels positioning
body: <p>I am able to set my panel's position then update it however I have trouble when getting its current position.</p>
  
  <p>For example:
  Currently, my panel is positioned at (50, 50). </p>
  
  <pre><code> &lt;h:form id="testForm"&gt;
          &lt;p:panel id="pane" style="position: absolute; left:50px; top:50px;"&gt;
              &lt;p:panelGrid columns=4&gt;
                  &lt;p:outputPanel id="ASlot3" styleClass="slot"/&gt;  
                  &lt;p:outputPanel id="ASlot4" styleClass="slot"/&gt;  
                  &lt;p:outputPanel id="ASlot5" styleClass="slot"/&gt;  
                  &lt;p:outputPanel id="ASlot6" styleClass="slot"/&gt;  
              &lt;/p:panelGrid&gt;
          &lt;/p:panel&gt;
          &lt;p:draggable id="drg" for="pane"/&gt;
  
          &lt;p:commandButton id="press" action="#{sbean.press}"/&gt;
  
      &lt;/h:form&gt;
  </code></pre>
  
  <p>I update its position via dragging the panel. After dragging it, I press a button holding this method printing the contents of "style".</p>
  
  <pre><code>    //press() method
      UIViewRoot viewRoot = FacesContext.getCurrentInstance().getViewRoot();
      UIComponent component = viewRoot.findComponent("testForm").findComponent("pane");
  
      Panel p = (Panel) component;
  
      System.out.println(p.getAttributes().get("style"));
  </code></pre>
  
  <p>The "style" does not update after dragging the panel and pressing the button.</p>
  
  <p>So how can I get my panel's current position after dragging?</p>
  
  <p>EDIT: BTW, the scope I'm using is @ViewScoped</p>