You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2011/10/17 15:18:47 UTC

svn commit: r1185154 - in /myfaces/tobago/trunk: tobago-example/tobago-example-demo/src/main/webapp/content/20/ tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/

Author: lofwyr
Date: Mon Oct 17 13:18:47 2011
New Revision: 1185154

URL: http://svn.apache.org/viewvc?rev=1185154&view=rev
Log:
TOBAGO-1011: Popup should determine its size automatically
- using current values

Modified:
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20/popup.xhtml
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PopupRenderer.java

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20/popup.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20/popup.xhtml?rev=1185154&r1=1185153&r2=1185154&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20/popup.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20/popup.xhtml Mon Oct 17 13:18:47 2011
@@ -96,6 +96,9 @@
       <tc:button label="Open modeless">
         <f:facet name="popup">
           <tc:popup id="non_modal_popup" modal="false">
+            <f:facet name="layout">
+              <tc:gridLayout rows="auto" columns="auto"/>
+            </f:facet>
             <tc:box label="Non modal text input">
               <f:facet name="layout">
                 <tc:gridLayout rows="auto;*;auto"/>

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PopupRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PopupRenderer.java?rev=1185154&r1=1185153&r2=1185154&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PopupRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PopupRenderer.java Mon Oct 17 13:18:47 2011
@@ -85,13 +85,13 @@ public class PopupRenderer extends Layou
     LOG.info("Laying out takes: " + new DecimalFormat("#,##0").format(System.nanoTime() - begin) + " ns");
 
     // XXX fixing invisible popups
-    if (popup.getWidth() == null || popup.getWidth().equals(Measure.ZERO)) {
+    if (popup.getCurrentWidth() == null || popup.getCurrentWidth().equals(Measure.ZERO)) {
       LOG.warn("Undefined width of popup with id='" + popup.getClientId(facesContext) + "'");
-      popup.setWidth(getPreferredWidth(facesContext, popup));
+      popup.setCurrentWidth(getPreferredWidth(facesContext, popup));
     }
-    if (popup.getHeight() == null || popup.getHeight().equals(Measure.ZERO)) {
+    if (popup.getCurrentHeight() == null || popup.getCurrentHeight().equals(Measure.ZERO)) {
       LOG.warn("Undefined height of popup with id='" + popup.getClientId(facesContext) + "'");
-      popup.setHeight(getPreferredHeight(facesContext, popup));
+      popup.setCurrentHeight(getPreferredHeight(facesContext, popup));
     }
 // LAYOUT End