Bind variable and parameter problem
Hello, I'm migrating a complex report from Oracle Report to BI Publisher. Now I have some problems with the bind variables. In order to explain the question clearly, I simplified the code as below. The value of e1 and sum1 can be generated correctly. The problem is that the value of e2 can not be generated.
<dataTemplate name="dt" defaultPackage="dt">
<properties>
<property name="xml_tag_case" value="upper"/>
</properties>
<parameters>
</parameters>
<dataQuery>
<sqlStatement name="q1">
<![CDATA[
select col1 c1, col2 c2, function1(:c1) e1,
from table1
]]>
</sqlStatement>
<sqlStatement name="q2">
<![CDATA[
select col3 c3, col4 c4, function2(:sum1) e2,
from table2
]]>
</sqlStatement>
</dataQuery>
<dataStructure>
<group name="g1" dataType="varchar2" source="q1">
<element name="e1" dataType="number" value="e1"/>
</group>
<group name="g2" dataType="varchar2" source="q2">
<element name="sum1" function="sum" dataType="number" value="g1.e1"/>
<element name="e2" dataType="number" value="e2"/>
</group>
</dataStructure>
</dataTemplate>I tried to replace the bind variable ":sum1" in the function2(:sum1) with a value, e.g. 5. And e2 can be generated correctly. So my guess is that ":sum1" is not correctly parsed to function2.
Please help if you have any idea of what may cause the problem.
Thank you in advance.
Thank you. Now the problem is clear and it relates to the conversion of the report.
I posted a new question in Report conversion compatibility problem (argument, formula and sum column) .
Similar Messages
-
Bind Variables and Shared Component Report Query
I have a query in a region report which I have replicated to a shared component report query.
Both queries reference page items as bind variables in the where clause.
The report region on screen shows the correct results but the report query shows "no data". This is the case when running "Test Query" and "Download XML data" from the shared component report query definition. If I hardcode the variable names I get rows returned, If I use bind variables - and specify the values for these variables I get no data. THe XML file contains the tags for each bind variable I have specified but has no data between the tags. I have Ticked the box to include application and session state but it appears that the bind variables are not being used.
When I use my report query in the application (URL tied to a button) I get the same problem, the binds are not being passed to the report query.
Can someone please clarify if this is a bug or not? And if not, how can I get it to work.
I am using Apex 4.0.2
Thanks
KathrynHi
To confirm, yes I selected the bind variables. I used these in the report layout, but the xml file has them as empty i.e.
<P0_START_DATE><P0_START_DATE/> with nothing in between.
IN the Test Query section, if I put real values in the boxes for the bind variables, I get no data found. If I hardcode the values into the query, I get the data.
I've repeated the create report query many times and have created a report layout in RTF. I can use the layout with my region - in the print attributes and the layout works with the query but I need to create a PDF using 2 queries - ROWSET1 and ROWSET2. I can generate the XML but the values in the rows are all empty. When I use the layout with a report query instead of the region, I get no data even though I have used the same sql and have selected the bind variables. I was using variables from page items on page zero but have also tried using page items on the current page, the result is the same.
I need to use a report query and a report layout as I need data from 2 queries in the PDF.
I looked at your demo - what happens if you add a second sql query to the report query - is there any chance I can look at the back end (developer access?)
Thanks for your input
Kathryn -
Af:query with bind variables and Saved Search
I have a VO and view criteria(VC).
VC has a criteria item ObsoleteDate with range specified as bindVariables "dateFrm" and "dateTo" I dragged & dropped the named criteria as af:Query with table. Table toolbar has 2 buttons in which I set & clear the bind variables. Data is fetched as per as expected based on the VC & bind variables.
The problem is,
If I save my search with bind variables set and swap between the saved searches , all works fine. But the moment I clear bind variables & swap between searches.. "dateFrm" is populated and "dateTo" is null and I get an Exception oracle.jbo.AttrValException: JBO-27035: Attribute Obsolete Date: is required.
Why is this happening?? Saved search is supposed to save the VC with all the bind values set while saving and clearing bind variables shouldn't affect the saved search, right?? Or I have understood it wrong?
I am using JDeveloper 11.1.2.3.0
ThanksTry
like ? || '%' -
Query regarding bind variables and LOVs
HI,
I am new to ADF.Last day I learnt about LOVS,View Criteria and bind variables.Now, I was trying to develop a sample application.I created some EOs,VOs and an AM.
I also defined a view criteria which takes a bind variable as parameter and resolves the condition at runtime.Then I created a query panel based on my view criteria.In that Query Panel,when I enter a student's name in an input box(which is bound to the bind variable I guess), the info about the student is displayed in a table.Now, instead of an input box, I want a choice list based on a model driven LOV which will contain all the student names available.Is it possible in ADF 11g?
Thanks in advanceYou need to open the VO , you are using , go to the Overview section and in overview section go to the Attributes section.
In attributes section select the attribute by which you are searching or doing your operation, click the add button of List of values: Attribute name
Select the vo object to populate the value.
You will get the data in bind variable you have created in view criteria.
For detailed reference you can follow the bolg
http://saumoinak.blogspot.com/2011/02/showing-data-based-on-list-of-values.html -
Can I put a SQL query into a bind variable and then use it to output report
Hi,
Can I put a SQL query into a bind variable and then use it to output report?
I want to create a report and an item "text area" (say P1_TEXT) which can let user to input a SQL query(they are all technical users and knows SQL very well). Then, I use a bind variable (that text area) to store the SQL statement. Then, I add a submit button and I want to use the following to output the report:
select * from (:P1_TEXT);
Do you think it is possible to do that? Any known limitations for APEX in this area?
Thanks a lot,
AngelaYou can, but make sure it's what you really want to do. Make sure you are VERY familiar with SQL Injection. Most people who know what it is, go out of their way to prevent SQL Injection. You're going out of your way to allow it.
You can try using &P1_TEXT. instead of bind variable syntax. Bind variables are one of the best ways to prevent SQL Injection, which is why it's not working for you.
Once again, I strongly urge you to consider the implications of your app, but this suggestion should get it working.
Tyler -
Bind variable and normal variable/parameter
Hi all
In many references it is common suggestion to use bind variable in SQL query for better performance. In oracle forms if we write query we use bind variable usually like as below:
select emp_name
from hr_employee
where emp_no = :emp_no;
But if we use backend function, we send the employee number through parameter and in backend function the query is as below
select emp_name
from hr_employee
where emp_no = pEmpNo; --- IN Parameter
Does this query get facility as bind variable??
Thanks in advance.
Mokarem.You may check Bind Variables for reference.
String literals are usually not automatically converted to binds, unless (and only in certain circumstances)cursor_sharing is enabled. -
View with Bind Variable and ADF table
Hi all,
Please note what i have noticed. I created a view with a bind parameter, overriden the prepareSession of my Application Module to set the bind parameter and execute the query. I then created a simple jsf page and included the view as an adf read-only table. When i run the page, the prepareSession is called, sets the bind parameter, however the selected record of the table is always the second record (Not the first record).
This behaviour can be reproduced with the HR schema. Please follow the below instructions for reproducing the problem.
1. Create a Fusion Web Application (ADF).
2. Create business components from tables.
3. Create a new connection with the HR schema.
4. Import the Departments table as an entity and then click finish.
5. Create a view based on the Departments entity.
6. Modify the Query to include a where clause (where DDepartmentsEO.DEPARTMENT_NAME LIKE :BindParam)
7. Provide an order by clause (DepartmentsEO.DEPARTMENT_ID DESC)
8. Creata a bind variable named "BindParam" of type string.
9. Create an Application Module and include the view object.
10. Open the Application Module Class and override the prepareSession method
11. include the following code after super.prepareSession(session):
ViewObject myView = this.getDepartments1();
myView.setNamedWhereClauseParam("BindParam", "%");
myView.executeQuery();
12. Create a jsf page
13. Drag the view object on the page as an adf read-only table, selecting the Row Selection, Sorting and Filtering
14. Run the page.
You will see that instead of the first record being selected, the second record in the table is selected.
Can anyone please help me?
Thank youFirst of all i would like to thank you for replying to my thread.
Secondly, i would like to inform you that the example that i have provided is just for REPRODUCTION purposes.
The real scenario has to do with setting the where clause with the authenticated user so that the view will query for data only associated with the authenticated user.
The only way to overcome this behaviour is to include a view action (namedWhereClause in the page definition)
However, this is not how i want to implement this. This was working properly in 10g -
Bind variables and Dynamic sql
I have this function which works only when i'm not passing bind variables. The moment i add bind variables it is not able to execute the function.
Oracle Db Version: 8.1
Thanks
Source Code
FUNCTION TestFunction( In_Test_id in Number,
In_Asof in Date )
Return ScoreType
IS
LvScore ABC.LV_SCORE.SCORE%TYPE;
DVScore ABC.LV_SCORE.SCORE%TYPE;
Begin
EXECUTE IMMEDIATE
'SELECT SCORE,DVSCORE
FROM
SELECT SCORE,DVSCORE
DENSE_RANK() OVER (PARTITION BY TEST_ID ORDER BY ASOF_DT DESC) AS score_RANK
FROM ABC.LV_SCORE
WHERE TEST_ID = :x
AND ASOF_DT <= :y
) WHERE score_RANK = 1'
INTO LvScore,DVScore
USING In_tEST_ID,In_Asof;
Return ScoreType( LvScore,
DVScore);
End;It just keeps on executing for sometime and then disconnects itself from database What was the indication that told you that it disconnected? Was there a visible indication of this disconnect?
Did you get ORA-03113?
===========================================
ORA-03113: end-of-file on communication channel
Cause: The connection between Client and Server process was broken.
Action: There was a communication error that requires further investigation. First, check for network problems and review the SQL*Net setup. Also, look in the alert.log file for any errors. Finally, test to see whether the server process is dead and whether a trace file was generated at failure time. -
Getting Errors in PL/SQL - bad bind variable and encountered the symbol...
CREATE OR REPLACE TRIGGER update_QOH
AFTER INSERT ON ORDERLINE
FOR EACH ROW
DECLARE
QOH_PRODUCT PRODUCT.QOH%TYPE;
BEGIN
SELECT QOH INTO QOH_PRODUCT FROM PRODUCT WHERE :old.product_no = :new.product_no;
IF :new.QTY <= :old.QOH THEN
QOH = :old.QOH - :new.QTY
ELSE
send_email(ord_no, 'Backorder');
INSERT INTO BACKORDER (backorder_no_seq.NEXTVAL, :new.product_no, :new.qty, SYSDATE);
INSERT INTO PRODVENDOR (po_no_seq.NEXTVAL, :new.vendor_no, :new.product_no, :new.vend_qty, :new.shipping_method, SYSDATE, NULL, NULL, NULL);
END IF;
END;
Error(5,17): PLS-00049: bad bind variable 'OLD.QOH'
Error(6,7): PLS-00103: Encountered the symbol "=" when expecting one of the following: := . ( @ % ;
Error(6,9): PLS-00049: bad bind variable 'OLD.QOH'Hi,
Welcome to the forum!
I see 4 mistakes:
851543 wrote:
CREATE OR REPLACE TRIGGER update_QOH
AFTER INSERT ON ORDERLINE
FOR EACH ROW
DECLARE
QOH_PRODUCT PRODUCT.QOH%TYPE;
BEGIN
SELECT QOH INTO QOH_PRODUCT FROM PRODUCT WHERE :old.product_no = :new.product_no;
IF :new.QTY <= :old.QOH THEN
QOH = :old.QOH - :new.QTY(1) The variable qoh isn't declared.
(2) Did you mean the assignment operator, :=, rather than the equality operator, = ?
(3) An assignment statement must end with a semi-colon.
ELSE
send_email(ord_no, 'Backorder');(4) The variable ord_no isn't declared.
INSERT INTO BACKORDER (backorder_no_seq.NEXTVAL, :new.product_no, :new.qty, SYSDATE);
INSERT INTO PRODVENDOR (po_no_seq.NEXTVAL, :new.vendor_no, :new.product_no, :new.vend_qty, :new.shipping_method, SYSDATE, NULL, NULL, NULL);
END IF;
END;
/While you can reference :NEW and :OLD values in the trigger, it doesn't make any sense to reference the :OLD values. On an INSERT (which is the only time this trigger fires), all :OLD values are NULL.
>
Error(5,17): PLS-00049: bad bind variable 'OLD.QOH'
Error(6,7): PLS-00103: Encountered the symbol "=" when expecting one of the following: := . ( @ % ;
Error(6,9): PLS-00049: bad bind variable 'OLD.QOH'I don't believe the code you posted is causing these errors. Each of the errors mentioned above would cause a different message. Post the actual code and error messages.
Whenever you post a question, post all the code necessary for people to re-create the problem and test their ideas.
In this case, that means CREATE statements for any tables or sequences involved, INSERT statements for any tables that need rows (such as product) as they exist before the INSERT, some INSERT statements for orderline, and the contents of all the tables after each of those INSERTs.
Always say which version of Oracle you're using. -
Bind variable and parse_call
if i use a bind variable in sql will it reduce the values of column parse_calls in v$sqlarea?
i am using bind variable in the following statement
declare
y number;
begin
:x:=101;
select salary into y from hr.employees where employee_id=:x;
end;
but subsequent execution of the pl/sql code shows an increase in parse_call column values
why its so.
if i am using a bind variable the parse_calls should be reduced.
i am using oracle 9.2To reduce the number of parse calls, you must hold cursors open. It is important to distinguish between a hard parse, a soft parse, and a session cursor cache hit. Using bind variables helps reduce the frequency of hard parses, where among other things memory is allocated to add a SQL statement to the library cache. Effectively using the SESSION_CACHED_CURSORS parameter helps reduce the number of soft parses, which among other things involve syntax and security checking, as well as obtaining the library cache latch to search for an already parsed and optimized version of the SQL statement. I would suggest taking a look at the following link and reading down through to the section "Reducing Parse Calls with Oracle Forms":
http://download.oracle.com/docs/cd/E11882_01/server.112/e10821/memory.htm#i34608
Also, take a look at the following Oracle Magazine article, specifically the section describing Execute to Parse:
http://www.oracle.com/technology/oramag/oracle/09-sep/o59asktom.html
Now a test case to possibly see what happens:
The set up:
CREATE TABLE T1 (EMPLOYEE_ID NUMBER);
INSERT INTO T1
SELECT
ROWNUM
FROM
DUAL
CONNECT BY
LEVEL<=1000;
COMMIT;
VARIABLE X NUMBERNow the test case:
EXEC :X:=10
SELECT EMPLOYEE_ID FROM T1 WHERE EMPLOYEE_ID= :X;
EMPLOYEE_ID
10
SELECT
HASH_VALUE,
CHILD_NUMBER,
PARSE_CALLS,
EXECUTIONS
FROM
V$SQL
WHERE
SQL_TEXT='SELECT EMPLOYEE_ID FROM T1 WHERE EMPLOYEE_ID= :X';
HASH_VALUE CHILD_NUMBER PARSE_CALLS EXECUTIONS
4179534647 0 1 1
SELECT EMPLOYEE_ID FROM T1 WHERE EMPLOYEE_ID= :X;
EMPLOYEE_ID
10
SELECT
HASH_VALUE,
CHILD_NUMBER,
PARSE_CALLS,
EXECUTIONS
FROM
V$SQL
WHERE
SQL_TEXT='SELECT EMPLOYEE_ID FROM T1 WHERE EMPLOYEE_ID= :X';
HASH_VALUE CHILD_NUMBER PARSE_CALLS EXECUTIONS
4179534647 0 2 2
SELECT EMPLOYEE_ID FROM T1 WHERE EMPLOYEE_ID= :X;
EMPLOYEE_ID
10
SELECT
HASH_VALUE,
CHILD_NUMBER,
PARSE_CALLS,
EXECUTIONS
FROM
V$SQL
WHERE
SQL_TEXT='SELECT EMPLOYEE_ID FROM T1 WHERE EMPLOYEE_ID= :X';
HASH_VALUE CHILD_NUMBER PARSE_CALLS EXECUTIONS
4179534647 0 3 3
SELECT EMPLOYEE_ID FROM T1 WHERE EMPLOYEE_ID= :X;
EMPLOYEE_ID
10
SELECT
HASH_VALUE,
CHILD_NUMBER,
PARSE_CALLS,
EXECUTIONS
FROM
V$SQL
WHERE
SQL_TEXT='SELECT EMPLOYEE_ID FROM T1 WHERE EMPLOYEE_ID= :X';
HASH_VALUE CHILD_NUMBER PARSE_CALLS EXECUTIONS
4179534647 0 4 4
COLUMN NAME FORMAT A27
SELECT
SN.NAME,
MS.VALUE
FROM
V$MYSTAT MS,
V$STATNAME SN
WHERE
MS.STATISTIC#=SN.STATISTIC#
AND SN.NAME LIKE 'session cursor cache%';
NAME VALUE
session cursor cache hits 1111
session cursor cache count 148
SELECT EMPLOYEE_ID FROM T1 WHERE EMPLOYEE_ID= :X;
EMPLOYEE_ID
10
SELECT
SN.NAME,
MS.VALUE
FROM
V$MYSTAT MS,
V$STATNAME SN
WHERE
MS.STATISTIC#=SN.STATISTIC#
AND SN.NAME LIKE 'session cursor cache%';
NAME VALUE
session cursor cache hits 1112
session cursor cache count 149
EXEC :X:=20
SELECT
SN.NAME,
MS.VALUE
FROM
V$MYSTAT MS,
V$STATNAME SN
WHERE
MS.STATISTIC#=SN.STATISTIC#
AND SN.NAME LIKE 'session cursor cache%';
NAME VALUE
session cursor cache hits 1112
session cursor cache count 149
SELECT EMPLOYEE_ID FROM T1 WHERE EMPLOYEE_ID= :X;
EMPLOYEE_ID
20
SELECT
SN.NAME,
MS.VALUE
FROM
V$MYSTAT MS,
V$STATNAME SN
WHERE
MS.STATISTIC#=SN.STATISTIC#
AND SN.NAME LIKE 'session cursor cache%';
NAME VALUE
session cursor cache hits 1114
session cursor cache count 150
EXEC :X:=30
SELECT EMPLOYEE_ID FROM T1 WHERE EMPLOYEE_ID= :X;
EMPLOYEE_ID
30
SELECT
SN.NAME,
MS.VALUE
FROM
V$MYSTAT MS,
V$STATNAME SN
WHERE
MS.STATISTIC#=SN.STATISTIC#
AND SN.NAME LIKE 'session cursor cache%';
NAME VALUE
session cursor cache hits 1116
session cursor cache count 150
SELECT
HASH_VALUE,
CHILD_NUMBER,
PARSE_CALLS,
EXECUTIONS
FROM
V$SQL
WHERE
SQL_TEXT='SELECT EMPLOYEE_ID FROM T1 WHERE EMPLOYEE_ID= :X';
HASH_VALUE CHILD_NUMBER PARSE_CALLS EXECUTIONS
4179534647 0 7 7In the above, the first execution caused a hard parse, which is not obvious from the V$SQL output. The second execution was a soft parse, as was the third. The fourth execution was satisfied by the session cursor cache (unfortunately, I did not capture the number of session cursor cache hits before the fourth execution). After the seventh execution, V$SQL still shows the number of PARSE_CALLS is equal to the number of EXECUTIONS, but the last four executions were satisfied without obtaining the library cache latch as would be required by a soft parse.
Charles Hooper
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc. -
Stuck with showDetails, View Bind Variable and I18N
Hi all,
I have a very weird situation.
I am creating a view object with a bind variable.
I then create a JSF page, and drag a table based on the view to the screen.
I now drag the "ExecuteWithParam" action to the screen, and create it as a parameterized form.
This works fine - english or hebrew (in my case).
I know surround the parameter form with a showDetails component.
I enter values to the parameter, and click on the hide link. I click on the show link - all I get is a list of ? marks for hebrew characters, but the correct characters for english characters.
Everything works fine if the showDetails component contains regular input texts, or input texts that show/edit values from the view objects (but not bind variables).
If I put the bind variable on the screen (outside the showDetails), in addition to putting the form inside the showDetails component, then the following occurs:
1. Changes in the param form are ignored if I click on the show/hide link.
2. Hebrew works when I edit the input text that is outside the showDetails. This updates the value in the show details, and it displays hebrew correctly.
Very odd. Any tips?First of all i would like to thank you for replying to my thread.
Secondly, i would like to inform you that the example that i have provided is just for REPRODUCTION purposes.
The real scenario has to do with setting the where clause with the authenticated user so that the view will query for data only associated with the authenticated user.
The only way to overcome this behaviour is to include a view action (namedWhereClause in the page definition)
However, this is not how i want to implement this. This was working properly in 10g -
Using Bind Variables in Parameter Form's Query
I want to use bind variables in the query of Parameter form. But
it does not allows. What is the other way out. The structure of
my Parameter form is as under:
State:
Customer:
Now I want that I want to list only those customer in the
Customer LOV which belongs to the selected state.
Thanks.
Muhammad NadeemCan we just link to an oracle form using a url still as we can with reports? I've built a report that requires the user to select from a dynamic list as well, and I know how to do this through forms, but can I simply call the form from a webpage?
-
Query With Bind Variables and %
Hi,
Quick question. I am using ADF BC on Jdev 11 with a MySQL Database.
I've used Bind Variables in the past (I have to use a Question Mark [?]) and have had no problem.
Now I want to do something like this in my where clause:
SELECT TempTable.ABC FROM TempTable
WHERE ABC LIKE ?%
When I try and create the View Object with that query it is complaining about the %.
Am I required to append the % in my bind variable? Any examples I have seen of this, people are doing something like :p_id = 'Jo%'Try
like ? || '%' -
How to update bind variable and restrict values in a Model Driven LOV?
Hi Guys,
Using JDev 11.1.1.2.0
I've recreated an excellent Frank Nimphius article about restricting values derived from a model driven LOV (http://www.oracle.com/technetwork/developer-tools/adf/learnmore/44-restrict-lov-169186.pdf)
But my bind variable isn't updating. Deleting the bind variable gets me the entire LOV. Activate the code below and insert a bind variable into the where clause like Frank says and I get nothing back. Bind variable is blank. Any ideas? Code wasn't supplied with the article. It seems simple enough but the bind variable isn't updating in the SQL, even though the updated value shows up here...
public void onLovLaunch(LaunchPopupEvent launchPopupEvent)
BindingContext bctx = BindingContext.getCurrent();
BindingContainer bindings = bctx.getCurrentBindingsEntry();
FacesCtrlLOVBinding lov = (FacesCtrlLOVBinding)bindings.get("DepartmentId");
lov.getListIterBinding().getViewObject().setNamedWhereClauseParam("deptId","60");
System.out.println("lov name: " + lov.getName().toString());
System.out.println("lov Param Attrs: " + lov.getListIterBinding().getViewObject().getNamedWhereClauseParams().getAttribute("deptId").toString());
System.out.println("lov View Object: " + lov.getListIterBinding().getViewObject().getName().toString());
System.out.println("lov IterBinding: " + lov.getListIterBinding().getName().toString());
}Gets me ...
lov name: DepartmentId
lov Param Attrs: 60
lov View Object: _LOCAL_VIEW_USAGE_lov_model_queries_EmployeesView_DepartmentsView
lov IterBinding: DepartmentIdList_2That's a good idea, but it's still not working. Here is how I implemented it. It might be different from your suggestion as I'm still pretty new to this.
I have a recursive tree table. You select a node. You then click a button which calls the listener below. "findParents" is a method call to the AppModuleImpl class and it finds all parent nodes of your selection. "restrictPartBomLOV", also of the AppModuleImpl class, then modifies the model driven lists' View Object (partBomLOV) to exclude those parent node values.
The resulting model driven LOV on the popup should be updated, yeah? But it still isn't udpating. If I manually type in the updated Where clause in PartBomLOV.xml query tab, it works, but it doesn't programmatically.
public void insertPopupFetchListener(PopupFetchEvent popupFetchEvent)
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("findParents");
parents = (List)operationBinding.execute();
operationBinding = bindings.getOperationBinding("restrictPartBomLOV");
operationBinding.execute();
public void restrictPartBomLOV(List parents)
ViewObjectImpl vo = getPartBomLOV();
String wcl = "";
Object[] p = parents.toArray();
for(int i = 0; i < p.length; i++)
if (i == 0)
wcl = wcl + "PNUM <> '" + p.toString() + "'";
else
wcl = wcl + "AND PNUM <> '" + p[i].toString() + "'";
vo.setWhereClause(wcl);
System.out.println(vo.getWhereClause().toString());
vo.executeQuery();
Edited by: LovettWB on Nov 11, 2010 11:23 PM -
ADF Groovy Expression with bind variable and ResourceBundle
Now I have ViewObject which have WHERE clause with bind variable.
This bind variable is for language. Within bind variable I can change Value Type to Expression and into Value: I put +(ResourceBundle.getBundle("model.ModelBundle")).getString("language")+.
Now if I run Oracle Business Component Browser (on AppModule) this works. In my ModelBundle.properties there is language=1 name-value pair. And with different locale I have different language number.
Now if I put that ViewObject on one JSF, this bind variable expression does not work any more. Error:
*oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.util.MissingResourceException, msg=Can't find bundle for base name model.ModelBundle, locale my_locale*
Any ideas?
10x
ZmedaThe most wierd thing is that, if I make ViewObjectImpl and insert this method
public String getLanguage() {
return (ResourceBundle.getBundle("model.ModelBundle")).getString("language");
and call it in Bind Variable Expression Value: viewObject.getLanguage()
IT WORKS!
But why with groovy expression it does not work?
Zmeda
Maybe you are looking for
-
How do I change the order of songs?
Hi, I have iTunes 9.0 (70) and I have my songs chosen in order by artist. I forgot how to change the order of songs. I tried switching the songs categorized by the name of the song. That didn't work. Please let me know how to drag and drop a song cor
-
No thumbnails for .EPS files in Finder Cover Flow?
I found a plugin for this: http://www.eternalstorms.at/staff/index.html It worked for one day, but today I can no longer preview .eps files. Any ideas?
-
Dear all i am a ABAPer,as abap mapping is done, i am about to test ABAP proxy, my XI have two client(100, 200) for proxy. but it is not easy to understand ABAP proxy for me, even though i've read relevant to ABAP proxy on this site. and i could not f
-
IPhone 3GS Cracks - CARPHONEWAREHOUSE UK
I bought my 3GS from Carphonewarehouse on the 26th of February. At the time I didn't take insurance out with them as I have heard bad things about the Carphonewarehouses insurance policy for iPhones. I have just noticed small cracks near the charging
-
http://www.boygeniusreport.com/2010/07/01/exclusive-conversation-with-steve-jobs -on-the-iphone-4-antenna-problems/