Jdev 11.1.1.5 R1 How To Get Row Data From ADF Table
Hi everyone,
I have an ADF Table Populated with dummy data (for now). Below the Table there is an InputText field.
What I need to do is have the body of the message show up in the InputText field when the user clicks on a message in the inbox(Table).
I've been trying to figure this out for quite some time now, unsuccessfully of course. Hopefully you guys can help me change that.
I do consider myself a beginner still, so please be as clear and specific as possible.
Thanks in advance!
Here is the code I have for the Table/InputText and Backing Beans
<tr>
<td>
<af:table value="#{TableBean.messageAll}" var="message"
rows="5"
inlineStyle="color:Navy; border-style:outset; border-color:Background; border-width:thick; font-size:small; text-align:center; vertical-align:middle; height:135.0px;"
width="610" rowBandingInterval="0" id="t1"
rowSelection="single"
selectionListener="#{TableBean.messageSelected}"
immediate="true" summary="Message Inbox"
disableColumnReordering="true"
columnSelection="none"
columnResizing="disabled">
<af:column sortable="false" align="center"
id="chechboxCol" width="25"
minimumWidth="25">
<f:facet name="header">
<h:selectBooleanCheckbox id="selectAll"
onclick="selectAll();"></h:selectBooleanCheckbox>
</f:facet>
<h:selectBooleanCheckbox id="selectMessage"
value="#{message.selected}"
immediate="true"></h:selectBooleanCheckbox>
</af:column>
<af:column id="urgentCol" width="25" align="center"
minimumWidth="25">
<f:facet name="header">
<h:outputText id="urgentHeader">
<img src="urgent.gif" height="14"
width="14" alt="Urgent Icon"/>
</h:outputText>
</f:facet>
</af:column>
<af:column sortable="true" headerText="From"
align="start" id="fromCol" width="175"
minimumWidth="175">
<af:outputText value="#{message.from}"
id="ot1"/>
</af:column>
<af:column sortable="true" headerText="Subject"
align="start" id="subjectCol" width="175"
minimumWidth="175">
<af:outputText value="#{message.subject}"
id="ot2"/>
</af:column>
<af:column sortable="true" headerText="Type"
align="start" id="c5" width="100"
minimumWidth="100">
<af:outputText value="#{message.type}"
id="ot3"/>
</af:column>
<af:column sortable="true"
headerText="Date Received" align="start"
id="c6" width="80" minimumWidth="80">
<af:outputText value="#{message.date}"
id="ot4"/>
</af:column>
<af:column sortable="true" headerText="Body"
rendered="false" align="start" id="c7"
width="100" minimumWidth="100">
<af:outputText value="#{message.body}"
id="ot5"/>
</af:column>
</af:table>
</td>
</tr>
<tr>
<td>
<p>
<af:commandButton text="Print" id="printButton"
inlineStyle="font-size:x-small;"/>
</p>
<af:inputText binding="#{TableBean.textArea}" rows="10"
readOnly="true" partialTriggers="t1"
contentStyle="width:620px;"
inlineStyle="color:Black; outline-color:Background; outline-style:outset;"
id="it1"></af:inputText>
</td>
</tr>
package Backing;
import javax.faces.event.ActionEvent;
import oracle.adf.view.rich.component.rich.input.RichInputText;
import oracle.adf.view.rich.component.rich.output.RichOutputText;
import java.util.List;
import java.util.ArrayList;
import oracle.adf.view.rich.component.rich.data.RichTable;
import org.apache.myfaces.trinidad.event.SelectionEvent;
public class TableBean {
private RichInputText textArea;
private message[] messageAll =
new message[] { new message("Sender 1", "Author 1", "Message 1",
"Alert", "6/21/2011",
"This is the body 1."),
new message("Sender 2", "Author 2", "Message 2",
"Notification", "6/22/2011",
"This is the body 2."),
new message("Sender 3", "Author 3",
"Message 3", "Broadcast", "6/23/2011",
"This is the body 3."),
new message("Sender 4", "Author 4",
"Message 4", "Alert", "6/24/2011",
"This is the body 4."),
new message("Sender 5", "Author 5", "Message 5",
"Notification", "6/25/2011",
"This is the body 5."), };
public message[] getmessageAll() {
return messageAll;
public void messageSelected(SelectionEvent selectionEvent) {
textArea.setValue("Message body should go here.");
public void setTextArea(RichInputText textArea) {
this.textArea = textArea;
public RichInputText getTextArea() {
return textArea;
public class message {
boolean selected;
String from;
String to;
String subject;
String type;
String date;
String body;
public message(String from, String to, String subject, String type,
String date, String body) {
this.from = from;
this.to = to;
this.subject = subject;
this.type = type;
this.date = date;
this.body = body;
public String getFrom() {
return from;
public String getTo() {
return to;
public String getSubject() {
return subject;
public String getType() {
return type;
public String getDate() {
return date;
public String getBody() {
return body;
}
try this code in selection method
RichTable object = (RichTable)selectionEvent.getSource();
Row row = null;
for (Object facesRowKey : object.getSelectedRowKeys()) {
object.setRowKey(facesRowKey);
Object o = object.getRowData();
JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding)o;
row = rowData.getRow();
}
Similar Messages
-
How to get the data from Pooled Table T157E.
Hi Experts,
How to get the data from Pooled Table T157E.
Any help.
Thanks in Advance,
Ur's Harsha.create some internal table similar to T157E and pass all data as per SPRAS.
After that use internal table in your program as per the requirement.
Regds,
Anil -
How to get the data from AUSP TABLE
Hi Experts,
Select * from AUSP where atinn = w_attin
And klart = 001
And atwrt between w_low and w_high.
Endselect.
Here I am using this select to retrive data from ausp where atwrt in between 00000[w_low] and 09999[w_high].
In EPC it displays an error like data types incompatability..
Because atwrt is character field of length 30 and w_low and w_high are integer fields.
How to rectify this problem.<b>Hi
Code like this
data: v_low type AUSP-ATWRT,
v_high type AUSP-ATWRT.
v_low = w_low .
v_high = w_high.
Select * from AUSP into corresponding fields of table itab where atinn = w_attin
And klart = 001
And atwrt between v_low and v_high.
DONT USE SELECT...ENDSELECT as performance issues is there rather use into table.
Mark points if helpful.
Regs
Manas Ranjan Panda</b> -
How to retrieve row data from a table
Hey,
Have a table with data and each row has one column which is a button. How do I retrieve the corresponding data of the row in which the button was clicked. Meaning what do I need to do differently in the table and what type of javascript on an onclick event etc would I need to get the data. If there is a better or simpler approach im open to any suggestions.
Thanks in advance for your assistance
e.g.
<table>
<tr>
<td>column1 data</td><td>column 2 data</td><<input type="button" value="select" onclick="?????"/>
</tr>
</table>In the onclick event submit the jsp with query string.
<onclick="process.do?rowId=<%=column1 data%>">
have column 1 data as a unique identifier. Using request.getParameter get the column1 data value and query the db again to fetch the whole row data. I guess, it will work. -
How to get the data from a table cell
Could somebody suggest me how I can get the data value from a table cell if I set that cell a Double object previously.
Thanks very muchThanks for camickr's information.
And thanks uhrand,
I haven't got it sloved. I am sick on this problem.
I have the methods to let the table editable. My tableModel code is from Sun Tutorial.
It has the code like this:
public int getColumnCount() {
return columnNames.length;
public int getRowCount() {
return data.length;
public String getColumnName(int col) {
return columnNames[col];
public Object getValueAt(int row, int col) {
return data[row][col];
* JTable uses this method to determine the default renderer/
* editor for each cell. If we didn't implement this method,
* then the last column would contain text ("true"/"false"),
* rather than a check box.
public Class getColumnClass(int c) {
return getValueAt(0, c).getClass();
* Don't need to implement this method unless your table's
* editable.
public boolean isCellEditable(int row, int col) {
//Note that the data/cell address is constant,
//no matter where the cell appears onscreen.
if (col < 1) {
return false;
} else {
return true;
* Don't need to implement this method unless your table's
* data can change.
public void setValueAt(Object value, int row, int col) {
if (DEBUG) {
System.out.println("Setting value at " + row + "," + col
+ " to " + value
+ " (an instance of "
+ value.getClass() + ")");
data[row][col] = value;
fireTableCellUpdated(row, col);
if (DEBUG) {
System.out.println("New value of data:");
printDebugData();
public void printDebugData() {
int numRows = getRowCount();
int numCols = getColumnCount();
for (int i=0; i < numRows; i++) {
System.out.print(" row " + i + ":");
for (int j=0; j < numCols; j++) {
System.out.print(" " + data[i][j]);
System.out.println();
System.out.println("--------------------------");
} -
How to get selected entity from ADF Table
I'm using EJB and ADF Faces.
I have an ADF Table, and when a row is selected I'd like to be able to get the EJB Entity that was selected, is this feasible?
The reason I would like to do it, is for a Dialog. I have a popup dialog, and in the popup the user can do a search. The results are displayed in the ADF table. When supplying the return value from the dialog:
AdfFacesContext.getCurrentInstance().returnFromDialog(?, null);
I would like ? to be the EJB entity representing the row, because I need to return the value of more than one of the columns. Is this not realistic, or should I just add then to a List and pass that back?
thanks
RThanks KUBA,
I hacked some code from the inbuilt JDeveloper Help. Are you saying there is an easier way than this, or did I state the question poorly and you gave an answer to something else? My english is not always perfect.
This is the code that works for me. (cmdSelect is the submit button on the table)
public String cmdSelect_action() {
//Access the tableSelectMany1 table. Note that the table name
//is taken from the id of the table in the JSF page.
CoreTable table = this.getUserResultsTable();
//Obtain a list of all selected rows from the table
Set rowSet = table.getSelectionState().getKeySet();
Iterator rowSetIter = rowSet.iterator();
//Use the declarative method to get the ADF bindings
BindingContainer bindings = getBindings();
//Get the object to delete. To do this, you must get the
//iterator binding for the Products in the page definition file,
//and cast it to DCIteratorBinding for further processing
DCIteratorBinding pr_dcib = (DCIteratorBinding)
bindings.get ("queryUserVFindByFullNameIter");
//Loop through the set of selected row numbers and delete the
//equivalent object from the Products collection.
UserV userV = null;
while (rowSetIter.hasNext()){
//get the table row
Key key = (Key) rowSetIter.next();
//set the current row in the ADF binding to the same row
pr_dcib.setCurrentRowWithKey(key.toStringFormat(true));
//Obtain the Products object to delete
RowImpl prRow = (RowImpl) pr_dcib.getCurrentRow();
//using the generated code to execute the declarative method
userV = (UserV)prRow.getDataProvider();
break;
AdfFacesContext.getCurrentInstance().returnFromDialog(userV, null);
return null;
} -
How to get the data from one table and insert into another table
Hi,
We have requirement to build OA page with the data needs to be populated from one table and on save data into another table.
For the above requirement what the best way to implement in OAF.
I understand that if we attach VO object instance to region/page, we only can pull and put data in to only one table.
ThanksYou can achieve this in many different ways, one is
1. Create another VO based on the EO which is based on the dest table.
2. At save, copy the contents of the source VO into the dest VO (see copy routine in dev guide).
3. commiting the transaction will push the data into the dest table on which the dest VO is based.
I understand that if we attach VO object instance to region/page, we only can pull and put data in to only one table.
if by table you mean a DB table, then no, you can have a VO based on multiple EOs which will do DMLs accordingly.Thanks
Tapash -
How to get the data from a table which are availble in MD04
Hello,
Can you please let me know the tables in which the 'data available in MD04' are stored.
I would like to have the data pertaining to the customer order/Item with requirements available in MD04.
Thanks and Regards,
Jana.Probably the easiest way in this case is to run the performance trace (System/Utilities/Performance trace). Start transaction MD04, put on the trace in another window, press enter to see the stock/requirements list, then stop the trace and list the results. Then you'll see which tables were accesses with which queries.
-
How to get all data from nokia to i5s
how to get all data from nokia E71 to i5s???
if you can put those data in your computer then add it in iTunes. your iPhone 5s should get it thru syncing.
-
How to get the data from multiple nodes to one table
Hi All,
How to get the data from multiple nodes to one table.examples nodes are like A B C D E relation also maintained
Regards,
IndraHI Indra,
From Node A, get the values of the attributes as
lo_NodeA->GET_STATIC_ATTRIBUTES( IMPORTING STATIC_ATTRIBUTES = ls_attributesA ).
Similarily get all the node values from B, C, D and E.
Finally append all your ls records to the table.
Hope you are clear.
BR,
RAM. -
How to get the data from pcl2 cluster for TCRT table.
Hi frndz,
How to get the data from pcl2 cluster for tcrt table for us payroll.
Thanks in advance.
Harisumanth.ChPL take a look at the sample Program EXAMPLE_PNP_GET_PAYROLL in your system. There are numerous other ways to read payroll results.. Pl use the search forum option & you sure will get a lot of hits..
~Suresh -
How to get purchasing data from SAP R/3 to OWB (Oracle warehouse builder).
Hi,
My name is Pavan Tata. I work as a SAP BW developer. Here is the situation at my client place. Client decided to retire BW system and wants to replace with OWB(Oracle warehouse). In all this currently we have purhchasing application in BW production system and wants to move this application to OWB for the same type of reporting what they are getting currently.
Here is my question:
How to get purchasing data from SAP R/3 to OWB(Warehouse) with initial full loads and deltas mechanism in the same way as we do in BW.
Please help on this, also send me any documentation about this if you have.
Thanks,
Pavan.Hello,
here is a short report which converts S012 entries to strings with separator semicolon. Perhaps this will help you?
Regards
Walter Habich
REPORT habitest2 LINE-SIZE 255.
TYPES:
strtab_t TYPE TABLE OF string.
CONSTANTS:
separator VALUE ';'.
DATA:
it_s012 LIKE s012 OCCURS 0,
wa_s012 LIKE s012,
strtab TYPE strtab_t,
strele TYPE string.
SELECT * FROM s012 INTO TABLE it_s012 UP TO 100 ROWS.
PERFORM data_to_string
TABLES
strtab
USING
'S012'. "requires it_s012 and wa_s012
LOOP AT strtab INTO strele.
WRITE: / strele.
ENDLOOP.
*& Form data_to_string
FORM data_to_string TABLES strtab TYPE strtab_t
USING ittab TYPE any.
DATA:
h_zaehler TYPE i,
line_str TYPE string,
l_tabellenname(10) TYPE c,
l_arbeitsbereichsname(10) TYPE c,
h_string TYPE string,
h_char(255) TYPE c.
FIELD-SYMBOLS: <l_tabelle> TYPE ANY TABLE,
<l_arbeits> TYPE ANY,
<feldzeiger> TYPE ANY.
CLEAR strtab.
CONCATENATE 'IT_' ittab INTO l_tabellenname.
ASSIGN (l_tabellenname) TO <l_tabelle>.
CONCATENATE 'WA_' ittab INTO l_arbeitsbereichsname.
ASSIGN (l_arbeitsbereichsname) TO <l_arbeits>.
LOOP AT <l_tabelle> INTO <l_arbeits>.
CLEAR: h_zaehler, line_str.
line_str = ittab.
DO.
ADD 1 TO h_zaehler.
ASSIGN COMPONENT h_zaehler OF
STRUCTURE <l_arbeits> TO <feldzeiger>.
IF sy-subrc <> 0. EXIT. ENDIF.
WRITE <feldzeiger> TO h_char LEFT-JUSTIFIED. "#EC *
h_string = h_char.
CONCATENATE line_str separator h_string INTO line_str.
ENDDO.
APPEND line_str TO strtab.
ENDLOOP.
ENDFORM. "data_to_string -
How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.
If the data is on a remote server (for example, PHP running on a web server, talking to a MySQL server) then you do this in an AIR application the same way you would do it with any Flex application (or ajax application, if you're building your AIR app in HTML/JS).
That's a broad answer, but in fact there are lots of ways to communicate between Flex and PHP. The most common and best in most cases is to use AMFPHP (http://amfphp.org/) or the new ZEND AMF support in the Zend Framework.
This page is a good starting point for learning about Flex and PHP communication:
http://www.adobe.com/devnet/flex/flex_php.html
Also, in Flash Builder 4 they've added a lot of remote-data-connection functionality, including a lot that's designed for PHP. Take a look at the Flash Builder 4 public beta for more on that: http://labs.adobe.com/technologies/flashbuilder4/ -
How to delete the data from partition table
Hi all,
Am very new to partition concepts in oracle..
here my question is how to delete the data from partition table.
is the below query will work ?
delete from table1 partition (P_2008_1212)
we have define range partition ...
or help me how to delete the data from partition table.
Thanks
Sree874823 wrote:
delete from table1 partition (P_2008_1212)This approach is wrong - as Andre pointed, this is not how partition tables should be used.
Oracle supports different structures for data and indexes. A table can be a hash table or index organised table. It can have B+tree index. It can have bitmap indexes. It can be partitioned. Etc.
How the table implements its structure is a physical design consideration.
Application code should only deal with the logical data structure. How that data structure is physically implemented has no bearing on application. Does your application need to know what the indexes are and the names of the indexes,in order to use a table? Obviously not. So why then does your application need to know that the table is partitioned?
When your application code starts referring directly to physical partitions, it needs to know HOW the table is partitioned. It needs to know WHAT partitions to use. It needs to know the names of the partitions. Etc.
And why? All this means is increased complexity in application code as this code now needs to know and understand the physical data structure. This app code is now more complex, has more moving parts, will have more bugs, and will be more complex to maintain.
Oracle can take an app SQL and it can determine (based on the predicates of the SQL), which partitions to use and not use for executing that SQL. All done totally transparently. The app does not need to know that the table is even partitioned.
This is a crucial concept to understand and get right. -
How to export some data from the tables of an owner with integrity?
Hi to all,
How to export some data from the tables of an owner with integrity?
I want to bring some data from all tables in a single owner of the production database for development environment.
My initial requirements are: seeking information on company code (emp), contract status (status) and / or effective date of contract settlement (dt_liq_efetiva) - a small amount of data to developers.
These three fields are present in the main system table (the table of contracts). Then I thought about ...
- create a temporary table from the query results table to contract;
- and then use this temporary table as a reference to fetch the data in other tables of the owner while maintaining integrity. But how? I have not found the answer, because: what to do when not there is the possibility of a join between the contract and any other table?
I am considering the possibility of consulting the names of tables, foreign keys and columns above, and create dynamic SQL. Conceptually, something like:
select r.constraint_name "FK name",
r.table_name "FK table",
r.column_name "FK column",
up.constraint_name "Referencing name",
up.table_name "Referencing table",
up.column_name "Referencing column"
from all_cons_columns up
join all_cons_columns r
using (owner, position), (select r.owner,
r.constraint_name fk,
r.table_name table_fk,
r.r_constraint_name r,
up.table_name table_r
from all_constraints up, all_constraints r
where r.r_owner = up.owner
and r.r_constraint_name = up.constraint_name
and up.constraint_type in ('P', 'U')
and r.constraint_type = 'R'
and r.owner = 'OWNERNAME') aux
where r.constraint_name = aux.fk
and r.table_name = aux.table_fk
and up.constraint_name = aux.r
and up.table_name = aux.table_r;
-- + Dynamic SQL
If anyone has any suggestions and / or reuse code to me thank you very much!
After resolving this standoff intend to mount the inserts in utl_file by a table and create another program to read and play in the development environment.
Thinking...
Let's Share!
My thanks in advance,
PhilipsThanks, Peter.
Well, I am working with release 9.2.0.8.0. But the planning is migrate to 10g this year. So my questions are:
With Data Pump can export data just from tables owned for me (SCHEMAS = MYOWNER) parameterizing the volume of data (SAMPLE) and filters to table (QUERY), right? But parameterizing a contract table QUERY = "WHERE status NOT IN (2,6) ORDER BY contract ":
1º- the Data Pump automatically searches for related data in other tables in the owner? ex. parcel table has X records related (fk) with Y contracts not in (2,6): X * SAMPLE records will be randomly exported?
2º- for the tables without relation (fk) and which are within the owner (MYOWNER) the data is exported only based on the parameter SAMPLE?
Once again, thank you,
Philips
Reading Oracle Docs...
Maybe you are looking for
-
I am not very good on computers and need help, I have lost past history emails when i have used hotmail on my new macbook, they say it is not set right but i do not understand! they say I need to ensure the box 'save a copy to the server' is ticked b
-
Adobe CC year membership not transferred to new computer - How do I get it back?
Earlier this year, I company I worked for bought me a year's subscription to Adobe CC. When got a new computer I wanted to transfer the membership, so I signed out of the desktop app on my old computer and installed it (and signed in) on my new machi
-
Dear cons We have created a p.r(material) having account assignment V i.e- for cost center.After that due to cetain reason one consultant has changed the setting that PR can be genereted only acct. assignment V & item catagory D only. For old P.R w
-
Movies not available on Irish iTunes Store
I was going to upgrade my iPod to a video iPod but it's not possible to download movies from Irish iTunes Store and US is blocked. Just checking if it's worth my while upgrading Thanks John
-
I recently purchased a Nokis Asha 201 using PAYG/Orange simcard, everything is working fine except the following:- Mail - When selecting "accept" to accept terms & privacy policy then searches for "mail service updates" but just continuously searche