Problem in setting bind variable

Hi,
I am sorry but I think I am having problem with this simple ADF BC concept.
I created a View object from HR Schema and I wanted to filter it with department id
so I created a bind variable :dept_id.
<?xml version="1.0" encoding="windows-1252" ?>
<!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
<!---->
<ViewObject
  xmlns="http://xmlns.oracle.com/bc4j"
  Name="EmployeesView"
  Version="11.1.1.59.23"
  SelectList="Employees.EMPLOYEE_ID,
       Employees.FIRST_NAME,
       Employees.LAST_NAME,
       Employees.EMAIL,
       Employees.PHONE_NUMBER,
       Employees.HIRE_DATE,
       Employees.JOB_ID,
       Employees.SALARY,
       Employees.COMMISSION_PCT,
       Employees.MANAGER_ID,
       Employees.DEPARTMENT_ID"
  FromList="EMPLOYEES Employees"
  BindingStyle="OracleName"
  CustomQuery="false"
  PageIterMode="Full"
  UseGlueCode="false"
  Where="Employees.DEPARTMENT_ID = :dept_id"
  RowClass="com.test.view.EmployeesViewRowImpl"
  ComponentClass="com.test.view.EmployeesViewImpl">
  <DesignTime>
    <Attr Name="_codeGenFlag2" Value="Access|Coll|VarAccess"/>
    <Attr Name="_isCodegen" Value="true"/>
  </DesignTime>
  <Variable
    Name="dept_id"
    Kind="viewcriteria"
    Type="oracle.jbo.domain.Number"/>
  <ViewAccessor
    Name="JobsView1"
    ViewObjectName="com.test.view.JobsView"
    RowLevelBinds="true"/>
  <ViewAccessor
    Name="EmployeesView1"
    ViewObjectName="com.test.view.EmployeesView"
    RowLevelBinds="true"/>
  <ViewAccessor
    Name="DepartmentsView1"
    ViewObjectName="com.test.view.DepartmentsView"
    RowLevelBinds="true"/>
  <ListBinding
    Name="LOV_JobId"
    ListVOName="JobsView1"
    ListRangeSize="10"
    NullValueFlag="none"
    NullValueId="LOV_JobId_LOVUIHints_NullValueId"
    MRUCount="0">
    <AttrArray Name="AttrNames">
      <Item Value="JobId"/>
    </AttrArray>
    <AttrArray Name="ListAttrNames">
      <Item Value="JobId"/>
    </AttrArray>
    <AttrArray Name="ListDisplayAttrNames">
      <Item Value="JobTitle"/>
    </AttrArray>
    <DisplayCriteria/>
  </ListBinding>
  <ListBinding
    Name="LOV_ManagerId"
    ListVOName="EmployeesView1"
    ListRangeSize="-1"
    NullValueFlag="start"
    NullValueId="${adfBundle['oracle.javatools.resourcebundle.SystemBundle']['NULL_VALUE_RESID']}"
    MRUCount="0">
    <AttrArray Name="AttrNames">
      <Item Value="ManagerId"/>
    </AttrArray>
    <AttrArray Name="ListAttrNames">
      <Item Value="EmployeeId"/>
    </AttrArray>
    <AttrArray Name="ListDisplayAttrNames">
      <Item Value="FirstName"/>
      <Item Value="LastName"/>
    </AttrArray>
    <DisplayCriteria/>
  </ListBinding>
  <ListBinding
    Name="LOV_DepartmentId"
    ListVOName="DepartmentsView1"
    ListRangeSize="-1"
    NullValueFlag="start"
    NullValueId="${adfBundle['oracle.javatools.resourcebundle.SystemBundle']['NULL_VALUE_RESID']}"
    MRUCount="0">
    <AttrArray Name="AttrNames">
      <Item Value="DepartmentId"/>
    </AttrArray>
    <AttrArray Name="ListAttrNames">
      <Item Value="DepartmentId"/>
    </AttrArray>
    <AttrArray Name="ListDisplayAttrNames">
      <Item Value="DepartmentName"/>
    </AttrArray>
    <DisplayCriteria/>
  </ListBinding>
  <EntityUsage
    Name="Employees"
    Entity="com.test.Employees"/>
  <ViewAttribute
    Name="EmployeeId"
    IsNotNull="true"
    PrecisionRule="true"
    EntityAttrName="EmployeeId"
    EntityUsage="Employees"
    AliasName="EMPLOYEE_ID"/>
  <ViewAttribute
    Name="FirstName"
    PrecisionRule="true"
    EntityAttrName="FirstName"
    EntityUsage="Employees"
    AliasName="FIRST_NAME"/>
  <ViewAttribute
    Name="LastName"
    IsNotNull="true"
    PrecisionRule="true"
    EntityAttrName="LastName"
    EntityUsage="Employees"
    AliasName="LAST_NAME"/>
  <ViewAttribute
    Name="Email"
    IsUnique="true"
    IsNotNull="true"
    PrecisionRule="true"
    EntityAttrName="Email"
    EntityUsage="Employees"
    AliasName="EMAIL"/>
  <ViewAttribute
    Name="PhoneNumber"
    PrecisionRule="true"
    EntityAttrName="PhoneNumber"
    EntityUsage="Employees"
    AliasName="PHONE_NUMBER"/>
  <ViewAttribute
    Name="HireDate"
    IsNotNull="true"
    PrecisionRule="true"
    EntityAttrName="HireDate"
    EntityUsage="Employees"
    AliasName="HIRE_DATE"/>
  <ViewAttribute
    Name="JobId"
    LOVName="LOV_JobId"
    IsNotNull="true"
    PrecisionRule="true"
    EntityAttrName="JobId"
    EntityUsage="Employees"
    AliasName="JOB_ID">
    <Properties>
      <SchemaBasedProperties>
        <CONTROLTYPE
          Value="combo_lov"/>
      </SchemaBasedProperties>
    </Properties>
  </ViewAttribute>
  <ViewAttribute
    Name="Salary"
    PrecisionRule="true"
    EntityAttrName="Salary"
    EntityUsage="Employees"
    AliasName="SALARY"/>
  <ViewAttribute
    Name="CommissionPct"
    PrecisionRule="true"
    EntityAttrName="CommissionPct"
    EntityUsage="Employees"
    AliasName="COMMISSION_PCT"/>
  <ViewAttribute
    Name="ManagerId"
    LOVName="LOV_ManagerId"
    PrecisionRule="true"
    EntityAttrName="ManagerId"
    EntityUsage="Employees"
    AliasName="MANAGER_ID">
    <Properties>
      <SchemaBasedProperties>
        <CONTROLTYPE
          Value="choice"/>
      </SchemaBasedProperties>
    </Properties>
  </ViewAttribute>
  <ViewAttribute
    Name="DepartmentId"
    LOVName="LOV_DepartmentId"
    PrecisionRule="true"
    EntityAttrName="DepartmentId"
    EntityUsage="Employees"
    AliasName="DEPARTMENT_ID">
    <Properties>
      <SchemaBasedProperties>
        <CONTROLTYPE
          Value="choice"/>
      </SchemaBasedProperties>
    </Properties>
  </ViewAttribute>
  <ViewLinkAccessor
    Name="EmployeesView"
    ViewLink="com.test.view.EmpManagerFkLink"
    Type="oracle.jbo.RowIterator"
    IsUpdateable="false"/>
  <ViewLinkAccessor
    Name="DepartmentsView"
    ViewLink="com.test.view.DeptMgrFkLink"
    Type="oracle.jbo.RowIterator"
    IsUpdateable="false"/>
</ViewObject>But when I ran it in my Business Component Browser, I am encountering below error
java.sql.SQLException: Missing IN or OUT parameter at index:: 1Not sure but did I miss something? Thanks
JDEV 11G PS3

Hi Frank,
Thanks, I think thats the gotcha...
setting the bind variable to required causes the dialog to appear...
Not sure though if this is a bug or something..

Similar Messages

  • Apex listener installed no test and set bind variables buttons

    I have installed Apex listener and while creating restful service module i dont see test and set bind variables buttons in the source region.
    I went through the many posts. Installed apex listener successfully.
    getting http://localhost:8080/ords/ started message when i start the listener.
    and using Apex URL as http://localhost:7780/pls/htmldb.
    What are the possibilities for this issues?
    Please help me on this.
    Thanks
    Chandran

    Apex listener version is 2.0.9
    Apex version is 4.2

  • Best Practice for setting bind variable when application loads

    I am using JDeveloper 11.1.2.3.
    When my application loads, the first unbounded page has a table populated by a named query.
    I would like to set the parameter used by the named query when the page loads, to populate the initial data that is displayed.
    What is the best practice for a solution to this issue?

    user6003393 wrote:
    I am using JDeveloper 11.1.2.3.
    When my application loads, the first unbounded page has a table populated by a named query.
    I would like to set the parameter used by the named query when the page loads, to populate the initial data that is displayed.
    What is the best practice for a solution to this issue?Hi,
    You can set the bind variable on VO by overriding prepareSession() method in Application Module check this http://docs.oracle.com/cd/E37975_01/web.111240/e16182/bcservices.htm#sthref357
    Setting bind variable on runtime http://docs.oracle.com/cd/E37975_01/web.111240/e16182/bcquerying.htm#CHDECJHD
    Zeeshan

  • How to set bind variable for a VO ,

    Hi,
    i got a requirement in which i have to set bind variable for VO , But the Bind variable is coming from payload attribute,
    For example my query in VO is select * from Employee where emp_id="payload attribute"
    How to set this attribute value is from the payload
    Thanks Regard
    Rajendar

    Hi i am getting this exception " Cannot create an object of type:java.lang.Number from type:oracle.bpel.services.datacontrol.data.DataObject with value:21159"
    Actually i am getting Decimal Value from Payload of BPEl process and i am trying to set this to The bind variable
    is that a type cast exception where can i typeCast Those values You should this in a new thread.Dont ask questions out of the scope of this thread.
    Please mark this thread as answered or helpful if you got solution for this thread.
    Thanks!!!

  • How to set bind variables for child VO in hierarchy component?

    Hi,
    Recently I created a application with Hierarchy Component with Parent VO (Query based VO with Bind variables in it) and its Child VO along with Child-Child VO(Query based VO with bind variable in it)
    I am able to set bind variable of parent VO but unable to set bind variable for Child-Child VO. Can any one help me regarding this issue?

    Hi i am getting this exception " Cannot create an object of type:java.lang.Number from type:oracle.bpel.services.datacontrol.data.DataObject with value:21159"
    Actually i am getting Decimal Value from Payload of BPEl process and i am trying to set this to The bind variable
    is that a type cast exception where can i typeCast Those values You should this in a new thread.Dont ask questions out of the scope of this thread.
    Please mark this thread as answered or helpful if you got solution for this thread.
    Thanks!!!

  • Is it possible to set bind variable for picklist?? for messageChoice

    we are trying to develop one new page in local JDeveloper.
    we have requirement for passing a bind variable to a picklist. is it possible?
    Item Type : messageChoice
    Query:
    SELECT DISTINCT TO_CHAR (effective_date, 'YYYY') TYPE
    FROM pay_assignment_actions a, pay_payroll_actions b
    WHERE a.payroll_action_id = b.payroll_action_id
    AND assignment_id =
    (SELECT assignment_id
    FROM per_assignments_x
    WHERE person_id = :person_id AND primary_flag = 'Y'
    AND assignment_type = 'E')
    AND a.action_status = 'C'
    AND b.payroll_action_id IN (SELECT payroll_action_id
    FROM pay_payroll_actions_v
    WHERE action_type IN ('P'))
    AND b.payroll_action_id IN (SELECT payroll_action_id
    FROM xxilo_pre_payments)
    ORDER BY 1 DESC
    processRequest() code:
    PayslipAMImpl am=(PayslipAMImpl)pageContext.getApplicationModule(webBean);
    YearPicklistVOImpl yvo=(YearPicklistVOImpl)am.getYearPicklistVO1();
    Number t = new Number(pageContext.getEmployeeId());
    yvo.setWhereClauseParams(null);
    yvo.setWhereClauseParam(0,t);
    for this query & code we are getting
    ERROR:
    java.sql.SQLException: Missing IN or OUT parameter at index:: 1
    if we hardcoded person_id in query to some value then we are getting results without any error.

    user603084 ,
    In the query you have specifies bind variable as :person_id , but in your VO execution code you are setting value for bind variable :1
    yvo.setWhereClauseParam(0,t);
    You need to change the bind variable in query , like :1
    and then execute the query of VO, as you have done. Also do executeQuery, after setting bind variables.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Problems with Date bind variable

    I'm trying to use a Date as a bind variable in a View Object, and I'm running into difficulties. I've got the bind variable type set to date, and the control hints for Format Type and Format set to "Simple Date" and "yyyy-MM-dd" respectively. When I run the application module test and enter the date in the correct format, the View Object returns the expected results. However, when I try to set a Query Bind Parameters property for a JHeadstart group in my application definition in order to set the bind variable's value from an dateField input control, I get the following exception:
    30-Jan 08:49:56 ERROR (ErrorReportingUtils) -java.lang.IllegalArgumentException
    at java.sql.Date.valueOf(Date.java:104)
    at oracle.jbo.domain.Date.toDate(Date.java:348)
    at oracle.jbo.domain.Date.<init>(Date.java:279)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at oracle.jbo.domain.TypeConvMapEntry.convert(TypeConvMapEntry.java:73)
    at oracle.jbo.domain.TypeFactory.get(TypeFactory.java:739)
    at oracle.jbo.domain.TypeFactory.getInstance(TypeFactory.java:90)
    at oracle.jbo.common.VariableImpl.convertToJava(VariableImpl.java:546)
    at oracle.jbo.common.VariableValueManagerImpl.doSetVariableValue(VariableValueManagerImpl.java:182)
    at oracle.jbo.common.VariableValueManagerImpl.setVariableValue(VariableValueManagerImpl.java:223)
    at oracle.jbo.common.VariableValueManagerImpl.setVariableValue(VariableValueManagerImpl.java:229)
    at oracle.jheadstart.model.adfbc.v2.JhsApplicationModuleImpl.applyBindParams(JhsApplicationModuleImpl.java:173)
    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:585)
    at oracle.adf.model.binding.DCInvokeMethod.invokeMethod(DCInvokeMethod.java:507)
    at oracle.adf.model.binding.DCDataControl.invokeMethod(DCDataControl.java:1795)
    at oracle.adf.model.bc4j.DCJboDataControl.invokeMethod(DCJboDataControl.java:1989)
    at oracle.adf.model.binding.DCInvokeMethod.callMethod(DCInvokeMethod.java:219)
    at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1289)
    at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:1802)
    at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:627)
    at oracle.adf.model.binding.DCInvokeActionDef$DCInvokeAction.refresh(DCInvokeActionDef.java:140)
    at oracle.adf.model.binding.DCBindingContainer.internalRefreshControl(DCBindingContainer.java:2521)
    at oracle.adf.model.binding.DCBindingContainer.refresh(DCBindingContainer.java:2260)
    at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.prepareRender(PageLifecycleImpl.java:534)
    at oracle.adf.controller.faces.lifecycle.FacesPageLifecycle.prepareRender(FacesPageLifecycle.java:98)
    at oracle.jheadstart.controller.jsf.lifecycle.JhsPageLifecycle.prepareRender(JhsPageLifecycle.java:1155)
    at oracle.adf.controller.v2.lifecycle.Lifecycle$1.execute(Lifecycle.java:297)
    at oracle.adf.controller.v2.lifecycle.Lifecycle.executePhase(Lifecycle.java:116)
    at oracle.adf.controller.faces.lifecycle.ADFPhaseListener.mav$executePhase(ADFPhaseListener.java:29)
    at oracle.adf.controller.faces.lifecycle.ADFPhaseListener$1.before(ADFPhaseListener.java:426)
    at oracle.adf.controller.faces.lifecycle.ADFPhaseListener.beforePhase(ADFPhaseListener.java:77)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:228)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:214)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
    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:123)
    at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
    at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:595)
    However, it seems that the value of the bind parameter did in fact change, according to the debug message issued by the JhsApplicationModuleImpl.applyBindParams(...) procedure:
    30-Jan 08:46:23 DEBUG (JhsApplicationModuleImpl) -ViewObject ViewObj: value of bind param move_date has changed: old value=null ,new value=Wed Jan 07 00:00:00 CST 2009
    One thing I have noticed that may be of interest - if I run the debugger into the JhsApplicationModuleImpl.applyBindParams(...) procedure, a default date in my bind variable shows up as an oracle.jbo.domain.Date object when it comes out of the following line:
    Object oldValue = vo.ensureVariableManager().getVariableValue(key);
    as opposed to the new value that gets sent from the input value of the dateField control, which shows up as a java.util.Date in the following line:
    Object value = args.get(key);
    In the string of functions leading up to the following in the stack trace:
                   at java.sql.Date.valueOf(Date.java:104)
    at oracle.jbo.domain.Date.toDate(Date.java:348)
    at oracle.jbo.domain.Date.<init>(Date.java:279)
    it looks like the value of the java.util.Date is converted to a string, then passed to these functions to be turned into a java.sql.Date object. However, according to the java.sql.Date.valueOf(...) function, it's expecting date in "yyyy-mm-dd" format, per the header comments:
    * Converts a string in JDBC date escape format to
    * a <code>Date</code> value.
    * @param s a <code>String</code> object representing a date in
    * in the format "yyyy-mm-dd"
    * @return a <code>java.sql.Date</code> object representing the
    * given date
    * @throws IllegalArgumentException if the date given is not in the
    * JDBC date escape format (yyyy-mm-dd)
    When the input value from the dateField input control is added as a java.util.Date, the toString() is producing the wrong date format, which could be seen in the debug output I included above that said the bind variable has changed.
    Has anyone done this before that can let me know what I am missing and how to fix this? I've search all over the web, and all the articles I've seen relating to bind variables only refer to those of numeric or string types, which aren't giving me any trouble. Even the Developer's Guide (http://database.in2p3.fr/doc/oracle/Oracle_Application_Server_10_Release_3/web.1013/b25947/bcquerying009.htm) article "5.9 Using Named Bind Variables" doesn't reference using a Date type.

    I had the same problem about a year ago (using JHeadstart 10.1.3.2.52):
    15-feb 14:10:31 DEBUG (JhsApplicationModuleImpl) -Search item matches query bind param SubjectenKernPeildatum, value set to 2000-01-01
    15-feb 14:10:33 DEBUG (JhsApplicationModuleImpl) -Executing applyBindParams for BasServiceKern.AdresRollenSubjecten
    15-feb 14:10:33 DEBUG (JhsApplicationModuleImpl) -ViewObject AdresRollenSubjecten: value of bind param peildatum has changed: old value=null ,new value=Sat Jan 01 00:00:00 CET 2000
    15-feb 14:10:33 ERROR (ErrorReportingUtils) -java.lang.IllegalArgumentException
    at java.sql.Date.valueOf(Date.java:104)
    at oracle.jbo.domain.Date.toDate(Date.java:348)
    It appears a java.util.Date gets put on the criteria Map in the searchBean, this can't be used as input for a jbo.Date bindvariable.
    My ugly solution was to override public void applyBindParams(String voUsage,HashMap args)
    in MyProjectApplicationModuleImp (which extends JhsApplicationModuleImpl of course),
    check if value is a java.util.Date, and then
    value = new java.sql.Date(((java.util.Date)value).getTime());
    Greetings, HJ
    Edited by: HJHorst on Feb 6, 2009 12:22 AM

  • Conditionally Setting Bind Variables

    I need help conditionally setting some bind variables so I don't have to hard code some values. However, I get errors when I try to do this. I might just be going about it the wrong way. This is my code so far:
    DECLARE
           first_offset varchar2(3);
           second_offset varchar2(3);
           current_term  varchar2(6);
    BEGIN
      current_term := (SELECT robinst_current_term_code
      FROM robinst
      WHERE robinst_aidy_code = :aidy)
      CASE
      WHEN current_term LIKE '%60' THEN first_offset := '40'
      AND second_offset := '100'
      WHEN current_term LIKE '%20' THEN first_offset := '100'
      AND second_offset := '160'
      END
    END;
    /I want to then use the offest variables in a select query afterwords. Is this possible, or what do I appear to be doing wrong?
    Edited by: blackhole82 on Jan 23, 2009 2:01 PM
    Edited by: blackhole82 on Jan 23, 2009 2:07 PM

    This works when I run it in toad:
    VARIABLE first_offset varchar2(3)
    VARIABLE second_offset varchar2(3)
    VARIABLE current_term  varchar2(6)
    BEGIN
      SELECT robinst_current_term_code
      INTO current_term
      FROM robinst
      WHERE robinst_aidy_code = :AIDY;
    first_offset := CASE 
      WHEN current_term LIKE '%60' THEN '40'
      WHEN  current_term LIKE '%20' THEN '100'
      END;
      second_offset := CASE
      WHEN current_term LIKE '%60' THEN '100'
      WHEN current_term LIKE '%20' THEN '160'
      END;
    END;
    SELECT spriden_id id, spriden_last_name||', '||spriden_first_name name
    FROM spriden
    WHERE spriden_pidm IN(
    SELECT DISTINCT(RCRESAR_PIDM)
    FROM RCRESAR A,RCRAPP1,SGBSTDN,SORLCUR, RCRAPP2, ROBINST
    WHERE  (RCRESAR_PELL_ELGBL = 'Y')
    AND   RCRAPP1_BIRTH_DATE <= (SELECT trunc(sysdate) - interval '25'year  from dual)
    AND   RCRAPP1_CITZ_IND='1'
    AND   RCRAPP1_CURR_REC_IND='Y'
    AND   RCRAPP1_INFC_CODE = 'EDE'
    AND   SGBSTDN_STYP_CODE = 'C'
    AND   SGBSTDN_STST_CODE = 'AS'
    AND SGBSTDN_LEVL_CODE = 'UG'
    AND  (SORLCUR_DEGC_CODE LIKE 'B%'
    OR   SORLCUR_DEGC_CODE LIKE 'A%')
    AND   SORLCUR_CACT_CODE='ACTIVE'
    AND ((RCRAPP2_C_DEPEND_STATUS='2'
    AND  (RCRAPP1_STAT_CODE_RES='LA'
    OR   RCRAPP1_PAR_STAT_CODE_RES='LA'))
    OR  (RCRAPP2_C_DEPEND_STATUS='1'
    AND   RCRAPP1_STAT_CODE_RES='LA'))
    AND F_ENROLLED_THIS_TERM(RCRESAR_PIDM, :current_term - :first_offset) = 'Y'
    AND MSU_ENROLLED_HISTORY_TERM(RCRESAR_PIDM, :current_term - :second_offset) = 'Y'
    AND NOT EXISTS (SELECT 'X'
    FROM RPRAWRD
    WHERE RCRESAR_PIDM = RPRAWRD_PIDM
    AND RCRESAR_AIDY_CODE = RPRAWRD_AIDY_CODE
    AND RPRAWRD_FUND_CODE LIKE 'GO%') 
    AND RCRAPP1_PIDM         = RCRESAR_PIDM
    AND SGBSTDN_PIDM         = RCRESAR_PIDM
    AND SORLCUR_PIDM         = RCRESAR_PIDM
    AND RCRAPP2_PIDM         = RCRESAR_PIDM
    AND RCRESAR_INFC_CODE    = RCRAPP1_INFC_CODE
    AND RCRESAR_SEQ_NO       = RCRAPP1_SEQ_NO 
    AND RCRAPP2_INFC_CODE    = RCRAPP1_INFC_CODE
    AND RCRAPP2_SEQ_NO       = RCRAPP1_SEQ_NO
    AND RCRAPP1_AIDY_CODE    = RCRESAR_AIDY_CODE       
    AND RCRAPP2_AIDY_CODE    = RCRESAR_AIDY_CODE
    AND ROBINST_AIDY_CODE    = RCRESAR_AIDY_CODE
    AND RCRESAR_AIDY_CODE    = :AIDY
    /*AND RCRESAR_PIDM = :PIDM */
    INTERSECT
    SELECT rprawrd_pidm
    FROM rprawrd
    WHERE rprawrd_fund_code = 'PELL'
    AND rprawrd_offer_amt > 0
    AND rprawrd_aidy_code = :AIDY
    INTERSECT
    SELECT rprawrd_pidm
    FROM rprawrd
    WHERE rprawrd_fund_code LIKE 'GO%'
    AND rprawrd_paid_amt > 0
    AND rprawrd_aidy_code <> :AIDY
    AND spriden_change_ind IS NULL
    ORDER BY nameBut it prompts me for my bind variables: current_term, first_offset, and second_offset. If I don't type in values I get no rows returned. When I type in what should be getting set in my pl/sql block it works fine. What could be the problem now? The purpose of the variables is to not to have to type anything.
    Edited by: blackhole82 on Jan 23, 2009 3:28 PM

  • About dynamically setting bind variable in LOV View

    Hi,
    I have a LOV VO for an af:SelectOneChoice field in the page.
    The LOV is depended on an SQL statement in which there is a bind variable in the where clause.
    When I open the page, I set the bind variable by using VO.setNamedWhereClauseParam in the prepareSession method in the application module, followed by VO.executeQuery();
    The problem is, the af:SelectOneChoice is blank. Why?
    If I do not use the bind variable in the SQL, I can see rows in the af:SelectOneChoice field.
    When is the proper time to populate the LOV? And where should I put the code for populating the LOV?
    I am sure that the VO is populated, because after I executeQuery, there are many rows in the VO.
    Thanks
    Stephen
    null

    Hi Franky,
    Yes, when I set a default value for the bind variable, everything is OK.
    But I want the bind variable dynamically be set when the AM is initiated. Is there a way to do that?
    Stephen

  • How to set Bind variable on the action of command link

    I have two tables. One is the list of processes and other one is the details of processes with process name as primary key.
    I want to first display the first table which has the list of processes on one page. When I click on perticular process name this process will pass to the bind variable of another table and corresponding details will be shown on other page. can anyone help how I can do this. My code is as follows:
    package model;
    import model.common.BpelDetailsView;
    import oracle.jbo.server.ViewObjectImpl;
    public class BpelDetailsViewImpl extends ViewObjectImpl implements BpelDetailsView {
    * This is the default constructor (do not remove).
    public BpelDetailsViewImpl() {
    * Returns the variable value for bpelnameVar.
    * @return variable value for bpelnameVar
    public String getbpelnameVar() {
    return (String)ensureVariableManager().getVariableValue("bpelnameVar");
    * Sets <code>value</code> for variable bpelnameVar.
    * @param value value to bind as bpelnameVar
    public void setbpelnameVar(String value) {
    ensureVariableManager().setVariableValue("bpelnameVar", value);
    this.executeQuery();
    <af:commandLink id="ot3" text="#{row.BpelName}"
    action="#{DasboardBean.ot3_action}"/>
    public String ot3_action() {
    BpelDetailsViewImpl bdv=new BpelDetailsViewImpl();
    bdv.setbpelnameVar("#{row.BpelName}");
    return "success";
    but its not working at all.
    Its displaying the errors on click of command link.
    javax.servlet.ServletException: java.lang.NullPointerException
         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:292)
         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:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:85)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:54)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.wls.JpsWlsFilter$1.run(JpsWlsFilter.java:96)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.wls.util.JpsWlsUtil.runJaasMode(JpsWlsUtil.java:146)
         at oracle.security.jps.wls.JpsWlsFilter.doFilter(JpsWlsFilter.java:140)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:202)
         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.run(WebAppServletContext.java:3588)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2200)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2106)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1428)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
         at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
         at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:147)
         at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:271)
         at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:140)
         at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:364)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:87)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:298)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:91)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:87)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:87)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:298)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:91)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:81)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:673)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:273)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:165)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         ... 34 more
    Caused by: java.lang.NullPointerException
         at oracle.jbo.server.ComponentObjectImpl.ensureVariableManager(ComponentObjectImpl.java:472)
         at model.BpelDetailsViewImpl.setbpelnameVar(BpelDetailsViewImpl.java:32)
         at portal.view.bean.DasboardBean.ot3_action(DasboardBean.java:24)
         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(AstValue.java:157)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
         ... 54 more

    Hi Shay..
    Thanx for your help...
    I stuck in one more problem. When I run directly the first list page it works fine. I craeted one more page home.jspx where I added a golink with <af:golink id="gl1" text ="List" destination="list.jspx". When I click on link it opens the list page. Now when I clicking on first column its redirecting to list.jspx not to details.jspx.
    What can be the solution for this.

  • Setting bind variables for VO in JUnit test case

    Hi,
    I am using Jdeveloper 11.1.2.2
    I have a problem while writing the test case for VO in JUnit.
    For the Remove method in the Test case , I have passed variables into the VO by using a setWhereClause() .
    Like this :
            view.setWhereClause(null);
            String whereClause = "location_id = '" + newUpdatedLocationId  + "' AND organization_id = '" +newOrganizationId + "'" ;
            view.setWhereClause(whereClause);
            view.executeQuery();
            while (view.hasNext()) {
                view.next();
                view.removeCurrentRow();
            fixture1.getApplicationModule().getTransaction().commit();But it is showing a an error like the bind variables are not set.
    So how will I access Bind variables programmatically and set the values ?
    Thanks
    Nigel.

    setNamedWhereClauseParam() is used for setting bind variables

  • Setting bind variable to a different value if its null

    Hi,
    I have a report page which displays a table. One of the parameters of the sql query that generates this table is an apex bind variable.
    I want the page to to run a different sql query depending on whether the bind variable is blank or not.
    How can I do this in Apex without having to do use a function?
    It would be good if I good reset the bind variable to another value (generated from a different sql statement) when the page loads.
    Thanks
    Edited by: sam on 17-Feb-2011 07:43

    Hi,
    Thanks, that's really helpful.
    I'm passing a value (:P1_VAR1) as null from page 1 to page 2. On page 2 I have a table with the first column showing primary keys that have links.
    When the user clicks on the link, it refreshes page 2 and sets the value on session :P1_VAR1 to the value of the primary key of the record clicked.
    However, the problem is that when the user goes from page 1 to page 2, I want the :P1_VAR1 to be initialised to the first primary key record from the first record on my table.
    I have a function that gets the id of the first record on my table but I don't know how to set the :P1_VAR1 to this value by modifying the item settings in APEX.
    Please can someone help and give me an example on how this is done?
    Thanks
    Edited by: sam on 17-Feb-2011 07:49

  • Problem Using a Bind Variable on a SelectOneChoice List VO

    Hi everyone,
    I have a List View Object on my application that contains the lookup values for some combos. The underlying table has three columns: LOOKUP_TYPE, LOOKUP_CODE and DESCRIPTION. It is used like this: when i want to find out which are the possible values for the "Customer Status" field on a form, i need to execute this VO with LOOKUP_TYPE = "CUST_STATUS". when i want to find the Supplier status, i execute it with "SUPP_STATUS". Then i compare the value of LOOKUP_CODE with the customer_status or supplier_status codes to get its description.
    The problem is, i have to use this VO as the Dynamic List of values for a SelectOneChoice. I have correctly mapped it, but the VO query is like this:
    SELECT lookup_code, description FROM tab_lookup_codes WHERE lookup_type = :lkpType
    So i need to set the bind variable dinamically, as i would do with ExecuteWithParams, but for a SelectOneChoice list. How can i do such thing? is there a way to define a value for this parameter before ADF executes the List VO on the page definition, or even programatically?
    If you didn't understand my requirement, please let me know.
    Thank you very much for your time!
    Thiago Souza

    Hi Thiago,
    If i understand you problem you can try to insert a invokeAction to your page definition with refresh property equals prepareModel that call a method that sets your Where param propertly. In this way your method will be executed before prepareModel.
    I haven't test this, its only a possible idea.
    Best Regards
    Hi everyone,
    I have a List View Object on my application that
    contains the lookup values for some combos. The
    underlying table has three columns: LOOKUP_TYPE,
    LOOKUP_CODE and DESCRIPTION. It is used like this:
    when i want to find out which are the possible values
    for the "Customer Status" field on a form, i need to
    execute this VO with LOOKUP_TYPE = "CUST_STATUS".
    when i want to find the Supplier status, i execute it
    with "SUPP_STATUS". Then i compare the value of
    LOOKUP_CODE with the customer_status or
    supplier_status codes to get its description.
    The problem is, i have to use this VO as the Dynamic
    List of values for a SelectOneChoice. I have
    correctly mapped it, but the VO query is like this:
    SELECT lookup_code, description FROM tab_lookup_codes
    WHERE lookup_type = :lkpType
    So i need to set the bind variable dinamically, as i
    would do with ExecuteWithParams, but for a
    SelectOneChoice list. How can i do such thing? is
    there a way to define a value for this parameter
    before ADF executes the List VO on the page
    definition, or even programatically?
    If you didn't understand my requirement, please let
    me know.
    Thank you very much for your time!
    Thiago Souza

  • Getting error 025036 while setting bind variable value

    Hi,
    I have created a view object (ViewObj) having bind variable (Bind_Val).
    I am writing custom java method in AppModuleImpl.java, so that I can use that in serviceInterface.
    my method is:
    public void Met(String a){
    ViewObjImpl vo=new ViewObjImpl();
    vo.setBind_Val(a);
    I tried the below method also:
    public void Met(String a){
    ViewObjectImpl vo=new ViewObjectImpl();
    vo.setNamedWhereClauseParam("Bind_Val",a)
    But when I am running the AppModuleServiceImpl.java and select the Met method and pass the value for a. It is giving me error 02036.
    How to set the bind variable value in AppModuleImpl.java??
    Thanks,
    Rohit

    Hi Frank,
    Thanks for reply. It was helpful.
    Please go through the below mentioned two queries.
    My sql query is:
    SELECT Message.MESSAGE_ID,
    MessageProp.VALUE,
    MessageProp.MSG_PROP_ID
    FROM MESSAGE Message, MESSAGE_PROP MessageProp
    WHERE (MessageProp.Key='From' OR MessageProp.Key='To')AND Message.MESSAGE_ID = MessageProp.MESSAGE_ID And MessageProp.Value='B'
    and I have created one view criteria where I am giving the condition as MessageId=:Bind_MessageId.
    And then I am executing my findViewCriteria method from AppModuleServiceImpl where I am passing the value for Bind_MessageId and I am getting the output as I want.
    Now I am modifying my query as:
    SELECT Message.MESSAGE_ID,
    MessageProp.VALUE,
    MessageProp.MSG_PROP_ID
    FROM MESSAGE Message, MESSAGE_PROP MessageProp
    WHERE (MessageProp.Key='From' OR MessageProp.Key='To')AND Message.MESSAGE_ID = MessageProp.MESSAGE_ID And MessageProp.Value=:Bind_Value
    and setting the value for :Bind_Value programatically as:
    public void test(String s){
    ViewObjectImpl view = this.getViewObj1();
    VariableValueManager vm = view.ensureVariableManager();
    vm.setVariableValue("Bind_Value",s);
    **Note- I have written this custom method in AppModuleImpl.java class
    Then firstly I am executing test method from AppModuleServiceImpl to set the value for :Bind_Value. After that I am executing findViewCriteria method but then I am not getting any record.
    **Note-I am not getting any error.
    I want to set Bind_Value programatically and then I want to execute my FindViewCriteria from serviceInterface.
    Thanks,
    Rohit

  • Setting bind variable for a view object from the Managed Bean

    Hi,
    i am using JDeveloper 11g, i have to create LOV in the JSF. To show the LOV, it has to populate data using View object and its query parameter need to be sent from the Managed Bean.
    For the View object i want to set the bind variable parameter from the managed bean value. bename is stored in a managed bean (session scope)
    #{beantest.bename}
    But it gives the following exception.
    JBO-29000: Unexpected exception caught:
    org.codehaus.groovy.control.MultipleCompilationErrorsException,msg=startup failed, Script1.groovy: 1: expecting '!',found '{'@ line1, column 2.
    I have followed the link http://kr.forums.oracle.com/forums/thread.jspa?threadID=615474 like Frank wrote on 8.2.2008:
    But steps are not clear.
    How to input the VO bind parameter with Managed bean variable?
    Any Help
    Regards
    Raj
    Edited by: user9928180 on Dec 17, 2008 9:51 AM

    Hi,
    a bind variable in a VO needs to be exposed as an executeWithParams operation in the pageDef file. Just add a new action binding to the pageDef file (context menu) and select the executeWithParams operation on teh VO. Then in the argument field, reference the managed bean property for the value
    Frank

Maybe you are looking for

  • Why is the iPad Mini slower than iPod touch 4 at buffering video?

    As mentioned in the title I have an iPad Mini that is being outperformed by my iPod touch 4. I have been using both devices on the same network and on You Tube the iPod is a lot faster at loading, Furthermore, when using BBC iPlayer I can connect wit

  • Name of the method.

    Good day, Within a class, the name of the class can bet determined via a call to the "getClass().getName()" method, right ? How do we get the name of the method itself ? ================ class magic { magician () { xx = getClass().getName(); // --> W

  • Any Graph Solution

    Hi all, I want to generate a line graph and a bar graph on my application which is developed in visual studio. Is there any way that i can add graph as an image?? How to generate it?? Well i have personally written applets which can draw both the gra

  • HT201210 acidentaly had my ios firmware deleted iphone 1gn 3g firmware 4.2.1 how can i get it back ? please lost everythin in it

    hi acidentally had my firmwre deletad on my 3g iphone 4.2.1 firmware all i can remeber, please **** dont wanto losse my phone

  • Photoshop Laggy under Domain Joined Windows 7 Machine

    Photoshop CS4 (64-bit) has been working fine up until I added my PC to my Server 2008 R2 level domain, complete with roaming profiles and folder redirection up to my server. I've googled around and found nothing, basically Photoshop now runs like mud