Setting VO bind variable programatically
Hi,
We have a panel accordion, which has several panels. Depending on panel's name (text attribute) we need to set the underlining VO bind variable to the name value.
Could someone point to an example of how to do it?
use [url http://docs.oracle.com/cd/E14571_01/apirefs.1111/e10653/oracle/jbo/server/ViewObjectImpl.html#setNamedWhereClauseParam%28java.lang.String,%20java.lang.Object%29]setNamedWhereClauseParam method
also check {message:id=9904521}
Edited by: M.Jabr on Nov 28, 2011 8:55 AM
Similar Messages
-
How to set a bind variable across the pages in a report
I want to create a portal report where data will come from a table for a date range for a week.
For e.g select event_date,last_name, event_name
from RESOURCES
where event_date between trunc(to_date(:curr_date,'DD-MON-RRRR'))
and trunc(to_date(:curr_date,'DD-MON-RRRR')+ 7)
The :curr_date is defined as a bind variable whose default value is sysdate.
Now, when we run the report for the first time, it takes the :curr_date as
sysdate and prints the report.
I have two buttons in the report output like "previous week" and "next week".
If someone presses previous week, the same report should run with curr_date
as sysdate-7 and if someone presses next week, the report should run with
curr_date as sysdate +7 and also the :curr_date sets to sysdate - 7 or sysdate + 7
depending on the button pressed.
Problem:
How do I set the value of curr_date if someone presses any of
previous week/next week.
nullBest to state your JDev version, and technology stack (eg. ADF BC) when posting.
I can think of 2 approaches.
1) Create a parent VO based on SELECT :bindVar FROM dual, then create links between your other VOs and the parent
2) Create a AM client interface method that programatically sets the bind variable in each VO.
Can you specify your use case? This one tends to come up when discussing effective from/to dated queries.
CM. -
How to set the bind variable on page load and execute query ?
Hi All,
I am using Jdeveloper 11.1.1.5
I have a table called "Employee"
Columns :- id , name , location
Data :- 1, ,james , chicago
2 ,Raj ,capetown
Now i have another webservice(created as a webservice dataControl) which sends me the "id" on each time my page loads.Now the id which has been returned by webservice should be incorporated in my VO Query as in where clause to fetch the data for the respective "id" in that "Employee" table and should be rendered on form.
Eg :- Id "2" has been sent by the webservice then the record should be fetched from database should be "2","raj","capetown".
I know that there would be necessity of bind variable , but how do i set the bind variable on page load ?
How can i use the bind variable appropriately ??
Please suggest !!!!
Thanks.Hi,
Check
http://www.orastudy.com/oradoc/selfstu/fusion/web.1111/b31974/web_services.htm#CJADCDBG
http://thepeninsulasedge.com/frank_nimphius/2011/02/18/adf-code-corner-sample-73-released-hands-on-creating-a-search-form-using-a-pojo-ws-and-the-web-service-data-control/
-Suresh -
Setting VO bind variable using session variable
Hi,
I need to get/set VO bind variable using ApplicationModuleImple or ViewObjectImple class. Does Any one know how to do it?
I have one VO based on query like "select name from users where password = :password ". I had a bind variable to it too. now i want to set it from a session scoped variable. can i do it using ADFContext.getCurrent().getSession().get('username'); ? but somehow I am not able to get the knowledge i.e where to set bind variable. please help.Timo thanks for the reply, actually I don't want to do it using data control i.e drag and drop method to a page. Instead i just want to set bind variable to a session varable already got from login page.
I got the following sollotion but don't know where to put them,
1.
FacesContext context = FacesContext.getCurrentInstance();
ValueBinding vb = context.getApplication().createValueBinding("#{data}");
BindingContext bci = (BindingContext)vb.getValue(context);
DCDataControl dc = bci.findDataControl("AppModuleDataControl");
ApplicationModule am = (ApplicationModule)dc.getDataProvider();
AppModuleImpl service = (AppModuleImpl)am;
ViewObject vo = service.findViewObject("YourViewObject").setNamedWhereClauseParam("nameBindVariable", objectValue);
vo.executeQuery();
what is the #{data} in second line ? if you know please let me know.
Second Solution :
2- In backing bean code:
FacesContext context = FacesContext.getCurrentInstance();
Application fapp = context.getApplication();
JUFormBinding adfbc = (JUFormBinding)fapp.createValueBinding("#{bindings}").getValue(context);
DCIteratorBinding iter = adfbc.findIteratorBinding("YourIterator");
iter.getViewObject().setNamedWhereClauseParam("nameBindVariable", objectValue);
iter.executeQuery();
where would I get "YourIterator" ... ? I am still a new at jdev ... ;) -
Set VO bind variable on page loading programmatically
Greetings everyone!
I use JDeveloper version 11.1.2.3.0
I am currently trying to get some filtered data from a VO, based on a WHERE clause with a bind variable. This process should be done on page load. I have to set this bind variable with the id of the logged user (the part of getting this id is already achieved and used somewhere else). My current approach is defining a managed bean with pageFlow scope. Inside this i have a method in which i retrieve the id and i set it as the parameter value. The code snippet:
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("getUserIdFromUsername"); //getUserIdFromUsername is a method defined in the AppModule and exposed in the client interface
operationBinding.getParamsMap().put("username", getUserName());
Object userID = operationBinding.execute();
setUserId(Integer.parseInt(userID.toString()));
System.out.println("THE USER ID IS: "+getUserId());
BindingContainer bindings2 = getBindings();
OperationBinding operationBinding2 = bindings.getOperationBinding("ExecuteWithParams"); // i've dragged and dropped the ExecuteWithParams operation into the page
operationBinding2.getParamsMap().put("userId", getUserId()); // userId is the bind variable which i'm talking about
Object result = operationBinding2.execute();
Then, i call this method on BeforePhase in the page view. It works, i get the filtered data and the println shows me the correct ID. The problem is that each time i select a row in the table showing the data, the page seems to reload and it always get the selection back at the very first row.
What am i doing wrong? May be this is not the right approach, as i've seen some other posts about this topic but they are not very clear to me.
Please adviceApproach1:
Drag and Drop an Application method as Default Method Call Activity, then draw a control flow case from the method to your page.
In the application module method, implement appropriate logic.
Approach2:
Using a combination of client listener and server listener will also help.
<af:clientListener method="onLoadAction" type="load"/>
<af:serverListener type="MyCustomServerEvent"
method="#{backingBeanScope.editBean.onLoadListener}"/>
function onLoadAction(event){
/*alert(':::: onSave ::');*/
AdfCustomEvent.queue(actionEvent.getSource(),
"MyCustomServerEvent",
true);
actionEvent.cancel() ;
actionEvent.stopPropagation(); -
Setting a bind variable in a Shared Component Report Query
I have defined a Shared Component Report Query in APEX using a bind variable similar to below
Select name, id , ....
from asset
where id = :id
I have also created a Report Region that displays a table where one of the columns contains a value I would like to be a link column that can launch the Report Query and pass its value to the bind parameter :id in the report query. This in turn would generate a pdf report for the details associated with that column. I am having problems setting the :id bind parameter. How do I do this?
Can anyone help?
ThanksThe bind values are set from session state. So if try something like this:
Select name, id , ....
from asset
where id = :P1_ID
With P1_ID being a page item, for which you set the session state / value before generating the PDF file. So assuming you already have a page with a report and a page item, and that page item is already used in your report, then you could just create a button to download the PDF, make sure the button is a submit button, and create a branch pointing to the report query URL (or in 3.1 use the create button wizard, to do this declaratively.)
Regards,
Marc -
How to set a bind variable into a vo query from the current vo ?
I would like to exclude from my list of values defined in a view object the already referenced items in the current view object content.
Let's say i have dept and emp with a many to many relationships, I would like that the already existing dept for emp not listed (excluded) in the list of values for emp.
Do i need to define a bind parameters and set it during search or is it possible to use an expression that will refer the current row attribute representing the dept ?
I didn't find an example or explanation how to set bind parameters defined in a view object query from seach pages or list of values ui components. May be somebody know how to find the info.
Thank youI think that bind variable accessors in the VO class is what you need. You can override the getter method of the bind variable "LocaleCode2" in order to return the first 2 chars from the bind variable "LocaleCode". Have a look at this blog post for details:
http://jdeveloperandadf.blogspot.com/2011/03/custom-java-bind-variable-in-where.html
Dimitar -
How to set default bind variable value to task parameter value
Hi,
I 'm implementing a BPEL process with a human task, and I autogenerate the task form. I have a custom sql table that stores opinions, different processes should show different opinios, so my ADF table can only show records related to that process. A custom process number is sent to the task form as a task parameter. How do I use that value as the bind variable default and only value?
Thanks,
I.D.Hi Shay and thanks for your reply,
What I want is what you have but without the login page. I tried to start my flow with an action and for some reason it didn't work.
Is there anything else you can tell me?
Thanks,
I.D.
P.S. I was able to get it to work using the aproach Frank Nimphius described in another post.
Re: How do I prepopulate a bind variable from a session variable?
Anyway just out of curiosity could you please tell me if I could have done it your way?
Thanks a lot,
I.D.
Edited by: user8696770 on 5/Ago/2009 7:12 -
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,
RohitHi 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 -
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 PS3Hi 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.. -
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 -
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 AMHi,
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 -
Af:query stuck on previous search bind variables if set manually
I'm not sure if this is a bug or we're just doing something we're not supposed to do. It totally threw me off.
We didn't like any of the built-in ways of making a list type search, but we liked different aspects of different things available. So we created out own search component using a declarative component. The way it works is that we have an auto complete field which is a text field that pops up a table styled how we want it. When clicking or navigating onto the popup and pressing enter, it would select the value. We also wanted a more advanced search type thing which is pretty much the ADF LOV which pops up a dialog with essentially an af:query with a table. So we just put an image next to the search field that would pop up such a dialog.
One thing we wanted as well was to use the same collection for both the table in the auto complete popup and in the dialog. The dialog is allowed to have more columns or even different columns for that matter, but same collection model.
The problem is that I noticed that when I use the auto complete and then go to the dialog, the af:query would stop working. If the first thing I do is to go to the dialog, it would work fine. For the auto complete part, I'm calling ExecuteWithParams from the view criteria of our ADF BC View's Data Control. It seems like once we set the bind variable on the view manually, the af:query is stuck on the value that was set and the search button no longer responds to the search filters there. Can someone confirm if this is expected? It seems like Oracle did not expect that the same view would be used on an af:query's table and another table.Thinking about this some more, I guess what I need is to somehow when I popup the dialog reset the view's bind variable to their initial state. Setting them to NULL or empty string doesn't do it. Then it's stuck on those values. I need to set it to whatever af:query expects.
-
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 PMThis 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
nullHi 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
Maybe you are looking for
-
I have searched through the FAQs and find stuff on "crashing". I have not had any trouble with flash crashing, but I can't keep it installed. If I install flash, then it stays as long as I am logged in, even if I close firefox. Once I log out and log
-
How can I burn all of my iPhoto videos onto a DVD?
I record many many live events with my iPhone! I of course back them up onto my Macbook Air's iPhoto, which is also backed up onto an external hard drive. I was wondering how I can just locate all of the video files in my library, put those onto a fl
-
lost most of my important e mails this morning had a total of 21 new emails only managed to read a few when they suddenly disappeared they are not in my deleted folder or any other i can see
-
Can you block file types???
Can you block certain file types from playing to force users to have a standardized file type to be uploaded to the server? For example, if we decide we do not want .wav files played on the server, is there a configuration setting to block/stop a .w
-
QuickTime 7.1.3 and Group Policey
I have been trying to get the new version to push to my windows XP workstations from my windows server 2003 AD group policies. First I have got it to install but the Language is set for something like Chinese or something. I unfortunately need to be