Getting selected row values of a classic report
Hi Guys,
i'm using Apex 4.1,
I have a classic report on my apex page. First column of this report is check box for row selection. and its binded to primary key of a table. i know that i can get the selected row's primary key (Check box value) using APPLICATION_ITEM.G_FO1() function. What i need is how can i get the other cell values of the selected row ?
Appreciate if someone can help on this,
Thanks.
Apex-Ape wrote:
i'm using Apex 4.1,
I have a classic report on my apex page. First column of this report is check box for row selection. and its binded to primary key of a table. i know that i can get the selected row's primary key (Check box value) using APPLICATION_ITEM.G_FO1() function. What i need is how can i get the other cell values of the selected row ?If you really have a report with just one checkbox column and the rest of the data standard read-only report columns then it's not clear exactly what the requirement is. What do you want to do with them when you get them?
I can think of 2 possible approaches:
<li>Stick with the current report. On page submit you get an array of zero or more PKs. Create a collection with a row containing each PK. Whatever it is that you want to do next can then use a query that is a clone of the original report query plus a join to the PK values in the collection.
<li>Recreate the report with shadow <tt>apex_item.hidden</tt> columns in the query for each value. In the report column attributes, do not display the <tt>apex_item.hidden</tt> columns, but include them with each displayed column (or stuff them all into one column for convenience) using HTML Expressions. The values will then be available in <tt>apex_application.g_fxx</tt> arrays like the row selector checkbox.
I prefer the first one, but really it depends on what the next step is...
(If it's actually a tabular form then the values will be in other <tt>apex_application.g_fxx</tt> arrays.)
Similar Messages
-
Get selected row values from Table view control
Hi ,
I am using transaction ME23N, would like to access row values from item table for selected row. I have written a script as in screen shot and its giving me error at java script step two. I want to get the PR number from item table for selected row.
With Regards
Vishal LokapurH Vishal,
Can you please share how you were able to resolve the issue regarding the selected row
in case of a table control .
Regards -
How to get selected row values in a table using check box
Hi ADF Experts,
JDEV Version 11.1.1.7.0
My requirement is getting the selected row valuesof a af:table using a checkbox(multi select).
Thanks,
AnimeshHi,
add a transient attribute to the POJO entity and update this through a check box. The ensure you have autosubmit=true set on the check box. In a value change listener set or remove the row's checbox attribute value
Frank -
How to set the number of rows displayed in a classical report at runtime?
Hi,
Our customer has several standard client hardware configuration and would like to enable end users to choose their 'display profile' at login time. This 'display profile' would contain predefined values for these hardware configurations and supposed to set various paramters that should define the number of rows displayed in a classical report region.
I tried to provide parameters on the report region but it refused to accept anything but numerical values. Is it possible to do this?
Regards, TamasThe link is to the closest linkable point in the documentation to the description of the Number of Rows (Item) attribute.
It sounds like you have been trying to enter—unsuccessfully—an item name or substitution string into the Number of Rows attribute. The Number of Rows (Item) attribute is the one that actually allows you to do this. Click on the flashlight icon beside it to get a list of items from the application. -
How can I get selection screen values from outside of program?
Hi. all.
Now. I'm developing moritoring systems and I have problems. for getting selection screen values in runtime. Is there any function, methods or structure to know this?
I'd like to get selection screen values while several programs working in runtime and update these values to table to show current system's status and input values for users in real time.
For example.
Now. 3 PGMs are working on systems.
each PGM is ZAAA01, ZAAA02, ZAAA03.
and ZAAA01 needs input parameter P01, ZAAA02 needs input parameter P02, ZAAA03 needs input parameter P03.
In this case, I have to know values of P01, P02 and P03.
The mornitoring systems will show current working status of PGMs(ZAAA01~03)' and these PGMs' input values.
As fas as I know, the structure 'SCREEN' can be used in each PGM for runtime. Is there any SAP system structure or something else for this purpose?
I hope your hopeful repsponse.
Thanks.Umm..I need to explain more about this.
of course I know SET, GET PARAMETERS.
But I'd like to minimize coding for each PGM level.
I have over hundreds PGMs and I have to develop the PGM(including tables and structures) that mornitor
all of those PGMs on a report in real-time.
This PGM is kind of Process Manager.
First I should know dialogue job PGM and background job that pass parameters using SAP(ABAP) Memory.
And then I have to update those PGMs' input values via screens into tables in real-time.
So, I couldn't use SET,GET PARAMETERS for this PGM.
I want to know methods that can be used for getting information about runtime PGMs' selection screen field values in SAP systems wide.
Please help me some one knows this. -
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 selected row keys from RichSelectManyCheckbox
Adf Table has getSelectedRowKeys but SelectManyChekcbox does not has anything similar. Can you tell me how to get selected row keys programmatically for RichSelectManyCheckbox?
Hi User,
selectManyCheckbox component's value property holds the selected items values. Bind this property to some bean variable(of type list) so that you can get the selected values by accessing the bean property.
Sireesha -
How to get selected row from table(FacesCtrlHierBinding ).
I'am trying to get selected row data from table:
FacesCtrlHierBinding rowBinding = (FacesCtrlHierBinding) tab.getSelectedRow();
Row rw = rowBinding.getRow();
But import for oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding cannot be found from my JDev 11.
What is correct package for FacesCtrlHierBinding?Hi, another problem.
I fill table with data manualy from source:
<af:table var="row" value="#{getCompanyData.com}"
rowSelection="single" columnSelection="single"
editingMode="clickToEdit"
binding="#{getCompanyData.tab}"
selectionListener="#{getCompanyData.GetSelectedCompany}">
<af:column sortable="false" headerText="col1">
<af:outputText value="#{row.id}"/>
</af:column>
<af:column sortable="false" headerText="col2">
<af:outputText value="#{row.name}"/>
</af:column>
<af:column sortable="false" headerText="col3">
<af:outputText value="#{row.phone}"/>
</af:column>
</af:table>
and when I'am trying to use method to get selected row:
RichTable table = this.getTab(); //get table bound to UI Table
RowKeySet rowKeys = table.getSelectedRowKeys();
Iterator selection = table.getSelectedRowKeys().iterator();
while (selection.hasNext())
Object key = selection.next();
table.setRowKey(key);
Object selCompany = table.getRowData();
JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding) selCompany;
row = rowData.getRow();
I got an error:
SEVERE: Server Exception during PPR, #1
javax.el.ELException: java.lang.ClassCastException: data.COMPANY cannot be cast to oracle.jbo.uicli.binding.JUCtrlHierNodeBinding
When I created tables by dragging data from date control, all worked fine.
What could be a problem? -
Issue in getting current row value using getCurrent Value
Issue:When I call ththe method executeSearchVO from controller class
with Row row = personalActionSearchVO.first();
I am getting the corresponding value.
but my requirement is I have multiple record , If i press action on any of the record, I need to read SITName value for the particular record and need to pass it as parameter to other pager(i mean If i select any record, I need to get corresponding value in the attribute for the record.)
if i comment personalActionSearchVO.first(); i am getting null pointer exception.
Pl. helpme how to get current row instead of first row always.
AMIMPL Clause
public void executeSearchVO(String loginPersonId)
XXHRPersonalActionSearchVOImpl personalActionSearchVO =getXXHRPersonalActionSearchVO1();
personalActionSearchVO.initQuery(loginPersonId);
// Row row = personalActionSearchVO.first();
row = personalActionSearchVO.getFirstFilteredRow("action","1");
Row masterRow = row;
personalActionSearchVO.setCurrentRow(masterRow);
OARow Row1 = (OARow)personalActionSearchVO.getCurrentRow();
System.out.println("Org "+Row1.getAttribute("Organization"));
calling this method from controller clause
if("action".equals(pageContext.getParameter(EVENT_PARAM)) )
System.out.println("Person Id "+ pageContext.getParameter("XXHRPersonId"));
Serializable methodParams[] = {pageContext.getEmployeeId()+""};
applicationModule.invokeMethod("executeSearchVO",methodParams);
need it urgently. pl. help
thanks
sivaTimo,
I am new to Jdevloper. I will explain the issue in detail.
Version: Oracle 9i Jdeveloper
I have a query page with multiple records. when I perform action , I need to pass 2 parameters from query screen to my actual page.
1 parameter is Login person Id,. Now the issue is with getting current value for 2nd paramenter. 2nd Parameter will be changed depends upon record i am choosing in my query page: column is : Information Name.
when I use getcurrentrow , I am getting null pointer exception.
My controller class when I click action button :
if("action".equals(pageContext.getParameter(EVENT_PARAM)) )
Serializable methodParams[] = {pageContext.getEmployeeId()+""};
applicationModule.invokeMethod("executeSearchVO1",methodParams);
{color:#993300}
// Here I need to get InformationName value based on the record I am choosing{color}
HashMap hashMap = new HashMap(2);
hashMap.put("XXHRPersonId", pageContext.getParameter("XXHRPersonId"));
// hashMap.put("InformationName", methodParams);
pageContext.forwardImmediately(
"OA.jsp?page=/xxhr/oracle/apps/xxhr/selfservice/personalaction/webui/XXHRPersonalActionPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
hashMap,
true, // Retain AM
OAWebBeanConstants.ADD_BREAD_CRUMB_NO
my AMIMPL Clause :
I am just pasting whatever I have tried. Pl. suggest me If my code is wrong.
*{color:#993300}I need to get current row information value from the below method*
*{color}*
public void executeSearchVO1(String loginPersonId)
XXHRPersonalActionSearchVOImpl personalActionSearchVO =getXXHRPersonalActionSearchVO1();
personalActionSearchVO.initQuery(loginPersonId);
System.out.println("Row count "+personalActionSearchVO.getRowCount());
// Row row = personalActionSearchVO.first();
Row row = personalActionSearchVO.getCurrentRow();
System.out.println("Informaton Name "+row.getAttribute("InformationName");
In this , If i initialzie with Row row = personalActionSearchVO.first();I am able to get value for my column Information Name.
whereas, if I use directly Row row = personalActionSearchVO.getCurrentRow();, i am getting null pointer exception.
Pl. let me know how to get current row value for Information Name.
Looking for the reply at the earliest.
Thanks
siva -
Hi
I use JDev 11.1 with ADF, i have grid, i need to get selected row of grid when i press buttom, how can i do that?
ThanksHi,
You have a table in your page that is based on a viewObject iterator and you need to get the selected row in your backing bean when you click on a button.
Did I get this right?
If so then you need to add an actionListener on this button that executes a method in the backing bean.
the button code:
<af:commandButton text="commandButton 1" id="cb1"
actionListener="#{myBean.buttonActionListener}"/>In this method you need to add code like this:
public void buttonActionListener(ActionEvent actionEvent) {
BindingContext bindingctx=BindingContext.getCurrent();
DCBindingContainer bindings=(DCBindingContainer)bindingctx;
DCIteratorBinding iter= bindings.findIteratorBinding("iteratorName");
Row currentRow=iter.getCurrentRow();
}If this is not what you need give some more details.
Gabriel -
How to get selected row index of a Table ?
hi gurus,I'm new to Webdynpro for abap
I'm displaying just Flight details in a Table so
how to get selected row index of a Table and need to be display in Message manager.Hi,
For getting the row index use the following code.
DATA lo_nd_node TYPE REF TO if_wd_context_node.
DATA lo_el_node TYPE REF TO if_wd_context_element.
DATA index TYPE i.
* navigate from <CONTEXT> to <NODE> via lead selection
lo_nd_node = wd_context->get_child_node( name = wd_this->wdctx_node ).
lo_el_node = lo_nd_node->get_lead_selection( ).
index = lo_el_node->get_index( ).
node is the name of the node which is binded to the table.
For printing the message u can use code wizard.
Press ctrl-F7. Now Select generate message.
IN this select the method REPORT_SUCCESS
In the code now u can give index to Message text Exporting parameter. Comment receiving parameter.
Write the whole code in onLeadSelect of the table.
Regards,
Pankaj Aggarwal -
How to get Current Row values in Af:ForEach
Hi,
We have a requirement to conditionally Display/Hide CommandLink item in af:forEach Loop.
<af:forEach items="#{bindings.RegionalAreaPVO.rangeSet}" var="parent">
<af:spacer height="10" id="s1"/>
<af:commandLink inlineStyle="font-weight:bold;" text="#{parent.ItemName}" partialSubmit="true" actionListener="#{backingBeanScope.RegionalAreaBean.launchTaskflow}" id="cl1" rendered="*#{backingBeanScope.XXWFCRegionalAreaBean.modelEligibleflag eq true}*">
<af:setActionListener from="#{parent.Code}" to="#{parentNode}"/>
</af:commandLink>
</af:forEach>
I have added a Cutom Managed Bean Class and Returning boolean value to Control Render property which is working. But now i want to add business Logic based on 'parent.ItemName' or 'parentNode' Values in the bean method to return proper Boolean value.
But i am unable to get the Current Iteration values in the bean method.
I am using below EL expressions to get the values. But no luck.
String nameel = (String)ADFUtil.evaluateEL("#{bindings.parent.ItemName}");
String codeel = (String)ADFUtil.evaluateEL("#{parent.Code}");
String nodeEl = (String)ADFUtil.evaluateEL("#{parentNode}");
Also, i have tried getting the Row object like below but i am getting the First row details always. My intention is to get Current row values and use them for Business logic.
ViewRowImpl row =
(ViewRowImpl)ADFUtil.evaluateEL("#{bindings." + VoName +
"Iterator.currentRow}");
String code = (String)row.getAttribute("Code");
Any help is highly appreciated.
Thanks
KajaHi Sascha,
I have tried that. But in my case the functional logic behind the Rendering is based on more complex logic. Hence i am trying to add a method to return a boolean in Render property of the Link.
But the real problem for me is, in the Managed bean method i am not finding a way to get the Current Iteration index. If i can get the Current iteration index, i can get the Corresponding Component ID of Command link (In the forEach Loop Component Id's are getting generated Dynamically based on Iteration Index), i can use that and add additional logic and derive true/false to return.
Any inputs?
Thanks
Kaja -
How get pervious row value in grid
hi master
sir
I have grid in my form my user design the balance sheet
Then he want add the last row value in next row
Such as
Row2 amount=1000
Row3 row2+2000
Total row3-row2
How I get last row value
Please give me ideaOther solution is to use a collection in a package unit.
Type TYP_COLL is table of Number INDEX BY BINARY_INTEGER ;
my_coll TYP_COLL ;
Then in the Post-Trigger :
my_coll( :system.current_record ) := value ;so you can navigate easily within the collection in both directions Next/Previous.
Easy to get the previous value:
value := my_coll( :system.current_record - 1 ) ;Francois -
WEB DYNPRO ALV GRID GET SELECTED ROWS...
I'm reusing component ALV Grid ...
How can i get selected rows...Hi Stephan,
In order to get the multiple rows which were selected by the user you will just have to call the get_selected_elements method of if_wd_context_node. So as you can see its no different from how you would get the multiple rows selected by the user in a table ui element. First get the reference of the node which you have used to bind to the ALV & then call this method on it.
METHOD get_selected_rows .
DATA: temp TYPE string.
DATA: lr_node TYPE REF TO if_wd_context_node,
wa_temp TYPE REF TO if_wd_context_element,
ls_node1 TYPE wd_this->element_node_flighttab,
lt_node1 TYPE wd_this->elements_node_flighttab.
lr_node = wd_context->get_child_node( name = 'NODE_FLIGHTTAB' ).
" This would now contain the references of all the selected rows
lt_temp = lr_node->get_selected_elements( ).
LOOP AT lt_temp INTO wa_temp.
" Use the references to get the exact row data
CALL METHOD wa_temp->get_static_attributes
IMPORTING
static_attributes = ls_node1.
APPEND ls_node1 TO lt_node1.
CLEAR ls_node1.
ENDLOOP.
ENDMETHOD.
Hope this helps resolve your problem.
Regards,
Uday -
Urgent..ADF 11g Getting selected Checkbox values..
Hi,
I am working on 11g ADF form.One of the requirement is like this:
User will select multiple rows and click on "Assign" button and pop-up window will open with some fields. How can i pass the selected rows values to the pop-up window?
It would be really appreciate if anyone can help me as soon as possible.
Thanks[bump]
Maybe you are looking for
-
I own a MAC Pro 3,1 (early 2008) and am running Mavericks 10.9.3 with no problems. I would like to add an I/O card to add USB 3 functionality or ESATA functionality but am unable to find a compatible card. As such my question...can I do this and if s
-
How to backup external hard drive that is not mounting
Hi sorry if this is too easy or if it has been answered--my 150GB WD USB hard drive won't mount on the desktop (I think there is a bad connection at the drive--the mini usb port seems to lose disconnect). I can see it in disk utility, and I tried rep
-
How to use same cost center?
Hi Gurus, I have one controlling are and 2 company codes. I have assigned these company codes to same controlling area. I have observed that cost center is company code specific. In this case, whether we can use same cost center and standard hirachy
-
ITunes Store TEXT Size ----- No Way to Increase it.
The size of text for the iTunes Store is so small on a MacBook 13" screen you can hardly read it. Especially when they put a dozen or so titles (e.g. audiobooks) on one screen. Does anyone know if there is a simple way to increase the fonts displayed
-
ITunes is splitting up my Keynote Podcasts!?
I have 11 episodes of Apple's keynotes that I have stored on my external Hard Drive, containing the rest of my iTunes library. I have clean installed OS X Lion and done all the updates, and opened iTunes, clicked "Add to library", added all the podca