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 2010/03/04 11:22:40 UTC

svn commit: r918925 [2/2] - in /myfaces/tobago/trunk: core/src/main/java-jsf-1.1-todo/org/apache/myfaces/tobago/taglib/component/ core/src/main/java-jsf-1.2-todo/org/apache/myfaces/tobago/taglib/component/ core/src/main/java/org/apache/myfaces/tobago/c...

Modified: myfaces/tobago/trunk/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/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PopupRenderer.java?rev=918925&r1=918924&r2=918925&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PopupRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PopupRenderer.java Thu Mar  4 10:22:39 2010
@@ -17,13 +17,6 @@
  * limitations under the License.
  */
 
-/*
-  * Created 28.04.2003 at 15:29:36.
-  * $Id$
-  */
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.tobago.ajax.api.AjaxRenderer;
 import org.apache.myfaces.tobago.ajax.api.AjaxUtils;
 import org.apache.myfaces.tobago.component.Attributes;
@@ -47,13 +40,12 @@
 
 public class PopupRenderer extends LayoutComponentRendererBase implements AjaxRenderer {
 
-  @SuppressWarnings({"UnusedDeclaration"})
-  private static final Log LOG = LogFactory.getLog(PopupRenderer.class);
-
+  @Override
   public boolean getRendersChildren() {
     return true;
   }
 
+  @Override
   public void prepareRender(FacesContext facesContext, UIComponent component) throws IOException {
     if (facesContext instanceof TobagoFacesContext) {
       ((TobagoFacesContext) facesContext).getPopups().add((UIPopup) component);
@@ -61,12 +53,8 @@
     super.prepareRender(facesContext, component);
   }
 
-  public void decode(FacesContext facesContext, UIComponent component) {
-    super.decode(facesContext, component);
-  }
-
-  public void encodeBegin(
-      FacesContext facesContext, UIComponent uiComponent) throws IOException {
+  @Override
+  public void encodeBegin(FacesContext facesContext, UIComponent uiComponent) throws IOException {
 
     TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
     UIPopup component = (UIPopup) uiComponent;
@@ -99,7 +87,7 @@
     //contentStyle.append("top: ");
     //contentStyle.append(top);
     //contentStyle.append("; ");
-    if (component.getModal()) {
+    if (component.isModal()) {
       writer.startElement(HtmlConstants.DIV, component);
       writer.writeIdAttribute(clientId);
       writer.writeStyleAttribute("z-index: " + (zIndex + 1) + ";");
@@ -119,7 +107,7 @@
       writer.writeClassAttribute("tobago-popup-iframe tobago-popup-none");
       writer.writeStyleAttribute("z-index: " + (zIndex + 2) + ";");
       UIPage page = (UIPage) ComponentUtils.findPage(facesContext);
-      if (component.getModal()) {
+      if (component.isModal()) {
         final StringBuilder frameSize = new StringBuilder(32);
         // full client area
         frameSize.append("width: ");
@@ -142,7 +130,7 @@
     StyleClasses styleClasses = new StyleClasses();
     styleClasses.addClass("popup", "content");
     styleClasses.addClass("popup", "none");
-    if (component.getModal()) {
+    if (component.isModal()) {
       styleClasses.addClass("popup", "modal");
     }
     writer.writeClassAttribute(styleClasses);
@@ -150,6 +138,7 @@
     writer.writeAttribute(HtmlAttributes.STYLE, contentStyle.toString(), false);
   }
 
+  @Override
   public void encodeEnd(FacesContext facesContext,
       UIComponent uiComponent) throws IOException {
     TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
@@ -166,7 +155,7 @@
     writer.write("', '");
     writer.write(component.getTop().getPixel());
     writer.write("', ");
-    writer.write(String.valueOf(component.getModal()));
+    writer.write(String.valueOf(component.isModal()));
     writer.write(");");
     writer.endJavascript();
   }

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java?rev=918925&r1=918924&r2=918925&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java Thu Mar  4 10:22:39 2010
@@ -85,6 +85,7 @@
 
   private static final Integer HEIGHT_0 = 0;
 
+  @Override
   public void prepareRender(FacesContext facesContext, UIComponent component) throws IOException {
     super.prepareRender(facesContext, component);
     if (facesContext instanceof TobagoFacesContext) {
@@ -92,6 +93,7 @@
     }
   }
 
+  @Override
   public void encodeEnd(FacesContext facesContext, UIComponent uiComponent) throws IOException {
 
     UISheet sheet = (UISheet) uiComponent;
@@ -228,7 +230,7 @@
     }
 
 
-    final boolean showHeader = sheet.getShowHeader();
+    final boolean showHeader = sheet.isShowHeader();
     if (showHeader) {
       // begin rendering header
       writer.startElement(HtmlConstants.DIV, null);
@@ -581,6 +583,7 @@
     return sheetPagingInfo;
   }
 
+  @Override
   public void decode(FacesContext facesContext, UIComponent component) {
     super.decode(facesContext, component);
 
@@ -687,8 +690,7 @@
       return value;
     } else {
       if (!"none".equals(value)) {
-        LOG.warn(
-            "illegal value in sheet' paging attribute : \"" + value + "\"");
+        LOG.warn("Illegal value in sheets paging attribute: '" + value + "'");
       }
       return "none";
     }
@@ -696,14 +698,14 @@
 
   private boolean isValidPagingValue(String value) {
     // todo: use enum type instead of string
-    return "left".equals(value) || "center".equals(value)
-        || "right".equals(value);
+    return "left".equals(value) || "center".equals(value) || "right".equals(value);
   }
 
   private Measure getAscendingMarkerWidth(FacesContext facesContext, UISheet data) {
     return getResourceManager().getThemeMeasure(facesContext, data, "ascendingMarkerWidth");
   }
 
+  @Override
   public boolean getRendersChildren() {
     return true;
   }
@@ -1106,6 +1108,7 @@
     renderSheet(facesContext, data, (clickAction != null || dblClickAction != null), style);
   }
 
+  @Override
   public void encodeChildren(FacesContext context, UIComponent component) throws IOException {
     // DO Nothing
   }

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeNodeRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeNodeRenderer.java?rev=918925&r1=918924&r2=918925&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeNodeRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeNodeRenderer.java Thu Mar  4 10:22:39 2010
@@ -119,7 +119,6 @@
   }
 
   public void encodeBeginListbox(FacesContext facesContext, UITreeNode node, UITreeListbox tree) throws IOException {
-    String treeId = tree.getClientId(facesContext);
     TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
 
     boolean folder = node.isFolder();
@@ -189,7 +188,7 @@
 
     String treeId = tree.getClientId(facesContext);
     boolean folder = node.isFolder();
-    boolean marked = node.getMarked();
+    boolean marked = node.isMarked();
     String id = node.getClientId(facesContext);
     int depth = node.getDepth();
     boolean hasNextSibling = node.isHasNextSibling();
@@ -515,10 +514,8 @@
     TreeState state = (TreeState) tree.getState();
     if (state != null) {
       return state.getExpanded().contains(node.getPath());
-    } else if (node.getExpanded() != null) {
-      return node.getExpanded();
     } else {
-      return false;
+      return node.isExpanded();
     }
   }
 
@@ -535,7 +532,7 @@
       node.setExpanded(expanded);
     }
     if (oldExpanded != expanded) {
-      new TreeExpansionEvent(node, node.getExpanded(), expanded).queue();
+      new TreeExpansionEvent(node, node.isExpanded(), expanded).queue();
     }
   }
 }

Modified: myfaces/tobago/trunk/theme/standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/CommandRendererHelper.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/CommandRendererHelper.java?rev=918925&r1=918924&r2=918925&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/CommandRendererHelper.java (original)
+++ myfaces/tobago/trunk/theme/standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/CommandRendererHelper.java Thu Mar  4 10:22:39 2010
@@ -41,9 +41,6 @@
 import java.util.Arrays;
 import java.util.List;
 
-/*
- * Date: 19.03.2007 17:54:59
- */
 public class CommandRendererHelper {
 
   private static final Log LOG = LogFactory.getLog(CommandRendererHelper.class);
@@ -177,7 +174,7 @@
     ExternalContext externalContext = facesContext.getExternalContext();
 
     if (component.getResource() != null) {
-      boolean jsfResource = component.getJsfResource();
+      boolean jsfResource = component.isJsfResource();
       url = ResourceManagerUtil.getPageWithoutContextPath(facesContext, component.getResource());
       if (url != null) {
         if (jsfResource) {

Modified: myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?rev=918925&r1=918924&r2=918925&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js (original)
+++ myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js Thu Mar  4 10:22:39 2010
@@ -1323,7 +1323,7 @@
 
 
   /**
-   * check if a component type is valid to recieve the focus
+   * check if a component type is valid to receive the focus
    */
   isFocusType: function(type) {
     if ( type == 'text'