12 Replies Latest reply on May 8, 2013 6:27 AM by neha

    sending lov index instead of display value or code

    mm07
      hi i have a situation where am passing value to my human task flow my problem is all value which i beign selected through lov they are sending lov index instead of the actual value,for example when i select country in my lov instead of sendinding country name display it send that lov index which is 1
      my pagedef is 
      
      <list IterBinding="IntUsr1Iterator" StaticList="false"
                Uses="LOV_Countrycode" id="Countrycode" DTSupportsMRU="true"/>
      
      
      <methodAction id="approveUser" InstanceName="InternalUserAppDC"
                        DataControl="InternalUserAppDC" RequiresUpdateModel="true"
                        Action="invokeMethod" MethodName="approveUser"
                        IsViewObjectMethod="false">
      <NamedData NDName="country_of_origin"
                       NDValue="#{bindings.Countrycode.inputValue}"
                       NDType="java.lang.String"/>
      
       </methodAction>
      
      
      lov
      <af:selectOneChoice value="#{bindings.Countrycode.inputValue}"
                                    shortDesc="#{bindings.Countrycode.hints.tooltip}"
                                    id="soc3" simple="true">
                  <f:selectItems value="#{bindings.Countrycode.items}" id="si3"/>
                </af:selectOneChoice>
      how can i pass selected value instead of input value
      Edited by: adf009 on 2013/05/07 10:55 AM

      Edited by: adf009 on 2013/05/07 10:56 AM
        • 1. Re: sending lov index instead of display value or code
          neha
          Hi,

          Try using following code in your backing bean
          BindingContext bindingctx = BindingContext.getCurrent();
          BindingContainer bindings = null;
          bindings = bindingctx.getCurrentBindingsEntry();
          DCBindingContainer bindingsImpl = (DCBindingContainer) bindings;
          DCIteratorBinding dciterator = null;
          dciterator = bindingsImpl.findIteratorBinding("VOItertor");// your iterator
          Row row = dciterator.getRowAtRangeIndex((Integer.parseInt(valueChangeEvent.getNewValue().toString())));
          String selectOneValue= row.getAttribute("VOAttribut").toString();
          or you can check
          http://www.oracle.com/technetwork/developer-tools/jdev/listbindingvalue-088449.html
          https://blogs.oracle.com/adf/entry/getting_selected_value_from_selectonechoice

          Edited by: neha on May 7, 2013 1:22 AM
          • 2. Re: sending lov index instead of display value or code
            Manish
            you can get value of attribute using this code call this method on valueChangelistener event of Selectonechoice
            public void valueChanged(ValueChangeEvent valueChangeEvent) {
                       this.setValueToEL("#{bindings.Countrycode.inputValue}", valueChangeEvent.getNewValue()); 
                    String val=(String) resolveExpression("#{bindings.Countrycode.attributeValue}");
                   
                   
                }
            
            //also add these methods      
            
                public Object resolveExpression(String el) {      
                    FacesContext facesContext = FacesContext.getCurrentInstance();
                    ELContext elContext = facesContext.getELContext();
                    ExpressionFactory expressionFactory =  facesContext.getApplication().getExpressionFactory();        
                    ValueExpression valueExp = expressionFactory.createValueExpression(elContext,el,Object.class);
                    return valueExp.getValue(elContext);
                }
            
                public void setValueToEL(String el, Object val) {
                    FacesContext facesContext = FacesContext.getCurrentInstance();
                    ELContext elContext = facesContext.getELContext();
                    ExpressionFactory expressionFactory =   facesContext.getApplication().getExpressionFactory();
                    ValueExpression exp = expressionFactory.createValueExpression(elContext, el, Object.class);
                    exp.setValue(elContext, val);
                }   
            • 3. Re: sending lov index instead of display value or code
              mm07
              ok it must be
              <af:selectOneChoice value="#{bindings.Countrycode.inputValue}"
                                            shortDesc="#{bindings.Countrycode.hints.tooltip}"
                                            id="soc3" simple="true"
                                            valueChangeListener="#{pageFlowScope.InternalUserBean.valueChanged}">
                          <f:selectItems value="#{bindings.Countrycode.items}" id="si3"/>
                        </af:selectOneChoice>
              
              public void valueChanged(ValueChangeEvent valueChangeEvent) {
                         this.setValueToEL("#{bindings.Countrycode.inputValue}", valueChangeEvent.getNewValue()); 
                      String val=(String) resolveExpression("#{bindings.Countrycode.attributeValue}");
                     
                     
                  }
               
              //also add these methods      
               
                  public Object resolveExpression(String el) {      
                      FacesContext facesContext = FacesContext.getCurrentInstance();
                      ELContext elContext = facesContext.getELContext();
                      ExpressionFactory expressionFactory =  facesContext.getApplication().getExpressionFactory();        
                      ValueExpression valueExp = expressionFactory.createValueExpression(elContext,el,Object.class);
                      return valueExp.getValue(elContext);
                  }
               
                  public void setValueToEL(String el, Object val) {
                      FacesContext facesContext = FacesContext.getCurrentInstance();
                      ELContext elContext = facesContext.getELContext();
                      ExpressionFactory expressionFactory =   facesContext.getApplication().getExpressionFactory();
                      ValueExpression exp = expressionFactory.createValueExpression(elContext, el, Object.class);
                      exp.setValue(elContext, val);
                  }   
              
              must i set autosubmite=true
              • 4. Re: sending lov index instead of display value or code
                Manish
                yes you need to set autosubmit=true to call valueChanged method.
                • 5. Re: sending lov index instead of display value or code
                  mm07
                  but now am geting this ,the value is string in database i think is still reading the index
                  Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
                       at view.InternalBean.titlevalue(InternalBean.java:665)
                       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                       at java.lang.reflect.Method.invoke(Method.java:597)
                       at com.sun.el.parser.AstValue.invoke(Unknown Source)
                       at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
                       at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
                       ... 43 more
                  <XmlErrorHandler> <handleError> ADF_FACES-60096:Server Exception during PPR, #2
                  javax.servlet.ServletException: java.lang.Integer cannot be cast to java.lang.String
                       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
                       at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
                       at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
                       at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
                       at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
                       at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                       at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
                       at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                       at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
                       at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
                       at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
                       at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
                       at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
                       at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
                       at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
                       at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                       at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
                       at java.security.AccessController.doPrivileged(Native Method)
                       at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
                       at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
                       at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
                       at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
                       at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
                       at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                       at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
                       at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                       at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
                       at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                       at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
                       at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
                       at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                       at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
                       at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
                       at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
                       at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
                       at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
                       at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
                  Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
                       at view.InternalBean.titlevalue(InternalBean.java:665)
                       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                       at java.lang.reflect.Method.invoke(Method.java:597)
                       at com.sun.el.parser.AstValue.invoke(Unknown Source)
                       at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
                       at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
                       at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1256)
                       at org.apache.myfaces.trinidad.component.UIXEditableValue.broadcast(UIXEditableValue.java:214)
                       at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
                       at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1018)
                       at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:430)
                       at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
                       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
                       ... 36 more
                  Edited by: adf009 on 2013/05/07 1:49 PM
                  • 6. Re: sending lov index instead of display value or code
                    neha
                    Error is in line
                    adf009 wrote:
                    Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
                         at view.InternalBean.titlevalue(InternalBean.java:665)
                    Do check and debug the line, something is coming in Integer and you are directly casting it to String.

                    Which method did you used, when you got this error ??


                    Regards,
                    Neha..
                    • 7. Re: sending lov index instead of display value or code
                      Manish
                      can you post code of InternalBean.java line no 665 ?
                      • 8. Re: sending lov index instead of display value or code
                        mm07
                        am geting this error now ,i did add attributeValue,but other lov don't have problem when i select tham
                        <LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase PROCESS_VALIDATIONS 3
                        javax.faces.el.EvaluationException: javax.el.PropertyNotFoundException: The class 'java.lang.Integer' does not have the property 'attributeValue'.
                             at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:58)
                             at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1256)
                             at org.apache.myfaces.trinidad.component.UIXEditableValue.broadcast(UIXEditableValue.java:214)
                             at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
                             at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1018)
                             at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:430)
                             at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
                             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
                             at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
                             at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
                             at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
                             at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
                             at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                             at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
                             at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                             at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
                             at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
                             at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
                             at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
                             at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
                             at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
                             at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
                             at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                             at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
                             at java.security.AccessController.doPrivileged(Native Method)
                             at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
                             at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
                             at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
                             at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
                             at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
                             at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                             at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
                             at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                             at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
                             at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                             at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
                             at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
                             at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                             at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
                             at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
                             at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
                             at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
                             at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
                             at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
                        Caused by: javax.el.PropertyNotFoundException: The class 'java.lang.Integer' does not have the property 'attributeValue'.
                             at javax.el.BeanELResolver.getBeanProperty(BeanELResolver.java:547)
                             at javax.el.BeanELResolver.getValue(BeanELResolver.java:249)
                             at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:173)
                             at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:200)
                             at com.sun.el.parser.AstValue.getValue(Unknown Source)
                             at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)
                             at view.InternalBean.resolveExpression(InternalBean.java:684)
                             at view.InternalBean.officevalue(InternalBean.java:674)
                             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                             at java.lang.reflect.Method.invoke(Method.java:597)
                             at com.sun.el.parser.AstValue.invoke(Unknown Source)
                             at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
                             at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
                             ... 43 more
                        <XmlErrorHandler> <handleError> ADF_FACES-60096:Server Exception during PPR, #3
                        javax.servlet.ServletException: The class 'java.lang.Integer' does not have the property 'attributeValue'.
                             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
                             at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
                             at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
                             at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
                             at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
                             at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                             at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
                             at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                             at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
                             at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
                             at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
                             at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
                             at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
                             at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
                             at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
                             at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                             at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
                             at java.security.AccessController.doPrivileged(Native Method)
                             at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
                             at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
                             at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
                             at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
                             at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
                             at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                             at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
                             at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                             at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
                             at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                             at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
                             at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
                             at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                             at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
                             at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
                             at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
                             at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
                             at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
                             at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
                        Caused by: javax.el.PropertyNotFoundException: The class 'java.lang.Integer' does not have the property 'attributeValue'.
                             at javax.el.BeanELResolver.getBeanProperty(BeanELResolver.java:547)
                             at javax.el.BeanELResolver.getValue(BeanELResolver.java:249)
                             at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:173)
                             at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:200)
                             at com.sun.el.parser.AstValue.getValue(Unknown Source)
                             at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)
                             at view.InternalBean.resolveExpression(InternalBean.java:684)
                             at view.InternalBean.officevalue(InternalBean.java:674)
                             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                             at java.lang.reflect.Method.invoke(Method.java:597)
                             at com.sun.el.parser.AstValue.invoke(Unknown Source)
                             at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
                             at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
                             at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1256)
                             at org.apache.myfaces.trinidad.component.UIXEditableValue.broadcast(UIXEditableValue.java:214)
                             at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
                             at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1018)
                             at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:430)
                             at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
                             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
                             ... 36 more
                        
                        
                        the code is 
                        <af:selectOneChoice value="#{bindings.Office.inputValue}"
                                                      required="#{bindings.Office.hints.mandatory}"
                                                      shortDesc="#{bindings.Office.hints.tooltip}"
                                                      id="soc9" simple="true"
                                                      valueChangeListener="#{pageFlowScope.InternalUserBean.officevalue}"
                                                      autoSubmit="true">
                                    <f:selectItems value="#{bindings.Office.items}" id="si14"/>
                                  </af:selectOneChoice>
                        
                            public void officevalue(ValueChangeEvent valueChangeEvent){
                                this.setValueToEL("#{bindings.Office.inputValue}", valueChangeEvent.getNewValue()); 
                                String val=(String)resolveExpression("#{bindings.Office.inputValue.attributeValue}");
                           
                        Edited by: adf009 on 2013/05/07 2:08 PM

                        Edited by: adf009 on 2013/05/07 2:20 PM
                        • 9. Re: sending lov index instead of display value or code
                          neha
                              public void officevalue(ValueChangeEvent valueChangeEvent){
                                  this.setValueToEL("#{bindings.Office.inputValue}", valueChangeEvent.getNewValue()); 
                                  String val=(String)resolveExpression("#{bindings.Office.inputValue.attributeValue}"); // Incorrect
                          Should be
                              public void officevalue(ValueChangeEvent valueChangeEvent){
                                  this.setValueToEL("#{bindings.Office.inputValue}", valueChangeEvent.getNewValue()); 
                                  String val=(String)resolveExpression("#{bindings.Office.attributeValue}"); // AttributeName . attributeValue
                          Neha
                          • 10. Re: sending lov index instead of display value or code
                            Manish
                            String val=(String)resolveExpression("#{bindings.Office.inputValue.attributeValue}");
                            write this line in place of above line you also include "inputValue" this is wrong.
                            String val=(String)resolveExpression("#{bindings.Office.attributeValue}");
                            • 11. Re: sending lov index instead of display value or code
                              mm07
                              but am still sending index to my workflow instead of actual value
                              <af:selectOneChoice value="#{bindings.Countrycode.inputValue}"
                                                            shortDesc="#{bindings.Countrycode.hints.tooltip}"
                                                            id="soc3"
                                                            valueChangeListener="#{pageFlowScope.InternalUserBean.valueChanged}"
                                                            simple="true" autoSubmit="true">
                                          <f:selectItems value="#{bindings.Countrycode.items}" id="si3"/>
                                        </af:selectOneChoice>
                              
                              
                                  public void valueChanged(ValueChangeEvent valueChangeEvent) {
                                             this.setValueToEL("#{bindings.Countrycode.inputValue}", valueChangeEvent.getNewValue()); 
                                          String val=(String) resolveExpression("#{bindings.Countrycode.attributeValue}");
                                          System.out.println("countryselected " +val);
                                         
                                         
                                      }
                              
                              <FacesCtrlListBinding> <getInputValue> ADFv: Could not find selected item matching value Individual of type: java.lang.String in the list-of-values.
                              countryselected ZA
                              
                              but this value is not been send to my humanworklist
                              
                              the workflow is geting this value
                              <auditQueryPayload  auditId="2151003"  ciKey="440124"> 
                              <serviceInput> 
                              <element  name="payload"  isBusinessIndicator="false"> 
                              <value> 
                              <initiateTask> 
                              <task> 
                              <title>Approve/Reject Internal User Registration</title> 
                              <payload> 
                              <user_details> 
                              <username>jzuma</username> 
                              <persal_number>3454758678876</persal_number> 
                              <first_name>jacob</first_name> 
                              <last_name>zuma</last_name> 
                              <initials>jz</initials> 
                              <title>1</title> 
                              <gender>0</gender> 
                              <sa_id>2500221155444</sa_id> 
                              <passport> 
                              <number>324365464</number> 
                              <expiry_date>2013-05-15</expiry_date> 
                              </passport> 
                              <country_of_origin>241</country_of_origin> 
                              <branch>2</branch> 
                              <office>3</office> 
                              <practitioner_number/> 
                              <business_role>Survey Office Administrator</business_role> 
                              <email_address>zuma@gmail.com</email_address> 
                              <mobile_number>072221155444</mobile_number> 
                              <business_number>012002244</business_number> 
                              </user_details> 
                              </payload> 
                              <priority>3</priority> 
                              <processInfo> 
                              <instanceId>520026</instanceId> 
                              <processId>ApproveRejectUser</processId> 
                              <processName>ApproveRejectUser</processName> 
                              </processInfo> 
                              <systemAttributes> 
                              <activityName>Approve Registration</activityName> 
                              <activityId>ABSTRACT_ACTIVITY6590200330245</activityId> 
                              <thread>0</thread> 
                              <parentThread>-1</parentThread> 
                              <swimlaneRole>ApprovalManager</swimlaneRole> 
                              </systemAttributes> 
                              </task> 
                              </initiateTask> 
                              </value> 
                              </element> 
                              </serviceInput> 
                              <dataState> 
                              <dataObject  name="approval_outcome"  isBusinessIndicator="false"> 
                              <value> <approval_outcome xmlns:def="http://www.w3.org/2001/XMLSchema" xsi:type="def:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/> </value> 
                              </dataObject> 
                              </dataState> 
                              </auditQueryPayload> 
                              
                              my pagedefination is
                               <methodAction id="approveUser" InstanceName="InternalUserAppDC"
                                                DataControl="InternalUserAppDC" RequiresUpdateModel="true"
                                                Action="invokeMethod" MethodName="approveUser"
                                                IsViewObjectMethod="false">
                              <NamedData NDName="country_of_origin"
                                               NDValue="#{bindings.Countrycode.inputValue}"
                                               NDType="java.lang.String"/>
                              
                               </methodAction>
                              Edited by: adf009 on 2013/05/07 5:41 PM
                              • 12. Re: sending lov index instead of display value or code
                                neha
                                Hi,

                                I don't know much about worklist and its flow. But I guess
                                ...
                                <NamedData NDName="country_of_origin"
                                                 NDValue="#{bindings.Countrycode.inputValue}"   // inputValue = ZA 
                                                 NDType="java.lang.String"/>
                                 
                                ....
                                should be
                                ...
                                <NamedData NDName="country_of_origin"
                                                 NDValue="#{bindings.Countrycode.attributeValue}"   // attributeValue = Original Name
                                                 NDType="java.lang.String"/>
                                 ....
                                I already shared it, but again... Can you go through the link <a href ="https://blogs.oracle.com/adf/entry/getting_selected_value_from_selectonechoice"> Getting Selected Value from SOC </a>


                                -Neha..