This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

SelectOne submittedValue's index 4 is out of bounds. It should be between 0 and -1  RSS feed

 
Maroof Ahmad
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
See First Method
Lov code in .jspx file
selectOneChoice
<af:selectOneChoice value="#{bindings.vwDmsApplMapDocType.inputValue}"
label="" showRequired="true"
binding="#{docDownload.selectOneChoice3}"
autoSubmit="true" immediate="true" id="selectOneChoice3"
valueChangeListener="#{docDownload.getApplMapDocType}"
partialTriggers="selectOneChoice2" inlineStyle="width:50%">
<f:selectItems value="#{bindings.vwDmsApplMapDocType.items}"/>
</af:selectOneChoice>

valu change listener
getApplMapDocType(ValueChangeEvent valueChangeEvent)
public void getApplMapDocType(ValueChangeEvent valueChangeEvent){
FacesContext fctx = FacesContext.getCurrentInstance();
setAppKey(JSFUtils.getProcessAttribute("appid").toString());
System.out.println("\n value of doc type == "+selectOneChoice3.getValue());
Integer rowKey = null;
String docAppId = null;
try
{
ValueBinding vbinding = fctx.getApplication().createValueBinding("#{bindings.vwrDMSDocTypeIterator}");
DCIteratorBinding doctypeIterBinding = (DCIteratorBinding)vbinding.getValue(fctx);
if (valueChangeEvent != null && valueChangeEvent.getNewValue() != null) {
System.out.println("\n valueChangeEvent is not null then value is == "+valueChangeEvent.getNewValue());
rowKey = ((Integer)valueChangeEvent.getNewValue()).intValue();
//rowKey = Integer.parseInt(valueChangeEvent.getNewValue().toString());
//rowKey = ((Integer)selectOneChoice3.getValue()).intValue();
//rowKey = Integer.parseInt(selectOneChoice3.getValue().toString());
System.out.println("\n Value of rowKey == "+rowKey);
if (appKey != null) {
Row[] rw = doctypeIterBinding.getAllRowsInRange();
System.out.println("\n Row Value == "+rw);
System.out.println("\n value of doc DocType == "+rw[rowKey].getAttribute("DocType"));
System.out.println("\n value of doc AppId == "+rw[rowKey].getAttribute("AppId"));
System.out.println("\n value of doc DocTypeDesc == "+rw[rowKey].getAttribute("DocTypeDesc"));
System.out.println("row key value means doc type: = "+rowKey);
docType = (String)rw[rowKey].getAttribute("DocType");
docAppId = (String)rw[rowKey].getAttribute("AppId");
docTypeDesc = (String)rw[rowKey].getAttribute("DocTypeDesc");
JSFUtils.putOnProcessScope("jsfdoctype", docType);
this.setDocType(docType);
this.setDocTypeDesc(docTypeDesc);
}
}else{
JSFUtils.addFacesWarningMessage("Document type is Required");
}
}
catch (Exception e)
{
e.printStackTrace();
FacesContext fc = FacesContext.getCurrentInstance();
FacesMessage fm = new FacesMessage(FacesMessage.SEVERITY_WARN, "Its in getMap Doc Type", null);
fc.addMessage(null, fm);
System.out.println("Error Occurs in " +
e.getMessage());
}
}

I am using JDeveloper10.3.2 Application is already developed and running on production, i am doing some changes in this application. I have a lov which is populated from from DB. After choosing these love when i am changing other fields then i am getting below error. Here i am used valuePass=true then also i its not working. Actually its working some time but most of the time is getting below error.

Console Error
13/10/24 11:11:24 [16901] Bind params for ViewObject: vwrShops
13/10/24 11:11:24 [16902] $$added root$$ id=-2
Oct 24, 2013 11:11:24 AM com.sun.faces.lifecycle.ApplyRequestValuesPhase execute
SEVERE: SelectOne submittedValue's index 4 is out of bounds. It should be between 0 and -1
java.lang.IndexOutOfBoundsException: SelectOne submittedValue's index 4 is out of bounds. It should be between 0 and -1
at oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleSelectOneRenderer.__getIndex(SimpleSelectOneRenderer.java:347)
at oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleSelectOneRenderer._convertIndexedSubmittedValue(SimpleSelectOneRenderer.java:189)
at oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleSelectOneRenderer.getConvertedValue(SimpleSelectOneRenderer.java:157)
at oracle.adfinternal.view.faces.renderkit.core.xhtml.InputLabelAndMessageRenderer.getConvertedValue(InputLabelAndMessageRenderer.java:42)
at oracle.adf.view.faces.component.UIXEditableValue.getConvertedValue(UIXEditableValue.java:455)
13/10/24 11:11:24 [16903] Resolving VO:vwrDmsDocMandField for iterator binding:vwrDmsDocMandFieldIterator
13/10/24 11:11:24 [16904] Resolving VO:vwrDMSParamType for iterator binding:vwrDMSParamTypeIterator
13/10/24 11:11:24 [16905] *** DCDataControl.sync() called from :DCBindingContainer.refresh
13/10/24 11:11:24 [16906] *** DCDataControl.sync() called from :DCBindingContainer.refresh
at oracle.adf.view.faces.component.UIXEditableValue.validate(UIXEditableValue.java:198)
at oracle.adf.view.faces.component.UIXEditableValue._executeValidate(UIXEditableValue.java:522)
at oracle.adf.view.faces.component.UIXEditableValue.processDecodes(UIXEditableValue.java:272)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:818)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:803)
at oracle.adf.view.faces.component.UIXComponentBase.processDecodes(UIXComponentBase.java:673)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:818)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:803)
at oracle.adf.view.faces.component.UIXComponentBase.processDecodes(UIXComponentBase.java:673)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:818)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:803)
at oracle.adf.view.faces.component.UIXComponentBase.processDecodes(UIXComponentBase.java:673)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:818)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:803)
at oracle.adf.view.faces.component.UIXComponentBase.processDecodes(UIXComponentBase.java:673)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:818)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:803)
at oracle.adf.view.faces.component.UIXComponentBase.processDecodes(UIXComponentBase.java:673)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:818)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:803)
at oracle.adf.view.faces.component.UIXComponentBase.processDecodes(UIXComponentBase.java:673)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:818)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:803)
at oracle.adf.view.faces.component.UIXComponentBase.processDecodes(UIXComponentBase.java:673)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:818)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:803)
at oracle.adf.view.faces.component.UIXForm.processDecodes(UIXForm.java:53)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:818)
at oracle.adf.view.faces.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:803)
at oracle.adf.view.faces.component.UIXComponentBase.processDecodes(UIXComponentBase.java:673)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:900)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:326)
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:99)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:171)
at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
at amgdms.view.utils.ApplicationSessionExpiryFilter.doFilter(ApplicationSessionExpiryFilter.java:70)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:620)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:369)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:865)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:447)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:215)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
13/10/24 11:11:24 javax.servlet.ServletException: SelectOne submittedValue's index 4 is out of bounds. It should be between 0 and -1
13/10/24 11:11:24 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:225)
13/10/24 11:11:24 at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
13/10/24 11:11:24 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
13/10/24 11:11:24 Exception in ApplicationSessionExpiryFilter.doFilter:javax.servlet.ServletException: SelectOne submittedValue's index 4 is out of bounds. It should be between 0 and -1
13/10/24 11:11:24 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
13/10/24 11:11:24 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:171)
13/10/24 11:11:24 at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
13/10/24 11:11:24 at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
13/10/24 11:11:24 at amgdms.view.utils.ApplicationSessionExpiryFilter.doFilter(ApplicationSessionExpiryFilter.java:70)
13/10/24 11:11:24 at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
13/10/24 11:11:24 at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
13/10/24 11:11:24 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:620)
13/10/24 11:11:24 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:369)
13/10/24 11:11:24 at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:865)
13/10/24 11:11:24 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:447)
13/10/24 11:11:24 at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:215)
13/10/24 11:11:24 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
13/10/24 11:11:24 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
13/10/24 11:11:24 at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
13/10/24 11:11:24 at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
13/10/24 11:11:24 at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
13/10/24 11:11:24 at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
13/10/24 11:11:24 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
13/10/24 11:11:24 at java.lang.Thread.run(Thread.java:595)
Oct 24, 2013 11:11:24 AM oracle.jsp.logger.JspMessages infoCannotDispatchJspPage
INFO: Unable to dispatch JSP Page : Exception:java.io.FileNotFoundException: D:\c\Oracle\Middleware\JDeveloper10.1.3.2\jdevstudio10132\jdev\system\oracle.j2ee.10.1.3.40.66\embedded-oc4j\default-web-app\DMSTimeOut.jspx (The system cannot find the file specified)
13/10/24 11:11:40 [16907] ApplicationPoolImpl.resourceStateChanged wasn't release related. No notify invoked.

For Screen Please Click Here To See Screen Shot

Whats the wrong? How can i fix it,

Maroof
forums_SS.png
[Thumbnail for forums_SS.png]
SS
 
Tim Holloway
Bartender
Posts: 18709
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Maroof!

Our message editor has a "Code" button that will insert special tags into the text that help make samples of code, data and XML easier to read. I recommend it over coloring different bits of text, as it will preserve your formatting. Especially indentations.

I cannot give a definite answer, but anytime I see lots of JSF-specific code in a JSF problem, my initial suspicion is that someone's attempting a complex answer for a problem with an easy solution. JSF was designed to do the overwhelming majority of its work using non-JSF POJO code, with the unavoidable exception of the JSF model wrappers.

Usually when there's a problem with a Select control it is because the selection model for the data being returned from the client doesn't match the selection model used to validate the incoming data. That can happen for example, when the backing bean containing the SelectItem collection for the object is in Request Scope instead of a scope that has a longer lifespan. Request scope is almost entirely useless with JSF.

Beyond that, a further danger signal is that you are using JSPX. Since JSF2, the View Templates for JSF Views are no longer based on JSPs. The View Template Language for JSF 2 is an XML (xhtml) format and instead of JSPs, the Facelets component handles Views. Facelets works as an add-on to JSF1, and is an integral part - in fact, a fundamental part - of JSF2.
 
Maroof Ahmad
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maroof Ahmad wrote:Hi All,
See First Method
Lov code in .jspx file

valu change listener

I am using JDeveloper10.3.2 Application is already developed and running on production, i am doing some changes in this application. I have a lov which is populated from from DB. After choosing these love when i am changing other fields then i am getting below error. Here i am used valuePass=true then also i its not working. Actually its working some time but most of the time is getting below error.

Console Error

For Screen Please Click Here To See Screen Shot

Whats the wrong? How can i fix it,

Maroof
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!