How to select rows in adf faces table
Hi guys
im new to adf faces .I created a adf faces table with some data.My task is to select one row and if i click tht row, the data of tht row will be displayed in an input text fileds.How can i select a row in a adf faces table and give actions to rows...i read so many tutorials...none of them didnt give a correct idea....plz help me...
thanks in advance..
rajiv
You're here in the Sun JSF forum, not in the Oracle JSF forum.
Try here: JDeveloper and ADF
If the ADF datatable is technically comparable with the RI datatable, check http://balusc.xs4all.nl/srv/dev-jep-dat.html to get some insights how to retrieve the selected row object.
Similar Messages
-
How to select rows or columns of tables without using the mouse?
2nd post ever! Yeah! \m/
In Excel, I can select entire rows or columns of data WITHIN TABLES--i.e., not selecting entire sheet rows or columns--by going to any cell on the perimeter of the table, holding down shift+ctrl, and clicking a direction arrow. So for example, if I have a table in columns D-G and rows 1-5, I can highlight row 4 by going to the first or last cell of that row, holding down the shift+ctrl, and hitting the appropriate direction arrow. You might think this is superfluous given that you can use the mouse to select cells. But that becomes cumbersome with large tables, and this method can be more efficient even with small tables.
Similarly, it's often useful to navigate tables, particularly large ones, by moving from any cell within the table to the end or beginning of that row or column by holding down ctrl and hitting the appropriate arrow key. In Excel, this ctrl+arrow key method also allows you to skip blank cells, which is another very useful navigational feature.
I tried numerous combos involving shift, ctrl, command, alt/option and the arrow keys. Haven't found a way to do any of this yet.
Anyone?Hi Josh,
Numbers is organized differently than Excel, and the navigation tools are different too. Many of us miss our particular favorites from spreadsheets past, but this is Numbers, not a clone. The biggest adjustment is to go from huge monolithic sheet-tables containing virtual sub-tables to a simple blank sheet with small tables, sometimes many per sheet. Navigating is no big deal in these small tables and neither is getting from one small table to another, using the Sheets pane.
Selecting a particular Table is as easy as clicking on the table's name in the Sheets pane. Selecting a particular row, or column, or ranges of rows or columns is done by clicking on the table's row and column labels, left side and top side once a cell is selected in the table.
Numbers is weak at handling large Tables and documents that are large overall. We know this and many of us still prefer it to the alternative when the tool fits the task.
Jerry -
ADF Faces table selection from commandLink?
I'm using the ADF faces table component and would like to allow my users to make a selection out of the table from a click onto a commandLink rather than using the tableSelection facets. How can I determine the row they have clicked on?
Thanks for any help,
Jeff CooperHello
Sorry to restart this thread again, but if i do table.getRowData() i don't get any rows, the rowcount remains 0, but my table contains many data rows.
Is there anybody who knows what the reason can be?
thx -
ADF Faces Table with a Total row calculated?
Hi there OTN Community:
I have another doubt.
I have an EJB dataControl, and i use one of his collections to display the data in an ADF Faces Table. One of the columns of the Adf Faces Table is numeric, And i have to display the Total of that Column.
I only shows 10 rows per screen, but i need to show the total of all the rows.
How i can calculate it?Mmmmm..... You're right!...I will try that.
Thanx :)
Hey, and....You know? i was thinking, maybe i can get the iterator and then capture each object of the iterator to compute the total. That is a crazy idea?, its possible?, its not recommended? or its ok too? :P
Thanx in advance.
Dany -
Need sample code to get handle of Selected rows from ADF Table
Hi,
I am new to ADF. I have an ADF table based on VO object.On some button action,I need to get handle of selected rows in application module.
If anybody is having sample code to do this then please share with me.
Thanks,
ashokwow now link http://blogs.oracle.com/smuenchadf/examples/#134 is working.thanks a lot.
also the link http://baigsorcl.blogspot.com/2010/06/deleting-multi-selected-rows-from-adf.html is very useful. Thanks a lot for Sameh Nassar too.He made it clear that in 11g Select column is not available for a ADF table and provided a solution to get Select column.
Thanks,
ashok -
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 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 -
URGENT: ADF Faces table updating issue.
I have a project that uses JSF, ADF Faces, EJB 3.0, and the ADF binding framework.
In this project, I have a page with a databound ADF Faces Table. The table has a number of read-only columns and two read-write columns. I also have an Edit button that allows the user to pop up a dialog box to edit the selected row of the table. When the user clicks OK in the dialog box, the data is passed back to the main page and the table is updated.
Everything works correctly for the read-only columns. For the read-write columns, however, the table data does not get updated following an edit. This is what I have found:
1. The table row data gets passed in to the Edit dialog correctly.
2. The data gets passed back correctly.
3. The model gets updated correctly (up to and including the database).
4. Looking at the iterator in the debugger shows the correct, updated data.
5. When the table row is getting redrawn, the getter calls for the read-write columns return the updated data.
6. As mentioned above, the read-only columns get updated correctly.
7. Updating the read-write columns directly from the table works correctly.
So, the problem appears to be in the GUI layer. I suspect that, somehow, the submitted values of the read-write columns are not getting set properly, but I cannot figure out how to do this.
Note that clicking on the Edit button results in a partial submit. In the return listener, I add a call to AdfFacesContext.getCurrentInstance().addPartialTarget(getRecipientTable()) in order to redraw the table (getRecipientTable() is the bound value of the ADF table).
Please help! We are so close to production and we need to fix this.
Thanks,
AraHi,
I don't have a testcase for this, so I just come up with ideas to try
1. refresh the parent container of the table. It seems that the input text components are not triggered to refresh if the refresh is on the table.
2. If using ADF, make sure the update is performed directly on theiterator (which automatically is the case if you use a ADF bound form for this)
3. Check if executing the table iterator and then setting back the current row makes a difference
Frank -
An extra column of a query in an ADF Faces Table?
Hi to all OTN Community...
I use ADF Faces, Toplink and EJB 3.0 in JDevelooper 10.1.3.1.0, and i have a question...
I need to show in an adf faces table, the result of a query like this
SELECT COLUMN1, COLUMN2, COUNT(*)
FROM TABLEX
GROUP BY COLUMN1, COLUMN2
I do this query in the TableX named queryes...and then i have acces to this named query in the dataControl, but, when i drag and drop the dataControl to a jsf page, this only shows the columns of the tableX. Then, i want to know, ¿How can i show the count(*) column in the page in a dataControl?
PD: i want to show in the adf faces table the same result if i execute that query in an sql client.
Thanx in advance...
DarklorddanyDarklorddany,
The solution to this is to add an additional method on your EJB 3.0 session-bean that exposes an dynamic TopLink report (projection) query.
The TopLink code within the method would leverage your existing TopLink mappings to do the query like:
ReportQuery rq = new ReportQuery(Employee.class, new ExpressionBuilder());
rq.addAttribute("firstName");
rq.addAttribute("lastName");
rq.addCount();
rq.addGrouping("firstName");
rq.addGrouping("lastName");
List<ReportQueryResult> results = (List<ReportQueryResult>)session.executeQuery(rq);The ReportQueryResult objects are very generic map/row type containers that will not work well in your ADF binding layer. With JPA you can specify and ad-hoc Java class to contain such projection results that make them a little easier to use in clients. This functionality will be available in the next release of TopLink. Until then you will need to write some code to convert to your own result class for this query.
In my case I'll create a simple POJO like:
public class EmployeeNameCount {
private String firstName;
private String lastName;
private int count;
public EmployeeNameCount(String firstName, String lastName, int count) {
this.firstName = firstName;
this.lastName = lastName;
this.count = count;
public String getFirstName() {
return this.firstName;
public String getLastName() {
return this.lastName;
public int getCount() {
return this.count;
}Now I combine the previous report query code into an EJB 3.0 session bean method:
@TransactionAttribute(TransactionAttributeType.SUPPORTS)
public List<EmployeeNameCount> findEmployeeNamesWithCount() {
Session session = getSessionFactory().acquireSession();
ReportQuery rq = new ReportQuery(Employee.class, new ExpressionBuilder());
rq.addAttribute("firstName");
rq.addAttribute("lastName");
rq.addCount();
rq.addGrouping("firstName");
rq.addGrouping("lastName");
List<ReportQueryResult> results = (List<ReportQueryResult>)session.executeQuery(rq);
session.release();
List<EmployeeNameCount> empNameCounts = new ArrayList<EmployeeNameCount>(results.size());
for (ReportQueryResult rqr: results) {
String fname = (String)rqr.getByIndex(0);
String lname = (String)rqr.getByIndex(1);
int count = ((Number) rqr.getByIndex(2)).intValue();
empNameCounts.add(new EmployeeNameCount(fname, lname, count));
return empNameCounts;
}You will also need to make sure the method exists on your EJB 3.0 session bean's interface as well. Then regenerate the data control for your session bean and you should have access to drag and drop this query with its results into your JSF pages.
As mentioned this use case will be much simpler and declarative in the next release.
Doug -
ADF Faces table with checkboxes
Hi,
My dev env: jdev 11.1.1.2.0
I like to implement something like yahoo mail, with a checkbox at the column header. If selected,
all rows will be selected. I assume Yahoo's email is using javascript. How do I achieve the same
thing here with adf faces table? Is there any tutorial I could reference.
Thanks in advance!
Edited by: user1145549 on Jul 13, 2010 8:18 AMHi,
U can also check this too.... it very simple approach to Implement Check box
http://theo.vanarem.nl/2010/07/07/adf-checkbox-representing-a-yes-or-no-value/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+orana+(OraNA)&utm_content=Netvibes
Regards,
Suganth.G -
Adf faces table and applet in jsf page navSubmit not working in IE
Hi
I have a jsf page with adf faces table and applet , previous / next navigation is not working for my table when i add the applet to the same page , it is working in firefox but not in IE .
I have no clue what to change , can any one help. below is the sample code for my jsf page
Best regards
Srinivas
Code follows, not sure how to format the code here
<h:form>
<af:panelPage title="Test Adf faces table and applet">
<af:panelHeader text="Orders">
<af:table value="#{bindings.Orders.collectionModel}" var="row"
rows="#{bindings.Orders.rangeSize}"
first="#{bindings.Orders.rangeStart}"
emptyText="#{bindings.Orders.viewable ? 'No rows yet.' : 'Access Denied.'}"
id="orders" >
<af:column sortProperty="order"
headerText="#{bindings.Orders.labels.order}">
<af:commandLink text="#{row.order}"
id="orderNumber"
onclick="showOrder(#{row.order})"
disabled="false"/>
</af:column>
</af:table>
</af:panelHeader>
<af:objectSpacer width="10" height="10"/>
<af:panelBox>
<f:verbatim>
<div id="appletDiv">
<applet here />
</div>
</f:verbatim>
</af:panelBox>
</af:panelHorizontal>
</af:panelPage>
</h:form>Sorry about the format, it looked okay when i previewed it , now it looks like terrible
-
ADF faces tables - range navigation table footer
Hi,
I have a strage situation using ADF Faces' table, sometimes it displays range navigation on top and bottom of the table and sometimes only on top of the table. Is it possible to show always the range navigation on top and bottom of the table? How? If not, can someone give me an example of using an selectRangeChoiceBar to implement navigation on bottom of the table?
Thanks in advance.
Best Regards,
Giuseppebump
-
Hello Oracle,
we consider to use ADF-Faces with Spring and TopLink or Hibernate that supports all important commercial databases.
We need a solution for selecting mass data and show them using a ADF-Faces component.
ADF-Faces table looks great and is fine for for some hundred datasets. But we have customers who could do a select over 80.000 or more datasets and it cannot be the solution to load them completly in collection-model in memory.
Do you have a solution or do you plan somthing? A JSF data table component for mass data (e.g. load from database on every "next or "previous" click)?
Regards
FlorianI'm pretty new to ADF Faces etc. but I know the ADF Table component supports paging. If you're using ADF Business Components as the persistence framework it supports paging out of the box giving you exactly what you're looking for.
If you're using EJBs or Toplink I think you have to write your own paging interface but I don't know this for sure.
Corey
Message was edited by:
cpuffalt
Message was edited by:
cpuffalt -
ADF How to Set TimeZone in adf-faces-config.xml
hi
How to set timezone in adf-faces-config.xml .Valid ID for a java.util.TimeZone should be supported.
See also http://java.sun.com/j2se/1.5.0/docs/api/java/util/TimeZone.html -
How to maintain selected row in adf table displayed after refresh
Hi,
I am using jdev 11g
I my jsf page I have a table with multiple rows.
When i scroll and click on one of the rows its selected but if the page is refreshed the row is always selected but not displayed.
I need to be able to maintain the selected row after the refresh of the page, so my table will look like its already scrolled to the selected row..
I tried to use the attribute displayRow="selected" but it won't do the trick.
Any hints
EmileHi Branislav,
Kindly answer the following if you may.
Is there a way to refresh the table after the selectListner is fired.
Automatically when i select the table i need to refresh it.
Why after refresh the selected row changes skin.
Regards
Maybe you are looking for
-
I don't know how to put a bookmarked page back into my most visited folder on the tool bar under the "back" arrow key. It has been there for days and this morning it was gone!
-
Need to be Able to use a TB-1328 with an SCXI-1125
I need some labview code to show me how to read temp from a SCXI-1125 with a TB-1328 thermocouple on it. I have a K type thermocouple wire, I have to stick with Labview V7.0, NI-DAQ 6.9.3f5, and this is running on an RT machine using a PXI-1010 split
-
Returning Purchase parts directly delivered to a subcontractor?
We have had parts directly delivered to our subcontrator and the PO line has been set as SC Vendor. The parts were found defective on the production line and need to be returned to the vendor for resupply. The process we were told to use was to trans
-
What is the best way to avoid Snapshot too old error without the need to increase the rollback segment. If I am using a cursor to fetch data in a PL/SQL procedure to update the same table, what should be the coding to avoid the snapshot too old error
-
Importing time frame from DV camcorder
My wife needed to import some video for a presentation and it needed to have the original time signal shown on it. We were going to edit (titles etc) on iMovie HD but I could not find a way of making the time signal from the camcorder come up on scre