myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1764900 - in /myfaces/tobago/trunk: tobago-core/src/main/java/org/apache/myfaces/tobago/component/ tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/ tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/...
Date Fri, 14 Oct 2016 13:57:39 GMT
Author: lofwyr
Date: Fri Oct 14 13:57:39 2016
New Revision: 1764900

URL: http://svn.apache.org/viewvc?rev=1764900&view=rev
Log:
TOBAGO-1610: Attributes "resource" and "jsfResource" will be removed from
tc:button, tc:link etc.
* resource/jsfResource removed
* tobago demo adjusted
[developed by hnoeth]

Removed:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/HasResource.java
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/x-resource.html
    myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/test/button/resource-attribute.selenium.html
    myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/test/button/resource-attribute.xhtml
Modified:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/Attributes.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ButtonTagDeclaration.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/CommandTagDeclaration.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/LinkTagDeclaration.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeCommandTagDeclaration.java
    myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/CommandNode.java
    myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/CommandNodeFactory.java
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/00-button+link/button+link.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/090-tree/00-command/tree-command-types.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/button+link.test.js
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/button+link.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/java/org/apache/myfaces/tobago/example/test/PageItem.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRendererBase.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/RenderUtils.java

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/Attributes.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/Attributes.java?rev=1764900&r1=1764899&r2=1764900&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/Attributes.java
(original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/Attributes.java
Fri Oct 14 13:57:39 2016
@@ -103,7 +103,6 @@ public enum Attributes {
   itemLabel,
   itemImage,
   itemValue,
-  jsfResource,
   label,
   labelLayout,
   labelPosition,
@@ -196,7 +195,6 @@ public enum Attributes {
   renderRangeExtern,
   required,
   resizable,
-  resource,
   rowId,
   rowSpan,
   rowSpacing,
@@ -458,9 +456,6 @@ public enum Attributes {
   public static final String ITEM_VALUE = "itemValue";
   /** @deprecated Since Tobago 3.0.0. Please use the enum */
   @Deprecated
-  public static final String JSF_RESOURCE = "jsfResource";
-  /** @deprecated Since Tobago 3.0.0. Please use the enum */
-  @Deprecated
   public static final String LABEL = "label";
   /** @deprecated Since Tobago 3.0.0. Please use the enum */
   @Deprecated
@@ -641,9 +636,6 @@ public enum Attributes {
   public static final String RESIZABLE = "resizable";
   /** @deprecated Since Tobago 3.0.0. Please use the enum */
   @Deprecated
-  public static final String RESOURCE = "resource";
-  /** @deprecated Since Tobago 3.0.0. Please use the enum */
-  @Deprecated
   public static final String ROW_ID = "rowId";
   /** @deprecated Since Tobago 3.0.0. Please use the enum */
   @Deprecated

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java?rev=1764900&r1=1764899&r2=1764900&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java
(original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java
Fri Oct 14 13:57:39 2016
@@ -163,10 +163,6 @@ public abstract class AbstractUICommand
   @Override
   public abstract String getLabel();
 
-  public abstract boolean isJsfResource();
-
-  public abstract String getResource();
-
   public abstract String getLink();
 
   public abstract String getTarget();

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ButtonTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ButtonTagDeclaration.java?rev=1764900&r1=1764899&r2=1764900&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ButtonTagDeclaration.java
(original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ButtonTagDeclaration.java
Fri Oct 14 13:57:39 2016
@@ -33,7 +33,6 @@ import org.apache.myfaces.tobago.interna
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasImage;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasLabel;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasLink;
-import org.apache.myfaces.tobago.internal.taglib.declaration.HasResource;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasTabIndex;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasTarget;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasTip;
@@ -67,7 +66,7 @@ import javax.faces.component.UICommand;
     })
 public interface ButtonTagDeclaration
     extends HasIdBindingAndRendered, HasAction, HasActionListener, IsImmediateCommand, HasConfirmation,
-    HasLink, HasResource, IsTransition, HasTarget, IsDisabledBySecurity,
+    HasLink, IsTransition, HasTarget, IsDisabledBySecurity,
     IsOmit, IsVisual, HasLabel, HasAccessKey, HasTip, HasImage,
     IsDefaultCommand, HasTabIndex {
 }

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/CommandTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/CommandTagDeclaration.java?rev=1764900&r1=1764899&r2=1764900&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/CommandTagDeclaration.java
(original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/CommandTagDeclaration.java
Fri Oct 14 13:57:39 2016
@@ -32,7 +32,6 @@ import org.apache.myfaces.tobago.interna
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasImage;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasLabel;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasLink;
-import org.apache.myfaces.tobago.internal.taglib.declaration.HasResource;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasTarget;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasTip;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasValue;
@@ -64,7 +63,7 @@ import javax.faces.component.UICommand;
             allowedChildComponenents = "org.apache.myfaces.tobago.Out")})
 public interface CommandTagDeclaration
     extends HasIdBindingAndRendered, HasAction, HasActionListener, IsImmediateCommand, HasConfirmation,
-    HasLink, HasResource, IsTransition, HasTarget, IsDisabledBySecurity,
+    HasLink, IsTransition, HasTarget, IsDisabledBySecurity,
     IsOmit, HasValue, IsVisual, HasLabel, HasAccessKey, HasTip, HasImage,
     IsDefaultCommand {
 }

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/LinkTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/LinkTagDeclaration.java?rev=1764900&r1=1764899&r2=1764900&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/LinkTagDeclaration.java
(original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/LinkTagDeclaration.java
Fri Oct 14 13:57:39 2016
@@ -33,7 +33,6 @@ import org.apache.myfaces.tobago.interna
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasImage;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasLabel;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasLink;
-import org.apache.myfaces.tobago.internal.taglib.declaration.HasResource;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasTabIndex;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasTarget;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasTip;
@@ -65,6 +64,6 @@ import javax.faces.component.UICommand;
             allowedChildComponenents = "org.apache.myfaces.tobago.Out")})
 public interface LinkTagDeclaration
     extends HasIdBindingAndRendered, HasAction, HasActionListener, IsImmediateCommand, HasConfirmation,
-            HasLink, HasResource, IsTransition, HasTarget, IsDisabledBySecurity,
+            HasLink, IsTransition, HasTarget, IsDisabledBySecurity,
             IsOmit, HasImage, HasTabIndex, IsVisual, HasLabel, HasAccessKey, HasTip {
 }

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeCommandTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeCommandTagDeclaration.java?rev=1764900&r1=1764899&r2=1764900&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeCommandTagDeclaration.java
(original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeCommandTagDeclaration.java
Fri Oct 14 13:57:39 2016
@@ -32,7 +32,6 @@ import org.apache.myfaces.tobago.interna
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasIdBindingAndRendered;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasLabel;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasLink;
-import org.apache.myfaces.tobago.internal.taglib.declaration.HasResource;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasTabIndex;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasTarget;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasTip;
@@ -66,6 +65,6 @@ import javax.faces.component.UICommand;
     rendererType = RendererTypes.TREE_COMMAND)
 public interface TreeCommandTagDeclaration
     extends HasIdBindingAndRendered, HasAction, HasActionListener, IsImmediateCommand, HasConfirmation,
-            HasLink, HasResource, IsTransition, HasTarget, IsDisabledBySecurity,
+            HasLink, IsTransition, HasTarget, IsDisabledBySecurity,
             IsOmit, HasLabel, HasAccessKey, HasTip, HasTabIndex, IsVisual {
 }

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/CommandNode.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/CommandNode.java?rev=1764900&r1=1764899&r2=1764900&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/CommandNode.java
(original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/CommandNode.java
Fri Oct 14 13:57:39 2016
@@ -25,17 +25,15 @@ public class CommandNode extends Default
 
   private String name;
   private String action;
-  private String resource;
   private String url;
 
   public CommandNode(String name) {
     this.name = name;
   }
 
-  public CommandNode(String name, String action, String resource, String url) {
+  public CommandNode(String name, String action, String url) {
     this.name = name;
     this.action = action;
-    this.resource = resource;
     this.url = url;
   }
 
@@ -47,10 +45,6 @@ public class CommandNode extends Default
     return action;
   }
 
-  public String getResource() {
-    return resource;
-  }
-
   public String getUrl() {
     return url;
   }

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/CommandNodeFactory.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/CommandNodeFactory.java?rev=1764900&r1=1764899&r2=1764900&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/CommandNodeFactory.java
(original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/CommandNodeFactory.java
Fri Oct 14 13:57:39 2016
@@ -25,22 +25,14 @@ public class CommandNodeFactory {
     final CommandNode root = new CommandNode("Commands");
 
     final CommandNode actions = new CommandNode("Actions");
-    actions.add(new CommandNode("Action 1", "ActionOne", null, null));
-    actions.add(new CommandNode("Action 2", "ActionTwo", null, null));
+    actions.add(new CommandNode("Action 1", "ActionOne", null));
+    actions.add(new CommandNode("Action 2", "ActionTwo", null));
     root.add(actions);
 
-    final CommandNode resources = new CommandNode("Resources");
-    resources.add(new CommandNode("Input Fields", null, "content/20-component/010-input/input.xhtml",
null));
-    resources.add(new CommandNode("Output Fields", null, "content/20-component/020-output/output.xhtml",
null));
-    resources.add(new CommandNode("Dropdown Box", null,
-            "content/20-component/030-select/20-selectOneChoice/selectOneChoice.xhtml", null));
-    resources.add(new CommandNode("Popup Dialog", null, "content/20-component/060-popup/popup.xhtml",
null));
-    root.add(resources);
-
     final CommandNode links = new CommandNode("Links");
-    links.add(new CommandNode("Apache", null, null, "https://www.apache.org/"));
-    links.add(new CommandNode("MyFaces", null, null, "https://myfaces.apache.org/"));
-    links.add(new CommandNode("Tobago", null, null, "https://myfaces.apache.org/tobago/"));
+    links.add(new CommandNode("Apache", null, "https://www.apache.org/"));
+    links.add(new CommandNode("MyFaces", null, "https://myfaces.apache.org/"));
+    links.add(new CommandNode("Tobago", null, "https://myfaces.apache.org/tobago/"));
     root.add(links);
 
     return root;

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/00-button+link/button+link.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/00-button%2Blink/button%2Blink.xhtml?rev=1764900&r1=1764899&r2=1764900&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/00-button+link/button+link.xhtml
(original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/00-button+link/button+link.xhtml
Fri Oct 14 13:57:39 2016
@@ -33,7 +33,6 @@
     <p>The next two sections show how a link and a button is set.</p>
     <p>'apache.org' leads to the appropriated website.<br/>
       'Disable' show a disabled link/button.<br/>
-      'Resource' use the <code>resource</code> attribute, leading to the #{overviewBundle.component}
section.<br/>
       'Action' use the <code>action</code> attribute to link the #{overviewBundle.component}
section.<br/>
       The image leads to www.apache.org.</p>
     <tc:section label="&lt;tc:link>">
@@ -42,8 +41,6 @@
       |
       <tc:link id="l2" label="Disabled" disabled="true" link="https://www.apache.org/"/>
       |
-      <tc:link id="l3" label="Resource" resource="faces/content/20-component/component.xhtml"/>
-      |
       <tc:link id="l4" label="Action" action="#{buttonLinkController.linkToComponentsRoot}"/>
       |
       <tc:link id="l5" label="Link with an image" image="image/feather-leaf.png" link="https://www.apache.org/"/>
@@ -52,7 +49,6 @@
       <pre><code class="language-markup">&lt;tc:button label="apache.org"
link="https://www.apache.org/"/></code></pre>
       <tc:button id="b1" label="apache.org" link="https://www.apache.org/"/>
       <tc:button id="b2" label="Disabled" disabled="true" link="https://www.apache.org/"/>
-      <tc:button id="b3" label="Resource" resource="faces/content/20-component/component.xhtml"/>
       <tc:button id="b4" label="Action" action="#{buttonLinkController.linkToComponentsRoot}"/>
       <tc:button id="b5" image="image/feather-leaf.png" link="https://www.apache.org/"/>
     </tc:section>
@@ -114,23 +110,6 @@
     </tc:section>
   </tc:section>
 
-  <tc:section label="Localization">
-    <p>When configured, a link leads to a localized resource. Languages can be configured
in the faces-config.xml.</p>
-      <pre><code class="language-markup">&lt;application>
-  &lt;locale-config>
-    &lt;default-locale>en&lt;/default-locale>
-    &lt;supported-locale>de&lt;/supported-locale>
-    ...</code></pre>
-    <p>In addition, a localized file must be available.</p>
-    <p>In this example, <tc:link label="this link"
-                                 resource="content/20-component/040-command/00-button+link/sample.html"/>
-      leads to a 'sample.html'. When the language is german, it leads to 'sample_de.html'.</p>
-    <tc:selectOneChoice label="#{overviewBundle.locale}" value="#{clientConfigController2.locale}">
-      <f:selectItems value="#{clientConfigController2.localeItems}"/>
-    </tc:selectOneChoice>
-    <tc:button action="#{clientConfigController2.submit}" label="#{overviewBundle.locale_submit}"/>
-  </tc:section>
-
   <tc:section label="Confirmation">
     <p>A confirmation dialog can be added to a link or a button via
       <code class="language-markup">&lt;f:facet name="confirmation"></code>.
@@ -162,7 +141,7 @@
     <tc:section label="IFrame">
       <p>The iframe is set with <code class="language-markup">&lt;tc:object
name="objectframe" .../></code>
         (see <tc:link label="#{overviewBundle.object}"
-                      resource="content/20-component/020-output/60-object/object.xhtml"/>).
+                      link="/faces/content/20-component/020-output/60-object/object.xhtml"/>).
         The value of the <code>target</code> attribute is in this case 'objectframe'.</p>
       <p><tc:link label="apache.org" link="https://www.apache.org/" target="objectframe"/>
         |

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/090-tree/00-command/tree-command-types.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/090-tree/00-command/tree-command-types.xhtml?rev=1764900&r1=1764899&r2=1764900&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/090-tree/00-command/tree-command-types.xhtml
(original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/090-tree/00-command/tree-command-types.xhtml
Fri Oct 14 13:57:39 2016
@@ -23,10 +23,8 @@
                 xmlns:ui="http://java.sun.com/jsf/facelets">
   <ui:param name="title" value="#{overviewBundle.tree_command_types} &lt;tc:treeCommand>"/>
   <p>The <code class="language-markup">&lt;tc:treeCommand/></code>
tag can be added to a
-    <code class="language-markup">&lt;tc:treeNode/></code> instead of
a
-    <code class="language-markup">&lt;treeLabel/></code> tag.
-    It's like a <code class="language-markup">&lt;tc:link/></code> and
can used to run a action or
-    link to a resource or external website.</p>
+    <code class="language-markup">&lt;tc:treeNode/></code> tag.
+    The command can be used to execute an action or a link.</p>
   <p><tc:link label="Tag Library Documentation" image="image/feather-leaf.png"
               link="#{overviewBundle.tagDocUrl}/treeCommand.html"/></p>
 
@@ -36,15 +34,13 @@
       <code class="language-markup">&lt;tc:treeCommand/></code>.
       Like the parent nodes suggest,
       the entries in 'Actions' run an action with the <code>action</code> attribute.
-      The entries in 'Resources' link to an internal page via <code>resource</code>
attribute.
       And the entries in 'Links' are links to an external website using the <code>link</code>
attribute.</p>
     <tc:tree value="#{treeCommandTypesController.sample}" var="node">
       <tc:treeNode>
         <tc:treeIndent showJunctions="false"/>
         <tc:treeLabel value="#{node.name}" rendered="#{node.childCount > 0}"/>
         <tc:treeCommand label="#{node.name}" rendered="#{node.childCount == 0}"
-                        action="#{treeCommandTypesController.increaseActionCount(node.action)}"
-                        resource="#{node.resource}" link="#{node.url}"/>
+                        action="#{treeCommandTypesController.increaseActionCount(node.action)}"
link="#{node.url}"/>
       </tc:treeNode>
     </tc:tree>
 

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/button+link.test.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button%2Blink/button%2Blink.test.js?rev=1764900&r1=1764899&r2=1764900&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/button+link.test.js
(original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/button+link.test.js
Fri Oct 14 13:57:39 2016
@@ -33,15 +33,6 @@ QUnit.test("Standard Link Button", funct
   testStandardCommands($command, $destinationSection, assert, done);
 });
 
-QUnit.test("Standard Resource Button", function(assert) {
-  assert.expect(2);
-  var done = assert.async(2);
-
-  var $command = jQueryFrame("#page\\:mainForm\\:standardButtonResource");
-  var $destinationSection = jQueryFrame("#page\\:resourceSection");
-  testStandardCommands($command, $destinationSection, assert, done);
-});
-
 QUnit.test("Standard Action Link", function(assert) {
   assert.expect(2);
   var done = assert.async(2);
@@ -60,15 +51,6 @@ QUnit.test("Standard Link Link", functio
   testStandardCommands($command, $destinationSection, assert, done);
 });
 
-QUnit.test("Standard Resource Link", function(assert) {
-  assert.expect(2);
-  var done = assert.async(2);
-
-  var $command = jQueryFrame("#page\\:mainForm\\:standardLinkResource");
-  var $destinationSection = jQueryFrame("#page\\:resourceSection");
-  testStandardCommands($command, $destinationSection, assert, done);
-});
-
 function testStandardCommands($command, $destinationSection, assert, done) {
   var step = 1;
   $command[0].click();
@@ -107,15 +89,6 @@ QUnit.test("Target Link Button", functio
   testTargetCommands($command, $destinationSection, assert, done);
 });
 
-QUnit.test("Target Resource Button", function(assert) {
-  assert.expect(1);
-  var done = assert.async();
-
-  var $command = jQueryFrame("#page\\:mainForm\\:targetButtonResource");
-  var $destinationSection = jQueryTargetFrame("#page\\:resourceSection");
-  testTargetCommands($command, $destinationSection, assert, done);
-});
-
 QUnit.test("Target Action Link", function(assert) {
   assert.expect(1);
   var done = assert.async();
@@ -134,15 +107,6 @@ QUnit.test("Target Link Link", function(
   testTargetCommands($command, $destinationSection, assert, done);
 });
 
-QUnit.test("Target Resource Link", function(assert) {
-  assert.expect(1);
-  var done = assert.async();
-
-  var $command = jQueryFrame("#page\\:mainForm\\:targetLinkResource");
-  var $destinationSection = jQueryTargetFrame("#page\\:resourceSection");
-  testTargetCommands($command, $destinationSection, assert, done);
-});
-
 function testTargetCommands($command, $destinationSection, assert, done) {
   $command[0].click();
 

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/button+link.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button%2Blink/button%2Blink.xhtml?rev=1764900&r1=1764899&r2=1764900&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/button+link.xhtml
(original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/button+link.xhtml
Fri Oct 14 13:57:39 2016
@@ -26,13 +26,10 @@
     <tc:buttons>
       <tc:button id="standardButtonAction" label="Action" action="#{buttonLinkController.actionPage}"/>
       <tc:button id="standardButtonLink" label="Link" link="x-link.xhtml"/>
-      <tc:button id="standardButtonResource" label="Resource"
-                 resource="content/40-test/4000-button+link/x-resource.html"/>
     </tc:buttons>
     <tc:commands>
       <tc:link id="standardLinkAction" label="Action" action="#{buttonLinkController.actionPage}"/>
       <tc:link id="standardLinkLink" label="Link" link="x-link.xhtml"/>
-      <tc:link id="standardLinkResource" label="Resource" resource="content/40-test/4000-button+link/x-resource.html"/>
     </tc:commands>
     <br/>
     <br/>
@@ -43,18 +40,12 @@
       <tc:button id="confirmationButtonAction" label="Action" action="#{buttonLinkController.actionPage}"
                  confirmation="Are you sure?"/>
       <tc:button id="confirmationButtonLink" label="Link" link="x-link.xhtml" confirmation="Are
you sure?"/>
-      <tc:button id="confirmationButtonResource" label="Resource"
-                 resource="faces/content/40-test/4000-button+link/x-resource.html"
-                 confirmation="Are you sure?"/>
     </tc:buttons>
     <tc:commands>
       <tc:link id="confirmationLinkAction" label="Action" action="#{buttonLinkController.actionPage}"
                confirmation="Are you sure?"/>
       <tc:link id="confirmationLinkLink" label="Link" link="x-link.xhtml"
                confirmation="Are you sure?"/>
-      <tc:link id="confirmationLinkResource" label="Resource"
-               resource="faces/content/40-test/4000-button+link/x-resource.html"
-               confirmation="Are you sure?"/>
     </tc:commands>
     <br/>
     <br/>
@@ -65,16 +56,10 @@
       <tc:button id="targetButtonAction" label="Action" action="#{buttonLinkController.actionPage}"
                  target="targetFrame"/>
       <tc:button id="targetButtonLink" label="Link" link="x-link.xhtml" target="targetFrame"/>
-      <tc:button id="targetButtonResource" label="Resource"
-                 resource="content/40-test/4000-button+link/x-resource.html"
-                 target="targetFrame"/>
     </tc:buttons>
     <tc:commands>
       <tc:link id="targetLinkAction" label="Action" action="#{buttonLinkController.actionPage}"
target="targetFrame"/>
       <tc:link id="targetLinkLink" label="Link" link="x-link.xhtml" target="targetFrame"/>
-      <tc:link id="targetLinkResource" label="Resource"
-               resource="content/40-test/4000-button+link/x-resource.html"
-               target="targetFrame"/>
     </tc:commands>
     <br/>
     <br/>
@@ -83,10 +68,6 @@
     </tc:object>
   </tc:section>
 
-  <tc:section label="Resource + Language">
-    <p>Resource should lead to different HTMLs based on the current language.</p>
-  </tc:section>
-
   <tc:section label="JavaScript">
     <p>Execute JavaScript on click.</p>
     <tc:link label="JavaScript"/>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/java/org/apache/myfaces/tobago/example/test/PageItem.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/java/org/apache/myfaces/tobago/example/test/PageItem.java?rev=1764900&r1=1764899&r2=1764900&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/java/org/apache/myfaces/tobago/example/test/PageItem.java
(original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/java/org/apache/myfaces/tobago/example/test/PageItem.java
Fri Oct 14 13:57:39 2016
@@ -29,8 +29,6 @@ import javax.swing.tree.DefaultMutableTr
 public class PageItem extends DefaultMutableTreeNode implements Comparable {
 
   private String name;
-  private String resource;
-  private boolean jsfResource;
   private String label;
   private boolean folder;
   private boolean disabled;
@@ -38,8 +36,6 @@ public class PageItem extends DefaultMut
 
   public PageItem(final String name, final boolean disabled, final boolean todo) {
     this.name = name;
-    resource = name.substring(1);
-    jsfResource = name.endsWith(".xhtml") || name.endsWith(".jspx");
     folder = name.endsWith("/");
 
     label = name;
@@ -56,14 +52,6 @@ public class PageItem extends DefaultMut
     return name;
   }
 
-  public String getResource() {
-    return resource;
-  }
-
-  public boolean isJsfResource() {
-    return jsfResource;
-  }
-
   public String getLabel() {
     return label;
   }

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRendererBase.java?rev=1764900&r1=1764899&r2=1764900&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRendererBase.java
(original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRendererBase.java
Fri Oct 14 13:57:39 2016
@@ -84,7 +84,7 @@ public abstract class CommandRendererBas
     final String clientId = command.getClientId(facesContext);
     final boolean disabled = command.isDisabled();
     final LabelWithAccessKey label = new LabelWithAccessKey(command);
-    final boolean link = (command.getLink() != null || command.getResource() != null) &&
!disabled;
+    final boolean link = command.getLink() != null && !disabled;
     final String target = command.getTarget();
 
     final TobagoResponseWriter writer = getResponseWriter(facesContext);

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/RenderUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/RenderUtils.java?rev=1764900&r1=1764899&r2=1764900&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/RenderUtils.java
(original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/RenderUtils.java
Fri Oct 14 13:57:39 2016
@@ -19,7 +19,6 @@
 
 package org.apache.myfaces.tobago.renderkit.util;
 
-import org.apache.myfaces.tobago.context.ResourceManagerUtils;
 import org.apache.myfaces.tobago.internal.component.AbstractUICommand;
 import org.apache.myfaces.tobago.internal.component.AbstractUIData;
 import org.apache.myfaces.tobago.internal.util.StringUtils;
@@ -213,21 +212,7 @@ public final class RenderUtils {
 
     String url = null;
 
-    if (component.getResource() != null) {
-      final boolean jsfResource = component.isJsfResource();
-      url = ResourceManagerUtils.getPageWithoutContextPath(facesContext, component.getResource());
-      if (url != null) {
-        if (jsfResource) {
-          url = viewHandler.getActionURL(facesContext, url);
-          url = externalContext.encodeActionURL(url);
-        } else {
-          url = viewHandler.getResourceURL(facesContext, url);
-          url = externalContext.encodeResourceURL(url);
-        }
-      } else {
-        url = "";
-      }
-    } else if (component.getLink() != null) {
+    if (component.getLink() != null) {
 
       final String link = component.getLink();
       if (link.startsWith("/")) { // internal absolute link



Mime
View raw message