This week's book giveaways are in the Cloud/Virtualization and Go forums.
We're giving away four copies each of Cloud Native Transformation: Practical Patterns for Innovation and The Go Workshop and have the authors on-line!
See this thread and this one for details.
Win a copy of Cloud Native Transformation: Practical Patterns for InnovationE this week in the Cloud/Virtualization forum
or The Go Workshop in the Go forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Knute Snortum
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Joe Ess
  • salvin francis

java.lang.StringIndexOutOfBoundsException in primefaces ajax call

Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<h:form id="createAccountFormId">
<p:selectOneMenu id="accountDropDownId"
value="#{captureAccountDetailBackingBean.accountType}" >
itemValue="#{accountList.accoutTypeId}" var="accountList"
itemLabel="#{msg[accountList.accountTypeName]}" />
<p:ajax event="change"
update="createAccountFormId:accountTypeDetailsDivId" />

<h:panelGrid columns="3" id="accountTypeDetailsDivId"



public void handleAccountType(ActionEvent evt) {
showAccountTypeDetails = true;
showAccountTypeDetails = false;

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(
at com.sun.faces.renderkit.ServerSideStateHelper.getState(
at com.sun.faces.renderkit.ResponseStateManagerImpl.getState(
at com.sun.faces.application.view.StateManagementStrategyImpl.restoreView(
at com.sun.faces.application.StateManagerImpl.restoreView(
at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(
at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(
at com.sun.faces.application.view.MultiViewHandler.restoreView(
at com.sun.faces.lifecycle.RestoreViewPhase.execute(
at com.sun.faces.lifecycle.Phase.doPhase(
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(
at com.sun.faces.lifecycle.LifecycleImpl.execute(
at javax.faces.webapp.FacesServlet.service(
at weblogic.servlet.internal.StubSecurityHelper$
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(
at weblogic.servlet.internal.ServletStubImpl.execute(
at weblogic.servlet.internal.TailFilter.doFilter(
at weblogic.servlet.internal.FilterChainImpl.doFilter(
at weblogic.servlet.internal.RequestEventsFilter.doFilter(
at weblogic.servlet.internal.FilterChainImpl.doFilter(
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(
at weblogic.servlet.internal.WebAppServletContext$
at weblogic.servlet.internal.WebAppServletContext.securedExecute(
at weblogic.servlet.internal.WebAppServletContext.execute(

On making ajax call using p:ajax (method handleAccountType() ) on select of dropdown, getting above exception. Please help.
Kumar Sugandh
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem is coming in Mozilla firefox browser. In google crome it works perfectly fine.
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!