You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Thomas Andraschko (JIRA)" <de...@myfaces.apache.org> on 2017/10/13 11:45:00 UTC

[jira] [Reopened] (MYFACES-4163) h:commandScript execute attribute does not have a default value

     [ https://issues.apache.org/jira/browse/MYFACES-4163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Andraschko reopened MYFACES-4163:
----------------------------------------

> 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: Thomas Andraschko
>            Priority: Minor
>             Fix For: 2.3.0
>
>         Attachments: CommandScript.war
>
>
> 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)