JDeveloper and ADF


Bind variable issue of a VO when created by extending another VO


Hi, expertsIn jdev 12.1.3. I have created a VO by extending another VO which have some bind variables for this source VO's query.Then in this newly created VO's query attributes page, I can see these inherited Bind Variables been showed,and they can be overriden,but cann't be deleted.and I didn't use these variables in this VO's query where clause yet. Then, when run the APP in the Model Tester. errors will raised like :
...
Caused by: java.sql.SQLException: Attempt to set a parameter name that does not occur in the SQL:
How to fix it ?Thanks!
You have a required bind parameter which is not appearing in Query. There are two rules for bind parameters required property1. If any bind parameter is appearing in direct sql query that must be marked required. Otherwise you will get error "Missing in or out parameter ..."2. If any bind parameter is not appearing in direct sql query that must NOT be marked required. Otherwise you will get error "Attempt to set a parameter name that does not occur in the SQL" In short bind variables which are appearing in viecriteria should be optional and which are for direct sql query should be required. With that if you are not able to delete bind variable, you should be able to make it optional (not required) at least. Can you check? ThanksSanjeev
Hi,SanjeevI checked the Bind Variables setting agian. but cannot find the way to make it optional. see these images:The setting page for the source VO's Bind Variable: The setting page for the inherited VO's Bind Variable: Thanks!
In 12c required (Direct query related) and optional (viewCriteria related) bind variables got created in two different tab. In query tab, which you are showing you can only create required bind variable. You need to select View criteria tab and then you can add that optional bind variable.  To create optional bind parameter select view-criteria tab. If there is no criteria you will not see section to add bind variable. You can add a dummy criteria. Then you will see section to add bind parameter. Add a bind parameter p_Status. Alternatively directly go to VO.xml and add below xml directly above SQLQuery tag.  <Variable    Name="p_Status"    Kind="viewcriteria"    Type="java.lang.String"/> (Hopefully you don't have VOImpl otherwise you will require to generate getters/setters their as well. I believe at runtime your definition of p_Status should take control as you have overridden. If this approach does not work, there is on alternative solution that you put in your query a clause as(:p_Status is null or :p_Status = :p_Status) That way you will have p_Status in you query and it effect will be nothing. ThanksSanjeev
Hi,SanjeevI checked it the View Criteria tab for VO and do find the way to set validation option :Thank you much!
Hi, Sanjeev:I have another related question about Bind variable and View Criteria issue, the use case is as following:1. There is a self-referenced table (ie. task records were structured by master-detail relationships in one table/entity), and the records should be filtered for users according to their profiles. so I created a VO1 with some Bind Variables which is related with users;This is the basic filter condition for the VO1, and there may be some other furthur filter conditions append to it. 2.Then in one of  cases (maybe have other use cases)I need to filter all descendant rows of one specific id of this VO1.  and this filter condition should be combined with the previous ones. so I think it's a situation to create a View Criteria for this VO1. But I cann't find a way to create a View Criteria something like this:
SELECT e.id, e.title FROM e START WITH e.id =:p_id CONNECT BY e.f_id = prior e.id
Where p_id is the Bind Variable for query of VO2 .  3.So  I created a different VO2 which is based on the above query conditions. and create a View Link between VO1,VO2so that  I can 'see' the VO2 when create View Criteria in VO1. 4.Then in VO1, I tried to create a View Criteria, and I can choose the name of VO2 in the list of Attribute in the Edit ViewCriteria window, and more on... the auto-generated where clause will be something like this:
..the original basic where clause for VO1
AND ((EXIST(SELECT 1 FROM VO2...WHERE id = :p_f_id)))
Where p_f_id is the Bind Variable for ViewCriteria. --I hope to choose/use the above p_id Bind Variable, so I needn't have to create one more Bind variable, but find no way.  5. Run it in Model Tester, it will ask for entering p_f_id of Bind Variable of ViewCriteria , and will show a blank window ask for entering p_id of Bind Variable of VO2, and the Model Tester will be dead.  In conclusion, I mean, In some cases I cannot create a specific ViewCriteria( query where clause), and the Bind Variable mechanisim seems out of work. Is there a way to fullfill the above use case? Thanks a lot!

Related Links

Using ajax to show info? setPropertyListener
Is it possible to create view link on programatic VOs
Justify property in ADF
How to extend ReceiveItemsTxnVOHelper in 11i OA Framework customization
Problem in deploying ADF application
Jdeveloper 11g project set-up question
Need a Simple Example Program That Uses Bounded Task Flow Template
How to set up fixed height in ADF layout component
ADF 11g + View controler resource bundle
How to deploy ADF-BC (SDO) with ANT
deploying from jdeveloper without data sources
Opening new nonmodal window from action of commandImageLinkCommandButton
ADF Application creating multiple BPEL processes
Printable page and showPrintablePageBehavior
Emailable Page
How to capture a data change event in Swing/ADF application?

Categories

ORACLE DEV
Java
Globalization Support
Sample Code
Java and JavaScript in...
Ultra Search
OO4O and Wizards [ARCH...
Oracle Help Technologies
Integration and Events
Java - JDBC Archive
Healthcare
RAC, ASM & Clusterware...
Content Services
Export/Import/SQL Load...
Instant Client
Berkeley DB Family
Berkeley DB High Avail...
Backup & Recovery (Kor...
ODBC (Korean)
XML Gateway (Korean)
LCM: Maintenance Wizard
Essbase
Technology - General D...
SOA Suite and OC4J 11g...
Smart Space
WebLogic Server - Clus...
Packaged Applications
协作套件
weblogic.developer.int...
weblogic.developer.int...
weblogic.developer.int...
bea.workshop.historica...
WebLogic Portal Newsgr...
weblogic.developer.int...
ALUI CodeShare
Pages
Industries
Primavera Contract Man...
Open Source (Chinese)
2007 BEA TMT创新大赛
WebLogic Server - Diag...
WebLogic Server - JMS
Primavera P3 User Comm...
Java APIs
Java EE (Java Enterpri...
Collections: Lists, Se...
Java Speech [ARCHIVE]
Naming and Directory (...
Storage
JavaBeans [ARCHIVE]
Solaris 11
HotSpot FAQs [ARCHIVE]
Java ME Embedded
Sun ONE Unified Develo...
NoSQL Database
DTrace for Oracle Linu...
ADF Mobile Preview
Oracle JRockit (Japanese)
Fusion Applications
Oracle FLEXCUBE Core B...
Oracle Social Network
Oracle Coherence (MOSC...
Oracle Mobile
Resell
ECOUG中文论坛
Sweden Eloqua User Group
E10
Eloqua Users with MS C...
SFDC Integration
Eloqua Experience 2013
Eloqua 10 Product Docu...
Oracle Marketing Cloud...
Java Lambda MOOC
SPARC Servers
...
Oracle Supply Chain Ma...
Independent Oracle Use...
ilOUG - Israel Oracle ...
OTN Tour Latin America...
Eclipse開発ツール
NightHacking
Oracle Partner Acceler...
Service Supply Chain
Containers, Docker, an...
APEX Gruppe
Oracle Identity Cloud ...
North Central Oracle A...
Cúpula Virtual de Tecn...
Data Mining
Order Management
Sales and Marketing
Business Intelligence ...
Application Server - G...
Data Integrator
Enterprise 2.0
weblogic.developer.int...
jrockit.developer.inte...
RTSJ (Real-Time Specif...
Other Sun Hardware
.NET (Japanese)
English
Desktop

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile