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 you
I 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
Similar Messages
-
How to set JRE 1.5.0_07 as default Java from the cmd line in Windows
Hi All,
We are currently in the process of upgrading our company to IE8. As MS JVM is incompatible we need to remove it.
However, once we have done this JRE 1.5.0_07 is not the default version of Java any more for IE8.
My question is - Is there a command line switch to set set JRE 1.5.0_07 as default Java from the cmd line in Windows. ie the setting in Java Control panel where you would tick Internet Explorer?
Thanks in advance!This is to confirm a similar issue. Here is the scenario:
We are currently using IE 6 and looking forward to upgrade to IE 8. Our current Java version is: J2RE 1.5.0_16.
When updating from IE 6 to IE 8 with J2RE 1.5.0_16 on a test workstation, we get the following error from the Java testing website (http://www.java.com/en/download/help/testvm.xml): "load: class testvm2/Main.class not found."
Workaround :
-> Change Java JRE Network Settings in Control Panel to "User proxy server : xxx.xxx.xxx.xxx:xx"
We are using an autoconfig.pac file and it seems IE8 can't parse the settings to JRE to go through the proxy.
Please advise if you have a fix for the autoconfig.pac file. -
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 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 -
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 -
I only recently learned/read about SharePoint's JavaScript Client Object Model. I'm reading online trying to figure this out but not having much luck.
On newform.aspx (and dispform.aspx) I want to get the
current list,
the last item created, and it's attachments. I now the CAML query I need to get the last item created, but first I have to get the current list and I am not sure how to do that.
I tried this but it returns null:
SP.ListOperation.Selection.getSelectedList()Hi,
For your issue, you can get the list name from the new form url and retrieve the list last created item :
https://social.msdn.microsoft.com/Forums/office/en-US/b90a64f8-2255-41b0-9d91-78335dd4a4cf/get-list-name-from-list-url-through-javascript?forum=sharepointdevelopmentprevious
http://msdn.microsoft.com/en-us/library/office/hh185007(v=office.14).aspx
Best Regards,
Eric
Eric Tao
TechNet Community Support -
How to set a sound when a email will print from the printer.
I would like to set a sound or a big bip when a email come throught the printer via hpeprint
You can send the values in query string and access them from
your flex application. Below is the URL to the page describing how
to access query string parameters in Flex application
http://livedocs.adobe.com/labs/flex3/html/deep_linking_5.html#245869
Hope this helps. -
How to set up Hp office jet 6600 to print from the iPad air? In a wifi setting.
How can I print from iPad air to the HP office jet 6600?
Hi Big-apple
Check out the link below....
http://www8.hp.com/ie/en/support-topics/mobile-printing/how-to-print-mobile-devices-ipad-iphone.html
Although I am an HP employee, I am speaking for myself and not for HP.
Twitter: @Ciara_B_HP -
How do you call a function in an attached MovieClip from the current MovieClip?
Hi there,
I have this MovieClip A (converted as a symbol) and put in my
main MovieClip B using attachMovie() , and I am wondering how I can
call a function defined in A from within B.
Is it possible?
ThanksHi kglad,
yes, I did the attachMovie of the symbol B and it seems like
none of the ActionScript written in B was not carried over.
This is how I built B into a symbol :
(1) Two layers ( one for the ActionScript only, the other for
the Components)
(2) I defined the functions to be called remotely by A in the
ActionScript layer
(3) I selected all the components in the Components Layer and
did a Convert To Symbol
(4) I added the Symbol into A's Library
(5) I used attachMovie to instantiate the Symbol of B
I must have missed out something somewhere
Thanks -
How to set ORACLE_HOME environment variables in win 2003
Can anyone tell me how to set ORACLE_HOME environment variables in Win2003
Please tell me the significance of that also.It will be really helpful if u can help me out from Path variable seting of JAVA SDK also... Thanks in advance...hi
use this code IN FORMS60 variable in Regedit
\\server\DATA\store\Forms;
Rizwan -
How to pass bind variable into oracle reports 6i - Parameter form
Hello All,
I want to pass bind variable into Oracle Reports 6I - Parameters.
I have tried out that but got the below error :-
rep-0781 : Bind variables are not allowed in the select statement
Kindly help me is there any option which allow me to pass bind variables into Oracle reports 6I.
Thanks
HARSH SHAHHi,
may be its not possible to use :P_PARAM1 in user parameter of oracle 6i reports
but u can full fill user requirement using oracle forms
create a form as like as report parameter window
then create parameter list and run report
PROCEDURE Run_Emp_Report IS
pl_id ParamList;
BEGIN
pl_id := Get_Parameter_List('tmpdata');
IF NOT Id_Null(pl_id) THEN
Destroy_Parameter_List( pl_id );
END IF;
pl_id := Create_Parameter_List('tmpdata');
Add_Parameter(pl_id, 'PARAMFORM', TEXT_PARAMETER, 'NO');
Run_Product(REPORTS, 'empreport', SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);
END;
thanks
mostafiz mitul
Dhaka Bangladesh -
How to pass a jsp variable into javascript??
<p><%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<p><%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<p><html>
<p><c:set var="binrmapi" value="http://localhost/paas-api/bingorooms.action;jsessionid=XXXXXX?userId=TEST2&sessionId=1&key=1" />
<p><c:import var="testbinrm" url="${fn:replace(binrmapi, 'XXXXXX', jsessionid)}"/>
<p><c:set var="tuples" value="${fn:split(testbinrm, '><')}" />
<p>Time until next game
<p><c:forEach var="tuple" items="${tuples}">
<p><c:if test="${fn:contains(tuple, 'row ')}">
<p> <p><code>
<p> <c:set var="values" value="${fn:split(tuple, '=\"')}" />
<p> <font color="blue">
<p> <c:out value="${values[17]}" />
<p><c:set var="remainingtime" value="${values[17]}" />
<p> </font>
<p> </code>
<p></c:if>
<p></c:forEach>
<p><form name="counter"><input type="text" size="8" name="d2"></form>
<p><script>
<p>var milisec=0
<p>var seconds=eval("document.myForm.remaining").value;
<p>function display(){
<p> if (milisec<=0){
<p> milisec=9
<p> seconds-=1
<p>}
<p>if (seconds<=-1){
<p> milisec=0
<p> seconds+=1
<p> }
<br>else
<p> milisec-=1
<p> document.counter.d2.value=seconds+"."+milisec
setTimeout("display()",100)
<p>}
<p>display()
<p></script>
<p></body>
<p></html>
<p>This is my code that i was working on, in the jsp part of the script, i get a api call and save a value of time in the variable remainingtime.. and in the javascript, i try to have a countdown clock counting down the remaining time.. but i guess it doesnt work.. how can i get that working? thanks alot
Message was edited by:
hamham3001
Message was edited by:
hamham3001
Message was edited by:
hamham3001
Message was edited by:
hamham3001Re: How to pass a jsp variable into javascript??Here is the sameple one, hope it will solves your problem.
<html>
<body>
<form name=f>
<%!
String str = "A String"
%>
<script>
var avariable = <%=str%>
<script>
</form>
</body>
</html>
Let me know if you face any problem -
How to compute a bind variable from another?
I am trying to create a View Criteria that has the following View Object Where Clause:
(UPPER(LOCALE) = UPPER(:LocaleCode) ) OR (UPPER(LOCALE) = UPPER(SUBSTR(:LocaleCode,1,2)))
In other words, I have a bind variable called LocaleCode, and I want to return all rows that either match the LocaleCode exactly (first part of the Where Clause), or match the first 2 characters of the LocaleCode value (second part of Where Clause).
I can't seem to figure out any way to do this straight-up using the UI for a View Criteria - there doesn't seem to be a "substring" operator when adding an item to the clause.
So, my thought was to create a second bind variable (e.g. "LocaleCode2") that was computed from the first bind variable (LocaleCode). This new bind variable would contain the first 2 characters from LocaleCode. I could then have the Where Clause be:
(UPPER(LOCALE) = UPPER(:LocaleCode) ) OR (UPPER(LOCALE) = UPPER(:LocaleCode2))
My problem is that when I define the LocaleCode2 bind variable, I see the option to set it to an Expression, but I can't seem to figure out how to build an expression that refers to another bind variable.
So, my questions are:
1. How can I have a bind variable expression refer to another bind variable (e.g. "LocaleCode2 = substring(:LocaleCode,1,2)" or something)?
2. Is there a better way to do this altogether? (What I'm trying to do is set up a view criteria for a lookup table that will return rows that match a passed-in locale exactly (language and country), or just on the 'language' part (first 2 characters).)
Thanks!I 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 -
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();
Maybe you are looking for
-
after trying to update my iphone 5 to ios 7 via itunes my phone will not work at all, all i have is an itunes logo and cable logo on the screen HELP!!!!
-
Javascript and Struts HTML problem
Hi all, I write the following script in my jsp page, but this one does not produce the output at all : <script type="text/javascript"> document.write("<input type="button" value='<bean:message key="btn.show"/>' onclick='onShowClick(this.form,"<b
-
Late 2013 15" Retina Macbook Pro - wifi connection timeout with one router
Hi, I've recently purchased a new Macbook Pro retina 15 inch late 2013 model. Everything is fine at home, but at work I cannot connect to one wireless router (Netgear WAG102). The computer tries to connect but I get a connection timeout error after a
-
how to restart a grace period on MDS9506? I have be late :(, the reseller has my deceive. If I upgrade SAN-OS from 2.1 to 3.x will the counter of grace period start from the begining?
-
How to refresh schema attached with DB adaptor
Hi all, I am facing a problem. Currently my database schema is not fixed. So if I modify the table structure (add/delete column) then how I can reflect the changes in the XSD attached to this DB Adaptor? Thanks.