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 2016/09/06 15:32:54 UTC
svn commit: r1759447 - in
/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main:
java/org/apache/myfaces/tobago/example/demo/
webapp/content/40-test/4000-button+link/
Author: lofwyr
Date: Tue Sep 6 15:32:54 2016
New Revision: 1759447
URL: http://svn.apache.org/viewvc?rev=1759447&view=rev
Log:
TOBAGO 1544 Demo
*Test Buttons and Links
[developed by hnoeth]
Added:
myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/
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-demo/src/main/webapp/content/40-test/4000-button+link/x-action.xhtml
myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/x-resource.xhtml
Modified:
myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ButtonLinkController.java
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ButtonLinkController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ButtonLinkController.java?rev=1759447&r1=1759446&r2=1759447&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ButtonLinkController.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ButtonLinkController.java Tue Sep 6 15:32:54 2016
@@ -34,4 +34,9 @@ public class ButtonLinkController implem
LOG.info("link to components root");
return "/content/20-component/component.xhtml";
}
+
+ public String actionPage() {
+ LOG.info("link to components root");
+ return "/content/40-test/4000-button+link/x-action.xhtml";
+ }
}
Added: 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=1759447&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/button+link.test.js (added)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/button+link.test.js Tue Sep 6 15:32:54 2016
@@ -0,0 +1,29 @@
+/*
+ * 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.
+ */
+
+QUnit.test("Standard Action Link", function (assert) {
+ var $command = jQueryFrame("#page\\:mainForm\\:standardLinkAction");
+
+ // do something
+
+ jQuery("#page\\:testframe").load(function () {
+
+ // do something
+
+ done();
+ });
+});
Added: 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=1759447&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/button+link.xhtml (added)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/button+link.xhtml Tue Sep 6 15:32:54 2016
@@ -0,0 +1,98 @@
+<!--
+ * 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.
+-->
+
+<ui:composition template="/main.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:tc="http://myfaces.apache.org/tobago/component"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core">
+ <ui:param name="title" value="#{overviewBundle.button_link}"/>
+ <tc:section label="Standard">
+ <tc:link id="standardLinkAction" label="Action" action="#{buttonLinkController.actionPage}"/>
+ | <tc:link id="standardLinkOnClick" label="OnClick" disabled="true" link="https://www.apache.org/"/>
+ | <tc:link id="standardLinkLink" label="Link" link="https://www.apache.org/"/>
+ | <tc:link id="standardLinkResource" label="Resource"
+ resource="faces/content/40-test/4000-button+link/x-resource.xhtml"/>
+ <br/>
+ <tc:button id="standardButtonAction" label="Action" action="#{buttonLinkController.actionPage}"/>
+ <tc:button id="standardButtonOnClick" label="OnClick" disabled="true" link="https://www.apache.org/"/>
+ <tc:button id="standardButtonLink" label="Link" link="https://www.apache.org/"/>
+ <tc:button id="standardButtonResource" label="Resource"
+ resource="faces/content/40-test/4000-button+link/x-resource.xhtml"/>
+ </tc:section>
+ <tc:section label="Confirmation">
+ <tc:link id="confirmationLinkAction" label="Action" action="#{buttonLinkController.actionPage}">
+ <f:facet name="confirmation">
+ <tc:out value="Are you sure?"/>
+ </f:facet>
+ </tc:link>
+ | <tc:link id="confirmationLinkOnClick" label="OnClick" disabled="true" link="https://www.apache.org/">
+ <f:facet name="confirmation">
+ <tc:out value="Are you sure?"/>
+ </f:facet>
+ </tc:link>
+ | <tc:link id="confirmationLinkLink" label="Link" link="https://www.apache.org/">
+ <f:facet name="confirmation">
+ <tc:out value="Are you sure?"/>
+ </f:facet>
+ </tc:link>
+ | <tc:link id="confirmationLinkResource" label="Resource"
+ resource="faces/content/40-test/4000-button+link/x-resource.xhtml">
+ <f:facet name="confirmation">
+ <tc:out value="Are you sure?"/>
+ </f:facet>
+ </tc:link>
+ <br/>
+ <tc:button id="confirmationButtonAction" label="Action" action="#{buttonLinkController.actionPage}">
+ <f:facet name="confirmation">
+ <tc:out value="Are you sure?"/>
+ </f:facet>
+ </tc:button>
+ <tc:button id="confirmationButtonOnClick" label="OnClick" disabled="true" link="https://www.apache.org/">
+ <f:facet name="confirmation">
+ <tc:out value="Are you sure?"/>
+ </f:facet>
+ </tc:button>
+ <tc:button id="confirmationButtonLink" label="Link" link="https://www.apache.org/">
+ <f:facet name="confirmation">
+ <tc:out value="Are you sure?"/>
+ </f:facet>
+ </tc:button>
+ <tc:button id="confirmationButtonResource" label="Resource"
+ resource="faces/content/40-test/4000-button+link/x-resource.xhtml">
+ <f:facet name="confirmation">
+ <tc:out value="Are you sure?"/>
+ </f:facet>
+ </tc:button>
+ </tc:section>
+ <tc:section label="Target">
+ <tc:link id="targetLinkAction" label="Action" action="#{buttonLinkController.actionPage}" target="_blank"/>
+ | <tc:link id="targetLinkOnClick" label="OnClick" disabled="true" link="https://www.apache.org/" target="_blank"/>
+ | <tc:link id="targetLinkLink" label="Link" link="https://www.apache.org/" target="_blank"/>
+ | <tc:link id="targetLinkResource" label="Resource"
+ resource="faces/content/40-test/4000-button+link/x-resource.xhtml"
+ target="_blank"/>
+ <br/>
+ <tc:button id="targetButtonAction" label="Action" action="#{buttonLinkController.actionPage}" target="_blank"/>
+ <tc:button id="targetButtonOnClick" label="OnClick" disabled="true" link="https://www.apache.org/"
+ target="_blank"/>
+ <tc:button id="targetButtonLink" label="Link" link="https://www.apache.org/" target="_blank"/>
+ <tc:button id="targetButtonResource" label="Resource"
+ resource="faces/content/40-test/4000-button+link/x-resource.xhtml"
+ target="_blank"/>
+ </tc:section>
+</ui:composition>
Added: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/x-action.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button%2Blink/x-action.xhtml?rev=1759447&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/x-action.xhtml (added)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/x-action.xhtml Tue Sep 6 15:32:54 2016
@@ -0,0 +1,26 @@
+<!--
+ * 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.
+-->
+
+<ui:composition template="/main.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:tc="http://myfaces.apache.org/tobago/component"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+ <ui:param name="title" value="#{overviewBundle.button_link} <tc:link> <tc:button>"/>
+ <tc:section label="Action">
+ <p>This page should be accessed by an link/button with <code>action</code> attribute.</p>
+ </tc:section>
+</ui:composition>
Added: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/x-resource.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button%2Blink/x-resource.xhtml?rev=1759447&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/x-resource.xhtml (added)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4000-button+link/x-resource.xhtml Tue Sep 6 15:32:54 2016
@@ -0,0 +1,26 @@
+<!--
+ * 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.
+-->
+
+<ui:composition template="/main.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:tc="http://myfaces.apache.org/tobago/component"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+ <ui:param name="title" value="#{overviewBundle.button_link} <tc:link> <tc:button>"/>
+ <tc:section label="Resource">
+ <p>This page should be accessed by an link/button with <code>resource</code> attribute.</p>
+ </tc:section>
+</ui:composition>