[ADF, JDev 12.1.3] To run a query on the fly is always necessary to define a VO? How to get the Id of the last line inserted in a VO...
Hallo,
Sometimes, in the code for my application, I need to run smaller queries to retrieve data from the database.
I wonder if for these queries, it is necessary to define a View object or if I can avoid this for example creation and execution of a VO on the fly.
In this case I would not define a VO, given that queries will be never used to display data, but only for the internal logic.
A use case, I want to solve it next.
I would like to create a function to be used after validation for last inserted record by a user in a TableVO.
For example
Select the Id of the Table where UserId =? and Type =?
The query should be run in a managed bean...
public String okButton_action() {} |
OperationBinding operationBinding is BindingsUtils.getBindings () .getOperationBinding ("Commit");.
Object result = operationBinding.execute ();
If (! operationBinding.getErrors () .isEmpty ()) {}
Error handling
return;
}
Here, I need to:
1. run the query to get the Id of the last inserted record
2 call the setCurrentRowWithKey on the TableVO to update the display
and get the Id (identity/auto-increment) than the database
assigned to the field
return "return"; } |
If I can create a function that creates / runs the VO on the fly and return the value ID... It is best to create it in a class of public services or in the implementation class TableVO?
I need to get the Id of the last line inserted since the ADF is not able to manage MS SQL Server identity fields (it seems that REFRESH AFTER INSERT cannot be used with non - Oracle DB).
Any notice will be welocome.
Thank you
Federico
The query should be run in a managed bean...
Much better to execute the query in the template project.
Example query: http://amit-adf-work.blogspot.com/2013/09/how-to-execute-sql-using-adf-application.html
If I can create a function that creates / runs the VO on the fly and return the value ID... It is best to create it in a class of public services or in the implementation class TableVO?
If you have the function that accepts the SQL as a parameter, then this should go to class util.
Dario
Tags: Java
Similar Questions
-
I have trouble to get past step 1 in Lightroom getting up and running. Have spent the last 5 hours on it and very little hair left. Anyone out there to help?
Hi Craigb89524984,
I saw your Adobe ID (email address) you used to post here on the forums and found that a subscription to creative photography Cloud inscribed on it.
We will be happy to help you, but before that, there are a few information such as:
What is the exact error code/message, if you found one? Please attach a screenshot. See, FAQ: how to capture and after a video screen or blow?
What operating system you are using with his version?
Until then, check out the links below:
Download and install Adobe Lightroom CC
Error in downloading, installing or updating Adobe Creative Cloud applications
Troubleshoot Adobe Creative cloud download, install and update questions
You can also analyze the log files to find out the root cause of the problem: Troubleshooting Adobe Creative Cloud install problems with log files
-
Error running webworks create from the command line in Beta 2 of Webworks
Hello
I am creating a project of cordova webworks from the command line. I run the following command:
WebWorks create f:\devroot\NEXT_GEN\MobileApp\WebWorks2\MyApp com.joe.myApp MyApp
However, it fails with the following error message:
{[Error: check incorrect header] errno:-3, code: "Z_DATA_ERROR"}
It seems to me that its attempts to download a tar.gzip drop of github (url below), but this file does not exist:
URL: https://git-wip-us.apache.org/repos/asf?p=cordova-app-hello-world.git;a=snapshot;h=v2.0.0.54;sf=tgz
So I'm not sure that my project directory is set up correctly. What is contained in this folder which its trying to find in the remote repository and is it relevant to my application?
I can see my project directory in the space provided. It contains the following folders:
".cordova', 'merge', 'platforms', 'plugins' and 'www '.
".cordova" contains a subfolder 'hooks' which, in turn, contains about 24 cases being with 'after' or 'before' (e.g.after_build, before_build), it seems to be empty. It also contains a config.json that contains the attributes id and name of the project. Do any other necessary information in config.json?
All other folders are empty.
Is any other thing missing? should there be a config.xml file created for me in the directory "www" for example?
Just add a config.xml file myself? Y at - it information about the correct structure for the config.xml file in webworks 2.0?
Thank you
Joe
Hey Joe,
So, just to confirm, HOST = "C:\". "and USERPROFILE ="C:\Users\
? This is useful. Normally Windows machines do not have a HOME environment variable.
We must ensure that these files copied to %USERPROFILE%\.cordova\lib\www\cordova\v2.0.0.54
Please try this patch to webworks-cli/lib/utils/utils.js:
findHomePath : function () { return process.env[(process.platform === 'win32') ? 'USERPROFILE' : 'HOME']; },
-
Is there a way of only not to run a query on the rendering of the table?
Is there a way of only not to run a query associated with an af:table on the rendering of the table on the page?
I want to this control programmatically.
Examples will be very appreciated.Yes, there is.
{: identifier of the thread = 2362354}
-
Hallo,
in a page of my web application, I need to add a button that when clicked shows a PDF in a pop-up window which enables the user to download on the PC.
To get the file PDF, the application must call a Web service method that returns the contents of the file encoded in base64 in the body of the response. If the request does not get the file, but a stream that must be dealt with to get the file.
Could you kindly advice me a good approach/tutorial to create this feature?
Thank you and best regards,
Federico
Call your servlet ws, then convert bytes of payload in base64 and returns this as a binary stream.
Client side, you can use af:inlineFrame component inside the af: popup to call your servlet.
Here is example of servlet/inlineFrame part: https://technology.amis.nl/2011/07/28/adf-11g-show-pdf-in-a-popup/
Dario
-
Hallo,
I would like to know if it is possible (instead of using a ToolTip) to show the function/meaning of the inputText inside.
City
It's the city where works the epmployee Thank you
Federico
You can use the property "placeholder."
Dario
-
Running a script from the command line
Hi all
First of all, I'd like to say I'm just starting ORACLE 11 g with no prior experience of the database. I currently lectures once a week. However, I am stuck with a problem. I am trying to access my database of the United of the House so I can do some work, apparently I can only access it via the command prompt (which is good for me) I began by downloading a shell www.putty.org secure and I managed to connect to my database of test of the University from my laptop at home. However, I have a createHR.sql of script file that is stored in my C:\ORACLE directory which I try to access in order to load my test tables and start practicing with them.
use command line
SQL > C:\ORACLE\createHr and I get SP2-0310: unable to connect to the file "C:\ORACLE\create HR.sql".
normally, this should load and run the script - as with the browser method guests will get the tables is created and the test data.
I am now officially frustrated that I can't get any done practice, offered any help will be welcome.
Concerning
Claude
Published by: 891128 October 12, 2011 09:33
Published by: 891128 October 12, 2011 09:41
Published by: 891128 October 12, 2011 09:44891128 wrote:
I started by downloading a shell www.putty.org secure and I managed to connect to my database of test of the University from my laptop at home.
However, I have a createHR.sql of script file that is stored in my phonebook C:\ORACLEThese two sentences above are essential. If I had to bet a directory C:\ORACLE assumption is located locally on your laptop. However, it seems you have done a SSH connection to your server and connected to the database using SQL * more customer on the server. The client on the server has no idea or access to files on your machine.
You must open the script on your laptop and copy / paste into your SQL SSH * more session or you will need to find a way to copy this script on the server, so you can run it.
I hope this helps!
-
Type characters appears seconds later (for example to provide these details). Web sites load slowly.
Start Firefox in Safe Mode {web link} by holding down the < shift >
(Mac options) key and then from Firefox. Is always the problem? -
I can't find the download of Java to install so I can run Photoshop again. The last update to my OS disabled.
Install a new OS, or by reinstalling the current always removes Apple Java 6. Installation will help any Java of Oracle 8 (ongoing). You need to reinstall Apple Java 6.
-
How to get the query execution time without running...?
Hello
I had one condition... as follows...
I had 3 sql statements. I need to run only sql what runtime is very less.
Can someone help me, how to get the time query and run this query without using explain plan... ?
Thank you
RajeshI can't think in any way at all to get the query execution time without running the query.
You might get an estimate ( approximation ) If you are using explain plan.
But you have governed to explain plan for a reason, so I can't help you.
Why you do not want to use don't explain plan? -
Run the command line script AfterFX
Hi all
I'm trying to run a script from the command line AfterFX.exe and I get the message: "unable to run the script at line 1. Syntax error.
If I run the same Script AE editor script file, it works perfectly
Here is the command line that I use:
"C:\Program Files\Adobe\Adobe after effects CS6\Support Files\AfterFX.exe" indefinite display - noui s 'D:\Product\Watermark\Rendering\WatermarkedSecuritySample.jsx '.
Someone has an idea of what may cause this error? I tried to run the script directly from the command line like
"C:\Program Files\Adobe\Adobe after effects CS6\Support Files\AfterFX.exe" indefinite display - noui s 'alert('1') '.
and it works very well for small script but mine is way big to do
As you can probably guess with the 'watermark' and 'Security' in the name of the file, I can't post here, the script file, all I can say is that line 1 is:
{
projectName = "D:\\Product\\WatermarkTemplate.aep"; var
I tried to replace the entire script 'alert('1')'; and it causes the same error when running it from the command line
Also, if anyone knows where I can find the command line arguments AfterFX.exe description, I'd be very happy... everybody talks about aerender.exe, but I need these options to AfterFX.exe
Thanks for your help
Have you tried using "-r" instead of "-s"?
("-s" argument is a script; and to "-r" argument is a path to the script)
-
Running jspx page having the ADF DVT inside bar chart
In Jdev, I am able to create a page jspx with ADF DVT associated histogram in it, also a bean of support and is successfully able to run the jspx page.
Now, I'll have my web application (no ADF in service) running on WLS. I want to deploy a graphic page jspx with ADF DVT bar inside the server where my web application is running. What are the steps, configurations and libraries that I need to make it work?
Any document relating to this will be very useful.http://radalcove.com/blog/?p=48
or
http://download.Oracle.com/docs/CD/E15523_01/Web.1111/b31974/deployment_topics.htm#CHDJJDDG -
ADF how can I run a parameter query when the page is displayed
Hello
I use web ADF 11 g
I need to run a parameter query when the page is displayed
Thank youprotected DCIteratorBinding getItrtBindings (String binding) {}
DCIteratorBinding outIterBinding is getBindingsForDCB () .findIteratorBinding (binding);.
Return outIterBinding;
}public DCBindingContainer getBindingsForDCB() {}
If (this.bindings == null) {}
FacesContext fc = FacesContext.getCurrentInstance ();
This.Bindings = (DCBindingContainer) fc.getApplication (.evaluateExpressionGet(fc,"#{bindings}",DCBindingContainer.class));
}
return (DCBindingContainer) this.bindings;
}BindingContainer links protected;
public BindingContainer {} getBindings()
Return this.bindings;
}public void setBindings (links BindingContainer) {}
This.Bindings = links;
} -
Some columns of the values of the selected line returns NULL in the table of the adf.
Hello..
My version of jdev 11.1.1.5.0
I have a vision with some columns. This view is mapped to a table of adf with some of the displayed columns. My task is to get the column values selected line (including the values of the column not displayed).
But I'm certain values such as null, although there are values present when I run the query from the view.
My code:
DCIteratorBinding tableVO = ADFUtils.findIterator ("myVO");
ViewObject voTableData = tableVO.getViewObject ();
Line rowSelected = voTableData.getCurrentRow ();
+ / / codeto display column and the values +.
int x = 0;
* for (the names of the objects: rowSelected.getAttributeNames ()) {*}
* for (int i = x; i < rowSelected.getAttributeValues () .length; i ++) {*}
* System.out.println (x + "." + name + "=" + rowSelected.getAttribute (i)); *
break;
*}*
x ++ ;
continue;
*}*
MY table:
* < af:table value = "#{bindings.myVO.collectionModel}" *.
* var = "row" rows = "#{bindings.myVO.rangeSize}" *.
* EmptyText = "#{Bindings.myVO.Viewable?" "{'No data to display.': 'Access Denied.'}". *
* fetchSize = "#{Bindings.myVO.rangeSize}" *.
* rowBandingInterval = "0."
* filterModel = "#{Bindings.myVO.queryDescriptor}" *.
* queryListener = "#{Bindings.myVO.processQuery}" *.
* filterVisible = "true" varStatus = "vs."
* selectionListener = "#{myBean.method_onRowSelect}" *.
* rowSelection = "single" id = "t1" styleClass = "AFStretchWidth."
"* partialTriggers =": sbcClose: sbcOpen: socWarehouse. "
* inlineStyle = "height: 217px;" / > *.
Thank youQuestion: the attributes are not null in the DB?
The attributes are part of the past of the query select?
And they are part of the binding of the tree?Timo
-
How to get the userId value in the workflow of adf
Hello
I've created a workflow of adf and deployed the same into the application as a library of adf.
Now, I need to get the registered in the value of the ID of the user in the workflow of adf I created.
Based on this user ID needed to run the query to retrieve the data related to the user from the database.
Please help/guide me to solve this problem.3 ways to recover the username (not sure what you mean by user ID):
http://mahmoudoracle.blogspot.be/2012/06/ADF-get-current-logged-user-name.html#.USI_c-h8zIoAlso provide your JDev version.
Basically, you need to use the groovy expression in a view criteria (it's the way the faster and easier) and call that view criteria whenever you have need.
That's if you use ADF BC of course.
Maybe you are looking for
-
Symbol of the day before for iphone6
Can how I reinstall the software from Apple Watch on my phone. I can't find my kidnapped.
-
How can I get my favorites in the menu of the toolbar
After updating my bookmarks in the sidebar has disappeared, they were replaced by bookmarks/place holders 3 What about (untitled). I can see my favorites when I click the menu drop down Favorites, they still work. How can I get all the bookmarks in m
-
Need bios 2.30 for Satellite X 200 - 24Z
Hi all I upgraded my X 200 - 24Z of version 2.30 of bios to version 2.50 but it does not work correctly now (boot is much slower, graphic quality has declined, the screen flashes a lot and SLI is sometimes automatically disabled). I would go back to
-
Satellite P770 - helps the touchscreen, backlit screen and Functionkeys
Hey, I come from Germany and I need your help! So be patient with my broken :) English My problem is, I have my own version of win 7 and downloaded all the drivers, but 3 things are missing, because thereplace. First of the drivers for the backlit an
-
Brand newThinkPad x 1 Carbon20BS very noisy fan
My new ThinkPad has a very noisy fan. This fan is noisy even with the only window open. Have I not a dud? Anyway to fix this easily? Thank you. Discouraged, I am hopeful for a solution.