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/10/07 11:33:15 UTC
svn commit: r1763742 - in /myfaces/tobago/trunk: src/site/apt/
tobago-core/src/main/java/org/apache/myfaces/tobago/component/
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/
tobago-example/tobago-example-addressbook/src/m...
Author: lofwyr
Date: Fri Oct 7 11:33:15 2016
New Revision: 1763742
URL: http://svn.apache.org/viewvc?rev=1763742&view=rev
Log:
TOBAGO-1609 Add load-Facet to <tc:page>
* replace action-facet of tc:page with load-facet
[developed by hnoeth]
Modified:
myfaces/tobago/trunk/src/site/apt/migration-3.0.apt
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/Facets.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PageTagDeclaration.java
myfaces/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/webapp/addressbook/start.xhtml
myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/init.xhtml
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
Modified: myfaces/tobago/trunk/src/site/apt/migration-3.0.apt
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/src/site/apt/migration-3.0.apt?rev=1763742&r1=1763741&r2=1763742&view=diff
==============================================================================
--- myfaces/tobago/trunk/src/site/apt/migration-3.0.apt (original)
+++ myfaces/tobago/trunk/src/site/apt/migration-3.0.apt Fri Oct 7 11:33:15 2016
@@ -129,3 +129,7 @@ Migration from Tobago 2.0 to 3.0 (work i
* <<<\<tc:toolBar\>>>> -> <<<\<tc:buttons\>>>>
* If using <<<\<tc:page\>>>> with the attributes state, width, height: remove the attributes
+
+* Replace facet 'action' with 'load' for <<<\<tc:page\>>>>
+
+ <<<\<f:facet name="load"\>>>> contain an instance of UICommand (tc:command).
\ No newline at end of file
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/Facets.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/Facets.java?rev=1763742&r1=1763741&r2=1763742&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/Facets.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/Facets.java Fri Oct 7 11:33:15 2016
@@ -22,6 +22,9 @@ package org.apache.myfaces.tobago.compon
public enum Facets {
after,
+ /**
+ * @deprecated since 3.0.0. is no longer supported, use "load".
+ */
action,
bar,
before,
@@ -48,6 +51,7 @@ public enum Facets {
@Deprecated
layout,
layoutDefault,
+ load(true),
/**
* @deprecated since 3.0.0. Menu bar is no longer supported.
*/
@@ -103,6 +107,7 @@ public enum Facets {
@Deprecated
public static final String LAYOUT = "layout";
public static final String LAYOUT_DEFAULT = "layoutDefault";
+ public static final String LOAD = "load";
/**
* @deprecated since 3.0.0. Menu bar is no longer supported.
*/
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PageTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PageTagDeclaration.java?rev=1763742&r1=1763741&r2=1763742&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PageTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PageTagDeclaration.java Fri Oct 7 11:33:15 2016
@@ -44,7 +44,7 @@ import javax.faces.component.UIForm;
componentFamily = UIForm.COMPONENT_FAMILY,
rendererType = RendererTypes.PAGE,
facets =
- { @Facet(name = Facets.ACTION,
+ { @Facet(name = Facets.LOAD,
description ="Contains an instance of UICommand (tc:command) for an auto-action",
allowedChildComponenents = "org.apache.myfaces.tobago.Command"),
@Facet(name = Facets.RESIZE,
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/webapp/addressbook/start.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/webapp/addressbook/start.xhtml?rev=1763742&r1=1763741&r2=1763742&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/webapp/addressbook/start.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/webapp/addressbook/start.xhtml Fri Oct 7 11:33:15 2016
@@ -23,7 +23,7 @@
<tc:loadBundle basename="addressbook" var="bundle"/>
<tc:page label="#{bundle.editorTitle}">
- <f:facet name="action">
+ <f:facet name="load">
<tc:link action="list"/>
</f:facet>
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/init.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/init.xhtml?rev=1763742&r1=1763741&r2=1763742&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/init.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/init.xhtml Fri Oct 7 11:33:15 2016
@@ -24,7 +24,7 @@
<tc:loadBundle basename="overview" var="overviewBundle"/>
<tc:page applicationIcon="icon/favicon.ico" label="#{overviewBundle.pageTitle}" id="page">
- <f:facet name="action">
+ <f:facet name="load">
<tc:link action="#{navigationState.gotoFirst}"/>
</f:facet>
Modified: myfaces/tobago/trunk/tobago-theme/tobago-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/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?rev=1763742&r1=1763741&r2=1763742&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js Fri Oct 7 11:33:15 2016
@@ -466,18 +466,18 @@ var Tobago = {
Tobago.submitAction(this, commands.complete.action, commands.complete);
}
}
+ if (commands.load) {
+ setTimeout(function() {
+ Tobago.submitAction(this, commands.load.action, commands.load);
+ },
+ commands.load.delay || 100);
+ }
if (commands.resize) {
jQuery(window).resize(function() {
console.debug("window resize event: " + commands.resize); // @DEV_ONLY
Tobago.submitAction(this, commands.resize.action, commands.resize);
});
}
- if (commands.action) {
- setTimeout(function () {
- Tobago.submitAction(this, commands.action.action, commands.action);
- },
- commands.action.delay || 100);
- }
},
initDom: function(elements) {