[GitHub] krichter722 opened a new pull request #1: added initial .travis.yml
krichter722 opened a new pull request #1: added initial .travis.yml URL: https://github.com/apache/myfaces-tobago/pull/1 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] deki commented on issue #1: added initial .travis.yml
deki commented on issue #1: added initial .travis.yml URL: https://github.com/apache/myfaces-tobago/pull/1#issuecomment-339617910 Thanks for the PR. Can you elaborate a bit more on your usecase? Currently we are using Jenkins builds... This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pnicolucci closed pull request #5: MYFACES-4236: Add package-info.java to javax.faces.bean package
pnicolucci closed pull request #5: MYFACES-4236: Add package-info.java to javax.faces.bean package URL: https://github.com/apache/myfaces/pull/5 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/api/src/main/java/javax/faces/bean/package-info.java b/api/src/main/java/javax/faces/bean/package-info.java new file mode 100644 index 0..69cc885a3 --- /dev/null +++ b/api/src/main/java/javax/faces/bean/package-info.java @@ -0,0 +1,20 @@ +/* + * 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. + */ +@Deprecated +package javax.faces.bean; \ No newline at end of file This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pnicolucci opened a new pull request #5: MYFACES-4236: Add package-info.java to javax.faces.bean package
pnicolucci opened a new pull request #5: MYFACES-4236: Add package-info.java to javax.faces.bean package URL: https://github.com/apache/myfaces/pull/5 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pnicolucci opened a new pull request #6: MYFACES-4237: improve performance when checking for duplicate ids
pnicolucci opened a new pull request #6: MYFACES-4237: improve performance when checking for duplicate ids URL: https://github.com/apache/myfaces/pull/6 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pnicolucci closed pull request #7: MYFACES-4237: improve performance when checking for duplicate ids
pnicolucci closed pull request #7: MYFACES-4237: improve performance when checking for duplicate ids URL: https://github.com/apache/myfaces/pull/7 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/CheckDuplicateIdFaceletUtils.java b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/CheckDuplicateIdFaceletUtils.java index f0dd9c4c7..0543196f3 100644 --- a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/CheckDuplicateIdFaceletUtils.java +++ b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/CheckDuplicateIdFaceletUtils.java @@ -55,14 +55,12 @@ private static void checkIdsStatefulComponents (FacesContext context, id = component.getClientId (context); -if (existingIds.contains (id)) +if (!existingIds.add (id)) { DuplicateIdException duplicateIdException = createAndQueueException(context, component, id); throw duplicateIdException; } -existingIds.add (id); - int facetCount = component.getFacetCount(); if (facetCount > 0) { @@ -102,14 +100,12 @@ private static void checkIds (FacesContext context, UIComponent component, Set 0) { This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pnicolucci opened a new pull request #7: MYFACES-4237: improve performance when checking for duplicate ids
pnicolucci opened a new pull request #7: MYFACES-4237: improve performance when checking for duplicate ids URL: https://github.com/apache/myfaces/pull/7 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] henningn opened a new pull request #12: TOBAGO-1879 tc:date does not support Calendar and DateTime
henningn opened a new pull request #12: TOBAGO-1879 tc:date does not support Calendar and DateTime URL: https://github.com/apache/myfaces-tobago/pull/12 * tc:convertDateTime implemented, Calendar and java8.time API supported * test added * Annotation 'ConverterTag' implemented This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] ebreijo closed pull request #1: MYFACES-4231 Update SearchExpressionContextFactory and FaceletCache s…
ebreijo closed pull request #1: MYFACES-4231 Update SearchExpressionContextFactory and FaceletCache s… URL: https://github.com/apache/myfaces/pull/1 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/api/src/main/java/javax/faces/component/search/SearchExpressionContextFactory.java b/api/src/main/java/javax/faces/component/search/SearchExpressionContextFactory.java index 76ab1121d..0bdaf4563 100644 --- a/api/src/main/java/javax/faces/component/search/SearchExpressionContextFactory.java +++ b/api/src/main/java/javax/faces/component/search/SearchExpressionContextFactory.java @@ -31,10 +31,6 @@ { private SearchExpressionContextFactory delegate; -public SearchExpressionContextFactory() -{ -} - public SearchExpressionContextFactory(SearchExpressionContextFactory delegate) { this.delegate = delegate; @@ -44,5 +40,8 @@ public abstract SearchExpressionContext getSearchExpressionContext( FacesContext context, UIComponent source, Set expressionHints, Set visitHints); -public abstract SearchExpressionContextFactory getWrapped(); +public SearchExpressionContextFactory getWrapped() +{ +return this.delegate; +} } diff --git a/api/src/main/java/javax/faces/view/facelets/FaceletCache.java b/api/src/main/java/javax/faces/view/facelets/FaceletCache.java index 8a1e08dd1..fa4c15788 100644 --- a/api/src/main/java/javax/faces/view/facelets/FaceletCache.java +++ b/api/src/main/java/javax/faces/view/facelets/FaceletCache.java @@ -38,6 +38,7 @@ public abstract boolean isViewMetadataFaceletCached(URL url); +@Deprecated protected void setMemberFactories(FaceletCache.MemberFactory faceletFactory, FaceletCache.MemberFactory viewMetadataFaceletFactory) { diff --git a/impl/src/main/java/org/apache/myfaces/component/search/SearchExpressionContextFactoryImpl.java b/impl/src/main/java/org/apache/myfaces/component/search/SearchExpressionContextFactoryImpl.java index 11509d4c2..e79457163 100644 --- a/impl/src/main/java/org/apache/myfaces/component/search/SearchExpressionContextFactoryImpl.java +++ b/impl/src/main/java/org/apache/myfaces/component/search/SearchExpressionContextFactoryImpl.java @@ -34,6 +34,16 @@ public class SearchExpressionContextFactoryImpl extends SearchExpressionContextFactory { +public SearchExpressionContextFactoryImpl() +{ +super(null); +} + +public SearchExpressionContextFactoryImpl(SearchExpressionContextFactory delegate) +{ +super(delegate); +} + @Override public SearchExpressionContext getSearchExpressionContext( FacesContext context, UIComponent source, @@ -47,10 +57,4 @@ public SearchExpressionContext getSearchExpressionContext( return searchExpressionContext; } -@Override -public SearchExpressionContextFactory getWrapped() -{ -return null; -} - } This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pnicolucci opened a new pull request #4: MYFACES-4235: Use cached BeanManager
pnicolucci opened a new pull request #4: MYFACES-4235: Use cached BeanManager URL: https://github.com/apache/myfaces/pull/4 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pnicolucci closed pull request #4: MYFACES-4235: Use cached BeanManager
pnicolucci closed pull request #4: MYFACES-4235: Use cached BeanManager URL: https://github.com/apache/myfaces/pull/4 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/impl/src/main/java/org/apache/myfaces/cdi/model/DataModelBuilderProxy.java b/impl/src/main/java/org/apache/myfaces/cdi/model/DataModelBuilderProxy.java index c1a21e8a7..45f2c7422 100644 --- a/impl/src/main/java/org/apache/myfaces/cdi/model/DataModelBuilderProxy.java +++ b/impl/src/main/java/org/apache/myfaces/cdi/model/DataModelBuilderProxy.java @@ -20,7 +20,6 @@ package org.apache.myfaces.cdi.model; import javax.enterprise.inject.spi.BeanManager; -import javax.enterprise.inject.spi.CDI; import javax.faces.context.FacesContext; import javax.faces.model.DataModel; import org.apache.myfaces.cdi.util.CDIUtils; @@ -34,7 +33,7 @@ @Override public DataModel createDataModel(FacesContext facesContext, Class forClass, Object value) { -BeanManager beanManager = CDI.current().getBeanManager(); +BeanManager beanManager = CDIUtils.getBeanManager(facesContext.getExternalContext()); FacesDataModelClassBeanHolder holder = CDIUtils.lookup(beanManager, FacesDataModelClassBeanHolder.class); return holder.createDataModel(facesContext, forClass, value); } This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] deki closed pull request #3: MYFACES-4234 Use intern() on FACELET_CACHE_KEY value
deki closed pull request #3: MYFACES-4234 Use intern() on FACELET_CACHE_KEY value URL: https://github.com/apache/myfaces/pull/3 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/api/src/main/java/javax/faces/view/facelets/FaceletContext.java b/api/src/main/java/javax/faces/view/facelets/FaceletContext.java index 93d4363b2..7bc54cf7a 100644 --- a/api/src/main/java/javax/faces/view/facelets/FaceletContext.java +++ b/api/src/main/java/javax/faces/view/facelets/FaceletContext.java @@ -40,7 +40,7 @@ public abstract class FaceletContext extends ELContext { // TODO: REPORT this aberration to the EG -public static final String FACELET_CONTEXT_KEY = "javax.faces.FACELET_CONTEXT"; +public static final String FACELET_CONTEXT_KEY = "javax.faces.FACELET_CONTEXT".intern(); /** * Generate a unique ID for the passed String This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] ebreijo opened a new pull request #1: MYFACES-4231 Update SearchExpressionContextFactory and FaceletCache s…
ebreijo opened a new pull request #1: MYFACES-4231 Update SearchExpressionContextFactory and FaceletCache s… URL: https://github.com/apache/myfaces/pull/1 …ignature methods in the JSF 2.3 API JIRA issue: https://issues.apache.org/jira/browse/MYFACES-4231 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pnicolucci opened a new pull request #3: MYFACES-4234 Use intern() on FACELET_CACHE_KEY value
pnicolucci opened a new pull request #3: MYFACES-4234 Use intern() on FACELET_CACHE_KEY value URL: https://github.com/apache/myfaces/pull/3 https://issues.apache.org/jira/browse/MYFACES-4234 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] ebreijo opened a new pull request #2: MYFACES-4232 Update UIWebsocket signature in the JSF 2.3 API
ebreijo opened a new pull request #2: MYFACES-4232 Update UIWebsocket signature in the JSF 2.3 API URL: https://github.com/apache/myfaces/pull/2 https://issues.apache.org/jira/browse/MYFACES-4232 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] ebreijo closed pull request #2: MYFACES-4232 Update UIWebsocket signature in the JSF 2.3 API
ebreijo closed pull request #2: MYFACES-4232 Update UIWebsocket signature in the JSF 2.3 API URL: https://github.com/apache/myfaces/pull/2 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/api/src/main/java/javax/faces/component/_UIWebsocket.java b/api/src/main/java/javax/faces/component/_UIWebsocket.java index cc99bb91b..e2dc0b09b 100644 --- a/api/src/main/java/javax/faces/component/_UIWebsocket.java +++ b/api/src/main/java/javax/faces/component/_UIWebsocket.java @@ -33,7 +33,7 @@ defaultRendererType = "javax.faces.Websocket", implementz = "javax.faces.component.behavior.ClientBehaviorHolder", bodyContent = "empty") -abstract class _UIWebsocket extends UIOutput implements ClientBehaviorHolder +abstract class _UIWebsocket extends UIComponentBase { static public final String COMPONENT_FAMILY = "javax.faces.Script"; @@ -60,89 +60,4 @@ @JSFProperty(defaultValue = "true") public abstract boolean isConnected(); -@Override -public java.util.Collection getEventNames() -{ -return new java.util.Collection(){ - -@Override -public int size() -{ -return 0; -} - -@Override -public boolean isEmpty() -{ -return false; -} - -@Override -public boolean contains(Object o) -{ -return true; -} - -@Override -public java.util.Iterator iterator() -{ -throw new UnsupportedOperationException("Not supported yet."); -} - -@Override -public Object[] toArray() -{ -throw new UnsupportedOperationException("Not supported yet."); -} - -@Override -public T[] toArray(T[] a) -{ -throw new UnsupportedOperationException("Not supported yet."); -} - -@Override -public boolean add(String e) -{ -throw new UnsupportedOperationException("Not supported yet."); -} - -@Override -public boolean remove(Object o) -{ -throw new UnsupportedOperationException("Not supported yet."); -} - -@Override -public boolean containsAll(java.util.Collection c) -{ -return true; -} - -@Override -public boolean addAll(java.util.Collection c) -{ -throw new UnsupportedOperationException("Not supported yet."); -} - -@Override -public boolean removeAll(java.util.Collection c) -{ -throw new UnsupportedOperationException("Not supported yet."); -} - -@Override -public boolean retainAll(java.util.Collection c) -{ -throw new UnsupportedOperationException("Not supported yet."); -} - -@Override -public void clear() -{ -throw new UnsupportedOperationException("Not supported yet."); -} -}; -} - } diff --git a/api/src/main/resources/META-INF/componentClass20.vm b/api/src/main/resources/META-INF/componentClass20.vm index 11d8be7d9..ce205224b 100644 --- a/api/src/main/resources/META-INF/componentClass20.vm +++ b/api/src/main/resources/META-INF/componentClass20.vm @@ -131,6 +131,99 @@ $innersource } #end #end + +#if ($component.implements) +#if ( ($component.implements == "javax.faces.component.behavior.ClientBehaviorHolder") + && (${utils.getClassFromFullClass($component.className)} == "UIWebsocket")) +// Start UIWebsocket getEventNames template +@Override +public java.util.Collection getEventNames() +{ +return new java.util.Collection(){ + +@Override +public int size() +{ +return 0; +} + +@Override +public boolean isEmpty() +{ +return false; +} + +@Override +public boolean contains(Object o) +{ +return true; +} + +@Override +public java.util.Iterator iterator() +{ +throw new UnsupportedOperationException("Not supported yet."); +} + +@Override +public Object[] toArray() +{ +throw new UnsupportedOperationException("Not supported yet."); +} + +@Override +public T[] toArray(T[] a) +{ +
[GitHub] pnicolucci commented on issue #8: MYFACES-4239: Multiple performance improvements
pnicolucci commented on issue #8: MYFACES-4239: Multiple performance improvements URL: https://github.com/apache/myfaces/pull/8#issuecomment-399940917 I'll work to remove the sb changes from this PR and will open a new issue / PR for the changes and get a discussion started on the mailing list. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] tandraschko commented on issue #8: MYFACES-4239: Multiple performance improvements
tandraschko commented on issue #8: MYFACES-4239: Multiple performance improvements URL: https://github.com/apache/myfaces/pull/8#issuecomment-399597447 I also thought a bit about it, i think it would be better if we discuss it first on the mailing list. And details about it would be great. You know, we already have a buffer. So could you maybe split the sb/out commits from the other improvements? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pnicolucci commented on issue #8: MYFACES-4239: Multiple performance improvements
pnicolucci commented on issue #8: MYFACES-4239: Multiple performance improvements URL: https://github.com/apache/myfaces/pull/8#issuecomment-400047548 @tandraschko ok with the current changes in this PR? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] tandraschko commented on issue #8: MYFACES-4239: Multiple performance improvements
tandraschko commented on issue #8: MYFACES-4239: Multiple performance improvements URL: https://github.com/apache/myfaces/pull/8#issuecomment-400075148 Yep! :) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] tandraschko commented on issue #8: MYFACES-4239: Multiple performance improvements
tandraschko commented on issue #8: MYFACES-4239: Multiple performance improvements URL: https://github.com/apache/myfaces/pull/8#issuecomment-399456368 @pnicolucci i'm not sure about this changes out.write vs sb.append... Why do you switchted from out.write to a new StringBuilder? You know, this are always new object instances... And we have something like a SharedString This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] tandraschko edited a comment on issue #8: MYFACES-4239: Multiple performance improvements
tandraschko edited a comment on issue #8: MYFACES-4239: Multiple performance improvements URL: https://github.com/apache/myfaces/pull/8#issuecomment-399456368 @pnicolucci i'm not sure about this changes out.write vs sb.append... Why do you switchted from out.write to a new StringBuilder? You know, this are always new object instances... And we have something like a SharedStringBuilder This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pnicolucci commented on issue #8: MYFACES-4239: Multiple performance improvements
pnicolucci commented on issue #8: MYFACES-4239: Multiple performance improvements URL: https://github.com/apache/myfaces/pull/8#issuecomment-399464056 @tandraschko , we've been running some performance tests and can see a .5 - 1% increase in our testing in performance with an application that is only about 15% JSF , with a larger application and more JSF within it , the gain could be even greater. Basically we want to avoid the writer.write path , it is quite a long path to call over and over again if it isn't necessary. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] tandraschko commented on issue #8: MYFACES-4239: Multiple performance improvements
tandraschko commented on issue #8: MYFACES-4239: Multiple performance improvements URL: https://github.com/apache/myfaces/pull/8#issuecomment-399464821 ok, i see i'm ok for it if you use the SharedStringBuilder This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] tandraschko commented on issue #8: MYFACES-4239: Multiple performance improvements
tandraschko commented on issue #8: MYFACES-4239: Multiple performance improvements URL: https://github.com/apache/myfaces/pull/8#issuecomment-399465655 JFYI: we avoided new objects so much in the past that we even switched from for-each to for loops, so the SharedStringBuilder is IMO a must-have for this change This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] tandraschko commented on issue #8: MYFACES-4239: Multiple performance improvements
tandraschko commented on issue #8: MYFACES-4239: Multiple performance improvements URL: https://github.com/apache/myfaces/pull/8#issuecomment-399465769 All other changes looks fine of course. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] tandraschko edited a comment on issue #8: MYFACES-4239: Multiple performance improvements
tandraschko edited a comment on issue #8: MYFACES-4239: Multiple performance improvements URL: https://github.com/apache/myfaces/pull/8#issuecomment-399465655 JFYI: we avoided new objects so much in the past that we even switched from for-each to for loops, so the SharedStringBuilder is IMO a must-have for this change, also those methods are called really often This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pnicolucci closed pull request #8: MYFACES-4239: Multiple performance improvements
pnicolucci closed pull request #8: MYFACES-4239: Multiple performance improvements URL: https://github.com/apache/myfaces/pull/8 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java b/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java index de30135a8..181276855 100755 --- a/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java +++ b/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java @@ -2322,19 +2322,19 @@ private void _handleListenerForAnnotations(FacesContext context, Object inspecte List listenerForList = null; boolean isCachedList = false; -if(isProduction && _classToListenerForMap.containsKey(inspectedClass)) +if(isProduction) { listenerForList = _classToListenerForMap.get(inspectedClass); -if(listenerForList == null) -{ -return; //class has been inspected and did not contain any listener annotations -} -else if (listenerForList.isEmpty()) + +if (listenerForList != null) { -return; +if (listenerForList.isEmpty()) +{ +return; //class has been inspected and did not contain any listener annotations +} + +isCachedList = true;// else annotations were found in the cache } - -isCachedList = true;// else annotations were found in the cache } if(listenerForList == null) //not in production or the class hasn't been inspected yet @@ -2465,19 +2465,19 @@ private void _handleResourceDependencyAnnotations(FacesContext context, Class List dependencyList = null; boolean isCachedList = false; -if(isProduction && _classToResourceDependencyMap.containsKey(inspectedClass)) +if(isProduction) { dependencyList = _classToResourceDependencyMap.get(inspectedClass); -if(dependencyList == null) -{ -return; //class has been inspected and did not contain any resource dependency annotations -} -else if (dependencyList.isEmpty()) + +if (dependencyList != null) { -return; +if (dependencyList.isEmpty()) +{ +return; //class has been inspected and did not contain any resource dependency annotations +} + +isCachedList = true;// else annotations were found in the cache } - -isCachedList = true;// else annotations were found in the cache } if(dependencyList == null) //not in production or the class hasn't been inspected yet diff --git a/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java b/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java index 8946096f1..a67fc6a62 100755 --- a/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java +++ b/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java @@ -947,11 +947,18 @@ private String encodeURL(String baseUrl, Map> parameters) } } +boolean hasParams = paramMap != null && paramMap.size()>0; + +if (!hasParams && fragment == null) +{ +return baseUrl; +} + // start building the new URL StringBuilder newUrl = new StringBuilder(baseUrl); //now add the updated param list onto the url -if (paramMap != null && paramMap.size()>0) +if (hasParams) { boolean isFirstPair = true; for (Map.Entry> pair : paramMap.entrySet()) @@ -989,7 +996,8 @@ private String encodeURL(String baseUrl, Map> parameters) //add the fragment back on (if any) if (fragment != null) { -newUrl.append(URL_FRAGMENT_SEPERATOR + fragment); +newUrl.append(URL_FRAGMENT_SEPERATOR); +newUrl.append(fragment); } return newUrl.toString(); diff --git a/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java b/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java index d4bb32f31..e60eabd32 100644 --- a/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java +++
[GitHub] wtlucy opened a new pull request #16: MYFACES-3629 add context attr for case when faces servlet is found by SCI
wtlucy opened a new pull request #16: MYFACES-3629 add context attr for case when faces servlet is found by SCI URL: https://github.com/apache/myfaces/pull/16 Fix the web-fragment issue described in MYFACES-3629 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pnicolucci closed pull request #10: MYFACES-4244:Use StringBuilder rather than calling write multiple times
pnicolucci closed pull request #10: MYFACES-4244:Use StringBuilder rather than calling write multiple times URL: https://github.com/apache/myfaces/pull/10 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java b/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java index 155d17882..63c3cc55c 100644 --- a/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java +++ b/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java @@ -59,22 +59,35 @@ public void write(int c) throws IOException public void write(char[] cbuf, int off, int len) throws IOException { int index = off; +StringBuilder sb = null; for (int i = 0; i < len; i++) { char c = cbuf[off+i]; if (c1 == ']' && c2 == ']' && c == '>') { -super.write(cbuf, index, i+1 - ( index - off ) ); +if (sb == null) +{ +sb = new StringBuilder(len + 16); +} +sb.append(cbuf, index, i+1 - ( index - off )); index = off+i+1; -
[GitHub] pnicolucci commented on issue #10: MYFACES-4244:Use StringBuilder rather than calling write multiple times
pnicolucci commented on issue #10: MYFACES-4244:Use StringBuilder rather than calling write multiple times URL: https://github.com/apache/myfaces/pull/10#issuecomment-410808355 After additional investigation we've determined this change is not necessary so I'm closing this Pull request. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pnicolucci opened a new pull request #14: MYFACES-4249: Don't call charAt more than needed
pnicolucci opened a new pull request #14: MYFACES-4249: Don't call charAt more than needed URL: https://github.com/apache/myfaces/pull/14 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pnicolucci opened a new pull request #15: MYFACES-4249: Don't call charAt more than needed
pnicolucci opened a new pull request #15: MYFACES-4249: Don't call charAt more than needed URL: https://github.com/apache/myfaces/pull/15 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pnicolucci closed pull request #14: MYFACES-4249: Don't call charAt more than needed
pnicolucci closed pull request #14: MYFACES-4249: Don't call charAt more than needed URL: https://github.com/apache/myfaces/pull/14 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java b/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java index 155d17882..a72403036 100644 --- a/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java +++ b/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java @@ -69,7 +69,7 @@ public void write(char[] cbuf, int off, int len) throws IOException
[GitHub] pnicolucci closed pull request #15: MYFACES-4249: Don't call charAt more than needed
pnicolucci closed pull request #15: MYFACES-4249: Don't call charAt more than needed URL: https://github.com/apache/myfaces/pull/15 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java b/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java index 155d17882..a72403036 100644 --- a/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java +++ b/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java @@ -69,7 +69,7 @@ public void write(char[] cbuf, int off, int len) throws IOException
[GitHub] wtlucy closed pull request #16: MYFACES-3629 add context attr for case when faces servlet is found by SCI
wtlucy closed pull request #16: MYFACES-3629 add context attr for case when faces servlet is found by SCI URL: https://github.com/apache/myfaces/pull/16 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/impl/src/main/java/org/apache/myfaces/ee/MyFacesContainerInitializer.java b/impl/src/main/java/org/apache/myfaces/ee/MyFacesContainerInitializer.java index 668c1cf41..485336146 100644 --- a/impl/src/main/java/org/apache/myfaces/ee/MyFacesContainerInitializer.java +++ b/impl/src/main/java/org/apache/myfaces/ee/MyFacesContainerInitializer.java @@ -115,6 +115,12 @@ * is stored under this key in the ServletContext. */ public static final String FACES_SERVLET_ADDED_ATTRIBUTE = "org.apache.myfaces.DYNAMICALLY_ADDED_FACES_SERVLET"; + +/** + * If the servlet mapping for the FacesServlet is found on the ServletContext, Boolean.TRUE + * is stored under this key in the ServletContext. + */ +public static final String FACES_SERVLET_FOUND = "org.apache.myfaces.FACES_SERVLET_FOUND"; private static final String INITIALIZE_ALWAYS_STANDALONE = "org.apache.myfaces.INITIALIZE_ALWAYS_STANDALONE"; @@ -183,7 +189,8 @@ public void onStartup(Set> clazzes, ServletContext servletContext) thro if (FACES_SERVLET_CLASS.getName().equals(className) || isDelegatedFacesServlet(className)) { -// we found a FacesServlet, so we have nothing to do! +// we found a FacesServlet; set an attribute for use during initialization +servletContext.setAttribute(FACES_SERVLET_FOUND, Boolean.TRUE); return; } } diff --git a/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java b/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java index 0838fba51..4731154ab 100644 --- a/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java +++ b/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java @@ -161,17 +161,25 @@ public void initFaces(ServletContext servletContext) if (webConfigProvider.getFacesServletMappings(facesContext.getExternalContext()).isEmpty()) { -// check if the FacesServlet has been added dynamically -// in a Servlet 3.0 environment by MyFacesContainerInitializer +// check to see if the FacesServlet was found by MyFacesContainerInitializer Boolean mappingAdded = (Boolean) servletContext.getAttribute( - MyFacesContainerInitializer.FACES_SERVLET_ADDED_ATTRIBUTE); +MyFacesContainerInitializer.FACES_SERVLET_FOUND); + if (mappingAdded == null || !mappingAdded) { -if (log.isLoggable(Level.WARNING)) +// check if the FacesServlet has been added dynamically +// in a Servlet 3.0 environment by MyFacesContainerInitializer +mappingAdded = (Boolean) servletContext.getAttribute( + MyFacesContainerInitializer.FACES_SERVLET_ADDED_ATTRIBUTE); + +if (mappingAdded == null || !mappingAdded) { -log.warning("No mappings of FacesServlet found. Abort initializing MyFaces."); +if (log.isLoggable(Level.WARNING)) +{ +log.warning("No mappings of FacesServlet found. Abort initializing MyFaces."); +} +return; } -return; } } } @@ -374,17 +382,25 @@ public void destroyFaces(ServletContext servletContext) if (webConfigProvider.getFacesServletMappings(facesContext.getExternalContext()).isEmpty()) { -// check if the FacesServlet has been added dynamically -// in a Servlet 3.0 environment by MyFacesContainerInitializer +// check to see if the FacesServlet was found by MyFacesContainerInitializer Boolean mappingAdded = (Boolean) servletContext.getAttribute( - MyFacesContainerInitializer.FACES_SERVLET_ADDED_ATTRIBUTE); +MyFacesContainerInitializer.FACES_SERVLET_FOUND); + if (mappingAdded == null || !mappingAdded) { -if
[GitHub] wtlucy opened a new pull request #17: MYFACES-3629 add context attr for case when faces servlet is found by SCI - 2.2.x
wtlucy opened a new pull request #17: MYFACES-3629 add context attr for case when faces servlet is found by SCI - 2.2.x URL: https://github.com/apache/myfaces/pull/17 Fixing this issue on the 2.2 branch This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] wtlucy closed pull request #17: MYFACES-3629 add context attr for case when faces servlet is found by SCI - 2.2.x
wtlucy closed pull request #17: MYFACES-3629 add context attr for case when faces servlet is found by SCI - 2.2.x URL: https://github.com/apache/myfaces/pull/17 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/impl/src/main/java/org/apache/myfaces/ee6/MyFacesContainerInitializer.java b/impl/src/main/java/org/apache/myfaces/ee6/MyFacesContainerInitializer.java index de74039da..2ebd151eb 100644 --- a/impl/src/main/java/org/apache/myfaces/ee6/MyFacesContainerInitializer.java +++ b/impl/src/main/java/org/apache/myfaces/ee6/MyFacesContainerInitializer.java @@ -113,6 +113,13 @@ */ private static final String FACES_SERVLET_ADDED_ATTRIBUTE = "org.apache.myfaces.DYNAMICALLY_ADDED_FACES_SERVLET"; +/** + * If the servlet mapping for the FacesServlet is found on the ServletContext, Boolean.TRUE + * is stored under this key in the ServletContext. + * ATTENTION: this constant is duplicate in AbstractFacesInitializer. + */ +private static final String FACES_SERVLET_FOUND = "org.apache.myfaces.FACES_SERVLET_FOUND"; + private static final String INITIALIZE_ALWAYS_STANDALONE = "org.apache.myfaces.INITIALIZE_ALWAYS_STANDALONE"; /** @@ -162,7 +169,8 @@ public void onStartup(Set> clazzes, ServletContext servletContext) thro if (FACES_SERVLET_CLASS.getName().equals(className) || isDelegatedFacesServlet(className)) { -// we found a FacesServlet, so we have nothing to do! +// we found a FacesServlet; set an attribute for use during initialization +servletContext.setAttribute(FACES_SERVLET_FOUND, Boolean.TRUE); return; } } diff --git a/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java b/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java index 3a833f719..c10bef7f5 100644 --- a/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java +++ b/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java @@ -83,6 +83,13 @@ */ private static final String FACES_SERVLET_ADDED_ATTRIBUTE = "org.apache.myfaces.DYNAMICALLY_ADDED_FACES_SERVLET"; +/** + * If the servlet mapping for the FacesServlet is found on the ServletContext, Boolean.TRUE + * is stored under this key in the ServletContext. + * ATTENTION: this constant is duplicate in MyFacesContainerInitializer. + */ +private static final String FACES_SERVLET_FOUND = "org.apache.myfaces.FACES_SERVLET_FOUND"; + /** * This parameter specifies the ExpressionFactory implementation to use. */ @@ -153,16 +160,23 @@ public void initFaces(ServletContext servletContext) if (webConfigProvider.getFacesServletMappings(facesContext.getExternalContext()).isEmpty()) { -// check if the FacesServlet has been added dynamically -// in a Servlet 3.0 environment by MyFacesContainerInitializer -Boolean mappingAdded = (Boolean) servletContext.getAttribute(FACES_SERVLET_ADDED_ATTRIBUTE); +// check to see if the FacesServlet was found by MyFacesContainerInitializer +Boolean mappingAdded = (Boolean) servletContext.getAttribute(FACES_SERVLET_FOUND); + if (mappingAdded == null || !mappingAdded) { -if (log.isLoggable(Level.WARNING)) +// check if the FacesServlet has been added dynamically +// in a Servlet 3.0 environment by MyFacesContainerInitializer +mappingAdded = (Boolean) servletContext.getAttribute(FACES_SERVLET_ADDED_ATTRIBUTE); + +if (mappingAdded == null || !mappingAdded) { -log.warning("No mappings of FacesServlet found. Abort initializing MyFaces."); +if (log.isLoggable(Level.WARNING)) +{ +log.warning("No mappings of FacesServlet found. Abort initializing MyFaces."); +} +return; } -return; } } } @@ -347,16 +361,23 @@ public void destroyFaces(ServletContext servletContext) if (webConfigProvider.getFacesServletMappings(facesContext.getExternalContext()).isEmpty()) { -// check if the FacesServlet has been added dynamically -// in
[GitHub] luigiJsonar opened a new pull request #18: MYFACES-4082 Fix 'binding' when referencing composite components
luigiJsonar opened a new pull request #18: MYFACES-4082 Fix 'binding' when referencing composite components URL: https://github.com/apache/myfaces/pull/18 Code that 'sets' the value of the binding attribute for composite components. Inspired on: org.apache.myfaces.view.facelets.tag.jsf.ComponentTagHandlerDelegate#createComponent This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pnicolucci closed pull request #12: MYFACES-4247: reduce number of char[] objects and CommonPropertyUtils…
pnicolucci closed pull request #12: MYFACES-4247: reduce number of char[] objects and CommonPropertyUtils… URL: https://github.com/apache/myfaces/pull/12 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlLabelRenderer.java b/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlLabelRenderer.java index da0c3882c..110ff4225 100755 --- a/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlLabelRenderer.java +++ b/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlLabelRenderer.java @@ -140,7 +140,7 @@ public void encodeBegin(FacesContext facesContext, UIComponent uiComponent) thro if (isCommonPropertiesOptimizationEnabled(facesContext)) { CommonPropertyUtils.renderLabelPassthroughPropertiesWithoutEvents(writer, - CommonPropertyUtils.getCommonPropertiesMarked(uiComponent), uiComponent); +commonPropertiesMarked, uiComponent); } else { diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/util/FastWriter.java b/impl/src/main/java/org/apache/myfaces/view/facelets/util/FastWriter.java index ba00f97c0..c34abdb9d 100644 --- a/impl/src/main/java/org/apache/myfaces/view/facelets/util/FastWriter.java +++ b/impl/src/main/java/org/apache/myfaces/view/facelets/util/FastWriter.java @@ -86,12 +86,14 @@ public void write(int c) throws IOException public void write(String str, int off, int len) throws IOException { -this.write(str.toCharArray(), off, len); +overflow(len); +str.getChars(off, off+len, this.buff, size); +this.size += len; } public void write(String str) throws IOException { -this.write(str.toCharArray(), 0, str.length()); +this.write(str, 0, str.length()); } public void reset() diff --git a/impl/src/test/java/org/apache/myfaces/view/facelets/util/FastWriterTest.java b/impl/src/test/java/org/apache/myfaces/view/facelets/util/FastWriterTest.java new file mode 100644 index 0..465b0c589 --- /dev/null +++ b/impl/src/test/java/org/apache/myfaces/view/facelets/util/FastWriterTest.java @@ -0,0 +1,65 @@ +/* + * 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. + */ +package org.apache.myfaces.view.facelets.util; + +import org.apache.myfaces.view.facelets.util.FastWriter; +import org.junit.Assert; +import org.junit.Test; + +public class FastWriterTest +{ +// Test FastWriter.write(String str, int off, int len) +@Test +public void testFastWriterWriteString() throws Exception +{ +String sampleStringToWrite = "Test String to write"; + +FastWriter fw = new FastWriter(); +fw.write(sampleStringToWrite, 0, sampleStringToWrite.length()); + +// fw.toString() should be: Test String to write +Assert.assertEquals(fw.toString(), sampleStringToWrite); +} + +@Test +public void testFastWriterWriteStringOffSet() throws Exception +{ +int offSet = 5; +String sampleStringToWrite = "Test String to write"; + +FastWriter fw = new FastWriter(); +fw.write(sampleStringToWrite, offSet, sampleStringToWrite.length() - offSet); + +// fw.toString() should be: String to write +Assert.assertEquals(fw.toString(), sampleStringToWrite.substring(offSet)); +} + +@Test +public void testFastWriterWriteStringLength() throws Exception +{ + String sampleStringToWrite = "Test String to write"; + int length = sampleStringToWrite.substring(0, sampleStringToWrite.indexOf(" ")).length(); + + FastWriter fw = new FastWriter(); + fw.write(sampleStringToWrite, 0, length); + + // fw.toString() should be: Test + Assert.assertEquals(fw.toString(), sampleStringToWrite.substring(0,length)); +} +} \ No newline at end of file diff --git
[GitHub] pnicolucci closed pull request #11: MYFACES-4247: reduce number of char[] objects and CommonPropertyUtils…
pnicolucci closed pull request #11: MYFACES-4247: reduce number of char[] objects and CommonPropertyUtils… URL: https://github.com/apache/myfaces/pull/11 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlLabelRenderer.java b/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlLabelRenderer.java index 8bdb37651..8417ed672 100755 --- a/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlLabelRenderer.java +++ b/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlLabelRenderer.java @@ -143,7 +143,7 @@ public void encodeBegin(FacesContext facesContext, UIComponent uiComponent) thro if (isCommonPropertiesOptimizationEnabled(facesContext)) { CommonPropertyUtils.renderLabelPassthroughPropertiesWithoutEvents(writer, - CommonPropertyUtils.getCommonPropertiesMarked(uiComponent), uiComponent); +commonPropertiesMarked, uiComponent); } else { diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/util/FastWriter.java b/impl/src/main/java/org/apache/myfaces/view/facelets/util/FastWriter.java index ba00f97c0..c34abdb9d 100644 --- a/impl/src/main/java/org/apache/myfaces/view/facelets/util/FastWriter.java +++ b/impl/src/main/java/org/apache/myfaces/view/facelets/util/FastWriter.java @@ -86,12 +86,14 @@ public void write(int c) throws IOException public void write(String str, int off, int len) throws IOException { -this.write(str.toCharArray(), off, len); +overflow(len); +str.getChars(off, off+len, this.buff, size); +this.size += len; } public void write(String str) throws IOException { -this.write(str.toCharArray(), 0, str.length()); +this.write(str, 0, str.length()); } public void reset() diff --git a/impl/src/test/java/org/apache/myfaces/view/facelets/util/FastWriterTest.java b/impl/src/test/java/org/apache/myfaces/view/facelets/util/FastWriterTest.java new file mode 100644 index 0..465b0c589 --- /dev/null +++ b/impl/src/test/java/org/apache/myfaces/view/facelets/util/FastWriterTest.java @@ -0,0 +1,65 @@ +/* + * 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. + */ +package org.apache.myfaces.view.facelets.util; + +import org.apache.myfaces.view.facelets.util.FastWriter; +import org.junit.Assert; +import org.junit.Test; + +public class FastWriterTest +{ +// Test FastWriter.write(String str, int off, int len) +@Test +public void testFastWriterWriteString() throws Exception +{ +String sampleStringToWrite = "Test String to write"; + +FastWriter fw = new FastWriter(); +fw.write(sampleStringToWrite, 0, sampleStringToWrite.length()); + +// fw.toString() should be: Test String to write +Assert.assertEquals(fw.toString(), sampleStringToWrite); +} + +@Test +public void testFastWriterWriteStringOffSet() throws Exception +{ +int offSet = 5; +String sampleStringToWrite = "Test String to write"; + +FastWriter fw = new FastWriter(); +fw.write(sampleStringToWrite, offSet, sampleStringToWrite.length() - offSet); + +// fw.toString() should be: String to write +Assert.assertEquals(fw.toString(), sampleStringToWrite.substring(offSet)); +} + +@Test +public void testFastWriterWriteStringLength() throws Exception +{ + String sampleStringToWrite = "Test String to write"; + int length = sampleStringToWrite.substring(0, sampleStringToWrite.indexOf(" ")).length(); + + FastWriter fw = new FastWriter(); + fw.write(sampleStringToWrite, 0, length); + + // fw.toString() should be: Test + Assert.assertEquals(fw.toString(), sampleStringToWrite.substring(0,length)); +} +} \ No newline at end of file diff --git
[GitHub] pnicolucci edited a comment on issue #11: MYFACES-4247: reduce number of char[] objects and CommonPropertyUtils…
pnicolucci edited a comment on issue #11: MYFACES-4247: reduce number of char[] objects and CommonPropertyUtils… URL: https://github.com/apache/myfaces/pull/11#issuecomment-405272258 I'll add a couple unit tests and ensure the behavior is the same before and after the changes just to be extra safe. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pnicolucci opened a new pull request #12: MYFACES-4247: reduce number of char[] objects and CommonPropertyUtils…
pnicolucci opened a new pull request #12: MYFACES-4247: reduce number of char[] objects and CommonPropertyUtils… URL: https://github.com/apache/myfaces/pull/12 … calls This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] tandraschko commented on issue #11: MYFACES-4247: reduce number of char[] objects and CommonPropertyUtils…
tandraschko commented on issue #11: MYFACES-4247: reduce number of char[] objects and CommonPropertyUtils… URL: https://github.com/apache/myfaces/pull/11#issuecomment-405244998 +1 for the CommonProperties stuff +0 for the changes in write could you explain them before? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pnicolucci commented on issue #11: MYFACES-4247: reduce number of char[] objects and CommonPropertyUtils…
pnicolucci commented on issue #11: MYFACES-4247: reduce number of char[] objects and CommonPropertyUtils… URL: https://github.com/apache/myfaces/pull/11#issuecomment-405247268 @tandraschko : String.toCharArray() is what is not called now The string uses its internal char[] instead of a copy to put the chars in the this.buff object. Otherwise you make a copy of the char[] with toCharArray() and then copy that char[] into this.buff This removes one copy of the char[] This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] tandraschko commented on issue #11: MYFACES-4247: reduce number of char[] objects and CommonPropertyUtils…
tandraschko commented on issue #11: MYFACES-4247: reduce number of char[] objects and CommonPropertyUtils… URL: https://github.com/apache/myfaces/pull/11#issuecomment-405248399 if it works fine, i'm ok with it it would be just better if we would have a unittest for it? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pnicolucci commented on issue #11: MYFACES-4247: reduce number of char[] objects and CommonPropertyUtils…
pnicolucci commented on issue #11: MYFACES-4247: reduce number of char[] objects and CommonPropertyUtils… URL: https://github.com/apache/myfaces/pull/11#issuecomment-405272258 I'll add a couple unit tests and ensure the behavior is the same before an after the changes just to be extra safe. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pnicolucci closed pull request #13: MYFACES-4248
pnicolucci closed pull request #13: MYFACES-4248 URL: https://github.com/apache/myfaces/pull/13 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/impl/src/main/java/org/apache/myfaces/el/unified/OpenWebBeansELResolverComparator.java b/impl/src/main/java/org/apache/myfaces/el/unified/OpenWebBeansELResolverComparator.java index 06fed6728..425d23553 100644 --- a/impl/src/main/java/org/apache/myfaces/el/unified/OpenWebBeansELResolverComparator.java +++ b/impl/src/main/java/org/apache/myfaces/el/unified/OpenWebBeansELResolverComparator.java @@ -33,15 +33,17 @@ public class OpenWebBeansELResolverComparator implements Comparator { -public static final String OWB_RESOLVER = "org.apache.webbeans.el.WebBeansELResolver"; +public static final String OWB_RESOLVER_OLD = "org.apache.webbeans.el.WebBeansELResolver"; +public static final String OWB_RESOLVER = "org.apache.webbeans.el22.WebBeansELResolver"; +@Override public int compare(ELResolver r1, ELResolver r2) { -if (r1.getClass().getName().equals(OWB_RESOLVER)) +if (r1.getClass().getName().equals(OWB_RESOLVER_OLD) || r1.getClass().getName().equals(OWB_RESOLVER)) { return 1; } -else if (r2.getClass().getName().equals(OWB_RESOLVER)) +else if (r2.getClass().getName().equals(OWB_RESOLVER_OLD) || r2.getClass().getName().equals(OWB_RESOLVER)) { return -1; } This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pnicolucci opened a new pull request #13: MYFACES-4248
pnicolucci opened a new pull request #13: MYFACES-4248 URL: https://github.com/apache/myfaces/pull/13 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pnicolucci opened a new pull request #10: MYFACES-4244:Use StringBuilder rather than calling write multiple times
pnicolucci opened a new pull request #10: MYFACES-4244:Use StringBuilder rather than calling write multiple times URL: https://github.com/apache/myfaces/pull/10 Creating this PR for discussion on the dev list for MYFACES-4244: https://issues.apache.org/jira/browse/MYFACES-4244 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pnicolucci opened a new pull request #11: MYFACES-4247: reduce number of char[] objects and CommonPropertyUtils…
pnicolucci opened a new pull request #11: MYFACES-4247: reduce number of char[] objects and CommonPropertyUtils… URL: https://github.com/apache/myfaces/pull/11 … calls This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pnicolucci commented on issue #11: MYFACES-4247: reduce number of char[] objects and CommonPropertyUtils…
pnicolucci commented on issue #11: MYFACES-4247: reduce number of char[] objects and CommonPropertyUtils… URL: https://github.com/apache/myfaces/pull/11#issuecomment-404571508 @tandraschko can you review these changes and let me know if you have any concerns? If not I'll merge this PR. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] bohmber closed pull request #5: converted readme.txt to markdown
bohmber closed pull request #5: converted readme.txt to markdown URL: https://github.com/apache/myfaces-tobago/pull/5 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/readme.txt b/readme.md similarity index 95% rename from readme.txt rename to readme.md index ba8ca7156..2b7645d6f 100644 --- a/readme.txt +++ b/readme.md @@ -1,3 +1,5 @@ +# Apache Tobago + Building You need Maven 3 (at least 3.0.4) and Java 8 or 9 to build Tobago. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] bohmber opened a new pull request #5: converted readme.txt to markdown
bohmber opened a new pull request #5: converted readme.txt to markdown URL: https://github.com/apache/myfaces-tobago/pull/5 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] bohmber closed pull request #6: improved markdown
bohmber closed pull request #6: improved markdown URL: https://github.com/apache/myfaces-tobago/pull/6 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/readme.md b/readme.md index 2b7645d6f..a4e5a6079 100644 --- a/readme.md +++ b/readme.md @@ -1,19 +1,23 @@ # Apache Tobago -Building - +## Building + You need Maven 3 (at least 3.0.4) and Java 8 or 9 to build Tobago. -In the main directory you can use +In the project directory you can use: + +``` +mvn install - mvn install +``` to run the install target on all sub projects. This will put all necessary artifacts into your local repository. -Demo - +## Demo -In the directory tobago-example/tobago-example-demo call: +In the directory `tobago-example/tobago-example-demo` call: +``` mvn jetty:run +``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] bohmber opened a new pull request #6: improved markdown
bohmber opened a new pull request #6: improved markdown URL: https://github.com/apache/myfaces-tobago/pull/6 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] deki commented on a change in pull request #8: fix Meecrowave sample
deki commented on a change in pull request #8: fix Meecrowave sample URL: https://github.com/apache/myfaces-tobago/pull/8#discussion_r173650522 ## File path: tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml ## @@ -68,16 +68,16 @@ -
[GitHub] bohmber commented on a change in pull request #8: fix Meecrowave sample
bohmber commented on a change in pull request #8: fix Meecrowave sample URL: https://github.com/apache/myfaces-tobago/pull/8#discussion_r173650474 ## File path: tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml ## @@ -68,16 +68,16 @@ -
[GitHub] asfgit closed pull request #8: fix Meecrowave sample
asfgit closed pull request #8: fix Meecrowave sample URL: https://github.com/apache/myfaces-tobago/pull/8 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/tobago-example/tobago-example-demo/pom.xml b/tobago-example/tobago-example-demo/pom.xml index 34fa2e794..5d085a649 100644 --- a/tobago-example/tobago-example-demo/pom.xml +++ b/tobago-example/tobago-example-demo/pom.xml @@ -39,7 +39,10 @@ phantomjs 3.7.1 7.0.4 +1.2.1-SNAPSHOT +9.0.4 + tobago-example-demo @@ -166,18 +169,6 @@ - -org.apache.meecrowave -meecrowave-maven-plugin -1.2.0 - - -org.apache.geronimo.specs -geronimo-el_2.2_spec -1.0.4 - - - @@ -234,6 +225,7 @@ + org.apache.myfaces.tobago @@ -997,5 +989,60 @@ + + + meecrowave + + + + org.apache.meecrowave + meecrowave-core + ${meecrowave.version} + + + org.apache.openwebbeans + openwebbeans-jsf + ${openwebbeans.version} + + + org.apache.tomcat + tomcat-el-api + ${tomcat.version} + + + org.apache.tomcat + tomcat-jasper-el + ${tomcat.version} + + + + + + +org.apache.meecrowave +meecrowave-maven-plugin +${meecrowave.version} + + +org.apache.myfaces.tobago.example + + + + +org.apache.tomcat +tomcat-el-api +${tomcat.version} + + +org.apache.tomcat +tomcat-jasper-el +${tomcat.version} + + + + + + + diff --git a/tobago-example/tobago-example-demo/src/main/resources/META-INF/beans.xml b/tobago-example/tobago-example-demo/src/main/resources/META-INF/beans.xml new file mode 100644 index 0..e69de29bb diff --git a/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml b/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml index 65afe9ff7..df2c1200e 100644 --- a/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml +++ b/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml @@ -68,16 +68,16 @@ - +
[GitHub] bohmber opened a new pull request #9: fixed demo for mojarra
bohmber opened a new pull request #9: fixed demo for mojarra URL: https://github.com/apache/myfaces-tobago/pull/9 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] bohmber closed pull request #9: fixed demo for mojarra
bohmber closed pull request #9: fixed demo for mojarra URL: https://github.com/apache/myfaces-tobago/pull/9 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml b/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml index bd2da967f..97b20725f 100644 --- a/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml +++ b/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml @@ -68,9 +68,9 @@ - + This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] bohmber commented on a change in pull request #8: fix Meecrowave sample
bohmber commented on a change in pull request #8: fix Meecrowave sample URL: https://github.com/apache/myfaces-tobago/pull/8#discussion_r173647614 ## File path: tobago-example/tobago-example-demo/pom.xml ## @@ -39,7 +39,10 @@ phantomjs 3.7.1 7.0.4 +1.2.1-SNAPSHOT Review comment: I think it should be the 1.2.1 version. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] bohmber commented on issue #8: fix Meecrowave sample
bohmber commented on issue #8: fix Meecrowave sample URL: https://github.com/apache/myfaces-tobago/pull/8#issuecomment-372100254 Nice addtion This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] struberg commented on a change in pull request #8: fix Meecrowave sample
struberg commented on a change in pull request #8: fix Meecrowave sample URL: https://github.com/apache/myfaces-tobago/pull/8#discussion_r173648220 ## File path: tobago-example/tobago-example-demo/pom.xml ## @@ -39,7 +39,10 @@ phantomjs 3.7.1 7.0.4 +1.2.1-SNAPSHOT Review comment: yes indeed! ? tomee is now 7.0.5 and johnzon 1.1.7 Preparing for JavaLand and have to finish $$dayjob stuff, so sorry for not finding time to polish further :( This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] deki commented on a change in pull request #8: fix Meecrowave sample
deki commented on a change in pull request #8: fix Meecrowave sample URL: https://github.com/apache/myfaces-tobago/pull/8#discussion_r173648854 ## File path: tobago-example/tobago-example-demo/pom.xml ## @@ -39,7 +39,10 @@ phantomjs 3.7.1 7.0.4 +1.2.1-SNAPSHOT Review comment: No problem, I'll take care of this (as discussed on the owb user list). Thanks. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] bohmber commented on issue #2: Tobago 1589
bohmber commented on issue #2: Tobago 1589 URL: https://github.com/apache/myfaces-tobago/pull/2#issuecomment-369352423 There is still an issue with mojarra 2.0 PostAddToViewEvent, Head and StateHandling in mojarra 2.0. No more energy to find a workaround for the crap mojarra impl. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] bohmber closed pull request #2: Tobago 1589
bohmber closed pull request #2: Tobago 1589 URL: https://github.com/apache/myfaces-tobago/pull/2 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PageRenderer.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PageRenderer.java index 78cd3d84d..2b459ffa3 100644 --- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PageRenderer.java +++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PageRenderer.java @@ -419,6 +419,7 @@ public boolean getRendersChildren() { .createComponent(facesContext, UIMeta.COMPONENT_TYPE, RendererTypes.Meta.name()); viewportMeta.setName("viewport"); viewportMeta.setContent("width=device-width, initial-scale=1.0"); +viewportMeta.setTransient(true); metas.add(0, viewportMeta); } @@ -426,6 +427,7 @@ public boolean getRendersChildren() { final UIMeta charsetMeta = (UIMeta) facesContext.getApplication() .createComponent(facesContext, UIMeta.COMPONENT_TYPE, RendererTypes.Meta.name()); charsetMeta.setCharset(charset); +charsetMeta.setTransient(true); metas.add(0, charsetMeta); } } diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SheetPageCommandRenderer.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SheetPageCommandRenderer.java index 4b9707f26..bbc15b160 100644 --- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SheetPageCommandRenderer.java +++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SheetPageCommandRenderer.java @@ -19,71 +19,11 @@ package org.apache.myfaces.tobago.internal.renderkit.renderer; -import org.apache.myfaces.tobago.component.Attributes; -import org.apache.myfaces.tobago.event.SheetAction; -import org.apache.myfaces.tobago.event.PageActionEvent; -import org.apache.myfaces.tobago.event.SortActionEvent; -import org.apache.myfaces.tobago.util.ComponentUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.faces.component.UIColumn; -import javax.faces.component.UIComponent; -import javax.faces.component.UIData; -import javax.faces.context.FacesContext; -import javax.faces.event.ActionEvent; -import java.util.Map; - public class SheetPageCommandRenderer extends LinkRenderer { private static final Logger LOG = LoggerFactory.getLogger(SheetPageCommandRenderer.class); - @Override - public void decode(final FacesContext facesContext, final UIComponent component) { -final String sourceId = facesContext.getExternalContext().getRequestParameterMap().get("javax.faces.source"); -final String clientId = component.getClientId(facesContext); -if (LOG.isDebugEnabled()) { - LOG.debug("sourceId = '{}'", sourceId); - LOG.debug("clientId = '{}'", clientId); -} - -if (clientId.equals(sourceId)) { - - final SheetAction action = (SheetAction) ComponentUtils.getAttribute(component, Attributes.sheetAction); - ActionEvent event = null; - - switch (action) { -case first: -case prev: -case next: -case last: - event = new PageActionEvent(component.getParent(), action); - break; -case toPage: -case toRow: - event = new PageActionEvent(component.getParent(), action); - Integer target = (Integer) ComponentUtils.getAttribute(component, Attributes.pagingTarget); - if (target == null) { -final Map map = facesContext.getExternalContext().getRequestParameterMap(); -final Object value = map.get(clientId); -try { - target = Integer.parseInt((String) value); -} catch (final NumberFormatException e) { - LOG.error("Can't parse integer value for action " + action.name() + ": " + value); - break; -} - } - ((PageActionEvent) event).setValue(target); - break; -case sort: - final UIColumn column = (UIColumn) component.getParent(); - final UIData data = (UIData) column.getParent(); - event = new SortActionEvent(data, column); - break; -default: - LOG.error("Unknown action '{}' found!", action); - } - component.queueEvent(event); -} - } } diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SheetRenderer.java
[GitHub] bohmber opened a new pull request #10: Tobago-1870
bohmber opened a new pull request #10: Tobago-1870 URL: https://github.com/apache/myfaces-tobago/pull/10 MyFaces core is removing the component resources in the head if the view will be recreated before rendering. The view will be recreated because of expressions. For example expressions in the ui:include src attribute The PostAddToViewEvent will not be broadcasted in this case again. A subscription to the PreRenderViewEvent avoids this problem This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] struberg opened a new pull request #8: fix Meecrowave sample
struberg opened a new pull request #8: fix Meecrowave sample URL: https://github.com/apache/myfaces-tobago/pull/8 this now needs a -Pmeecrowave Could certainly need some polishing still - feel free to amend as needed! This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] bohmber closed pull request #10: Tobago-1870
bohmber closed pull request #10: Tobago-1870 URL: https://github.com/apache/myfaces-tobago/pull/10 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIMeta.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIMeta.java index 2edf4b9c5..8a027d839 100644 --- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIMeta.java +++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIMeta.java @@ -25,15 +25,27 @@ import javax.faces.event.ComponentSystemEvent; import javax.faces.event.ListenerFor; import javax.faces.event.PostAddToViewEvent; +import javax.faces.event.PreRenderViewEvent; @ListenerFor(systemEventClass = PostAddToViewEvent.class) public abstract class AbstractUIMeta extends UIComponentBase { @Override public void processEvent(final ComponentSystemEvent event) { -final FacesContext facesContext = getFacesContext(); -final UIViewRoot root = facesContext.getViewRoot(); -root.addComponentResource(facesContext, this); + +super.processEvent(event); + +if (event instanceof PreRenderViewEvent) { + final FacesContext facesContext = getFacesContext(); + final UIViewRoot root = facesContext.getViewRoot(); + root.addComponentResource(facesContext, this); +} else if (event instanceof PostAddToViewEvent) { + // MyFaces core is removing the component resources in head if the view will be recreated before rendering. + // The view will be recreated because of expressions. For example expressins in the ui:include src attribute + // The PostAddToViewEvent will not be broadcasted in this case again. + // A subscription to the PreRenderViewEvent avoids this problem + getFacesContext().getViewRoot().subscribeToEvent(PreRenderViewEvent.class, this); +} } public abstract String getCharset(); diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIScript.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIScript.java index 1ed52bb9a..b53bfb7bb 100644 --- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIScript.java +++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIScript.java @@ -25,6 +25,7 @@ import javax.faces.event.ComponentSystemEvent; import javax.faces.event.ListenerFor; import javax.faces.event.PostAddToViewEvent; +import javax.faces.event.PreRenderViewEvent; /** * {@link org.apache.myfaces.tobago.internal.taglib.component.ScriptTagDeclaration} @@ -36,9 +37,20 @@ @Override public void processEvent(final ComponentSystemEvent event) { -final FacesContext facesContext = getFacesContext(); -final UIViewRoot root = facesContext.getViewRoot(); -root.addComponentResource(facesContext, this); + +super.processEvent(event); + +if (event instanceof PreRenderViewEvent) { + final FacesContext facesContext = getFacesContext(); + final UIViewRoot root = facesContext.getViewRoot(); + root.addComponentResource(facesContext, this); +} else if (event instanceof PostAddToViewEvent) { + // MyFaces core is removing the component resources in head if the view will be recreated before rendering. + // The view will be recreated because of expressions. For example expressins in the ui:include src attribute + // The PostAddToViewEvent will not be broadcasted in this case again. + // A subscription to the PreRenderViewEvent avoids this problem + getFacesContext().getViewRoot().subscribeToEvent(PreRenderViewEvent.class, this); +} } public abstract String getFile(); diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIStyle.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIStyle.java index ea7d99a69..5f5876a2b 100644 --- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIStyle.java +++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIStyle.java @@ -40,6 +40,7 @@ import javax.faces.event.ComponentSystemEvent; import javax.faces.event.ListenerFor; import javax.faces.event.PostAddToViewEvent; +import javax.faces.event.PreRenderViewEvent; /** * {@link org.apache.myfaces.tobago.internal.taglib.component.StyleTagDeclaration} @@ -53,17 +54,23 @@ @Override public void processEvent(final ComponentSystemEvent event) { - +super.processEvent(event); final FacesContext facesContext = getFacesContext(); -if (event instanceof
[GitHub] henningn opened a new pull request #7: TOBAGO-1852 Sheet row to open a popup does not work
henningn opened a new pull request #7: TOBAGO-1852 Sheet row to open a popup does not work URL: https://github.com/apache/myfaces-tobago/pull/7 * can now have children of type and * Fix a NPE for merging command maps * Fix log message when evaluateClientId * EventBehavior now have an id to identify related component * 'disabled' attribute of is now supported - does the same as rendered * A component can now have both and if only one is enabled This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] lofwyr14 commented on a change in pull request #7: TOBAGO-1852 Sheet row to open a popup does not work
lofwyr14 commented on a change in pull request #7: TOBAGO-1852 Sheet row to open a popup does not work URL: https://github.com/apache/myfaces-tobago/pull/7#discussion_r172821754 ## File path: tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/CommandMap.java ## @@ -104,14 +104,16 @@ public static CommandMap merge(final CommandMap m1, final CommandMap m2) { c1.merge(c2); } } else { - for (final Map.Entryentry : m2.getOther().entrySet()) { -final ClientBehaviors key = entry.getKey(); -final Command value = entry.getValue(); -if (m1.other.containsKey(key)) { - final Command command = m1.other.get(key); - command.merge(value); -} else { - m1.addCommand(key, value); + if (m1.getOther() != null && m2.getOther() != null) { Review comment: Please use "other" instead of "getOther()" for internal calls (performance). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] henningn commented on issue #7: TOBAGO-1852 Sheet row to open a popup does not work
henningn commented on issue #7: TOBAGO-1852 Sheet row to open a popup does not work URL: https://github.com/apache/myfaces-tobago/pull/7#issuecomment-373041616 Already committed in myfaces-tobago: [fa9d600c94068b46d3508e88065bd100fb80effd](https://github.com/apache/myfaces-tobago/commit/fa9d600c94068b46d3508e88065bd100fb80effd) [6a8602f538e7b7f0b2e16c19df02dcb21fceef14](https://github.com/apache/myfaces-tobago/commit/6a8602f538e7b7f0b2e16c19df02dcb21fceef14) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] bohmber opened a new pull request #11: Tobago 1870
bohmber opened a new pull request #11: Tobago 1870 URL: https://github.com/apache/myfaces-tobago/pull/11 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] lofwyr14 closed pull request #11: Tobago 1870
lofwyr14 closed pull request #11: Tobago 1870 URL: https://github.com/apache/myfaces-tobago/pull/11 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIMeta.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIMeta.java index 8a027d839..76be5df51 100644 --- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIMeta.java +++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIMeta.java @@ -27,6 +27,8 @@ import javax.faces.event.PostAddToViewEvent; import javax.faces.event.PreRenderViewEvent; +import org.apache.myfaces.tobago.util.FacesVersion; + @ListenerFor(systemEventClass = PostAddToViewEvent.class) public abstract class AbstractUIMeta extends UIComponentBase { @@ -36,18 +38,27 @@ public void processEvent(final ComponentSystemEvent event) { super.processEvent(event); if (event instanceof PreRenderViewEvent) { - final FacesContext facesContext = getFacesContext(); - final UIViewRoot root = facesContext.getViewRoot(); - root.addComponentResource(facesContext, this); + addComponentResource(); } else if (event instanceof PostAddToViewEvent) { - // MyFaces core is removing the component resources in head if the view will be recreated before rendering. - // The view will be recreated because of expressions. For example expressins in the ui:include src attribute - // The PostAddToViewEvent will not be broadcasted in this case again. - // A subscription to the PreRenderViewEvent avoids this problem - getFacesContext().getViewRoot().subscribeToEvent(PreRenderViewEvent.class, this); + if (FacesVersion.supports21() || !FacesVersion.isMyfaces()) { +// MyFaces core is removing the component resources in head if the view will be recreated before rendering. +// The view will be recreated because of expressions. For example expressins in the ui:include src attribute +// The PostAddToViewEvent will not be broadcasted in this case again. +// A subscription to the PreRenderViewEvent avoids this problem +// NOTE: PreRenderViewEvent can not used in myfaces prior 2.0.3 using PostAddToView for all myfaces 2.0 versions + getFacesContext().getViewRoot().subscribeToEvent(PreRenderViewEvent.class, this); + } else { +addComponentResource(); + } } } + private void addComponentResource() { +final FacesContext facesContext = getFacesContext(); +final UIViewRoot root = facesContext.getViewRoot(); +root.addComponentResource(facesContext, this); + } + public abstract String getCharset(); public abstract String getHttpEquiv(); diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIScript.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIScript.java index b53bfb7bb..5d289017e 100644 --- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIScript.java +++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIScript.java @@ -27,6 +27,8 @@ import javax.faces.event.PostAddToViewEvent; import javax.faces.event.PreRenderViewEvent; +import org.apache.myfaces.tobago.util.FacesVersion; + /** * {@link org.apache.myfaces.tobago.internal.taglib.component.ScriptTagDeclaration} * @@ -41,17 +43,26 @@ public void processEvent(final ComponentSystemEvent event) { super.processEvent(event); if (event instanceof PreRenderViewEvent) { - final FacesContext facesContext = getFacesContext(); - final UIViewRoot root = facesContext.getViewRoot(); - root.addComponentResource(facesContext, this); + addComponentResource(); } else if (event instanceof PostAddToViewEvent) { - // MyFaces core is removing the component resources in head if the view will be recreated before rendering. - // The view will be recreated because of expressions. For example expressins in the ui:include src attribute - // The PostAddToViewEvent will not be broadcasted in this case again. - // A subscription to the PreRenderViewEvent avoids this problem - getFacesContext().getViewRoot().subscribeToEvent(PreRenderViewEvent.class, this); + if (FacesVersion.supports21() || !FacesVersion.isMyfaces()) { +// MyFaces core is removing the component resources in head if the view will be recreated before rendering. +// The view will be recreated because of expressions. For example expressins in the ui:include src attribute +// The PostAddToViewEvent will not be
[GitHub] bohmber opened a new pull request #4: Misc
bohmber opened a new pull request #4: Misc URL: https://github.com/apache/myfaces-tobago/pull/4 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] bohmber closed pull request #4: Misc
bohmber closed pull request #4: Misc URL: https://github.com/apache/myfaces-tobago/pull/4 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component.stg b/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component.stg index 4ecdf17a3..5c3a3930f 100644 --- a/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component.stg +++ b/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component.stg @@ -120,6 +120,7 @@ public class @Override public void restoreState(FacesContext context, Object state) { +// FIXME HACK for mojarra SystemEventListener state restoring bug pushComponentToEL(context, this); super.restoreState(context, state); popComponentFromEL(context); This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] bohmber opened a new pull request #3: improved component template
bohmber opened a new pull request #3: improved component template URL: https://github.com/apache/myfaces-tobago/pull/3 added generated annotation This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] bohmber closed pull request #3: improved component template
bohmber closed pull request #3: improved component template URL: https://github.com/apache/myfaces-tobago/pull/3 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component.stg b/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component.stg index 882541ac5..4ecdf17a3 100644 --- a/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component.stg +++ b/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component.stg @@ -43,6 +43,7 @@ package ; import org.apache.myfaces.tobago.internal.util.ArrayUtils; import org.apache.myfaces.tobago.internal.util.StringUtils; import org.apache.myfaces.tobago.internal.util.Deprecation; +import javax.annotation.Generated; import javax.el.ELException; import javax.faces.FacesException; import java.util.Arrays; @@ -66,6 +67,7 @@ import javax.el.ValueExpression; @Deprecated +@Generated("component.stg") public class extends{ This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] bohmber opened a new pull request #2: Tobago 1589
bohmber opened a new pull request #2: Tobago 1589 URL: https://github.com/apache/myfaces-tobago/pull/2 Fix for the mojarra issue. Created the components transient and move decode to sheet back. The explicit remove of the component is needed for mojarra 2.3 (they have the DynamicActionComponent List inside the state handling. Looks like it's an other workaround for some crap and they did not respect the transient property) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] bohmber commented on issue #2: Tobago 1589
bohmber commented on issue #2: Tobago 1589 URL: https://github.com/apache/myfaces-tobago/pull/2#issuecomment-369297478 Added more fixes for Mojarra. Mojarra is like Klendathu This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] bohmber commented on issue #2: Tobago 1589
bohmber commented on issue #2: Tobago 1589 URL: https://github.com/apache/myfaces-tobago/pull/2#issuecomment-369291178 Checkstyle errors are fixed now. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] lofwyr14 commented on a change in pull request #2: Tobago 1589
lofwyr14 commented on a change in pull request #2: Tobago 1589 URL: https://github.com/apache/myfaces-tobago/pull/2#discussion_r171195751 ## File path: tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SheetRenderer.java ## @@ -132,13 +139,86 @@ public void decode(final FacesContext facesContext, final UIComponent component) } RenderUtils.decodedStateOfTreeData(facesContext, sheet); +decodeSheetAction(facesContext, sheet); +decodeColumnAction(facesContext, columns); /* this will be done by the javax.faces.component.UIData.processDecodes() because these are facets. for (UIComponent facet : sheet.getFacets().values()) { facet.decode(facesContext); } */ } + private void decodeColumnAction(final FacesContext facesContext, List columns) { Review comment: please use final as parameter qualifier This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] lofwyr14 commented on a change in pull request #2: Tobago 1589
lofwyr14 commented on a change in pull request #2: Tobago 1589 URL: https://github.com/apache/myfaces-tobago/pull/2#discussion_r171195972 ## File path: tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SheetRenderer.java ## @@ -132,13 +139,86 @@ public void decode(final FacesContext facesContext, final UIComponent component) } RenderUtils.decodedStateOfTreeData(facesContext, sheet); +decodeSheetAction(facesContext, sheet); +decodeColumnAction(facesContext, columns); /* this will be done by the javax.faces.component.UIData.processDecodes() because these are facets. for (UIComponent facet : sheet.getFacets().values()) { facet.decode(facesContext); } */ } + private void decodeColumnAction(final FacesContext facesContext, List columns) { +for (final AbstractUIColumnBase column : columns) { + final boolean sortable = ComponentUtils.getBooleanAttribute(column, Attributes.sortable); + if (sortable) { +final String sourceId = facesContext.getExternalContext().getRequestParameterMap().get("javax.faces.source"); +final String columnId = column.getClientId(facesContext); +final String sorterId = columnId + "_" + UISheet.SORTER_ID; + +if (sorterId.equals(sourceId)) { + final UIData data = (UIData) column.getParent(); + data.queueEvent(new SortActionEvent(data, column)); +} + } +} + } + + + private void decodeSheetAction(final FacesContext facesContext, UISheet component) { +final String sourceId = facesContext.getExternalContext().getRequestParameterMap().get("javax.faces.source"); + +final String clientId = component.getClientId(facesContext); +if (LOG.isDebugEnabled()) { + LOG.debug("sourceId = '{}'", sourceId); + LOG.debug("clientId = '{}'", clientId); +} + +final String sheetClientIdWithAction = clientId + UINamingContainer.getSeparatorChar(facesContext) + SUFFIX_PAGE_ACTION; Review comment: line width > 120 (please run checkstyle) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pnicolucci closed pull request #9: MYFACES-4239: Multiple performance improvements
pnicolucci closed pull request #9: MYFACES-4239: Multiple performance improvements URL: https://github.com/apache/myfaces/pull/9 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java b/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java index 6ec1321ae..6b3059b59 100755 --- a/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java +++ b/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java @@ -2235,19 +2235,19 @@ private void _handleListenerForAnnotations(FacesContext context, Object inspecte List listenerForList = null; boolean isCachedList = false; -if(isProduction && _classToListenerForMap.containsKey(inspectedClass)) +if(isProduction) { listenerForList = _classToListenerForMap.get(inspectedClass); -if(listenerForList == null) -{ -return; //class has been inspected and did not contain any listener annotations -} -else if (listenerForList.isEmpty()) + +if (listenerForList != null) { -return; +if (listenerForList.isEmpty()) +{ +return; //class has been inspected and did not contain any listener annotations +} + +isCachedList = true;// else annotations were found in the cache } - -isCachedList = true;// else annotations were found in the cache } if(listenerForList == null) //not in production or the class hasn't been inspected yet @@ -2378,19 +2378,19 @@ private void _handleResourceDependencyAnnotations(FacesContext context, Class List dependencyList = null; boolean isCachedList = false; -if(isProduction && _classToResourceDependencyMap.containsKey(inspectedClass)) +if(isProduction) { dependencyList = _classToResourceDependencyMap.get(inspectedClass); -if(dependencyList == null) -{ -return; //class has been inspected and did not contain any resource dependency annotations -} -else if (dependencyList.isEmpty()) + +if (dependencyList != null) { -return; +if (dependencyList.isEmpty()) +{ +return; //class has been inspected and did not contain any resource dependency annotations +} + +isCachedList = true;// else annotations were found in the cache } - -isCachedList = true;// else annotations were found in the cache } if(dependencyList == null) //not in production or the class hasn't been inspected yet diff --git a/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java b/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java index b468a7915..60f67cd0d 100755 --- a/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java +++ b/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java @@ -844,11 +844,18 @@ private String encodeURL(String baseUrl, Map> parameters) } } +boolean hasParams = paramMap != null && paramMap.size()>0; + +if (!hasParams && fragment == null) +{ +return baseUrl; +} + // start building the new URL StringBuilder newUrl = new StringBuilder(baseUrl); //now add the updated param list onto the url -if (paramMap != null && paramMap.size()>0) +if (hasParams) { boolean isFirstPair = true; for (Map.Entry> pair : paramMap.entrySet()) @@ -884,7 +891,8 @@ private String encodeURL(String baseUrl, Map> parameters) //add the fragment back on (if any) if (fragment != null) { -newUrl.append(URL_FRAGMENT_SEPERATOR + fragment); +newUrl.append(URL_FRAGMENT_SEPERATOR); +newUrl.append(fragment); } return newUrl.toString(); diff --git a/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java b/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java index a754fef61..c598bbebf 100644 --- a/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java +++
[GitHub] pnicolucci opened a new pull request #9: MYFACES-4239
pnicolucci opened a new pull request #9: MYFACES-4239 URL: https://github.com/apache/myfaces/pull/9 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pnicolucci opened a new pull request #8: MYFACES-4239: Multiple performance improvements
pnicolucci opened a new pull request #8: MYFACES-4239: Multiple performance improvements URL: https://github.com/apache/myfaces/pull/8 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pnicolucci commented on issue #8: MYFACES-4239: Multiple performance improvements
pnicolucci commented on issue #8: MYFACES-4239: Multiple performance improvements URL: https://github.com/apache/myfaces/pull/8#issuecomment-399469835 I'll refactor a bit to use the SharedStringBuilder. Thanks for the information / review! This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] tandraschko commented on issue #18: MYFACES-4082 Fix 'binding' when referencing composite components
tandraschko commented on issue #18: MYFACES-4082 Fix 'binding' when referencing composite components URL: https://github.com/apache/myfaces/pull/18#issuecomment-431913183 @luigiJsonar the ComponentTagHandlerDelegate contains the following, before setting the value: if (PhaseId.RESTORE_VIEW.equals(faces.getCurrentPhaseId())) Could you please if it makes sense to add this if? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] tandraschko commented on issue #18: MYFACES-4082 Fix 'binding' when referencing composite components
tandraschko commented on issue #18: MYFACES-4082 Fix 'binding' when referencing composite components URL: https://github.com/apache/myfaces/pull/18#issuecomment-431914558 @luigiJsonar Could you please try this: https://gist.github.com/tandraschko/2f8e15bcbf8affc63df26b25f9259584 If it works fine, i will apply it This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] ebreijo opened a new pull request #24: MYFACES-4260: Context map from CDI ViewScope is not being cleared at …
ebreijo opened a new pull request #24: MYFACES-4260: Context map from CDI ViewScope is not being cleared at … URL: https://github.com/apache/myfaces/pull/24 …destroy time This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] ebreijo opened a new pull request #23: MYFACES-4260: Context map from CDI ViewScope is not being cleared at …
ebreijo opened a new pull request #23: MYFACES-4260: Context map from CDI ViewScope is not being cleared at … URL: https://github.com/apache/myfaces/pull/23 …destroy time This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] ebreijo opened a new pull request #25: MYFACES-4260: Context map from CDI ViewScope is not being cleared at …
ebreijo opened a new pull request #25: MYFACES-4260: Context map from CDI ViewScope is not being cleared at … URL: https://github.com/apache/myfaces/pull/25 …destroy time This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] ebreijo closed pull request #25: MYFACES-4260: Context map from CDI ViewScope is not being cleared at …
ebreijo closed pull request #25: MYFACES-4260: Context map from CDI ViewScope is not being cleared at … URL: https://github.com/apache/myfaces/pull/25 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java b/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java index f107be05d..ab89ed64f 100644 --- a/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java +++ b/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java @@ -241,6 +241,8 @@ public static void destroyAllActive(ViewScopeContextualStorage storage, FacesCon contextualInstanceInfo.getCreationalContext()); } } + +contextMap.clear(); storage.deactivate(); } This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] ebreijo closed pull request #24: MYFACES-4260: Context map from CDI ViewScope is not being cleared at …
ebreijo closed pull request #24: MYFACES-4260: Context map from CDI ViewScope is not being cleared at … URL: https://github.com/apache/myfaces/pull/24 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java b/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java index 6384e43a2..122aeb1ca 100644 --- a/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java +++ b/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java @@ -246,6 +246,8 @@ public static void destroyAllActive(ViewScopeContextualStorage storage, FacesCon mbDestroyer.destroy(key.getName(), entry.getValue().getContextualInstance()); } } + +contextMap.clear(); storage.deactivate(); } This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] ebreijo closed pull request #23: MYFACES-4260: Context map from CDI ViewScope is not being cleared at …
ebreijo closed pull request #23: MYFACES-4260: Context map from CDI ViewScope is not being cleared at … URL: https://github.com/apache/myfaces/pull/23 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java b/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java index 7d47156ba..ff6cc9b51 100644 --- a/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java +++ b/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java @@ -254,6 +254,8 @@ public static void destroyAllActive(ViewScopeContextualStorage storage, FacesCon mbDestroyer.destroy(key.getName(), entry.getValue().getContextualInstance()); } } + +contextMap.clear(); storage.deactivate(); } This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] luigiJsonar commented on issue #18: MYFACES-4082 Fix 'binding' when referencing composite components
luigiJsonar commented on issue #18: MYFACES-4082 Fix 'binding' when referencing composite components URL: https://github.com/apache/myfaces/pull/18#issuecomment-436758724 I'd be more than happy to apply any other suggestions, open more PRs for previous versions, test it... I don't understand why it had to be your commit, not mine. Can you point me to any documentation on how to contribute to this repo? I need that because I might be missing something but IMHO I tried to contribute and you just got my code and didn't even mention me on it. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] tandraschko edited a comment on issue #18: MYFACES-4082 Fix 'binding' when referencing composite components
tandraschko edited a comment on issue #18: MYFACES-4082 Fix 'binding' when referencing composite components URL: https://github.com/apache/myfaces/pull/18#issuecomment-436766191 Sorry, please don't take it personally. I didn't see that you applied my changes, so i commited my version, which was inspired by your version and the original code. Thanks for your effort. You can just contribute by opening issues, trigger discussions on the dev mailing list and provide patches/Pull Requests. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] tandraschko commented on issue #18: MYFACES-4082 Fix 'binding' when referencing composite components
tandraschko commented on issue #18: MYFACES-4082 Fix 'binding' when referencing composite components URL: https://github.com/apache/myfaces/pull/18#issuecomment-436766191 Sorry, please don't take it personally. I didn't see that you applied my changes, so i commited my version, which was inspired by your version and the original code. You can just contribute by opening issues, trigger discussions on the dev mailinst list and provide patches/Pull Requests. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] tandraschko edited a comment on issue #18: MYFACES-4082 Fix 'binding' when referencing composite components
tandraschko edited a comment on issue #18: MYFACES-4082 Fix 'binding' when referencing composite components URL: https://github.com/apache/myfaces/pull/18#issuecomment-436766191 Sorry, please don't take it personally. I didn't see that you applied my changes, so i commited my version, which was inspired by your version and the original code. Thanks for your effort. You can just contribute by opening issues, trigger discussions on the dev mailinst list and provide patches/Pull Requests. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services