myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1763739 - in /myfaces/tobago/trunk: tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/ tobago-example/tobago-example-demo/src/main/webapp/content/40-test/60000-manual/4000-button+link/ tobago-theme/tobago-theme-standar...
Date Fri, 07 Oct 2016 11:24:42 GMT
Author: lofwyr
Date: Fri Oct  7 11:24:42 2016
New Revision: 1763739

URL: http://svn.apache.org/viewvc?rev=1763739&view=rev
Log:
TOBAGO-1587 links doesn't support rightklick->newTab
* fix for newTab by mouse-middleclick and CMD + click
[developed by hnoeth]

Modified:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/60000-manual/4000-button+link/button+link.xhtml
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRendererBase.java

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=1763739&r1=1763738&r2=1763739&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  7 11:24:42 2016
@@ -175,6 +175,8 @@ public abstract class AbstractUICommand
 
   public abstract boolean isOmit();
 
+  public abstract void setOmit(boolean omit);
+
   public abstract String getTip();
 
   public abstract String getConfirmation();

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/60000-manual/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/60000-manual/4000-button%2Blink/button%2Blink.xhtml?rev=1763739&r1=1763738&r2=1763739&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/60000-manual/4000-button+link/button+link.xhtml
(original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/60000-manual/4000-button+link/button+link.xhtml
Fri Oct  7 11:24:42 2016
@@ -50,13 +50,15 @@
       <tc:button id="standardButton" label="Standard" link="https://www.apache.org/"/>
       <tc:button id="confirmationButton" label="Confirmation" link="https://www.apache.org/"
                  confirmation="Are you sure?"/>
-      <tc:button id="targetButton" label="Target" link="https://www.apache.org/" target="targetFrame"/>
+      <tc:button id="targetFrameButton" label="Target: Frame" link="https://www.apache.org/"
target="targetFrame"/>
+      <tc:button id="targetBlankButton" label="Target: _blank" link="https://www.apache.org/"
target="_blank"/>
     </tc:buttons>
     <tc:commands>
       <tc:link id="standardLink" label="Standard" link="https://www.apache.org/"/>
       <tc:link id="confirmationLink" label="Confirmation" link="https://www.apache.org/"
                confirmation="Are you sure?"/>
-      <tc:link id="targetLink" label="Target" link="https://www.apache.org/" target="targetFrame"/>
+      <tc:link id="targetFrameLink" label="Target: Frame" link="https://www.apache.org/"
target="targetFrame"/>
+      <tc:link id="targetBlankLink" label="Target: _blank" link="https://www.apache.org/"
target="_blank"/>
     </tc:commands>
     <br/>
     <br/>

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=1763739&r1=1763738&r2=1763739&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  7 11:24:42 2016
@@ -113,6 +113,8 @@ public abstract class CommandRendererBas
         final String href = RenderUtils.generateUrl(facesContext, command);
         writer.writeAttribute(HtmlAttributes.HREF, href, false);
         writer.writeAttribute(HtmlAttributes.TARGET, target, false);
+
+        command.setOmit(true);
       }
 
       String commands = RenderUtils.getBehaviorCommands(facesContext, command);
@@ -254,7 +256,7 @@ public abstract class CommandRendererBas
 
   /**
    * We need an extra SPAN element with position: relative or absolute for positioning the
dropdown
-   * */
+   */
   private boolean needsExtraSpanElement(AbstractUICommand command) {
     return !(command.getParent() instanceof AbstractUICommand) // only needed for top elements
         && !(command.getParent() instanceof UICommands) // not needed inside of tc:commands



Mime
View raw message