Giter Site home page Giter Site logo

omnifaces's Introduction

omnifaces's People

Contributors

arjantijms avatar balusc avatar danny02 avatar dependabot[bot] avatar eitland avatar gabrielpbzr avatar garcia-jj avatar janbeernink avatar lprimak avatar melloware avatar mmariotti avatar nicolaisotta avatar pizzi80 avatar pvdlg avatar skuntsel avatar stefanpr avatar tomazzupan avatar velyn-n avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

omnifaces's Issues

<o:messages> is not rendered in a panelGroup

Hi,

It seems that the o:messages is not rendered when is inside of other component, for example inside of a panelGroup. Tested for JSF 2.2.5.

The omnifaces MessagesRenderer is using encodeChildren to render but this method is only called when the component is inside of a panelGroup is the component return true form getRendersChildren().

By default org.omnifaces.renderer.MessagesRenderer is returning false for getRendersChildren() and for this reason the component is not rendered in this case.

Overriding the getRendersChildren() and returning true in MessageRenderer could resolve this issue.

Regards,

Add <o:massAttribute>

I took the liberty to migrate this from google code. Was kind of hoping to see it set to a target version or rejected so I know if I should try it myself or not :-)
https://code.google.com/p/omnifaces/issues/detail?id=310&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Reporter%20Modified%20Summary

Today I often use a wide number of inputs. Primefaces offers no less then 24 different input types and then some standard ones etc.

I often have read only modes in my projects so it would be helpful to be able to control disabled on a higher level.

Vision:

<o:disableMany disabled=#{myBean.readOnly}>

    <h:inputText value="#{myBean.name}" />
    // many other inputs
</o:disableMany >

arjan.tijms:
Sounds like a pretty good plan!

We had a need for something quite like this before. I guess this can be somewhat generalized into a tag that's able to set any attribute on a number of components, e.g:

<o:massAttribute name="disabled" value="#{myBean.readOnly}">
  <h:inputText value="#{myBean.name}" />
  // many other inputs
</o:massAttribute>

With an optional attribute for targeting only specific component types, e.g.

<o:massAttribute name="disabled" value="#{myBean.readOnly}"      for="javax.faces.component.UIInput">
  <h:inputText value="#{myBean.name}" />
  // many other inputs
</o:massAttribute>

Besides this one, the o:form may be a natural place to have a disabled attribute as well for those cases where you quickly want to disable (set to read-only) all components in a given form.

Using o:methodParm for validator-attribute breaks validation

Hello,

if you use o:methodParam for a validator-attribute the validator-method is invoked correctly. However if a ValidatorException is thrown it is wrapped in an ELException, when it reaches UIInput.validateValue and is therefore not caught and handled.

Sample:

page.xhtml

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://xmlns.jcp.org/jsf/html"
    xmlns:f="http://xmlns.jcp.org/jsf/core"
    xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
    xmlns:o="http://omnifaces.org/ui"
    xmlns:of="http://omnifaces.org/functions">
<f:view contentType="text/html" encoding="iso-8859-1" locale="de">
<h:head />
<h:body>
    <h:form>
        <ui:include src="inputText.xhtml">
            <ui:param name="value" value="#{bean.value}" />
            <ui:param name="validator" value="#{bean.validateValue}" />
        </ui:include>
        <h:messages style="display: block" />       
        <h:commandButton value="submit" style="display: block" />
    </h:form>
</h:body>
</f:view>
</html>

inputText.xhtml

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://xmlns.jcp.org/jsf/html"
    xmlns:f="http://xmlns.jcp.org/jsf/core"
    xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
    xmlns:o="http://omnifaces.org/ui"
    xmlns:of="http://omnifaces.org/functions">
    <o:methodParam name="validatorM" value="#{validator}" />
    <h:inputText value="#{value}"
        validator="#{validatorM}" />
</ui:composition>

Bean.java

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.validator.ValidatorException;

import org.omnifaces.util.Messages;

@ManagedBean(name="bean")
@SessionScoped
public class Bean {

    public String _value;

    public String getValue() {
        return _value;
    }

    public void setValue(String value) {
        _value = value;
    }

    public void validateValue(FacesContext context, UIComponent component, Object value) throws ValidatorException {
        throw new ValidatorException(Messages.createError("Invalid!"));
    }
}

A possible solution would be to unwrap the ValidatorException in MethodExpressionValueExpressionAdapter#ValueToInvokeElResolver.getValue(ELContext, Object, Object).

try {
    return super.invoke(context, base, property, null, callerProvidedParameters != null ? callerProvidedParameters : EMPTY_PARAMETERS);
} catch (MethodNotFoundException e) {
    ...
} catch (ELException e) {
    Throwable cause = e.getCause();
    if (cause instanceof ValidatorException) {
        throw (ValidatorException) cause;
    }
    throw e;
}

Reproducable with OmniFaces 1.7, Mojarra 2.2.5, PrimeFaces 4.0.9, Tomcat 7.0.32.

Thanks for your great work.

OmniFaces breaks FacesConverter contract

Repost from googlecode:

Ever since FacesConverters have been made available as CDI InjectionTargets, one of our FacesConverters does not work as expected. The converter has a no-args Constructor (for partial state saving feature) plus a constructor with a Class<?> parameter.

public MyCoolConverter(Class<?> target) {
    this.clazz = target;
}

The FacesConverter's JavaDoc states:
"...If a converter has a single argument constructor that takes a Class instance and the Class of the data to be converted is known at converter instantiation time, this constructor must be used to instantiate the converter instead of the zero-argument version..."

Using plain Mojarra the Converter is instantiated as expected, using the aforementioned constructor. Since OmniFaces uses CDI to manage the instantiation (and lifecycle) of a FacesConverter-Bean I do not see how this can be achieved (in a clear manner).

Any advice on workarounds is appreciated.

[Feature] jsr 303 bean validation for class level constraints

What about a jsf tag that triggers class level constraints on a given bean within scope of a jsf form?

Having some class level constraints validation must manually be called within bean.

<o:validateBean value="#{bean.foo}"/>

This way "validateBean" would mean what it says and not just validate a single property.

regards mj

JNDI availability not correctly detected in Google App Engine

When using Google App Engine I get the following Exception:

SEVERE: Class : org.omnifaces.cdi.eager.EagerBeansPhaseListener not found.
java.lang.NoClassDefFoundError: javax.naming.InitialContext is a restricted class. Please see the Google  App Engine developer's guide for more details.
    at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51)
    at org.omnifaces.util.JNDI.lookup(JNDI.java:82)
    at org.omnifaces.config.BeanManager.init(BeanManager.java:69)
    at org.omnifaces.config.BeanManager.getReference(BeanManager.java:119)
    at org.omnifaces.cdi.eager.EagerBeansPhaseListener.<init>(EagerBeansPhaseListener.java:45)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at com.google.appengine.tools.development.agent.runtime.Runtime.newInstance_(Runtime.java:127)
    at com.google.appengine.tools.development.agent.runtime.Runtime.newInstance(Runtime.java:148)
    at org.apache.myfaces.shared.util.ClassUtils.newInstance(ClassUtils.java:411)
    at org.apache.myfaces.shared.util.ClassUtils.newInstance(ClassUtils.java:403)

I didn't have that problem in Omnifaces 1.7.

Setup:

Omnifaces 1.8.1
Primefaces 5
GAE 1.9.4
Myfaces 2.2.3

Increase more accessibility in Omnifaces

I know that this is not the focus of Omnifaces, but I think that is good increase accessibility Omnifaces, because the programmers that use the JSF Components rarely care with this.
For example:
Put the attribute "role" with value of "alert" in o:messages;
Put the attribute "role" with value of "tree" in o:tree;
Put the attribute "role" with value of "treeitem" in o:treeNodeItem;
Put the attribute "aria-required" with value "true" in inputs and selects that the "required" attribute is true;
Put the attribute "aria-labelledby" with value of id of the label that reference it;
Put the attribute "aria-label" with value of the inner text of the label that reference it;
Put the attribute "aria-disabled" with value "true" in inputs and selects that the "disabled" attribute is true;
Put the attribute "aria-readonly" with value "true" in inputs and selects that the "readonly" attribute is true;
Put the attribute "aria-valuemin" with value of "min" attribute;
Put the attribute "aria-valuemax" with value of "max" attribute;

Omnifaces Extensionless URL feature issue

Hi,

After trying on my project the Extensionless URL feature that's included on Omnifaces I decided to take it out since it broke compatibility with some other stuff I had done. Now my project doesn't work at all, it keeps on trying to find pages without the ".xhtml" extension even if the extensionless feature is not there in the web.xml file any more.

For example, after I removed everything from the web.xml, whenever I click on the below link the browser redirects towards "/dashboard/home" when it should redirect to "/dashboard/home.xhtml", so I get a "Not found" exception.

The link: href="../dashboard/home.xhtml">#{msgs.home_menu} (had to put it like this, if not GitHub converts it to a real link)

If I write manually the URL on the browser (WITH the .xhtml extension) the same happens... The extension disappears and I get a "Not found" exception. Cleared cache twice, restarted the server (Wildfly 8), tried everything.

Any ideas? It did work before adding the feature in, so I'm a 100% sure it's because of it (it was the only modification I did today and yesterday the site was up and running).

OmniFaces breaks DeltaSpike navigation using ViewConfigs

See DELTASPIKE-623. I created a simple test application. Navigation is broken if OmniFaces is also in the WAR, but is fine if I remove OmniFaces.

The culprit appears to be OmniApplicationFactory.createOmniApplication(), which "drops" DeltaSpike's ApplicationWrapper, which in turn causes DeltaSpike's NavigationHandler to not be set up.

o:deferredScript fails during postback of a stateless view

When performing a postback in a stateless view (f:view transient="true"), then DeferredScript#processEvent() isn't invoked for PostAddToView event. Ultimately, the o:deferredScript still sticks in head instead of body and subsequently CombinedResourceHandler isn't able to find it.

importConstants and importFunctions lookup class differently

In importConstants there is an extra bit of functionality involving inner enums:

try {
    return Class.forName(type, true, Thread.currentThread().getContextClassLoader());
}
catch (ClassNotFoundException e) {
    // Perhaps it's an inner enum which is specified as com.example.SomeClass.SomeEnum.
    // Let's be lenient on that although the proper type notation should be com.example.SomeClass$SomeEnum.
...

There is no corresponding functionality in importFunctions, which is confusing.

CacheControlFilter is not ignoring JSF resources

Check the next line in doFilter(...):
if (!request.getRequestURI().startsWith(ResourceHandler.RESOURCE_IDENTIFIER)) {
...
}

I think the correct code would see like this:

if (!request.getRequestURI().startsWith(request.getContextPath() + ResourceHandler.RESOURCE_IDENTIFIER)) {
...
}

We need to add the context path, the omnifaces showcase is working because doesnt have one.

SelectItemsIndexConverter throws exception on null-valued noSelectionOption

The omnifaces.SelectItemsIndexConverter#getAsObject operation does not return null, if a
<f:selectItem noSelectionOption="true" itemLabel="" itemValue="#{null}" />
is submitted.
Instead it throws a converter error: "Could not determine index for value {0} in component {1}"

Returning null should be the default behaviour, as @BalusC points out in http://stackoverflow.com/a/24321980/3588679:

As to dealing with the empty string submitted value (or null), you should actually let your converter delegate this responsibility to the required="true" attribute. So, when the incoming value is null or an empty string, then you should return null immediately.

Inject converted type directly in CDI Param

From: http://showcase.omnifaces.org/cdi/Param

String is actually not injected itself, but is wrapped in a value holder class called ParamValue. This is due to the fact that a CDI producer cannot produce an arbitrary object and a parameterized wrapper type is needed. For OmniFaces 1.7 we plan to look into a CDI extension to work around this and directly inject the converted type. ParamValue does have merit on its own though, as it allows access to the raw (non-converted) value and allows non-serializable types to be injected into a passivation capable bean. This last feature works by reconverting from the raw value after a bean is restored (changes made to the converted instance before passivation took place will be lost though).

NOTE: bean validation at the moment is done against the ParamValue instance that is injected. In many cases this will only be of limited use. We hope to directly inject the converted type in OmniFaces 1.7 and then bean validation will make more sense.

Faces.getLocale throws NPE if FacesContext is null

According to the javadoc description this method should always return a locale and it would be nice to be able to use it even without a facescontext.
Easy to fix: just check for context == null and then use Locale.getDefault()

Extend o:validateOrder to provide optional attribute

Would it be possible to extend the o:validateOrder component to provide an optional attribute so that if any of the client IDs specified in the components attribute contain a null value then the validation is skipped. The use case I've got is a form that has a start date and end date component both of which are optional and the user can popuate either or both components, and I would only like the o:validateOrder component to execute its validation if both start and end date components have been populated.

Whilst not needed in my use case another useful extension would be to include an o:validateOrder component which is based on o:validateAllOrNone

<o:validateBean /> does not work properly within UIData components

Steps

  1. Create a table with a column containing an ajaxified UICommand component that has o:validateBean disabled="true"
  2. Click the button

Expectation/Results
Bean validation will be skipped. Instead the bean validation is being executed

Version Info
Omnifaces: 1.8
JSF: Mojarra 2.2.7
Primefaces: 5.0

Debugging shows that the add phase listener callback method is not adding the BeanValidationEventListener to the Pre/Post validate events. The events are not added because of an issue in the org.omnifaces.utilComponents.hasInvokedSubmit method.

The hasInvokedSubnmit method compares the component clientId against the javax.faces.source param. In the case of a component within a datatable the javax.faces.source param would be form:table:0:button. However the component's clientId is form:table:button.

It looks like o:ignoreValidationFailed has the same issue.

All stylesheets are removed

When running the CombinedResourceManager (in Prod), JavaScript files are successfully combined and added into the header. However, all stylesheets are completely removed, not combined or inserted.

When I stay in Prod mode but remove Omnifaces, all stylesheet links are present again.

Setup:
Tomcat 7.0.50
Richfaces 4.3.1
MyFaces 2.1.12
JSF 2.0

Automatic Conversation Propagation for Ajax requests

If a JSF form is not re-rendered after an ajax request that created CDI long running conversation, then subsequent submission from the same form wouldn't be able to restore the conversation, because the conversation id was not propagated automatically.

The issue is described and discussed extensively here:

https://community.jboss.org/people/mkouba/blog/2012/08/30/seam-vs-cdi-conversations--pay-attention-to-rerendering

and here:
https://community.jboss.org/message/794857

There are some workarounds, however I find them not "transparent" enough.

I attempted a different approach, creating a servlet Filter and PhaseListener that transparently save and restore the cid parameter.

I have utmost respect for your work with JSF. I would like to hear your comment on this approach. If you find it acceptable, I wonder if you could incorporate it to OmniFaces?

AutomaticConversationPropagationFilter.java

package test.faces.cdi;

import java.io.IOException;
import javax.enterprise.context.Conversation;
import javax.enterprise.context.ConversationScoped;
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.BeanManager;
import javax.enterprise.inject.spi.CDI;
import javax.faces.event.PhaseEvent;
import javax.faces.event.PhaseId;
import javax.faces.event.PhaseListener;
import javax.faces.render.ResponseStateManager;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;

public class AutomaticConversationPropagationFilter implements Filter, PhaseListener {
    public static final String ATTRIBUTE_VIEW_STATE_CID_PREFIX = "viewStateCidMap:";

    private static class FilteredRequest extends HttpServletRequestWrapper {
        public FilteredRequest(final ServletRequest request) {
            super((HttpServletRequest) request);
        }

        @Override
        public String getParameter(final String paramName) {
            final String value = super.getParameter(paramName);
            if ("cid".equals(paramName)) {
                final String viewState = this.getParameter(ResponseStateManager.VIEW_STATE_PARAM);
                if (viewState != null) {
                    // retrieve the cid from the session if it's previously mapped to the ViewState
                    return (String) this.getSession().getAttribute(AutomaticConversationPropagationFilter.ATTRIBUTE_VIEW_STATE_CID_PREFIX + viewState);
                }
            }
            return value;
        }
    }



    // just wrap the request with our own
    @Override
    public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain) throws IOException, ServletException {
        chain.doFilter(new FilteredRequest(request), response);
    }

    @Override
    public void init(final FilterConfig filterConfig) throws ServletException {
        // no need to do anything
    }

    @Override
    public void destroy() {
        // no need to do anything
    }

    @Override
    public void afterPhase(final PhaseEvent event) {
        final BeanManager beanManager = CDI.current().getBeanManager();

        if (beanManager.getContext(ConversationScoped.class).isActive()) {
            final String viewState = event.getFacesContext().getExternalContext().getRequestParameterMap().get(ResponseStateManager.VIEW_STATE_PARAM);

            if (viewState != null) {
                // retrieve conversation id if there's a long running conversation
                final Bean<?> bean = beanManager.resolve(beanManager.getBeans(Conversation.class));
                final CreationalContext<?> context = beanManager.createCreationalContext(bean);
                final Conversation conversation = (Conversation) beanManager.getReference(bean, Conversation.class, context);
                final String cid = conversation.getId();

                // store the conversation id to the session, mapping it to the current javax.faces.ViewState
                event.getFacesContext().getExternalContext().getSessionMap().put(AutomaticConversationPropagationFilter.ATTRIBUTE_VIEW_STATE_CID_PREFIX + viewState, cid);
            }
        }
    }

    @Override
    public void beforePhase(final PhaseEvent event) {
        // no need to do anything
    }

    @Override
    public PhaseId getPhaseId() {
        return PhaseId.RENDER_RESPONSE;
    }
}

Filter mapping in web.xml:

    <filter>
        <filter-name>automaticConversationPropagationFilter</filter-name>
        <filter-class>test.faces.cdi.AutomaticConversationPropagationFilter</filter-class>
    </filter>

    <filter-mapping>
        <filter-name>automaticConversationPropagationFilter</filter-name>
        <servlet-name>facesServlet</servlet-name>
    </filter-mapping>   

    <!--
       The mapping of this CDI Conversation Filter here cause the conversation activation and
       initialization to be performed within this filter. Without this mapping, the default
       behavior is that the activation is performed before the filter chain, but the initialization
       would be done lazily when the conversation context is first accessed.

       We don't really need eager initialization here, but we need to delay the activation, so that
       we could do some cid parameter restoration first.       

       The filters are process in the order they are mapped in this web.xml file,
       thus our conversationRestorerFilter would be able to wrap the default request object
       within our own request object, which would be able to find cid parameter from session
       if it's not set
     -->

    <filter-mapping>
        <filter-name>CDI Conversation Filter</filter-name>
        <servlet-name>facesServlet</servlet-name>
    </filter-mapping>

Thank you very much for your time.

CombinedResourceHander script odering

Is it possible to set the order of the scripts with the CRH?

For example RichFaces has its own jQuery library. I can't map the jQuery file to version 2.x because RichFaces uses deprecated (now removed) functions.

If I could get my jQuery library (2.1.1) combined before RichFaces, I could then map the RichFaces jQuery library using the RichFaces static-resource-mappings.properties file to the jQuery migrate plugin instead. That way, I can get the benefit of jQuery 2.x and still allow RichFaces outdated functions to work.

I know with omnifaces you allow custom attributes. Perhaps this may be a possiblity? Or over a context-param?

Thanks in advance

Wrong filename displayed in Firefox

Using Faces.sendFile(..) with the file name in UTF-8 (ex: Καλημέρα.xls) will not be correctly displayed in Firefox (You have choosen to open: ...%CE%BB%CE.xls).

The current implementation uses:
externalContext.setResponseHeader("Content-Disposition", String.format("%s;filename="%s"",
(attachment ? "attachment" : "inline"), Utils.encodeURL(filename)));

The recommended implementation seems to use:
contentDisposition = "attachment; filename="" + fileName + ""; filename*=UTF-8''" + Uri.EscapeDataString(fileName);

See:
http://stackoverflow.com/questions/93551/how-to-encode-the-filename-parameter-of-content-disposition-header-in-http

More protected methods are needed in FullAjaxExceptionHandler

We have overwritten the FullAjaxExceptionHandler.

public class WebshopExceptionHandler extends FullAjaxExceptionHandler {
   ...
}

and want to use the following methods in WebshopExceptionHandler:

private void resetResponse(FacesContext context);
private void renderErrorPageView(FacesContext context, final HttpServletRequest request, String errorPageLocation) throws IOException;

but they are private and can not be called in the extended class. Can you make them protected please? Maybe in 1.8.2.

Also the constants

private static final String ATTRIBUTE_ERROR_EXCEPTION = "javax.servlet.error.exception";
private static final String ATTRIBUTE_ERROR_EXCEPTION_TYPE = "javax.servlet.error.exception_type";
private static final String ATTRIBUTE_ERROR_MESSAGE = "javax.servlet.error.message";
private static final String ATTRIBUTE_ERROR_REQUEST_URI = "javax.servlet.error.request_uri";
private static final String ATTRIBUTE_ERROR_STATUS_CODE = "javax.servlet.error.status_code";
private static final String ERROR_PAGE_ERROR = "...";

should be protected. Thanks.

Problems with Component.includeFacelet and includeCompositeComponent

Hi
Is there somewhere working examples of includeFacelet and includeCompositeComponent usage ?

I try to use includeFacelet and includeCompositeComponent but it works only with basic facelets without binding and actions.
On Omnifaces from trunk with Tomcat 7 and Mojarra 2.2.6 facelets are rendered but if you try to submit content an error occurs :
2014-05-17 12:24:45 com.sun.faces.lifecycle.ProcessValidationsPhase execute
WARNING: /test/addressEditorTemplate.xhtml @9,117 value="#{address.deliveryPoint}": Target Unreachable, identifier 'address' resolved to null
javax.el.PropertyNotFoundException: /test/addressEditorTemplate.xhtml @9,117 value="#{address.deliveryPoint}": Target Unreachable, identifier 'address' resolved to null

Above example is modified code from hifaces20/DynamicFaces/CompositeReverseStringBean.java with setComponent body replaced with includeCompositeComponent call.
Unmodified code with original Dynamicworks correctly.

Proposal new feature. Adding to render ids components with changes in ajax request

Hi,

Just an idea, what do you think about adding automatically by omnifaces the ids of the componens with values changed to the render ids of an ajax request ?

For example, suposse this form:

<h:form id="form1" prependId="false">

            <h:panelGroup id="panel">

                <h:outputLabel id="label1" value="LABEL 1" />
                <h:inputText id="input1" value="#{sessionMBean.input1}" />

                <h:outputLabel id="label2" value="LABEL 1" />
                <h:inputText id="input2" value="#{sessionMBean.input2}" />

                <h:outputLabel id="label3" value="LABEL 1" />
                <h:inputText id="input3" value="#{sessionMBean.input3}" />

            </h:panelGroup>

             <h:commandButton value="update 1" >
                 <f:ajax execute="@this panel" render="panel" listener="#{sessionMBean.updateOne()}"/>
             </h:commandButton>

             <h:commandButton value="update 2" >
                 <f:ajax execute="@this panel" render="panel" listener="#{sessionMBean.updateTwo()}"/>
             </h:commandButton>

             <h:commandButton value="update 3" >
                 <f:ajax execute="@this panel" render="panel" listener="#{sessionMBean.updateThree()}"/>
             </h:commandButton>
        </h:form>

updateOne() update only input1
updateTwo() update input1 and input2
updateThree() update input1, input2, input3

To minimize the response from the server in these ajax request I could do:

<h:commandButton value="update 1" >
                 <f:ajax execute="@this panel" render="input1" listener="#{sessionMBean.updateOne()}"/>
             </h:commandButton>

             <h:commandButton value="update 2" >
                 <f:ajax execute="@this panel" render="input1 input2" listener="#{sessionMBean.updateTwo()}"/>
             </h:commandButton>

             <h:commandButton value="update 3" >
                 <f:ajax execute="@this panel" render="input1 input2 input3" listener="#{sessionMBean.updateThree()}"/>
             </h:commandButton>

Why not let omnifaces to add to the render response only the information that have been updated in the backed bean? It is just an idea, maybe it is very specific but, it could be ussefull ?
For example, suposse a data table with inputs inside, why update all table if I only need update two inputs in specific rows? (yes I can add this specific id in the backed bean to render ids, but why not forget it?) Maybe, all componens inside on this omnifaces tag will be added automatically to the render ids:

 <h:form id="form1" prependId="false">

            <o:autoupdate id="idtorender">

                <h:panelGroup id="panel">

                    <h:outputLabel id="label1" value="LABEL 1" />
                    <h:inputText id="input1" value="#{sessionMBean.input1}" />

                    <h:outputLabel id="label2" value="LABEL 1" />
                    <h:inputText id="input2" value="#{sessionMBean.input2}" />

                    <h:outputLabel id="label3" value="LABEL 1" />
                    <h:inputText id="input3" value="#{sessionMBean.input3}" />

                </h:panelGroup>

            </o:autoupdate>

             <h:commandButton value="update 1" >
                 <f:ajax execute="@this panel" render="idtorender" listener="#{sessionMBean.updateOne()}"/>
             </h:commandButton>

             <h:commandButton value="update 2" >
                 <f:ajax execute="@this panel" render="idtorender" listener="#{sessionMBean.updateTwo()}"/>
             </h:commandButton>

             <h:commandButton value="update 3" >
                 <f:ajax execute="@this panel" render="idtorender" listener="#{sessionMBean.updateThree()}"/>
             </h:commandButton>



        </h:form>
``

Regards,

UnmappedResourceHandler causes NPE when loading invalid resources

When loading invalid resources, i.e. a subdirectory or just plain
http://localhost:8080/app/javax.faces.resource , NPE is produced.
I believe this error should be caught and 404 should be thrown,
or any other correct behavior, but not an NPE.

Thanks


WARNING: StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
org.apache.shiro.subject.ExecutionException: java.lang.NullPointerException: Argument Error: Parameter resourceName is null
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:385)
at com.flowlogix.security.WebSecurityFilter.doFilter(WebSecurityFilter.java:80)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at com.flowlogix.filters.EjbPingFilter.doFilter(EjbPingFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at com.baw.website.filters.CmsFilter.doFilter(CmsFilter.java:32)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at org.omnifaces.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:115)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:175)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
at com.sun.grizzly.comet.CometEngine.executeServlet(CometEngine.java:459)
at com.sun.grizzly.comet.CometEngine.handle(CometEngine.java:316)
at com.sun.grizzly.comet.CometAsyncFilter.doFilter(CometAsyncFilter.java:87)
at com.sun.grizzly.arp.DefaultAsyncExecutor.invokeFilters(DefaultAsyncExecutor.java:171)
at com.sun.grizzly.arp.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:143)
at com.sun.grizzly.arp.AsyncProcessorTask.doTask(AsyncProcessorTask.java:102)
at com.sun.grizzly.http.TaskBase.run(TaskBase.java:193)
at com.sun.grizzly.http.TaskBase.execute(TaskBase.java:175)
at com.sun.grizzly.arp.DefaultAsyncHandler.handle(DefaultAsyncHandler.java:145)
at com.sun.grizzly.arp.AsyncProtocolFilter.execute(AsyncProtocolFilter.java:210)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.NullPointerException: Argument Error: Parameter resourceName is null
at com.sun.faces.util.Util.notNull(Util.java:448)
at com.sun.faces.application.resource.ResourceHandlerImpl.createResource(ResourceHandlerImpl.java:193)
at javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:137)
at javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:137)
at javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:137)
at org.omnifaces.resourcehandler.CombinedResourceHandler.createResource(CombinedResourceHandler.java:246)
at javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:137)
at org.omnifaces.resourcehandler.UnmappedResourceHandler.createResource(UnmappedResourceHandler.java:139)
at org.omnifaces.resourcehandler.CDNResourceHandler.createResource(CDNResourceHandler.java:233)
at org.omnifaces.resourcehandler.CDNResourceHandler.createResource(CDNResourceHandler.java:205)
at org.omnifaces.resourcehandler.UnmappedResourceHandler.handleResourceRequest(UnmappedResourceHandler.java:199)
at javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:643)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at com.flowlogix.filters.EjbPingFilter.doFilter(EjbPingFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at com.baw.website.filters.CmsFilter.doFilter(CmsFilter.java:32)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at org.omnifaces.filter.GzipResponseFilter.doFilter(GzipResponseFilter.java:149)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at org.omnifaces.filter.FacesExceptionFilter.doFilter(FacesExceptionFilter.java:56)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at com.flowlogix.security.WebSecurityFilter$1.call(WebSecurityFilter.java:87)
at com.flowlogix.security.WebSecurityFilter$1.call(WebSecurityFilter.java:80)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
… 47 more

JNDI availability not correctly detected in Google App Engine

When using Google App Engine I get the following Exception:

java.lang.NoClassDefFoundError: javax.naming.InitialContext is a restricted class. Please see the Google App Engine developer's guide for more details.
    at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51)
    at org.omnifaces.util.JNDI.lookup(JNDI.java:82)
    at org.omnifaces.config.BeanManager.init(BeanManager.java:76)
    at org.omnifaces.config.BeanManager.getReference(BeanManager.java:115)
    at org.omnifaces.application.OmniApplication.createConverter(OmniApplication.java:86)
    at org.primefaces.config.ConfigContainer.initConfig(ConfigContainer.java:99)
    at org.primefaces.config.ConfigContainer.<init>(ConfigContainer.java:81)

It seems to be that the method init() in org.omnifaces.config.BeanManager is not detecting JNDI availability within GAE enviroment.

Maybe Apache Myfaces approach should be used like in http://svn.apache.org/repos/asf/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java initCDIIntegration(...) method.

Setup:

Omnifaces 1.7
Primefaces 5
GAE 1.9.4
Myfaces 2.2.3

<o:messages> does not show the error validations for inputs inside a table when for attribute is used

Hi,

I don't know if the o:message included this behavior but error messages for inputs in a table are not displayed using the for attribute. I have tested it with mojarra 2.2.5.

For example suppose the next page:

 <h:form prependId="false">
           <o:messages id="msg" for="panel1" />

           <h:panelGroup id="panel1">
                <h:dataTable value="#{of:createIntegerArray(1, 2)}" var="row">
                    <h:column>
                        <h:inputText required="true" value="#{row}" />
                    </h:column>
                </h:dataTable>
           </h:panelGroup>

            <o:messages id="msg2" for="panel2" />

            <h:panelGroup id="panel2">
                    <h:inputText required="true" value="1" />              
                    <h:inputText required="true" value="2" />
            </h:panelGroup>


            <h:commandButton value="TEST">
               <f:ajax execute="@form" render="@form" />
           </h:commandButton>
        </h:form>

If I click on command button with all inputs in blank I only can see the messages generated in panel2. I expected to see the messages of panel1 also.

New Repository to Organization Pages

Create new repository to provide GitHub Pages and allowing the OmniFaces site be accessed through the URL http://omnifaces.github.io, instead of http://omnifaces.github.io/omnifaces. There are instructions about:
https://help.github.com/articles/user-organization-and-project-pages#user--organization-pages

And could use the omnifaces.org domain to delivery the GitHub Pages?
https://help.github.com/articles/setting-up-a-custom-domain-with-github-pages

These options would be more elegant to use less redundant URL. :-)

read context-params from web.xml via WebXml

It would be great if one could read context-params via org.omnifaces.config.WebXml.
I'm writing a CDI extension which will do some JNDI lookup and I'd like to store url/usernames/etc in my web.xml (in context params) - but now its pretty hard to read web.xml in cdi extensions.

Failure to supress jsf.js after combining JS files

When using Omnifaces CombineResourceManager and setting the myFaces JSF script target to head

    <h:outputScript library="javax.faces" name="jsf.js" target="head" />

Omnifaces catches and combines the script correctly, however, the jsf.js script tag is then inserted a second time at the end of the body.

    <script type="text/javascript" src="/xxxxx/javax.faces.resource/jsf.js.faces?ln=javax.faces"><!--

    //--></script>

By removing the target - Omnifaces no longer combines the JS script and the jsf.js file is only inserted once.

Is this a Omnifaces or myFaces issue?

Setup:
Tomcat 7.0.50
Richfaces 4.3.1
MyFaces 2.1.12
JSF 2.0

NullPointerException when application deploys on WebLogic 12c

When upgrading the omnifaces dependency in a JSF application from 1.7 to 1.8.1, I get the following stacktrace:

<Jul 16, 2014 11:51:59 AM CEST> <Failure occurred in the execution of deployment request with ID "1405504307149" for task "0". Error is: "weblogic.management.DeploymentException: "
weblogic.management.DeploymentException:
at weblogic.application.internal.BaseDeployment.throwAppException(BaseDeployment.java:123)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:239)
at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:61)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:158)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
Truncated. see log file for complete stacktrace
Caused By: org.jboss.weld.exceptions.DeploymentException: Exception List with 1 exceptions:
Exception 0 :
java.lang.NullPointerException
at org.omnifaces.util.Beans.getReference(Beans.java:78)
at org.omnifaces.util.Beans.getReference(Beans.java:66)
at org.omnifaces.cdi.eager.EagerExtension.load(EagerExtension.java:111)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:264)
at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:260)
at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:170)
at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:51)
at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:154)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:241)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:229)
at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:207)
at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:75)
at org.jboss.weld.bootstrap.events.AbstractDeploymentContainerEvent.fire(AbstractDeploymentContainerEvent.java:46)
at org.jboss.weld.bootstrap.events.AfterDeploymentValidationImpl.fire(AfterDeploymentValidationImpl.java:31)
at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:364)
at com.oracle.injection.provider.weld.WeldInjectionContainer.start(WeldInjectionContainer.java:105)
at com.oracle.injection.integration.CDIAppDeploymentExtension.prepare(CDIAppDeploymentExtension.java:58)
at weblogic.application.internal.flow.AppDeploymentExtensionFlow.prepare(AppDeploymentExtensionFlow.java:23)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:706)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:237)
at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:61)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:158)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:207)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:96)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:229)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)
at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)
at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
at org.jboss.weld.bootstrap.events.AbstractDeploymentContainerEvent.fire(AbstractDeploymentContainerEvent.java:48)
at org.jboss.weld.bootstrap.events.AfterDeploymentValidationImpl.fire(AfterDeploymentValidationImpl.java:31)
at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:364)
at com.oracle.injection.provider.weld.WeldInjectionContainer.start(WeldInjectionContainer.java:105)
at com.oracle.injection.integration.CDIAppDeploymentExtension.prepare(CDIAppDeploymentExtension.java:58)
Truncated. see log file for complete stacktrace

First hunch: by going through the sources, it seems like Beans#resolve(BeanManager, Class) returns a null? In turn, maybe the == comparison for classes could be problematic (different classloaders?) or maybe the call to BeanManager#resolve(Set<Bean<? extends X>>) returns null?

Adding OmniFaces to Spring WebFlow JSF 2.2 app gives NPE

JSF 2.2 (mojarra) + Spring WebFlow + OmniFaces = NullPointerException

Commenting OmniFaces dependency from the POM results in a working application.
I'll attach minimized example maven project that reproduces the issue.

Bal 08, 2014 2:45:17 PM com.sun.faces.application.view.FaceletViewHandlingStrategy handleRenderException
SEVERE: Error Rendering View[/index.xhtml]
java.lang.NullPointerException
at com.sun.faces.application.NavigationHandlerImpl.determineViewFromActionOutcome(NavigationHandlerImpl.java:1342)
at com.sun.faces.application.NavigationHandlerImpl.findExactMatch(NavigationHandlerImpl.java:603)
at com.sun.faces.application.NavigationHandlerImpl.getViewId(NavigationHandlerImpl.java:481)
at com.sun.faces.application.NavigationHandlerImpl.getNavigationCase(NavigationHandlerImpl.java:149)
at com.sun.faces.application.NavigationHandlerImpl.getNavigationCase(NavigationHandlerImpl.java:140)
at com.sun.faces.renderkit.html_basic.OutcomeTargetRenderer.getNavigationCase(OutcomeTargetRenderer.java:146)
at com.sun.faces.renderkit.html_basic.OutcomeTargetButtonRenderer.encodeBegin(OutcomeTargetButtonRenderer.java:90)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:864)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1855)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1857)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1860)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1860)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:461)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133)
at org.springframework.faces.webflow.FlowViewHandler.renderView(FlowViewHandler.java:99)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
at org.springframework.faces.webflow.FlowViewHandler.renderView(FlowViewHandler.java:99)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2441)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2430)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)

Add <o:cdnScript> and <o:cdnStylesheet>

Since we can control resource rendering via among others the new Hacks#setScriptResourceRendered() utility as invented during creating <o:deferredScript>, we should be able to use tags like <o:cdnScript> and <o:cdnStylesheet> to declare CDN resources instead of a relatively clumsy web.xml entry as currently done by CDNResourceHandler.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.