How to get rowid of extend
Dear all,
How to get the rowids of the first and last row in every extent by dba_extents?
http://docs.oracle.com/cd/E14072_01/appdev.112/e10577/d_parallel_ex.htm
Examples
The following examples run on the Human Resources (HR) schema of the Oracle Database Sample Schemas. It requires that the HR schema be created with the JOB SYSTEM privilege.
Chunk by ROWID
This example shows the most common usage of this package. After calling the RUN_TASK Procedure, it checks for errors and re-runs in the case of error.
DECLARE
l_sql_stmt VARCHAR2(1000);
l_try NUMBER;
l_status NUMBER;
BEGIN
-- Create the TASK
DBMS_PARALLEL_EXECUTE.CREATE_TASK ('mytask');
-- Chunk the table by ROWID
DBMS_PARALLEL_EXECUTE.CREATE_CHUNKS_BY_ROWID('mytask', 'HR', 'EMPLOYEES', true, 100);
-- Execute the DML in parallel
l_sql_stmt := 'update /*+ ROWID (dda) */ EMPLOYEES e
SET e.salary = e.salary + 10
WHERE rowid BETWEEN :start_id AND :end_id';
DBMS_PARALLEL_EXECUTE.RUN_TASK('mytask', l_sql_stmt, DBMS_SQL.NATIVE,
parallel_level => 10);
-- If there is an error, RESUME it for at most 2 times.
L_try := 0;
L_status := DBMS_PARALLEL_EXECUTE.TASK_STATUS('mytask');
WHILE(l_try < 2 and L_status != DBMS_PARALLEL_EXECUTE.FINISHED)
LOOP
L_try := l_try + 1;
DBMS_PARALLEL_EXECUTE.RESUME_TASK('mytask');
L_status := DBMS_PARALLEL_EXECUTE.TASK_STATUS('mytask');
END LOOP;
-- Done with processing; drop the task
DBMS_PARALLEL_EXECUTE.DROP_TASK('mytask');
END;
/
Similar Messages
-
How to get ROWID...
As a relative rookie to Apex and a long time Forms guy, I was searching for a way to get the ROWID... mostly as a security blanket (in case I needed it).
I first tried to create a field in an HTML region called P5_ROWID, source type of Database Column and Source Value or Expression of ROWID.
The page worked without error, but the P5_ROWID field was blank. (Can someone explain this one?)
Then I set the source type to SQL Query and Source Value or Expression to select ROWID from Table where PK = :p5_PK
Now I have the rowid...
Does anyone see a problem with this solution?Hi,
Besides the fact that you're using the ROWID column when you already have a primary key, no.
Mike -
How to get rid of ROWID in Join query -- ORA-00918: column ambiguously defined
Hi, All
the source of my data block is from two tables Emp and Title. My select statements is:
select a.name, b.title, b.start_date, b.end_date from Emp a, Title b where a.id = b.emp_id
But at run time, I got "ORA-00918: column ambiguously defined"
the wrapped statement becomes:
SELECT ROWID,a.name, b.title, b.start_date, b.end_date from Emp a, Title b where a.id = b.emp_id
I run the query in SQL*PLUS, found out it was ROWID caused problem.
Can anybody tell me how to get rid of ROWID? or I missed something in datablock defination?
Thanks in adance.
DeborahI guess you are using oracle 7.x. In Oracle 8 and onwards, database lets you select ROWID from the views based on multiple views as long as view definition does not contain any aggregated functions or DISTINCT in it. Now coming back to forms ..Forms runtime engine uses ROWID to identify rows uniquely unless specified otherwise. If you are using forms 4.5/5.0 against Oracle 7.x , then change these properties and you should be able to run the form.
BLOCK PROPERTY
Key Mode : can be either updateable OR Non-updateable
( Certainly not 'Unique' .. That forces forms runtime engine to use ROWID to identify unique rows. )
ITEM PROPERTY
Identify one of the block items as unique. And then set the following property
Primary Key : True.
This should take care of rowid problem.
Regards,
Murali.
Hi, All
the source of my data block is from two tables Emp and Title. My select statements is:
select a.name, b.title, b.start_date, b.end_date from Emp a, Title b where a.id = b.emp_id
But at run time, I got "ORA-00918: column ambiguously defined"
the wrapped statement becomes:
SELECT ROWID,a.name, b.title, b.start_date, b.end_date from Emp a, Title b where a.id = b.emp_id
I run the query in SQL*PLUS, found out it was ROWID caused problem.
Can anybody tell me how to get rid of ROWID? or I missed something in datablock defination?
Thanks in adance.
Deborah -
Hello,
I would use some help and more info about how to get host object that extends the functionality of my current Interop.Excel.Worksheet object. I read this artical: https://msdn.microsoft.com/en-us/library/ee794671.aspx where I can call this function
GetVstoObject to get host object. But I see that here I need to pass the Globals.Factory object as second parametar. Can someone give me more details about that parameter and how to access it? I would like to get host object so I can access extension
property, since my interop excel worksheet doesn't have it.
I am using Visual Studio 2013 for developing Excel addin. Using Excel 2010.
Thanks in advance for help.
Regards,
ZeljkaHi Zeljka,
>>I am using the Microsoft Office PIAs, so my question is how to access this automatic generated class Globals in my case? <<
Sorry, I am not able to understand the application you were developing exactly. From the orgnal post, you were developing an application level add-in, however based on the description above, it seems that you were building an console or Windows form application
to automate Office application.
If you were developing Office automation, the host item can't work for this secnario since it should run under the VSTO runtime.
If I misunderstood, please feel free to let me know.
Regards & Fei
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How do you updated CS5 Extended when you keep getting a message to close the program but it is close
How do you updated CS5 extended when you keep getting a message to close the program but the program is already closed? I have tried to do the update when I first turn the computer on, go directly to Photoshop, go to update and click on that, get new screen, close Photoshop, and I still get a message to close the already closed program. I believe I have to open Photoshop to get to the update area, so I don't know how to get around this issue. I hope someone can help me.
(I use win8, 64 bit)
Thank you in advance to all who answer my request for help.
AnnThank you for answering. However, when I opened the Task Manager and looked at all the processes that were running, the only things running were the Task Manager and the browser. None of the Photoshop programs were running. So, do you have any other suggestions?
-
How to get Extended Warranty for iPhone 5 in india
How to get Extended Online Warranty for iPhone 5 in india
You need to take the iPhone into the Apple store for a visual inspection.
-
How to get the response of a vbscript ran from extended js?
Hi All,
I want to get the result from a vbscript, how to get that in my jsx? This is what I'm doing-
vbscript (this will return me something, i've added just a sample string)
Wscript.Echo "Like this?"
jsx
var a = File("C:\\Users\\Sahil\\AppData\\Roaming\\CreativeWorx\\1.vbs");
var b=a.execute();
Now, variable b returns me true/false; and the output i.e. "Like this?" is alerted! So my question is-
1. How to get the output in a variable?
2. How to avoid the alert
So, I simply wish to get the output from my vbscript and then perform certain functions accordingly, alos, I dont want this to be alerted!
Any help will be highly appreciated!The capitalization is app.doScript and not app.doscript that is if you are trying to get a jsx script to run and access a string from from a vbs script.
When defining the VBscript for multiline scripts the easiest method is to use triple quotes
VBscript = """dim WMI: set WMI = GetObject("winmgmts:\\.\root\cimv2")
dim Nads: set Nads = WMI.ExecQuery("Select * from Win32_NetworkAdapter where physicaladapter=true")
dim nad
for each Nad in Nads
if not isnull(Nad.MACAddress) then Wscript.Echo Nad.description, Nad.MACAddress
next"""
when using the scriptArgs you can either make a loop of them and send the string value of each one something like this
For (n = 0 .........
myArg = "myArg" & n
myStringToPassOver = "Shaddow Fax " & n
app.scriptArgs.SetValue myArg, myStringToPassOver
Next
or probably better to make a long comma or something else separated string and pass it over after the loop
var VBScript = """myArg = ""
For n = 0 To 15
myArg = myArg & "Shaddow Fax " & n & ","
Next
app.scriptArgs.SetValue "myResult", myArg
app.doScript(VBScript, ScriptLanguage.visualBasic);
var myResult = app.scriptArgs.getValue("myResult").replace(/\,$/,"").split(",");
// if neaded use "replace" to remove final "," and "split" to convert into an array
alert(myResult.join("\r")); // alert the array
The above script is a jsx script that runs a vbs
If you want a vbs script to run and access a string from from a jsx script then you would use xxx.DoScript see the sample from the manual below.
Set myInDesign = CreateObject("InDesign.Application")
myJavaScript = "alert(""First argument: "" + arguments[0] + ""\rSecond argument: "" +
arguments[1]);"
myInDesign.DoScript myJavaScript, idScriptLanguage.idJavascript, Array("Hello from
DoScript", "Your message here.")
myVBScript = "msgbox arguments(1), vbOKOnly, ""First argument: "" & arguments(0)"
myInDesign.DoScript myVBScript, idScriptLanguage.idVisualBasic, Array("Hello from
DoScript", "Your message here.")
P.s.Please mark the question as answered, thanks -
How to get the table of value field? and can we expand the technical limits
Dear
I have created value field in COPA with KEA6. And now, I need the table which the value fields are saved. Yet, I have tried a lot to find it and get failure? Can any guy help me? Please tell me how to get the table of a value field.
And another question is that, can we extend the technical limits for the number of value field for ECC6.0?
We have a note for R.4.x Please see below:
OSS note 160892
You can display the length of a data record using Transaction KEA0 ('Maintain Operating Concern'). After you have navigated to the 'Characteristics Screen' or to the 'Value field Screen' choose menu path 'Extras -> Technical Limits'.
The maximum displayed here under 'Length in bytes on the DB' is the maximum length permitted by the Dictionary. The reserve required for the release upgrade must be subtracted from this value.
To increase the allowed number of the value fields, increase the value that is assigned to field ikcge-bas_max_cnt (FORM init_ikcge_ke USING fm_subrc, approx. line 165) in Include FKCGNF20. It specifies the number of the possible value fields. The corresponding part of the source code is attached to the note as a correction.
David Sun
Regards!how to extend the limit of value numbers? please see the original question.
-
How to get SSO logged user information in a database trigger
my database is 9i
my application server is 9i too
I need to track which SSO user is inserting data into a table , so how can i get the information of that user in a database trigger on that table
thanksHi,
The only way I could figure out how to get it was to import the com.sap.security.api.
1. From Window>Preferences>Java-->Classpath Variables, set up a variable called WEBAS_HOME pointing to:
<drive>/usr/sap/<SID>/jc00/j2ee/cluster/server0/
2. Right click on properties of your Dynpro Project->Properties->Java Build Path->Libraries and click "Add Variable."
3. Select WEBAS_HOME and click "Extend"
4. Select /bin/ext/com.sap.api.sda/com.sap.security.api.jar and click OK.
If you don't have access to a portal directory, you will have to get this jar file and copy it to your workspace to add to your build path instead of the above steps.
Then in your code:
import com.sap.security.api.IUser;
import com.sap.security.api.IUserAccount;
public void GetLogonID( )
String LogonID;
try {
/* create an user object from the current user */
IWDClientUser wdUser = WDClientUser.getCurrentUser();
IUser user = wdUser.getSAPUser();
if (user != null) {
IUserAccount acct = user.getUserAccounts()[0];
if (acct != null) {
LogonID = acct.getLogonUid();
} else
LogonID = "acct null";
} else {
LogonID = "user null";
wdContext.currentContextElement().setDisplayName(user.getFirstName() + " " + user.getLastName());
wdContext.currentContextElement().setLogonID(LogonID.toUpperCase());
} catch (Exception e) {
e.printStackTrace();
Hope this helps... I had to search several places before I found all the necessary stuff. Maybe I can get my first points!
Thanks,
Andrew -
How to get all rows of an attribute data from a table?
Hello.. I´m using Jdev 10.1.3.2
I have a table with 5 columns and N rows.
I need to create a backing bean method to count the value of all rows of a specifc column.
I use
JUCtrlValueBindingRef selectedRowData= (JUCtrlValueBindingRef)myTable().getSelectedRowData();
to get an attribute from a selected row. but How can get from all rows?
Thank you
VandréHi Vandré
I think this example of Steve Muench will help you.
"Recalc Sum of Salary at the View Object Level
This example illustrates a technique where a transient attribute of a view object is updated to reflect the total sum of some attribute of all the rows in the view object's default row set. The code to recalculate the sum of the salary is in the getSumOfSal() method in the EmpViewImpl.java class. The custom EmpViewRowImpl.java class for the view row implements the getter method for the SumOfSal attribute by delegating to this view object method. The EmpViewImpl class extends a base DeclarativeRecalculatingViewObjectImpl class that contains some generic code to enable declaratively indicating that one attribute's change should recalculate one or more other attributes. The EmpView defines the "Recalc_Sal" property to leverage this mechanism to recalculate the "SumOfSal" attribute. If you restrict the VO's results using the BC Tester tool, you'll see the sum of the salaries reflects the subset. If you add a new row or delete an existing row, the sum of sal is updated, too."
http://otn.oracle.com/products/jdev/tips/muench/recalctotalvo/RecalcTotalOfRowsInVO.zip
Good Luck -
How to get submitted Value from SelectOneMenu?
Hi.
At the beginning, i would like to say, that i am at the beginning to learn JSP and JSF. I am from germany, so please excuse my english.
For work i have to develop a form, where the user can select a manufacturer, insert a unique key and get a list of devices after he submits this two attributes.
At the moment i can not get the value of the selected Item in the selectonemenu.
I deleted all my trys to get this value, to show you the working parts.
We work with faces-config.xml, tiles.xml and hybris as platform.
My code:
deviceFamilyMain.jsp:
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<h:form id="frmDeviceFamilySelect">
<h:selectOneMenu binding="#{DeviceFamilyBean.selectOneMenuDeviceFamilies}" id="selectOneMenuDeviceFamilies">
<f:selectItems binding="#{DeviceFamilyBean.dropdownDeviceFamilySelectItems}" id="dropdownDeviceFamilySelectItems" />
</h:selectOneMenu>
<h:commandButton action="#{DeviceFamilyBean.detailsAction}" value="Main"/>
</h:form>
DeviceFamilyBean:
public class DeviceFamilyBean extends TC_JSFBean
//selectOneMenuDeviceFamilies
HtmlSelectOneMenu selectOneMenuDeviceFamilies = new HtmlSelectOneMenu();
public HtmlSelectOneMenu getSelectOneMenuDeviceFamilies() {
return selectOneMenuDeviceFamilies;
public void setSelectOneMenuDeviceFamilies(HtmlSelectOneMenu selectOneMenuDeviceFamilies) {
this.selectOneMenuDeviceFamilies = selectOneMenuDeviceFamilies;
//dropdownDeviceFamilySelectItems
private UISelectItems dropdownDeviceFamilySelectItems = new UISelectItems();
public UISelectItems getDropdownDeviceFamilySelectItems() {
Object objFacesSession = FacesContext.getCurrentInstance().getApplication()
.getVariableResolver().resolveVariable(getFacesContext(), "SessionBean");
SessionBean sessionBean = (SessionBean) objFacesSession;
dropdownDeviceFamilySelectItems.setValue(getDropdownDeviceFamilyDefaultItems());
return dropdownDeviceFamilySelectItems;
public void setDropdownDeviceFamilySelectItems(UISelectItems dropdownDeviceFamiliesSelectItems) {
this.dropdownDeviceFamilySelectItems = dropdownDeviceFamiliesSelectItems;
//dropdownDeviceFamilyDefaultItems
private ArrayList dropdownDeviceFamilyDefaultItems = new ArrayList();
public ArrayList getDropdownDeviceFamilyDefaultItems() {
Object objFacesSession = FacesContext.getCurrentInstance().getApplication()
.getVariableResolver().resolveVariable(getFacesContext(), "SessionBean");
SessionBean sessionBean = (SessionBean) objFacesSession;
TC_Manager tcDeviceFamilyManager = TC_Manager.getInstance();
dropdownDeviceFamilyDefaultItems.clear();
Collection col = this.getAllDeviceFamilies();
Iterator itDev = col.iterator();
while (itDev.hasNext())
DeviceFamily deviceFamily = (DeviceFamily) itDev.next();
dropdownDeviceFamilyDefaultItems.add(new SelectItem(deviceFamily.getCode()));
return dropdownDeviceFamilyDefaultItems;
public void setDropdownDeviceFamilyDefaultItems(ArrayList dropdownDeviceFamilieDefaultItems) {
this.dropdownDeviceFamilyDefaultItems = dropdownDeviceFamilieDefaultItems;
//OutputText DeviceFamily Name
private HtmlOutputText outputTextDevFamName = new HtmlOutputText();
public HtmlOutputText getOutputTextDevFamName()
Object obj = FacesContext.getCurrentInstance().getApplication()
.getVariableResolver().resolveVariable(getFacesContext(), "SessionBean");
SessionBean sessionBean = (SessionBean) obj;
if (sessionBean.getCurrentDeviceFamily() != null)
outputTextDevFamName.setValue(sessionBean.getCurrentDeviceFamily().getCode());
} else {
outputTextDevFamName.setValue("CurDevFam = null");
return outputTextDevFamName;
public void setOutputTextDevFamName(HtmlOutputText outputTextDevFamName) {
this.outputTextDevFamName = outputTextDevFamName;
//detailsAction
public String detailsAction()
Object objFacesSession = FacesContext.getCurrentInstance().getApplication()
.getVariableResolver().resolveVariable(getFacesContext(), "SessionBean");
SessionBean sessionBean = (SessionBean) objFacesSession;
//sessionBean.setCurrentDeviceFamily((DeviceFamily) this.getDropdownDeviceFamilySelectItems().getValue());
return "go_devicefamily_details";
SessionBean:
private DeviceFamily currentDeviceFamily;
public DeviceFamily getCurrentDeviceFamily() {
return currentDeviceFamily;
public void setCurrentDeviceFamily(DeviceFamily currentDeviceFamily) {
this.currentDeviceFamily = currentDeviceFamily;
go_devicefamily_details is referenced to deviceFamilyDetails:
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<f:view>
<h:form id="frmDevFamDetails">
<h:outputText value="#{DeviceFamilyBean.outputTextDevFamName}" />
</h:form>
</f:view>I hope i did not forget anything needfull.
Maybe someone could explain how to get the value and complete the code.
Thanks.Thx 4 the tip.
I found an other way. It was such easy, that i could kick myself. :-)
Only in the detailsAction() i needed:
sessionBean.setCurrentDeviceFamilyName((String) this.getSelectOneMenuDeviceFamilies().getValue());
I allways looked for dropdownDeviceFamilySelectItems and tryed to get the selected Index, but it is the HtmlSelectOneMenu that carries the value. :-(
The DeviceFamily Class is an HybrisObject and not easy to initialize.
I just created a new String (currentDeviceFamilyName).
Now it works. -
How to get the values from table region and how to set
Hi,
I have a requirement as Seeded Page Having One Table Region having around 8 columns, In That Item Description field is there. My Requirement is I need add one more field for that Region and assign the value depending Item Description.
I will create one new Item in that region and will give name as Item, But how to set the values to Item Depending on Item Description.
Is it possible to through CO Extension, If yes..Pls help how to get it.
Thanks in Advance,
HanimiHi Hanimi,
1. You need to extend the VO, add a new Attribute.
2. In VORowImpl of the extended VO, you can find the getter for your new attribute (example getItem())
3. In this getter method you can write some code like:
if("ABC".equals(getItemDescription())
return "XYZ" ;
-Prince
http://princekapoor82.blogspot.com -
How to get the values of the objects inside an object??
Hi,
I am trying to write code to display name and memory usage of all session attributes, in a recursive way.
I suppose reflection is needed here, but I cant figure out how to get the values of the objects inside an object...
private void handleIt(String attributeName, Object attributeValue) {
boolean isPrimitiveOrNull = ((null == attributeValue) ||
(attributeValue.getClass().isPrimitive()));
if (isPrimitiveOrNull) {
sb.append("{" + attributeName + ":" + sizeOf(attributeValue) + "}");
} else {
sb.append("{" + attributeName + ":" + sizeOf(attributeValue) + "{");
Field[] fields = attributeValue.getClass().getDeclaredFields();
int lim = fields.length;
String name;
Object value = null;
for (int i = 0; i < lim; i++) {
name = fields.getName();
//LOOK AT THIS LINE: !!!!!!!!!!!!!!!!!!!!!!!!!!!
value = fields[i].get(obj); //I don´t know what 'obj' should be??
handleIt(name, value);
sb.append("}");
Any suggestions will be greatly appreciated...I realized that massive int objects called MAX_VALUE, MIN_VALUE and SIZE where causing the StackOverflow, so I removed them from the analysis.
This is the resultant code. But I think it isnt accurate in calculating the real size of objects being got using reflexion.
Do you or somebody have any more suggestions?
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.lang.reflect.Field;
import java.util.Enumeration;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
public class SessionMeasurer extends HttpServlet {
private static final long serialVersionUID = 1470488362727841992L;
private StringBuilder sb = new StringBuilder();
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
performTask(request, response);
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
performTask(request, response);
public void performTask(HttpServletRequest request, HttpServletResponse response) {
HttpSession session = request.getSession(false);
String attributeName = "";
Object attributeValue = null;
for (Enumeration<?> attributeNames = session.getAttributeNames(); attributeNames.hasMoreElements();) {
attributeName = (String)attributeNames.nextElement();
attributeValue = session.getAttribute(attributeName);
handleIt(attributeName, attributeValue);
System.out.println(sb.toString());
private void handleIt(String attributeName, Object attributeValue) {
if (attributeValue != null) {
boolean isPrimitive = attributeValue.getClass().isPrimitive();
if (isPrimitive) {
sb.append("{" + attributeName + ":" + sizeOf(attributeValue) + "}");
} else {
sb.append("{" + attributeName + ":" + sizeOf(attributeValue) + "{");
Field[] fields = attributeValue.getClass().getDeclaredFields();
String name;
Object value = null;
int lim = fields.length;
for (int i = 0; i < lim; i++) {
name = fields.getName();
if (!name.endsWith("_VALUE") && !name.equals("SIZE") && !name.equals("serialVersionUID")) {
try {
value = fields[i].get(attributeValue);
} catch(Exception e) {
//PENDIENTE: Tratamiento excepción
handleIt(name, value);
sb.append("}");
private int sizeOf(Object obj) {
//Valid only for Serializables
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream oos = null;
byte[] bytes = null;
try {
oos = new ObjectOutputStream(baos);
oos.writeObject(obj);
bytes = baos.toByteArray();
} catch(Exception e) {
//PENDIENTE: Tratamiento excepción
} finally {
if (oos != null) {
try {
oos.close();
} catch(Exception e) {
//PENDIENTE: Tratamiento excepción
if (baos != null) {
try {
baos.close();
} catch(Exception e) {
//PENDIENTE: Tratamiento excepción
int size = -1;
if (bytes != null) {
size = bytes.length;
return size; -
Interactive Report: how to get value of given row/col cell in selected row
Hi -- I have an interactive report. Instead of the default behavior of the link going to a single row view, I want it to
go to a form for editing the row. This means I have to be able to populate the form w/ the correct row's information...
so need to get the value(s) for the PK column(s) in the selected row of the interactive report, so I can select the row
from the database.
How can I do this? I see in the report attributes, Link Column section, I can set Rows Uniquely Identified by, and a Unique
Column (though there could be more than one in a PK). I imagine I'd want to use the rowid, but I'm not sure how the
rowid of the selected IR row can be referenced. And at that point, I'm not sure how to get the IR column value for
that row. (Say I'm on the 8th row and I need the first column... How is the column referenced? By a number, it's name,
its heading?)
Or maybe I'm not on the right track at all...
Ideas?
Thanks,
CarolHi Carol,
What I´m trying to do is: defining a button such as when you click it a pl-sql procedure is called, which needs as an input parameter the id of the row selected in my form. what I need first, then, is to get the id of the selected row. how did you get it?
Thanks in advance
Francesco -
How to get instance of all components in a frame dynamically
Hai ,
I want to know how to get the instance names and values of components on a frame . if any body knows anything on this
Please help me
Advance ThanksHai ..
Thanks for guiding me here i had copied my example code i am getting name value null
import javax.swing.*;
import java.awt.*;
import java.util.*;
* @author naveen
public class Test extends javax.swing.JFrame {
/** Creates new form RaviTest */
public RaviTest() {
initComponents();
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
private void initComponents() {
jTextField1 = new javax.swing.JTextField();
jTextField2 = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
getContentPane().setLayout(null);
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
exitForm(evt);
getContentPane().add(jTextField1);
jTextField1.setBounds(180, 60, 100, 20);
getContentPane().add(jTextField2);
jTextField2.setBounds(180, 90, 90, 20);
jButton1.setText("jButton1");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
getContentPane().add(jButton1);
jButton1.setBounds(170, 140, 81, 26);
pack();
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// Add your handling code here:
Component[] comp=this.getContentPane().getComponents();
for(int i=0;i<comp.length;i++)
if(comp[i] instanceof JTextField)
getT((JTextField)comp);
public void getT(JTextField jt)
System.out.print("name "+jt.getName());
System.out.println("value "+jt.getText());
/** Exit the Application */
private void exitForm(java.awt.event.WindowEvent evt) {
System.exit(0);
* @param args the command line arguments
public static void main(String args[]) {
new RaviTest().show();
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
// End of variables declaration
OUTPUT AS :
if we enter some text in text box and press the button we get like this
name null value ABCD
name null value EFGH
may be some components will have name but if they names are not set
then we get null value
what i want is at that i want the jTextField1.. as name(ie.. object name) when the name is not set how to do it
Maybe you are looking for
-
I have tried, unsuccessfully, to upgrade from 3.6.28 but have been unable to do so. A pop up shows up telling me that I should and offers a line to click on to go ahead and do it. I followed all the instructions and after dragging the Firefox logo to
-
My MBP have a beep sound when i open it from hibernate.
Why it happen? I don't what to do, then I push the shut down button then it shut down. when I open it it just like a normal start but then it open all what I left just like before I hibernate. Someone can help me?
-
Reg: No Receiver could be determined
Hi , I have set condition in receiver determination to route the mesage to 2 receivers accordingly but when did test configuration in ID , i got error as no Receiver could be determined. I have provided the exact value as in condition editor but when
-
About macbook pro mid 2012 ssd or sshd problem
hi i have macbook pro mid 2012 computer. i have problem about sad upgrade. and i tried mac os mountain lion and yosemite x i uninstall normal hdd and i bought new 3 different brand ssd. Kingston SSd now 120 GB Samsung Evo 840 250gb Sandisk X210 256 G
-
NB300 unable to set to AHCI mode for SSD drive
Hi, I have a Toshiba NB300 netbook, running Windows 8 Pro 32 bit, very happy with it! I have a Corsair Force 3 112GB SSD drive installed, and everything seems to be running very nicely! Reading up on SSD drives I see that for best performance I shoul