jsftomahawk

(JSF UI:PARAM) java.lang.IllegalArgumentException: can't parse argument number


When i use

<ui:include src="File.xhtml">
        <ui:param name="anexoTarefaBeanEspecializado" value="#{myBean}"/>
</ui:include>

And this code inside ui:composition on "File.xhtml"

<t:saveState value="#{anexoTarefaBeanEspecializado.anexoTarefaSecao}" />

And myBean have the property "anexoTarefaSecao" populated with getter and setter.

Then i make a request to the page, it's load correctly. But when i make a request in a button in another section of the page i got this expection:

Caused by: java.lang.IllegalArgumentException: can't parse argument number anexoTarefaBeanEspecializado.anexoTarefaSecao
at java.text.MessageFormat.makeFormat(MessageFormat.java:1339) ~[na:1.6.0_29]
at java.text.MessageFormat.applyPattern(MessageFormat.java:458) ~[na:1.6.0_29]
at java.text.MessageFormat.<init>(MessageFormat.java:350) ~[na:1.6.0_29]
at java.text.MessageFormat.format(MessageFormat.java:811) ~[na:1.6.0_29]
at com.sun.faces.util.MessageUtils.getExceptionMessageString(MessageUtils.java:395) ~[jsf-impl-2.0.6.jar:2.0.6-FCS]
at com.sun.faces.application.view.StateManagementStrategyImpl$1.visit(StateManagementStrategyImpl.java:268) ~[jsf-impl-2.0.6.jar:2.0.6-FCS]
at com.sun.faces.component.visit.FullVisitContext.invokeVisitCallback(FullVisitContext.java:151) ~[jsf-impl-2.0.6.jar:2.0.6-FCS]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1485) ~[jsf-api-2.0.6.jar:2.0.6-FCS]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1499) ~[jsf-api-2.0.6.jar:2.0.6-FCS]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1499) ~[jsf-api-2.0.6.jar:2.0.6-FCS]
at org.richfaces.component.AbstractTogglePanel.visitTree(AbstractTogglePanel.java:745) ~[richfaces-components-ui-4.2.3.Final.jar:4.2.3.Final]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1499) ~[jsf-api-2.0.6.jar:2.0.6-FCS]
at javax.faces.component.UIForm.visitTree(UIForm.java:335) ~[jsf-api-2.0.6.jar:2.0.6-FCS]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1499) ~[jsf-api-2.0.6.jar:2.0.6-FCS]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1499) ~[jsf-api-2.0.6.jar:2.0.6-FCS]
at com.sun.faces.component.visit.VisitUtils.doFullNonIteratingVisit(VisitUtils.java:75) ~[jsf-impl-2.0.6.jar:2.0.6-FCS]
at com.sun.faces.application.view.StateManagementStrategyImpl.restoreView(StateManagementStrategyImpl.java:257) ~[jsf-impl-2.0.6.jar:2.0.6-FCS]
at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:181) ~[jsf-impl-2.0.6.jar:2.0.6-FCS]
at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:123) ~[jsf-impl-2.0.6.jar:2.0.6-FCS]
at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(FaceletViewHandlingStrategy.java:448) ~[jsf-impl-2.0.6.jar:2.0.6-FCS]
at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:148) ~[jsf-impl-2.0.6.jar:2.0.6-FCS]
at javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:288) ~[jsf-api-2.0.6.jar:2.0.6-FCS]
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:187) ~[jsf-impl-2.0.6.jar:2.0.6-FCS]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) ~[jsf-impl-2.0.6.jar:2.0.6-FCS]
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:111) ~[jsf-impl-2.0.6.jar:2.0.6-FCS]
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) ~[jsf-impl-2.0.6.jar:2.0.6-FCS]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508) ~[jsf-api-2.0.6.jar:2.0.6-FCS]

Solution

  • this error message is not clear. But usually this error occurs when the parameter used on saveState are not passed correctly.

    Cheers;