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/02/15 09:18:38 UTC

svn commit: r1070804 - in /myfaces/tobago/branches/tobago-1.0.x: core/src/main/java/org/apache/myfaces/tobago/context/ core/src/test/java/org/apache/myfaces/tobago/context/ example/test/src/main/webapp/tc/image/

Author: lofwyr
Date: Tue Feb 15 08:18:38 2011
New Revision: 1070804

URL: http://svn.apache.org/viewvc?rev=1070804&view=rev
Log:
TOBAGO-973: Disabled Button/Link does not use the "Disabled" Icon

Added:
    myfaces/tobago/branches/tobago-1.0.x/example/test/src/main/webapp/tc/image/
    myfaces/tobago/branches/tobago-1.0.x/example/test/src/main/webapp/tc/image/disabled.xhtml
Modified:
    myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/context/ResourceUtils.java
    myfaces/tobago/branches/tobago-1.0.x/core/src/test/java/org/apache/myfaces/tobago/context/ResourceUtilsUnitTest.java

Modified: myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/context/ResourceUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/context/ResourceUtils.java?rev=1070804&r1=1070803&r2=1070804&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/context/ResourceUtils.java (original)
+++ myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/context/ResourceUtils.java Tue Feb 15 08:18:38 2011
@@ -57,7 +57,6 @@ public class ResourceUtils {
     String extension = filename.substring(dotIndex);
     return new StringBuilder()
         .append(name)
-        .append(SEPARATOR)
         .append(postfix)
         .append(extension)
         .toString();

Modified: myfaces/tobago/branches/tobago-1.0.x/core/src/test/java/org/apache/myfaces/tobago/context/ResourceUtilsUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/core/src/test/java/org/apache/myfaces/tobago/context/ResourceUtilsUnitTest.java?rev=1070804&r1=1070803&r2=1070804&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/core/src/test/java/org/apache/myfaces/tobago/context/ResourceUtilsUnitTest.java (original)
+++ myfaces/tobago/branches/tobago-1.0.x/core/src/test/java/org/apache/myfaces/tobago/context/ResourceUtilsUnitTest.java Tue Feb 15 08:18:38 2011
@@ -30,4 +30,9 @@ public class ResourceUtilsUnitTest exten
         assertEquals("folder/treeNode-icon.gif",
         ResourceUtils.createString("folder", "treeNode", "icon", "gif"));
   }
+
+  public void testAddPostfixToFilename() {
+    assertEquals("folder/treeNode-iconDisabled.gif", 
+        ResourceUtils.addPostfixToFilename("folder/treeNode-icon.gif", "Disabled"));
+  }
 }

Added: myfaces/tobago/branches/tobago-1.0.x/example/test/src/main/webapp/tc/image/disabled.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/example/test/src/main/webapp/tc/image/disabled.xhtml?rev=1070804&view=auto
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/example/test/src/main/webapp/tc/image/disabled.xhtml (added)
+++ myfaces/tobago/branches/tobago-1.0.x/example/test/src/main/webapp/tc/image/disabled.xhtml Tue Feb 15 08:18:38 2011
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+
+<f:view
+    xmlns:tc="http://myfaces.apache.org/tobago/component"
+    xmlns:tx="http://myfaces.apache.org/tobago/extension"
+    xmlns:ui="http://java.sun.com/jsf/facelets"
+    xmlns:f="http://java.sun.com/jsf/core">
+
+  <tc:page id="page" width="600px" height="600px">
+
+    <f:facet name="layout">
+      <tc:gridLayout columns="*;*" rows="fixed;fixed;fixed;fixed;*"/>
+    </f:facet>
+
+    <tc:label id="label" value="normal"/>
+    <tc:label id="label-d" value="disabled"/>
+
+    <tc:image id="image" value="image/foo.gif"/>
+    <tc:image id="image-d" value="image/foo.gif" disabled="true"/>
+
+    <tc:button id="button" image="image/foo.gif" label="button"/>
+    <tc:button id="button-d" image="image/foo.gif" label="button" disabled="true"/>
+
+    <tc:link id="link" image="image/foo.gif" label="link"/>
+    <tc:link id="link-d" image="image/foo.gif" label="link" disabled="true"/>
+
+    <tc:cell/>
+    <tc:cell/>
+
+  </tc:page>
+</f:view>