[
https://issues.apache.org/jira/browse/MYFACES-4163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16205479#comment-16205479
]
Werner Punz edited comment on MYFACES-4163 at 10/16/17 6:59 AM:
----------------------------------------------------------------
Ok I could reproduce it, i will fix it later today.
The getattributenode is one of the codeparts which will be removed in the
rewrite. It was not a code fault per se, because I checked in that part if the
method was present, but nevertheless, this is a really old api, not even
supported by newer browsers anymore.
So I will move this code to the end of the execution chain of the getAttribute
method so that only really really old browsers should even hit that code and
firefox should not display the warning anymore. Since by now getAttribute is
supported very well (which it was not when the code was written) by all
browsers doing the old old browser fallback at the end is not an issue anymore.
was (Author: werpu):
Ok I could reproduce it, i will fix it later tonight.
> h:commandScript execute attribute does not have a default value
> ---------------------------------------------------------------
>
> Key: MYFACES-4163
> URL: https://issues.apache.org/jira/browse/MYFACES-4163
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 2.3.0-beta
> Reporter: Jay Sartoris
> Assignee: Werner Punz
> Priority: Minor
> Fix For: 2.3.0
>
> Attachments: CommandScript.war, index.xhtml
>
>
> The vdldoc for the h:commandScript component state that "@this" should be the
> default value for the "execute" attribute.
> The excerpt from the execute attribute description in
> vdldocs/facelets/h/commandScript.html is:
> -------
> This is a space separated list of client identifiers of components that will
> participate in the "execute" portion of the Request Processing Lifecycle. If
> a literal is specified the identifiers must be space delimited. Any of the
> keywords "@this", "@form", "@all", "@none" may be specified in the identifier
> list. *If not specified, the default value of "@this" is assumed.* For
> example, @this clientIdOne clientIdTwo.
> -------
> When I specify the component like this (without an execute attribute):
> {code:java}
> <h:form id="form1">
> <h:commandScript name="commandScript1"
> action="#{commandScriptBean.testCommandScript('success')}" render=":output1"
> autorun="true"/>
> </h:form>
> <h:outputText id="output1" value="MyFaces test output:
> #{commandScriptBean.output}" />
> {code}
> I receive the following exception:
> {noformat}
> java.lang.NullPointerException
> at
> org.apache.myfaces.renderkit.html.HtmlCommandScriptRenderer.getCollectionFromSpaceSplitString(HtmlCommandScriptRenderer.java:690)
> at
> org.apache.myfaces.renderkit.html.HtmlCommandScriptRenderer.encodeBegin(HtmlCommandScriptRenderer.java:144)
> at
> javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:597)
> at
> javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:527)
> at
> javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:551)
> at
> javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:551)
> at
> javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:551)
> at
> org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.renderView(FaceletViewDeclarationLanguage.java:1898)
> at
> org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:315)
> at
> javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:73)
> at
> org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:117)
> at
> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:267)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:206)
> {noformat}
> When I try the same example using the Mojarra RI, it works as expected.
> I tried this with the MyFaces 2.3.0-beta and also several snapshots however,
> the issue still occurs. The latest snapshot I tried was the
> 20171010.124738-264 version of the impl.
> I will upload a sample application to help reproduce the issue.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)