You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by de...@apache.org on 2017/09/17 12:30:16 UTC

[myfaces-trinidad] branch 1.2.12.6.1-branch created (now 603059a)

This is an automated email from the ASF dual-hosted git repository.

deki pushed a change to branch 1.2.12.6.1-branch
in repository https://gitbox.apache.org/repos/asf/myfaces-trinidad.git.


      at 603059a  TRINIDAD-744 Updated translations

This branch includes the following new commits:

     new b81153b  [maven-release-plugin] prepare branch 1.2.12.6.2-branch
     new 996fad9  [maven-release-plugin] prepare release 1.2.12.6.2-branch
     new 3a0fe05  TRINIDAD-2206 - commit patch thanks to Gary VanMatre onto the 1.2.12.6.1 branch
     new 603059a  TRINIDAD-744 Updated translations

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


-- 
To stop receiving notification emails like this one, please contact
['"commits@myfaces.apache.org" <co...@myfaces.apache.org>'].

[myfaces-trinidad] 03/04: TRINIDAD-2206 - commit patch thanks to Gary VanMatre onto the 1.2.12.6.1 branch

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

deki pushed a commit to branch 1.2.12.6.1-branch
in repository https://gitbox.apache.org/repos/asf/myfaces-trinidad.git

commit 3a0fe05b380b91775c6f3919506c6add8a3e2bba
Author: Andrew Robinson <ar...@apache.org>
AuthorDate: Wed Jan 25 19:13:11 2012 +0000

    TRINIDAD-2206 - commit patch thanks to Gary VanMatre onto the 1.2.12.6.1 branch
---
 .../application/StateManagerImpl.java              | 114 ++++++++++++++++++++-
 1 file changed, 113 insertions(+), 1 deletion(-)

diff --git a/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/StateManagerImpl.java b/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/StateManagerImpl.java
index d5edc20..e35f492 100644
--- a/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/StateManagerImpl.java
+++ b/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/StateManagerImpl.java
@@ -53,6 +53,7 @@ import org.apache.myfaces.trinidad.component.UIXComponentBase;
 import org.apache.myfaces.trinidad.component.core.CoreDocument;
 import org.apache.myfaces.trinidad.context.RequestContext;
 import org.apache.myfaces.trinidad.context.Window;
+import org.apache.myfaces.trinidad.context.WindowManager;
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 import org.apache.myfaces.trinidad.util.ExternalContextUtils;
 import org.apache.myfaces.trinidadinternal.context.RequestContextImpl;
@@ -529,6 +530,44 @@ public class StateManagerImpl extends StateManagerWrapper
   {
     _delegate.writeState(context, state);
   }
+  /**
+   * Returns whether a token is a currently valid View State Token
+   * @param external The ExternalContext
+   * @param token    The state token to check for validity
+   * @return
+   */
+  public static boolean isValidViewStateToken(ExternalContext external, String token)
+  {
+    if ((token != null) && _calculateTokenStateSaving(external))
+    {
+      return (_getPageState(external, token) != null);
+    }
+    else
+    {
+      return false;
+    }
+  }
+
+
+  /**
+   * Returns the PageState for a state token
+   * @param external
+   * @param token
+   * @return
+   */
+  private static PageState _getPageState(ExternalContext external, String token)
+  {
+    // get view cache key with "." separator suffix to separate the SubKeyMap keys
+    String subkey = _getViewCacheKey(external,
+                                     RequestContext.getCurrentInstance(),
+                                     _SUBKEY_SEPARATOR);
+
+    Map<String, PageState> stateMap = new SubKeyMap<PageState>(
+                     external.getSessionMap(),
+                     subkey);
+    
+    return stateMap.get(token);
+  }
 
   @SuppressWarnings({"unchecked", "deprecation"})
   @Override
@@ -839,7 +878,11 @@ public class StateManagerImpl extends StateManagerWrapper
     String    prefix,
     Character suffix)
   {
-    Window currWindow = trinContext.getWindowManager().getCurrentWindow(eContext);
+    
+    Window currWindow = null;
+    // RequestContext.getWindowManager() uses the FacesContext
+    if (FacesContext.getCurrentInstance() != null)
+      currWindow = trinContext.getWindowManager().getCurrentWindow(eContext);
 
     // if we have a current window or a suffix, we need a StringBuilder to calculate the cache key
     if ((currWindow != null) || (suffix != null))
@@ -891,6 +934,75 @@ public class StateManagerImpl extends StateManagerWrapper
   }
 
   /**
+   * Returns <code>true</code> if we should use token state saving rather than client state
+   * saving
+   * @param external
+   * @return
+   * @see #_saveAsToken
+   */
+  private static boolean _calculateTokenStateSaving(ExternalContext external)
+  {
+    Map initParameters = external.getInitParameterMap();
+
+    Object stateSavingMethod = initParameters.get(StateManager.STATE_SAVING_METHOD_PARAM_NAME);
+
+    // on "SERVER" state-saving we return TRUE, since we want send down a token string.
+    if ((stateSavingMethod == null) ||
+        StateManager.STATE_SAVING_METHOD_SERVER.equalsIgnoreCase((String) stateSavingMethod))
+    {
+      return true;
+    }
+
+    // if the user set state-saving to "CLIENT" *and* the client-state-method to "ALL"
+    // we return FALSE, since we want to save the ENTIRE state on the client...
+    Object clientMethod = initParameters.get(CLIENT_STATE_METHOD_PARAM_NAME);
+
+    if ((clientMethod != null) &&
+        CLIENT_STATE_METHOD_ALL.equalsIgnoreCase((String) clientMethod))
+    {
+      return false;
+    }
+
+    // if the user has used the <document> 'stateSaving' attribute to specify
+    // client, we force the state mananger (see above) to render the entire
+    // state on the client. The indicator is stashed on the FacesContext and
+    // is therefore NOT visible during "restoreView" phase. So if we reach this point
+    // here AND we are using "full" client-side-state-saving, this has been tweaked
+    // on the previous page rendering phase...
+    // In this case we return FALSE to indicate to restore the entire (serialized)
+    // state from the client!
+    //
+    // @see setPerViewStateSaving()
+    String viewStateValue =
+                      external.getRequestParameterMap().get(ResponseStateManager.VIEW_STATE_PARAM);
+
+    if (viewStateValue != null && !viewStateValue.startsWith("!"))
+    {
+      return false;
+    }
+
+    // In certain situations this method is called from a filter and there's no facesContext, so 
+    // make sure to check for a null context
+    FacesContext context = FacesContext.getCurrentInstance();
+
+    if (context != null)
+    {
+      // is vanilla JSF used? No Trinidad render-kit-id give? If so, we need to return FALSE,
+      // since we want to save the ENTIRE state on the client...
+      UIViewRoot viewRoot = context.getViewRoot();
+      
+      if (viewRoot != null && RenderKitFactory.HTML_BASIC_RENDER_KIT.equals(viewRoot.getRenderKitId()))
+      {
+        return false;
+      }
+    }
+
+    // Last missing option: state-saving is "CLIENT" and the client-state-method uses
+    // its default (token), so we return TRUE to send down a token string.
+    return true;
+  }
+
+  /**
    * Tests whether to send a small string token, or the entire
    * serialized component state to the client-side.
    * @return true, if the small string token is to be sent to the client-side.

-- 
To stop receiving notification emails like this one, please contact
"commits@myfaces.apache.org" <co...@myfaces.apache.org>.

[myfaces-trinidad] 04/04: TRINIDAD-744 Updated translations

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

deki pushed a commit to branch 1.2.12.6.1-branch
in repository https://gitbox.apache.org/repos/asf/myfaces-trinidad.git

commit 603059a17c1f3deb7d5d7fdefbe4acce035f1284
Author: Scott Bryan <so...@apache.org>
AuthorDate: Sat Jan 28 00:49:06 2012 +0000

    TRINIDAD-744 Updated translations
---
 .../xrts/org/apache/myfaces/trinidad/resource/MessageBundle_ja.xrts     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/trinidad-api/src/main/xrts/org/apache/myfaces/trinidad/resource/MessageBundle_ja.xrts b/trinidad-api/src/main/xrts/org/apache/myfaces/trinidad/resource/MessageBundle_ja.xrts
index bb5f9aa..8701560 100644
--- a/trinidad-api/src/main/xrts/org/apache/myfaces/trinidad/resource/MessageBundle_ja.xrts
+++ b/trinidad-api/src/main/xrts/org/apache/myfaces/trinidad/resource/MessageBundle_ja.xrts
@@ -349,7 +349,7 @@
 <resource key="org.apache.myfaces.trinidad.convert.ALERT_FORMAT_detail" dnt="false">{0} - {1}</resource>
 <!-- message for error while downloading a file  -->
 <resource key="org.apache.myfaces.trinidad.event.FileDownloadActionListener.DOWNLOAD_ERROR" dnt="false">ファイルのダウンロード中にエラーが発生しました。</resource>
-<resource key="org.apache.myfaces.trinidad.event.FileDownloadActionListener.DOWNLOAD_ERROR_detail" dnt="false">ファイルはダウンロードされていないか、正しくダウンロールされませんでした。</resource>
+<resource key="org.apache.myfaces.trinidad.event.FileDownloadActionListener.DOWNLOAD_ERROR_detail" dnt="false">ファイルはダウンロードされていないか、正しくダウンロードされませんでした。</resource>
 <!-- message for error while uploading a file -->
 <resource key="org.apache.myfaces.trinidad.component.core.input.CoreInputFile.INPUT_FILE_ERROR" dnt="false">ファイルのアップロード中にエラーが発生しました。</resource>
 <resource key="org.apache.myfaces.trinidad.component.core.input.CoreInputFile.INPUT_FILE_ERROR_detail" dnt="false">ファイル・アップロード・エラーが発生しました。アップロード・データおよびファイル名を確認してください。</resource>

-- 
To stop receiving notification emails like this one, please contact
"commits@myfaces.apache.org" <co...@myfaces.apache.org>.

[myfaces-trinidad] 02/04: [maven-release-plugin] prepare release 1.2.12.6.2-branch

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

deki pushed a commit to branch 1.2.12.6.1-branch
in repository https://gitbox.apache.org/repos/asf/myfaces-trinidad.git

commit 996fad9fed9d7f70ba8c80d004541446e2602924
Author: Scott Bryan <so...@apache.org>
AuthorDate: Tue Nov 15 20:26:19 2011 +0000

    [maven-release-plugin] prepare release 1.2.12.6.2-branch
---
 pom.xml                                  | 8 ++++----
 trinidad-api/pom.xml                     | 2 +-
 trinidad-build/pom.xml                   | 2 +-
 trinidad-examples/pom.xml                | 2 +-
 trinidad-examples/trinidad-blank/pom.xml | 2 +-
 trinidad-examples/trinidad-demo/pom.xml  | 2 +-
 trinidad-impl/pom.xml                    | 2 +-
 7 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/pom.xml b/pom.xml
index 5864989..744b0a9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@
 
   <groupId>org.apache.myfaces.trinidad</groupId>
   <artifactId>trinidad</artifactId>
-  <version>1.2.12.6.2-SNAPSHOT</version>
+  <version>1.2.12.6.1-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <properties>
@@ -136,9 +136,9 @@
   </mailingLists>
 
   <scm>
-    <connection>scm:svn:http://svn.apache.org/repos/asf/myfaces/trinidad/branches/1.2.12.6.2-branch</connection>
-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/trinidad/branches/1.2.12.6.2-branch</developerConnection>
-    <url>http://svn.apache.org/viewcvs.cgi/myfaces/trinidad/branches/1.2.12.6.2-branch</url>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/myfaces/trinidad/branches/1.2.12.6.1-branch</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/trinidad/branches/1.2.12.6.1-branch</developerConnection>
+    <url>http://svn.apache.org/viewcvs.cgi/myfaces/trinidad/branches/1.2.12.6.1-branch</url>
   </scm>
 
   <repositories>
diff --git a/trinidad-api/pom.xml b/trinidad-api/pom.xml
index b93bf0e..b88a730 100644
--- a/trinidad-api/pom.xml
+++ b/trinidad-api/pom.xml
@@ -27,7 +27,7 @@
   <parent>
     <groupId>org.apache.myfaces.trinidad</groupId>
     <artifactId>trinidad</artifactId>
-    <version>1.2.12.6.2-SNAPSHOT</version>
+    <version>1.2.12.6.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>trinidad-api</artifactId>
diff --git a/trinidad-build/pom.xml b/trinidad-build/pom.xml
index eecffb3..2927477 100644
--- a/trinidad-build/pom.xml
+++ b/trinidad-build/pom.xml
@@ -27,7 +27,7 @@
   <parent>
     <groupId>org.apache.myfaces.trinidad</groupId>
     <artifactId>trinidad</artifactId>
-    <version>1.2.12.6.2-SNAPSHOT</version>
+    <version>1.2.12.6.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>trinidad-build</artifactId>
diff --git a/trinidad-examples/pom.xml b/trinidad-examples/pom.xml
index e19f041..9ed6ba4 100644
--- a/trinidad-examples/pom.xml
+++ b/trinidad-examples/pom.xml
@@ -27,7 +27,7 @@
   <parent>
     <groupId>org.apache.myfaces.trinidad</groupId>
     <artifactId>trinidad</artifactId>
-    <version>1.2.12.6.2-SNAPSHOT</version>
+    <version>1.2.12.6.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>trinidad-example</artifactId>
diff --git a/trinidad-examples/trinidad-blank/pom.xml b/trinidad-examples/trinidad-blank/pom.xml
index 08acf99..fadb751 100644
--- a/trinidad-examples/trinidad-blank/pom.xml
+++ b/trinidad-examples/trinidad-blank/pom.xml
@@ -26,7 +26,7 @@
   <parent>
     <groupId>org.apache.myfaces.trinidad</groupId>
     <artifactId>trinidad-example</artifactId>
-    <version>1.2.12.6.2-SNAPSHOT</version>
+    <version>1.2.12.6.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>trinidad-blank</artifactId>
diff --git a/trinidad-examples/trinidad-demo/pom.xml b/trinidad-examples/trinidad-demo/pom.xml
index 01350b8..453dddb 100644
--- a/trinidad-examples/trinidad-demo/pom.xml
+++ b/trinidad-examples/trinidad-demo/pom.xml
@@ -7,7 +7,7 @@
   <parent>
     <groupId>org.apache.myfaces.trinidad</groupId>
     <artifactId>trinidad-example</artifactId>
-    <version>1.2.12.6.2-SNAPSHOT</version>
+    <version>1.2.12.6.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>trinidad-demo</artifactId>
diff --git a/trinidad-impl/pom.xml b/trinidad-impl/pom.xml
index ffb1907..99d774f 100644
--- a/trinidad-impl/pom.xml
+++ b/trinidad-impl/pom.xml
@@ -27,7 +27,7 @@
   <parent>
     <groupId>org.apache.myfaces.trinidad</groupId>
     <artifactId>trinidad</artifactId>
-    <version>1.2.12.6.2-SNAPSHOT</version>
+    <version>1.2.12.6.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>trinidad-impl</artifactId>

-- 
To stop receiving notification emails like this one, please contact
"commits@myfaces.apache.org" <co...@myfaces.apache.org>.

[myfaces-trinidad] 01/04: [maven-release-plugin] prepare branch 1.2.12.6.2-branch

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

deki pushed a commit to branch 1.2.12.6.1-branch
in repository https://gitbox.apache.org/repos/asf/myfaces-trinidad.git

commit b81153bcb63913fcc780389c25c62d5d74b62dc0
Author: Scott Bryan <so...@apache.org>
AuthorDate: Tue Nov 15 20:25:57 2011 +0000

    [maven-release-plugin] prepare branch 1.2.12.6.2-branch
---
 pom.xml                                  | 8 ++++----
 trinidad-api/pom.xml                     | 2 +-
 trinidad-build/pom.xml                   | 2 +-
 trinidad-examples/pom.xml                | 2 +-
 trinidad-examples/trinidad-blank/pom.xml | 2 +-
 trinidad-examples/trinidad-demo/pom.xml  | 2 +-
 trinidad-impl/pom.xml                    | 2 +-
 7 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/pom.xml b/pom.xml
index 744b0a9..5864989 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@
 
   <groupId>org.apache.myfaces.trinidad</groupId>
   <artifactId>trinidad</artifactId>
-  <version>1.2.12.6.1-SNAPSHOT</version>
+  <version>1.2.12.6.2-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <properties>
@@ -136,9 +136,9 @@
   </mailingLists>
 
   <scm>
-    <connection>scm:svn:http://svn.apache.org/repos/asf/myfaces/trinidad/branches/1.2.12.6.1-branch</connection>
-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/trinidad/branches/1.2.12.6.1-branch</developerConnection>
-    <url>http://svn.apache.org/viewcvs.cgi/myfaces/trinidad/branches/1.2.12.6.1-branch</url>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/myfaces/trinidad/branches/1.2.12.6.2-branch</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/trinidad/branches/1.2.12.6.2-branch</developerConnection>
+    <url>http://svn.apache.org/viewcvs.cgi/myfaces/trinidad/branches/1.2.12.6.2-branch</url>
   </scm>
 
   <repositories>
diff --git a/trinidad-api/pom.xml b/trinidad-api/pom.xml
index b88a730..b93bf0e 100644
--- a/trinidad-api/pom.xml
+++ b/trinidad-api/pom.xml
@@ -27,7 +27,7 @@
   <parent>
     <groupId>org.apache.myfaces.trinidad</groupId>
     <artifactId>trinidad</artifactId>
-    <version>1.2.12.6.1-SNAPSHOT</version>
+    <version>1.2.12.6.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>trinidad-api</artifactId>
diff --git a/trinidad-build/pom.xml b/trinidad-build/pom.xml
index 2927477..eecffb3 100644
--- a/trinidad-build/pom.xml
+++ b/trinidad-build/pom.xml
@@ -27,7 +27,7 @@
   <parent>
     <groupId>org.apache.myfaces.trinidad</groupId>
     <artifactId>trinidad</artifactId>
-    <version>1.2.12.6.1-SNAPSHOT</version>
+    <version>1.2.12.6.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>trinidad-build</artifactId>
diff --git a/trinidad-examples/pom.xml b/trinidad-examples/pom.xml
index 9ed6ba4..e19f041 100644
--- a/trinidad-examples/pom.xml
+++ b/trinidad-examples/pom.xml
@@ -27,7 +27,7 @@
   <parent>
     <groupId>org.apache.myfaces.trinidad</groupId>
     <artifactId>trinidad</artifactId>
-    <version>1.2.12.6.1-SNAPSHOT</version>
+    <version>1.2.12.6.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>trinidad-example</artifactId>
diff --git a/trinidad-examples/trinidad-blank/pom.xml b/trinidad-examples/trinidad-blank/pom.xml
index fadb751..08acf99 100644
--- a/trinidad-examples/trinidad-blank/pom.xml
+++ b/trinidad-examples/trinidad-blank/pom.xml
@@ -26,7 +26,7 @@
   <parent>
     <groupId>org.apache.myfaces.trinidad</groupId>
     <artifactId>trinidad-example</artifactId>
-    <version>1.2.12.6.1-SNAPSHOT</version>
+    <version>1.2.12.6.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>trinidad-blank</artifactId>
diff --git a/trinidad-examples/trinidad-demo/pom.xml b/trinidad-examples/trinidad-demo/pom.xml
index 453dddb..01350b8 100644
--- a/trinidad-examples/trinidad-demo/pom.xml
+++ b/trinidad-examples/trinidad-demo/pom.xml
@@ -7,7 +7,7 @@
   <parent>
     <groupId>org.apache.myfaces.trinidad</groupId>
     <artifactId>trinidad-example</artifactId>
-    <version>1.2.12.6.1-SNAPSHOT</version>
+    <version>1.2.12.6.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>trinidad-demo</artifactId>
diff --git a/trinidad-impl/pom.xml b/trinidad-impl/pom.xml
index 99d774f..ffb1907 100644
--- a/trinidad-impl/pom.xml
+++ b/trinidad-impl/pom.xml
@@ -27,7 +27,7 @@
   <parent>
     <groupId>org.apache.myfaces.trinidad</groupId>
     <artifactId>trinidad</artifactId>
-    <version>1.2.12.6.1-SNAPSHOT</version>
+    <version>1.2.12.6.2-SNAPSHOT</version>
   </parent>
 
   <artifactId>trinidad-impl</artifactId>

-- 
To stop receiving notification emails like this one, please contact
"commits@myfaces.apache.org" <co...@myfaces.apache.org>.