selection of lines AF:table after sorting
HelloIf I select a line to an af:table and then to sort a column, the first line in the sorted table is selected.
Is there a way to keep the selection while sorting?
jdev versions:
-11.1.1.4.
-11.1.2.0.
Edited by: Fortega January 25, 2012 0:47
Please mention your version jdev 11g being ambiguous...
A sorting table normally means that the query is executed again with the selected sorting criteria. It also means that the current line that you checked before disappeared and the first line is marked as the current line.
You can save the key to the current line before the sort and place after sorting (using a managed bean).
However, you should be aware of the impact:
lets assume your table has 1000 rows and is sorted by Crescent after the default name column. Now select you the first line and click Descending in the same column. In this case the selected line will now be the last line. This line is not visible, then you need to scroll in the view with the effect that all the lines are read into memory. If you have 100000 lines that get worse (more memory and more time).
Timo
Tags: Java
Similar Questions
-
How to select the lines/odd table...
How to select lines / odd in a table?
Help, please.
Published by: vaibhav on May 7, 2012 05:30This can be done by using the function mod like this:
For even rows
Select * from (select rownum rn, nom_table.* from tableName) where mod (rn, 2) = 0;For the odd lines
Select * from (select rownum rn, nom_table.* from tableName) where mod (rn, 2) = 1; -
How to select a line of table on click using javascript?
I have an ADF table with some data. If the user clicks on a cell in the table, I want to do something for the whole line.
However, the event.getSource () method only gives me the column that was clicked.
How can I find the line using Javascript?
Hello
Try the approach given by frank at https://forums.oracle.com/thread/2205398
-
Add line before or after the selected line in af:Table
Hello
Please let me know how we can add a line before or after the selected line in the display: table.
Currently I have a table with 2 buttons on toolbar. 1. Add 2. Add after.
The user selects the row and click a button AddBefore and after... then, a blank line must have added in the table according to the clicked button.
Please suggest me your entries.
Thank you
Kiranchk this
http://mjabr.WordPress.com/2011/07/02/how-to-control-the-location-of-the-new-row-in-aftable/ -
Selecting a line to <; af:table >; triggers continuously refresh the page
Hello
I have a table that reflects the State of some data. When loading the page view fills correctly and sets the initial value on a detail panel.
When I select a line the page goes into a constant loop (post). The detail panel updates with the selection, but the loop continues.
We are doing something wrong or that someone has encountered this problem?
Thank you.
-Bill
Env: Build JDEVADF_11.1.2.4.0_GENERIC_130421.1600.6436.1
EDIT - cut any additional data that were not relevant to the response.Hello
on the link layer (PageDef) go to the iterator and set the property "ChangeEventPolicy" to "PPR" 'None '.
Frabnk
-
Selected line AF:table see, when the color
Hello
I put some color on the column of my table with this method:
public String getConditionalBackgroundColor() {}
System.out.println ("WW:" + executeValueExpression ("#{rank.")) (OvruLibelle}') + "-" + getBindingAttributeValue ("OvruLibelle"));
String res = "";
String color = (String) executeValueExpression ("#{rank.") OvrtColor}");
If (color is nothing)
Color = "";
If (color.equalsIgnoreCase ('green'))
RES = res + "background-color: lightgreen;" \n » ;
ElseIf (color.equalsIgnoreCase ("blue"))
RES = res + "background-color: color lightblue;" \n » ;
return res;
}
But now I don't see when a lines which is colorful, is selected...
I can't find a solution... I would like the line becomes blue when selected, as before...
Kind regards
JulienHello
I think you want the selected lines to bottom right blue color?
If Yes, you can override the default property that is given for af | : the table-row data: selected
AF | : the table-row data: selected af | : given the column-cell, af | : the table-row data: selected af | column: {banded-data-cell
make-weight: bold;
color: Blue;
or
background-color: blue;
} -
How to use the checkbox to select several lines of af: table
Hi all
I want to use the checkbox to select several lines of af: table
Kind regards
TomHello
look at this link
http://Sameh-Nassar.blogspot.com/2009/12/use-checkbox-for-selecting-multiple.htmlKind regards
Felix -
Table (ADF 11 g) does not get updated on the selection of lines...
Hi all
I have a table element (ADF 11 g) in my page with the selection of multiple lines. I have my own row selection listener. Whenever I have select several lines with the CTRL key, the table is getting updated. It is fetching the data again for each selection. I don't want the table to get updated whenever I select a line. In the im listener manually selected do the line current. The code below is the table row selection listener.
public void tableRowSelectionListener (SelectionEvent selectionEvent)
{
Add the code in the event here...
String tableRowSelectionListener = "tableRowSelectionListener";
Table richeTableau = (RichTable) selectionEvent.getComponent ();
Set of keys to RowKeySet = table.getSelectedRowKeys ();
Txn_id = number ((Number) ((Key) ((List) keySet.toArray () [0]) .get (0)) .getAttribute (0));
int noRowsSelected = ((List) keySet.toArray () [0]) .toArray () .length;
Rank [txnrows] = null;
if(noRowsSelected == 1)
{
PscTransactionsViewImpl txnVO = (PscTransactionsViewImpl) amImpl.getPscTransactionsView2 ();
if(txnVO!=null)
txnrows = txnVO.findByKey (new Key (new Object [] {txn_id}),-1);
If (txnrows! = null & & txnrows.length > 0)
{
SelectedRow PscTransactionsViewRowImpl = (PscTransactionsViewRowImpl) txnrows [0];
txnVO.setCurrentRow (selectedRow);
}
}
}
How to select a row in the table easily (without the table is refreshed). ?
Thanks in advance,
SwathiHi swati,
Set property of 'changeeventpolicy' on 'none' & 'useRowHints' to 'default' for the list that you iterate.
YP.
-
How to block a select statement for a table of the specified until validation line
Hello
How to block a SELECT statement for a specified row in a table until willingness to engage occure?
My procedure is part of a Stock request and if a user (X) get stock 1 piece, another user must wait for the user (Y) complete his reportoire.
So, let say my stock have 10 pencils.
When the X user starts the Stock_PLS procedure, in table Stock, line (e.g. R1) that user X should work with it, must be lock up to what the commit / rollback will appear.
procedure Stock_PLS...
Start
..
pencils: pencils-1 =;
..
End
Observation-> pencils: = 9;
This means that is a user there, run SELECT * stock of the table where rows_id = R1, SELECTION should wait the Stock_PLS started by user X will be completed (with commit or rollback) and his SELECT should return the value 9.
What I need, is that Oracle has something like LINE EXCLUSIVE TABLE LOCK, but in my situation the SELECT statement should be denied on the specified lines, until the end of the procedure.
Kind regards
MichaelHello
You can achieve this using the update with the Select clause.
You can write your select statement like this
SELECT * from stock of the table where rows_id = R1 for update; -
I know this was asked (I read all the other posts on the same question), but I have no luck with the 'official' way to do it.
I'm doing a row of a table (in hot mode) to become selected if you click on one of its cells. Here is my point:
int CVICALLBACK TableTest (int panel, int control, int event, void *callbackData, int eventData1, int eventData2) { Point cell; switch (event) { case EVENT_LEFT_CLICK: GetTableCellFromPoint(panel,control,MakePoint(eventData2,eventData1),&cell); if (cell.x == 0 && cell.y == 0) return 1; // Not on a row/col SetTableSelection(panel,control,VAL_TABLE_ROW_RANGE(cell.y)); break; } return 0;
What I see, is that the just SetTableSelection is not what it is supposed to do. I can break the function to the GetTableCellFromPoint and I can see the line concerned implement cell.y, but then selecting the line fails.
I found a good comment on the other thread about the mode of control of the table. This poster pointed out that, if the table is in non-indicateur mode, my reminder must swallow the event. OK, I tried and it works somehow. I can see the selected line, but it's a strange effect highlighted, not a dark solid grey cell background. See attachment (I've highlighted the line that was clicked).
Which leads to more questions. On a hot table, with traditional events which don't are NOT swallowed, event that creates the selection dark grey background of a cell?
To smile, I also tried to put my table saw mode and do not swallow all of the events. But here there is no selection at all.
So I'm just very confused about this. What I am doing wrong?
I don't think you're doing something wrong, apart from the fact that you're not swallowing the event when you change the selection. But even if your code does not she, you said that you have done this anyway, so it's probably a moot point.
On the other hand, I don't think you need to swallow the event when the user clicks on a row or column. As your reminder override mouse click in this case, I think you should allow the table to manage the event. Also, I think that your condition should be (cell.x == 0 | cell.y == 0) instead - the difference between the two conditions occurs when the user clicks on a row or column header and the table must already do what you want it to do in this case.
The only reason that you see the outline instead of the inversion of color is because it's as if the table is not the active control in the Panel. And that's how all the table selections are drawn when the table is not the focus. If you tab through the table, after you change the selection is not the change of plans? In addition, if you try to run a program example with a table (for example, samples\userint\gridview.prj). As you move the selection of this table and then tab away from the control, can't the same thing?
Luis
-
Dynamically apply the color to the lines of Table
Hello
I use JDeveloper - 11.1.1.6.0 version
I have a requirement to apply the background color for rows in the table dynamically.
In the table, I have a few lines with a checkbox.
When I select the checkbox of the line, the line selected as well as lines before and after the selected line should be displayed with a background color.
Please let me know of inputs for this question.
Thank you
RaviHello
You can do this by surrounding components of the cell (outputText, inputText, checkBox etc) with for example a panelLabelAndMessage component. Then on this property of component inlineStyle use EL to refer to a property of the managed bean. The managed bean property can now assess the State of checkbox selection. The part of thing in your question is to say during the rendering of the previous and next row that the checkbox in the line between has been selected. You must find a way to say this. An option would be to apply the logic as below
JUCtrlHierNodeBinding currentRenderedAdfRow = ... use facesContext --> getApplication --> getExpressionFactory --> createValueExpression to create a handle to the #{row} expression Row rw = currentRenderedAdfRow.getRow(); BindingContext bctx = BindingContext.getCurrent(); BindingContainer bindings = bctx.getCurrentBindingEntries(); DCIteratorBinding dciterator = (DCIteratorBinding ) bindings.get("Name of iterator used by table "); RowSetIterator rsIterator = dciterator .getRowSetIterator(); Row prevRow = rsIterator.setCurrentRow(rw); int currRowIndex = rsIterator.getCurrentRowIndex(); Row prevRow = getRowAtRangeIndex(currRowIndex-1); Row nextRow = getRowAtRangeIndex(currRowIndex-1); //return CSS that colors the background if the following conditions are true if ( ((DataType) rw.getAttribute("checkBoxAttr")) || ((DataType) prevRow .getAttribute("checkBoxAttr")) | ((DataType) nextRow .getAttribute("checkBoxAttr"))){ //color background returning CSS } else{ return empty string }
I wrote this code to the top of my head, to ensure you are looking for null pointers (for example if there is no such thing as a prev-line). Also consider caching the calculation so that it doesn't have to be performed for each cell in a row, but only once per line. For example you can save the color and the line key in a bean managed in scope view and then compare the key with this bean managed before performing the calculation
Frank
-
Multiple selection of records in table advanced to update in the Search Page.
Hi all
I write the code below, to select multiple records in table advanced for the update after clicking on the button update in the Search Page.
I write this code in Processform request, but I got the exception when I run the code below.
If (PageContext.GetParameter ("UpdateOnSeaBtn")! = null)
{
Am = (XxSupppacklistAMImpl) pageContext.getApplicationModule (webBean) XxSupppacklistAMImpl;
am.saveRollback ();
OAViewObjectImpl upDtVO = (OAViewObjectImpl) am.findViewObject ("PackingListSeaVO");
PackingListSeaVORowImpl line;
HashMap vParm = new HashMap();
Row [] rows = upDtVO.getFilteredRows ("SingleSelection", "Y");
int fetCount = upDtVO.getRowCount ();
System.out.println ("Teh recovered rowcount is:," + fetCount);
RowSetIterator multiIter;
multiIter = upDtVO.createRowSetIterator ("multiIter");
multiIter.setRangeStart (0);
multiIter.setRangeSize (fetCount);
for (int i = 0; i < fetCount; i ++)
{
Row = (PackingListSeaVORowImpl) multiIter.getRowAtRangeIndex (i);
If (Row.GetAttribute ("SingleSelection")! = null)
{
If (Row.GetAttribute ("ItemNumber")! = null)
{
Object vitemNum = row.getAttribute ("ItemNumber");
System.out.println ("The selected element Num is:," + vitemNum);
vParm.put ("ItemNumber", vitemNum);
pageContext.setForwardURL ("OA.jsp?page=/xxfls/oracle/apps/po/packlist/webui/XxSuppalistcrealistPG", / / here, I got the exception below)
NULL,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
NULL,
vParm,
false, / / RetainAM
OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
OAWebBeanConstants.IGNORE_MESSAGES);
}
}
}
multiIter.closeRowSetIterator ();
}
}
}
could you, please, can someone help on this.
I got below exception to the side server when it is run the code above.
Error (125,48): method setForwardURL (java.lang.String, null, null, byte, java.util.HashMap, boolean, java.lang.String, byte) is not not in the interface oracle.apps.fnd.framework.webui.OAPageContext
Kind regardsHello
832859 wrote:
for (int i = 0; i)<>
{
Row = (PackingListSeaVORowImpl) multiIter.getRowAtRangeIndex (i);
If (Row.GetAttribute ("SingleSelection")! = null)
{
If (Row.GetAttribute ("ItemNumber")! = null)
{
Object vitemNum = row.getAttribute ("ItemNumber");
System.out.println ("The selected element Num is:," + vitemNum);
vParm.put ("ItemNumber", vitemNum);> pageContext.setForwardURL"OA.jsp.page=/xxfls/oracle/apps/po/packlist/webui/XxSuppalistcrealistPG",//here I got below exception
NULL,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
NULL,
vParm,
false, / / RetainAM
OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
OAWebBeanConstants.IGNORE_MESSAGES);
}
}
}-Here is you call pageContext.setForwardURL loop.
>I got below exception to the side server when it is run the code above.
Error (125,48): method setForwardURL (java.lang.String, null, null, byte, java.util.HashMap, boolean, java.lang.String, byte) is not not in the interface oracle.apps.fnd.framework.webui.OAPageContext-check 5th param should nt be vParm if it is null
Finally... After the for loop ends call... y bcz assume this page grouped 10 rows can he navigate both on the next page...:
pageContext.setForwardURL ("OA.jsp?page=/xxfls/oracle/apps/po/packlist/webui/XxSuppalistcrealistPG",
NULL,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
NULL,
NULL,
false, / / RetainAM
OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
OAWebBeanConstants.IGNORE_MESSAGES);
}Concerning
Meher IrkPublished by: Meher Irk on March 31, 2011 19:54
-
How to select a line in the middle of a recordset?
UserID answered QuestionID
10 9 N
10 8 N
10-7 N
10 6 N
10 5
10 4 Y
10 1
In the table sorted by QuestionID DESC, how can I select the first row from the bottom up with answer equals 'n'?
In the example above would be:
10 6 N
I need to select that line and get the value of equal to 6 QuestionID.
Right now I have:
Select QuestionID
of tblMap
When answered = ' don't
and ROWNUM = 1
order by QuestionID CSA;
This always tidy most of the top, that would be:
10 9 Nby reversing the sort in a sorted query under such as rownum 1 is the record of interest:
select userid, questionid, answered from (select userid, questionid, answered from tblMap where answered='N' order by questionid ASC) where rownum=1 USERID QUESTIONID ANSWERED ---------------------- ---------------------- -------- 10 6 N 1 rows selected
Published by: Sentinel July 8, 2009 13:53
-
How to get the values of the modified line of table of the ADF?
JDev 11.
I have a table that is filled with bean data.
I need to save changes after the user makes changes in any table cell. InputText is defined for the table column component.
I've defined ValueChangeListener for inputText field and AutoSubmit = true. So when the user change the value field inputText, the method is called:
public void SaveMaterial (ValueChangeEvent valueChangeEvent) {}
getSelectedRow();
SaveMaterial (material);
}
This method must call getSelectedRow that take values of the selected table row and save them in object:
private line {} getSelectedRow()
Table richeTableau = this.getMaterialTable ();
Selection of the iterator = table.getSelectedRowKeys () .iterator ();
While (selection.hasNext ())
{
Key of the object = next ();
table.setRowKey (key);
Object o = table.getRowData ();
material = o (HARDWARE);
}
System.out.println ("selected hardware Desc =" + material.getEnumb ());
Returns a null value.
}
Problem is that getSelectedRow method is not new (edited) values, old values are still used.
I tried to use ActiveButton with the same method and it works very well in this case. New values are inserted and active line in the object selected.
JSF:
< af:table var = 'row' rowSelection = "single" columnSelection = "unique."
value = "#{ManageWO.Material}" binding = "#{ManageWO.materialTable}" > "
< af:column sortable = "false" headerText = "E-number" >
"< af:inputText value =" #{row.enumb} "valueChangeListener =" #{ManageWO.SaveMaterial} "autoSubmit ="true"/ >
< / af:column >
< af:column sortable = "false" headerText = "Description" >
"< af:inputText value =" #{row.desc} "valueChangeListener =" #{ManageWO.SaveMaterial} "autoSubmit ="true"/ >
< / af:column >
......
< / af:table >
< af:activeCommandToolbarButton text = "Save" action = "#{ManageWO.EditData}" / >
What is a good place where Save method must be called to get the new values (edited) table of the ADF?
Thank you.Have you looked into the valueChangeEvent?
There oldValue and newValue attributes.
public void SaveMaterial(ValueChangeEvent valueChangeEvent) { Object oldVal = valueChangeEvent.getOldValue(); Object newVal = valueChangeEvent.getNewValue(); // check if you see what you are looking for..... getSelectedRow(); SaveMaterial(material); }
Timo
-
How can disable us the selection of lines under condition
Hi Experts,
JDEV version 12.1.3.0
How can disable us the selection of lines under certain conditions.
As the lines newly unregistered should be allowing the selection of lines.
Saved lines should be disabled from the selection.
Can achieve us.
Please me advice accrdingly
Thank you
Roy
You are implementing a generic selection as shown here http://www.oracle.com/technetwork/developer-tools/adf/learnmore/23-generic-table-selection-listener-169162.pdf Manager in this handler, you check and validate the selection of our not.
Timo
Maybe you are looking for
-
Google toolbar is strange. It is not 'complete' when I type a partial search.
With the help of FF4... When I begin a search by typing in the Google toolbar, and choices appear in the drop-down menu, select one of the choices but they do not fill the search. For example, I start typing "am holland" and several choices appear in
-
HP designjet 500 plus network problem
Hello I'll need your help. I have the HP designjet 500 printer more and today I bought the HP JET DIRECT 620N NETWORK CARD. I installed inside the socket, connecting the card with an ethernet to pc cable. I went to the installation of hp on the monit
-
Where did go the 'Windows File System Namespace instructions' documentation?
Hi all Could you please help me where I can find under "Windows File System Namespace use Guidelines."?This document is mentioned in the Installation Guide (https://msdn.microsoft.com/en-us/library/windows/desktop/dn742461 (v = vs. 85) .aspx)But the
-
How to save a photo released on film
Here is my code, but I could not find photos that I took in the floder to camera. Anyone know what I did wrong?Thank you. _______________________________________________________________________ Project pane tabbed templateimport bb.cascades 1.0import
-
BlackBerry Smartphones accidentally deleted Calculator icon-cannot reinstall
I have a BB8830 with 4.2, waiting for Verizon to release 4.5. I accidentally deleted my homescreen Calculator icon and cannot find any way to reinstall the application or the icon. Any ideas?