How to getValue of CoreOutputText of a selected row ?
Hello Jdev 10.1.3 Experts,
Currently I am using JUCtrlValueBindingRef getSelectedRowData to access selected row data bound to ADF CoreTable. I have no problem with it.
Now I have a case to access selected row data from a column (CoreOutputText)that does not have ADF binding. I have read Frank Nimphius's Blogbuster, but I am not clear about his approach.
CAN YOU HELP ME TO FILL INCOMPLETE CODES (??????) OF MY BACKING VIEW METHODD:
public String openMissionTax() {
// Get CoreTable (8 columns)
CoreTable ct = this.getMissionResults();
// Get Selected row
currentRow = ct. ???????????
// Get CoreOutputText value (1st column)
?????????.getValue();
Thank you very much for your help.
Robert.
Hi,
the JUCtrlValueBindingRef has a getRow() method that you cast to oracle.jbo.Row. The first attribute is row.getAttribute(0), no matter of there is an ADF binding involved or not. As long as the column is populated through the "row" variable. So the question basically is, where does the value of the column come from?
Frank
Similar Messages
-
HOW CAN I HAVE THE NUMBER OF SELECTED ROWS IN ALV GRID?
HI.
HOW CAN I HAVE THE NUMBER OF SELECTED ROWS IN ALV GRID????
GABRY =)You need to use
data : grid1 type ref to cl_gui_alv_grid.
call method grid1->get_selected_rows
importing
et_index_rows = i_sel_alvrows[].
a® -
How to get the attribute of a selected row in a label
Hi all,
I am using Jdeveloper 11.1.1.2 and ADF.
I have a table with two columns, Id and Name. Furthermore I have an outputText where I would like to see the field Name of the selected Row in the table.
How have I to set the property "value" of the outputText to do this?
Thank you
AndreaHi Andrea,
If you are using ADFBC, the easiest way is to drop the attribute(Say Name) from the data control palette as outputText component and add partialTriggers property of it to point to table id(to refresh the outputText whenever the row is selected in table)
Sireesha -
How to get column value of a selected row of ALV
Hello ,
I have application POWL POWL_UI_COMP uses another component POWL_TABLE_COMP.
This POWL_TABLE_COMP uses SALV_WD_TABLE.
I want to select value of ORDER id and it need to be passed whenever user selects a display order button(Which is self defined function generated in POWL_TABLE_COMP) . I am calling a display order on action of this display button(http://nap60.nalco.one.net:8042/sap/bc/webdynpro/sap/mt_order_app?IV_ACTIVITYTYPE=A&IV_EQUIPMENT=aaaa&IV_ORDERID=90001511&IV_ORDERTYPE=STD&IV_QMNUM=00&IV_TPLNR=00)
ORDERID is one column value of selected row of ALV table.
So please can you suggest , how to read ORDERID and pass it to the self defined function..
thanks in advance,
SharadaAnoop,
I have plcaed this code in event handler of on_lead_select.
Its giving error the element doesnt exist.
static_attributes should give me row data but it's giving short dump saying
Pl can you suggest.
data: set_of_element type WDR_CONTEXT_ELEMENT_SET,
element1 type ref to IF_WD_CONTEXT_ELEMENT,
result type POWL_CRESULT_STY,
table_helper type ref to CL_POWL_TABLE_HELPER,
context_node type ref to IF_WD_CONTEXT_NODE,
lt_selected_elements TYPE wdr_context_element_set,
static_attributes type ref to data.
table_helper = wd_comp_controller->mr_table_helper.
context_node = table_helper->get_data_node( ).
context_node = wd_comp_controller->mr_table_helper->get_data_node( ).
context_node->get_static_attributes( exporting index = r_param->index
importing static_attributes = static_attributes ).
thanks,
Sharada -
How to get the values of last selected row in Table?
Hi,
I have one editable table , where i have Create, Delete and Commit operation on it.
When i am clicking on Create button it add new row to my table.
But I want the value of my last selected row from the table in my Bean.
Can anyone suggest me please....... its urgent
Jdev:- 11.1.1.0.3
Thanks,
Ramitjust get this code empTable is the table binding
RowKeySet rks = new RowKeySetImpl();
CollectionModel model = (CollectionModel)empTable.getValue();
RowKeySet selectedRowKeys = empTable.getSelectedRowKeys();
if (selectedRowKeys != null)
Iterator iter = selectedRowKeys.iterator();
if (iter != null && iter.hasNext())
empTable.setRowKey(iter.next());
model.setRowIndex(empTable.getRowIndex());
Object key = model.getRowKey();
rks.add(key);
empTable.setSelectedRowKeys(rks);
AdfFacesContext.getCurrentInstance().addPartialTarget(empTable);
public void setEmpTable(RichTable empTable) {
this.empTable = empTable;
public RichTable getEmpTable() {
return empTable;
} -
How to find out if JTable's selected row is visible?
Hello there,
Given:
a JTable is inserted into a JScrollPane and the number of rows in the table is greater than the vieport size.
A random row within the table gets programmatically selected.
How to find out if the selected row is visible in a JTable visible area?
Your help will be greatly appreciated.
TimThat will make the row visible, but not answer whether it was visible
in the first place. Try something like:
public boolean isRowVisible( JTable table, int row ) {
Rectangle rect = table.getBounds();
int rowHeight = table.getRowHeight();
int viewHeight = table.getParent().getHeight();
int max = rect.y - viewHeight + 1;
int rowPos = - rowHeight * row;
return ( rect.y >= rowPos && rowPos > max );
}assuming all rows have the same height.
: jay -
How to get all the index of "selected rows" in table control?
Hi Gurus,
I have a table control, wherein I need to get selected row so that I can get its respective TABIX.
I know that the event for capturing selected row is in PAI.
I also ensure that the w/ selColumn name in my screenpainter is exactly the same as my declaration in ABAP.
TOP INCLUDE
YPES: BEGIN OF Y_ZQID_CHECK,
IDNUM TYPE ZQID_CHECK-IDNUM,
WERKS TYPE ZQID_CHECK-WERKS,
MATNR TYPE ZQID_CHECK-MATNR,
LICHA TYPE ZQID_CHECK-LICHA,
LIFNR TYPE ZQID_CHECK-LIFNR,
ECOA_S TYPE ZQID_CHECK-ECOA_S,
ID_STAT TYPE ZQID_CHECK-ID_STAT,
ID_DATE TYPE ZQID_CHECK-ID_DATE,
FLAG_MAILCOA(1) TYPE C,
MARK(1) TYPE C, "Name of w/ SelColumn in ScreenPainter: T_ZQIDCHECK_DISCH-MARK
END OF Y_ZQID_CHECK.
DATA: T_ZQIDCHECK_DISCH TYPE STANDARD TABLE OF Y_ZQID_CHECK WITH HEADER LINE.
PAI
PROCESS AFTER INPUT.
* MODULE USER_COMMAND_9004.
LOOP AT T_ZQIDCHECK_DISCH.
MODULE READ_TC_DISCH .
ENDLOOP.
module READ_TC_DISCH input.
DATA: W_LINE_SEL TYPE SY-STEPL,
W_TABIX LIKE SY-TABIX.
GET CURSOR LINE W_LINE_SEL.
W_TABIX = TC_ID_ONLY-TOP_LINE + w_LINE_SEL - 1.
MODIFY T_ZQIDCHECK_DISCH INDEX TC_ID_ONLY-current_line.
If I am selecting single row, I can properly get the selected index via debug.
BUG:
When I'm selecting multiple rows in table control, only the last row is always being read inside the loop of my table control.
Please see the screenshot.
[url]http://img268.imageshack.us/img268/5739/tcselectedrows.jpg[url]
Notice in the debug screenshot, even if it's just in the 1st loop of table control, it automatically gets the 4th table control index, instead of the 2nd one.
Helpful inputs will be appreciated.
Thanks.
Jaime
Edited by: Jaime Cabanban on Dec 9, 2009 3:16 PMHi,
Are you sure that you have selected multiple line for tablecontrol in the property window of the tablecontrol.
Flowlogic.
LOOP WITH CONTROL TC_01.
Module Get_Marked.
ENDLOOP.
Module Pool
Module Get_Marked.
read the data from the internal table where mark = 'X'.
this should give you only selected records.
Endmodule.
Kindly check the tablecontrol property.
Regards,
Ranjith Nambiar -
How to get default color of a selected row in a JLIst
I have a JList that I am changing the font color for based on a certian situation so I created my own MyCellRenderer to do this. However, when I select an item in the list the row is no longer highlighted. I used the isSelected method to determine if a row was selected and then change the background color of that row. However, I would like the color to be the default color that you get when you select a row in a default JList. I can't seem to figure out how to get that color. How do I obtain what that color is? I found an example where you can get the default color for the background of a button and use that color so I would guess it is something similar to that. My code is below so I hope someone can tell me how to get that color that I want.
Thanks...Chris
class MyCellRenderer extends JLabel implements ListCellRenderer {
public MyCellRenderer() {
setOpaque(true);
public Component getListCellRendererComponent(
JList list,
Object value,
int index,
boolean isSelected,
boolean cellHasFocus)
int index1 = value.toString().indexOf("-");
String errors = value.toString().substring(index1 + 1, index1 + 6).trim();
int numErrors = Integer.parseInt(errors);
if (numErrors > 0)
setForeground(Color.red);
setBackground(Color.white);
else
setBackground(Color.white);
setForeground(Color.black);
if(isSelected)
//ColorUIResource col = (ColorUIResource)UIManager.getDefaults().get("JButton.background");
ColorUIResource col = (ColorUIResource)UIManager.getDefaults().get("Button.background");
setBackground(col);
setText(value.toString());
return this;
}Swing related questions should be posted in the Swing forum.
I would like the color to be the default color that you get when you select a row in a default JList. I can't seem to figure out how to get that colorlist.getSelectionBackground(); -
How do you populate cfselect when cfgrid selected row is changed
hi can anyone enlighten me as to how to pass data to a
cfselect from a cfgrid
i am using a listner function so that the grid can populate
form controlswhen a row is selected
i use bindings on cfinputs so no problem there
how do u populate a cfselect drop down with data from a grid
and then how woul i also display query results from another
query as a second option
lost
yes i dont konw much as
realyy apprecitae your helpUnfortunately, there's no 'tab-out' event in ABAP standard dynpros - you've got to trigger a PAI event to make that happen (such as hitting 'Enter').
-
How to get the values of a selected row and edit it
hi all,
i am using a table component.I am populating it from the database.i used static text to display the data .i have a edit button in the last column. when i click on it that particular rows data should be shown in a text field in that row itself,so that i should be able to edit it and then if i save it it that row should change to statictext with the updated data.
please provide a solution for this...
regards,
rpkHi Andrea,
If you are using ADFBC, the easiest way is to drop the attribute(Say Name) from the data control palette as outputText component and add partialTriggers property of it to point to table id(to refresh the outputText whenever the row is selected in table)
Sireesha -
How to create PDF from data grid selected row records and save in local PC
ok now i am need another help ;
i am having one datagrid and one button outside the grid ,
i am having one datagrid in that i am having 5 records if i click a record from the datagrid then click that button means that particular record will save as PDF in my local PC.
How to do that,
Any suggession or examples.
Thanks in advance
B.venkatesan.<cfdocument>
Usage is described in the cfml reference manual. If you don't have one, the internet does. -
How to get selected Row Index in a table based ona VO?
Hi All,
I'm writing an ADF form wherein I use a VO based on a SQL query. I'd like to know how to get the index of a selected row. I havea selection Listener in place where I can print the selected Row's data using getSelectedRowData().toString() on the table.
How can I get certain Attributes from this selected row.
One solution I thought of is to get the row index and then read attributes. But I cant seem to figure out how to get rowIndex for a selected row. Any sugestions?
Using JDeveloper 11g.
Thanks
P.If your selected row is marked as current row you can use
// Get a attribute value of the current row of iterator
DCIteratorBinding iterBind= (DCIteratorBinding)dcBindings.get("testIterator");
String attribute = (String)iterBind.getCurrentRow().getAttribute("field1");Where 'testIterator' is the name of the iterator you use for the table and 'field1' is the name of an attribute you want to get.
Or you can iterate over the selected row keys (even if it's only one):
// get selected Rows of a table 2
for (Object facesRowKey : table.getSelectedRowKeys()) {
table.setRowKey(facesRowKey);
Object o = table.getRowData();
JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding)o;
Row row = rowData.getRow();
TestRow testRow = (TestRow)((DCDataRow)row).getDataProvider() ;
}Where TestRow is the row type of the VO of your table.
Timo -
How to get the selected rows in a table
Hi,
How to get the ids of all the selected rows. On Page load a query is executed that shows the data in a table with a checkbox in the first column to select the rows and delete. Now if a user select multiple rows how do I get the ids of selected rows in the backend code.
ThanksPlease search the forum before posting questions.
refer following thread for table selection.
Re: Record selection with MessageCheckBox and print the selected record.
--Prasanna -
How to read the selected row value of a table node
hi
i have a node of table type, displaying few records & with each record a NEXT button is there.
now i want to read the values of the selected row of the table & want to process next with NEXT button.
pls tell me how to read the values of the selected row only.
reds.data : lo_nd type ref to if_wd_context_node,
lo_nd1 type ref to if_wd_context_node,
lt_temp type wdr_context_element_set,
wa_temp type ref to if_wd_context_element,
ls_node1 type sflight,
lt_node1 type STANDARD TABLE OF sflight.
lo_nd = wd_context->get_child_node('CN_MAIN').
CALL METHOD lo_nd->get_selected_elements
RECEIVING
set = lt_temp.
loop at lt_temp INTO wa_temp.
CALL METHOD wa_temp->get_static_attributes
IMPORTING
static_attributes = ls_node1.
APPEND ls_node1 TO lt_node1.
CLEAR ls_node1.
ENDLOOP.
'CN_MAIN' is the node whose selected values are to be picked and stored in internal table lt_node1.
Other option by Thomas :
DATA lo_nd_cn_main TYPE REF TO if_wd_context_node.
DATA lt_temp TYPE wdr_context_element_set.
FIELD-SYMBOLS <wa_temp> LIKE LINE OF lt_temp.
DATA lt_node1 TYPE wd_this->elements_cn_main.
FIELD-SYMBOLS <ls_node1> LIKE LINE OF lt_node1.
lo_nd_cn_main = wd_context->get_child_node( name = wd_this->wdctx_cn_main ).
lt_temp = lo_nd_cn_main->get_selected_elements( ).
LOOP AT lt_temp ASSIGNING <wa_temp>.
APPEND INITIAL LINE TO lt_node1 ASSIGNING <ls_node1>.
<wa_temp>->get_static_attributes( IMPORTING STATIC_ATTRIBUTES = <ls_node1> ).
ENDLOOP. -
How to variable exit read table based on selected row on weblayout ??
Hi All,
Greeting,
I have a question regarding IP.
I have report where I can choose the line. I've already been able to catch the selected row there using ABAP Planning Function.
The requirement is to change some value from other customized table ( not info cube ) based on selected row.
So when user's selecting data and pressing a button, the idea is to prompt a variable where they can see the old value, and they can entry the new value. But to query that value, I need to select based on the values the row.
My Question is how user-exit in variable can read selected row in web planning layout especially it happens when I_step = 1 ?
Or the other idea is to get the value on that customized table and put it in text web item as the old value. How can I fetch data from table and put it in text web item ?
Thanks a lot and have a good day,Hi.
My Question is how user-exit in variable can read selected row in web planning layout especially it happens when I_step = 1 ?
I think there is no way to do it. I_STEP=1 called before the report shows the data.
But may be the next approach could help you:
1. when you select line you can use command for populating variables according to selected line. let's say yohave selected line with costcenterr XXX so you can populate variable (let's say Z_CC) with selected value.
2. create FOX that reads variable Z_CC value and calls any function module with customized table and variable value (you can use CALL FUNCTION statement within FOX and pass to it variable value).
This is just an idea of some direction - may be you can take it and develope to required result.
Regards.
Maybe you are looking for
-
I have the mac book pro from 2010, 40gb HD. I have the game, Spore which was run in on it previously, and I hadn't used it for a long time. I had uninstalled it due to the old saved games on there. Now when trying to reinstall it, it gets about 3/4 o
-
TestStand Sequence Editor message
When TestStand is launched, getting a popup window - 'Value must be at least 0'. What does that mean? Will it make any effect on test sequence execution?
-
Accessing an external HD as a shared library
Here's my situation: I have a personal collection of music (about 30 GB) on my MBP hard disk, which I manage with iTunes. As a part-time job, I am also a DJ. I recently ripped all of my 3500+ CDs onto an external dive, which takes up almost 200GB. Wh
-
SSIS New Project Error in VS 2012
Hello, When I start a new SSIS project in VS Ultimate 2012, I received the error message below. VS Version: 11.0.61030.00 Update 4 SSIS Designer Version: 11.0.3360.12
-
IPOD HASN'T BEEN UPDATED IN A WHILE. EVERYTIME I HOOK TO COMPUTER, IT WANTS TO UPDATE BUT IT TAKES LIKE 6 HOURS. I CAN'T WAIT THAT LONG, BUT IT WON'T LET MY ADD ANY SONGS TO MY IPOD TILL I UPDATE. WHAT COULD BE WRONG?