First line of table is displayed as selected always what application load.
Hello..I have a table with a few lines in it. When the application is loaded as the first row of the table under the selected shape always appears. I don't want one of the lines to display under the selected name.
How can I avoid this?
My version of jdev 11.1.1.5.0
Published by: Lovin_JV_941794 on March 12, 2013 02:13
Hello
You can remove the attribute
selectedRowKeys = ' #{bindings. " XXXX.collectionModel.selectedRow}.
This would ensure that there is no selected line persisted. Alternatively, you can paste the code jspx also for the best answer.
~ Abhijit
Tags: Java
Similar Questions
-
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
-
ADF table selected displayRow does not display the selected line
Hello
JDev 11.1.2.4
I have a table with selection enabled and displayRow property the value selected. In the workflow, I have an ExecuteWithParams activity, and then a method activity that restores the current iterator of the line. Finally the activity view that displays the table.
Restore the current line with key
Iterator DCIteratorBinding = ADFUtils.findIterator ("MyIterator");
iterator.setCurrentRowWithKey (currentKey); currentKey is a string
The question I have is that the current line is properly restored, but the table does not display the page of "range" of the current line while the displayRow is the selected value. My table has 500 rows, the table displays the top 25 while the current line is the 500th line. I expect the table to display the line 475 to 500 line.
What I am doing wrong?
Thank you
You can save the index lines before executing your method and then set the iterator to this index.
The technique is described in this blog https://tompeez.wordpress.com/2016/02/12/naviagting-an-aftable-in-pagination-mode-from-a-bean/
Timo
-
Hi all
We use JDeveloper Studio Edition Version 12.1.3.0.0 and deployed on GlassFish Server Open Source Edition 3.1.2.2 (build 5) and connect to the SQLServer database.
We created a table ADF programming related to a SortableModel created programmatically to a bean.
We need to select and highlight the first row in the table just after making it to retrieve data based on the first line.
We tried the based on the following thread: How to call the bean support just after JSFF / page fragment loads? and a few other posts online, but it does not work very well.
W has created a hidden text in the bottom of the JSF model as follows:
< af:table varStatus = "rowStat" Summary = "table" value = "#{pageFlowScope.crudBean.dynamicTable.collectionModel} '"
Rows = "#{pageFlowScope.crudBean.dynamicTable.collectionModel.RowCount} '"
contentDelivery = 'immediate' var = 'row' rendered = 'true '.
Binding = "#{backingBeanScope.crudBackingBean.tasksTable} '"
selectionListener = "#{backingBeanScope.crudBackingBean.customListener} '"
"rowSelection ="single"id ="t1"partialTriggers =": pt_gr2 "columnStretching =" column: clmn0 ">
< af:forEach items = "#{pageFlowScope.crudBean.dynamicTable.columnNames}" var = 'name' varStatus 'vs' = > "
< af:column sortable = "true" sortProperty rowHeader = "#{name}" = "no style" headerText = "#{pageFlowScope.crudBean.dynamicTable.columnLabel [name]}" "
inlineStyle = "width: 100px;" ID = "clmn$ {vs.index}" >
< af:activeOutputText value = "#{row [name]}" id = "aot1" / >
< / af:column >
< / af:forEach >
< / af:table >
....
< af:outputText id = "hiddenOutputTextId" visible = "false" value = "#{backingBeanScope.crudBackingBean.afterPageLoad} '"
Binding="#{backingBeanScope.crudBackingBean.hiddenOutputText}"/ >
And we have added the code to the bean to support below:
public String getAfterPageLoad() {}
If (!.) {AdfFacesContext.getCurrentInstance () .isPostback ()}
selectFirstRowInTasksTable();
}
Return afterPageLoad;
}
public void selectFirstRowInTasksTable() {}
try {}
RKS RowKeySet = new RowKeySetImpl();
RowKeySet rksEmpty = new RowKeySetImpl();
Model CollectionModel = tasksTable.getValue ((CollectionModel));
ROWCOUNT int = model.getRowCount ();
If (rowcount > 0) {}
model.setRowIndex (0);
Key of the object = model.getRowKey ();
RKS. Add (Key);
tasksTable.setSelectedRowKeys (rks);
SelectionEvent selectEvent =
new SelectionEvent (tasksTable.getSelectedRowKeys (), rks, tasksTable);
selectEvent.queue ();
customListener (selectEvent); / / to retrieve data
AdfFacesContext.getCurrentInstance () .addPartialTarget (tasksTable);
}
} catch (Exception e) {}
}
}
I think that () selectEvent.queue; should work even without calling the customerListener, but it is not working in all cases.
What is the problem in my code?
Have you tried to bind property of 'selectedRowKeys' to selection configuration / bean there?
Something like:
public RowKeySet getSelectedRKS() { if (rks == null) { // make first record as selected // create RowKeySet and assign it to rks variable(where rks is variable defined in bean with some scope higher than request scope) } return rks; }
Dario
-
Hallo,
I created an af:table like this https://community.oracle.com/servlet/JiveServlet/downloadImage/2-12620067-7140/cmnt1.png following the advice that the kind has been suggested to me by Ashish (for details, see [ADF, JDev 12.1.3] how to display multiple records on the same page... not in a table, but display a form for each record)
When the table is loaded for the first time, it appears correctly.
But often (not always) when I select a new line, the selected line up to become "white" and its content disappears http://digilander.libero.it/flattit82/OTN_FILES/rowDisappearing.png
This product especially if I change the value of 1 or 2 fields contained in the line.
If I select several lines - one after the other one - the part visible AF: table may become totally white.
Looks like a refresh problem.
The table is in a tab.
If I switch to the tab, then I it again once the table appears again correctly.
Another thing I noticed: for example 2 rows have disappeared, I select an end of line I have empty in a required field: when I select another line, the popup "this field is required" appears in the row selected previously and magically all the missing lines are coming back!
The problem seems to be less frequent if I set the selection table = none... but it is always present.
You could you kindly help me to solve this problem?
Thank you
Federico
Hi Federico
See I've made a few changes in your application, this problem is due to your provision
as there are a lot of line of the grid, groups, I simple used Panel of and provision of group only
Thank you
-
Get the first line selected on the CommandButton Click
Hi guys,.
My version of jdev is 11.1.1.5.0. I have table on my Page of Adf.< af:table value = "#{bindings." MyvwVO1.collectionModel}.
var = "row" rows = "#{bindings." MyvwVO1.rangeSize}.
emptyText = "#{bindings." MyvwVO1.viewable? "{'No data to display.': 'Access Denied.'}".
filterModel = "#{bindings." MyvwVO1.queryDescriptor}.
queryListener = ' #{bindings. " MyvwVO1.processQuery}.
filterVisible = "true" varStatus = 'vs' rowBandingInterval = '1 '.
columnSelection = 'single '.
Summary = "Table of suppliers.
selectionListener = "#{bindings." MyvwVO1.collectionModel.makeCurrent}.
rowSelection = "single" id = "t2".
"partialTriggers =": soc1: ctb2: cb22.
fetchSize = "#{bindings." MyvwVO1.rangeSize}.
Binding = "#{MyBN.supplierTableBinding}" >
< af:column id = "c14" frozen = "true" align = "center" >
< af:commandButton action = "viewNext" text = "Next view" id = "cb1" >
< af:setActionListener from = "#{bindings." CurrSupplierSiteId.inputValue}.
to = "#{bindings." SupplierSiteID.inputValue} "/ >"
< af:setActionListener from = "#{bindings." CurrSupplierSiteId.inputValue}.
to = "#{MyBN.supplier_site_id}" / >
< / af:commandButton >
< / af:column >
When I'm clicking viewNext button. When debugging, I get first line provider site Id instead of the current line selected.I also removed the selectedRowKeys of af: table. Now his show is not first line select default, but still get the Site Id of first line supplier back Bean.
{} public void setSupplier_site_id (number supplier_site_id)
This.supplier_site_id = supplier_site_id;
}
public {getSupplier_site_id() number
Return supplier_site_id;
}
No idea what I'm doing wrong.
Thank youRaul
you pass line value.right... so from value as link will not be work.try send as #{row.abc.value} go on setactionListener and so on. You pass the rank value.
-
Delete in af:table always remove the first line when using ExecuteWithParams
Hello world
I got a page with master form and af:table two details related to the master. When I'm trying to remove a line in an af:table of detail, it always removes the first line, any line, I selected before. The table has a single = rowSelection and the line is properly visually selected. I remove the line using a "delete hyperlink" on each line, but I first have to select the line. Delete called a bond (or a method at the bean by removing the current line of the iterator, I tried both, none of them work)
Links page has an ExecuteWithParams defining the correct ID to edit on the master of iterator and an InvokeExecuteWithParams the renderModel value. If I put the refresh condition zero and I hard-code an ID in the binding variable in the model, I am able to delete the selected line.
In addition, I don't know if this information is useful, but if I set the iterator to PPR ChangeEventPolicy, when I select a line, there always select the first line.
Any ideas what I could do wrong? Is this a bug?
I use JDev 11.1.1.7
Thank you
Guillaume
You can try creating a method in ApplicationModule for filter master records instead of executeWithParams?
Ashish
-
Re: How to display records of newlyadded first in the table
Hi all
I use Jdev 11.1.2.3.0
My requirement is I have a table in this table, I have a table and the form. Here, I want to display newly added records, first in the table.but that table always shows of old recordings first.so how do I display it.can someone help out me.
Thank you
G.Shilpa.
You can control the line newly inserted into the table of the ADF
http://lucbors.blogspot.in/2010/12/ADF-11g-how-to-control-where-new-row-is.html
ttp://mjabr.WordPress.com/2011/07/02/how-to-control-the-location-of-the-new-row-in-aftable/
-
How can I change the first line of the table to a header row if it contains PGF with tblHead tags
So far, I have the following text in a JavaScript:
If (tbl. FirstRowInTbl.FirstCellInRow.FirstPgf.PgfFmt.Name = "tblHead")
{
If (tbl. FirstRowInTbl.RowType = 1).
1 is Constants.FV_ROW_BODY
tbl. FirstRowInTbl.RowType = 0;
0 is Constants.FV_ROW_HEADING
on the other
continue;
}
on the other
continue;
It does not work. I'm not comfortable with tbl. FirstRowInTbl.FirstCellInRow.FirstPgf.PgfFmt.Name.
It is clearly wrong. How I would I want to determine the tag of the first paragraph of the first line?
Any help is very appreciated!
Thank you
Ruth
Ruth, here is a function that converts the body lines to the header of a table lines. Please let me know if you have any questions or comments. -Rick
#target framemaker var doc = app.ActiveDoc; // Set a variable for the selected table. var tbl = doc.SelectedTbl; // Convert the first body row to a heading row. bodyToHeadingRow (tbl, 1, doc); function bodyToHeadingRow (tbl, num, doc) { var row = 0; // Select the top "num" rows in the table. tbl.MakeTblSelection (0, num - 1, 0, tbl.TblNumCols - 1); // Push the current clipboard contents and cut the selected rows. PushClipboard (); doc.Cut (Constants.FF_CUT_TBL_CELLS); // Add "num" number of heading rows to the table. row = tbl.FirstRowInTbl; row.AddRows (Constants.FV_Heading, num); // Select the new heading rows. tbl.MakeTblSelection (0, num - 1, 0, tbl.TblNumCols - 1); // Paste the rows from the clipboard into the new heading rows. doc.Paste (Constants.FF_REPLACE_CELLS); // Restore the clipboard contents. PopClipboard(); }
-
selection of lines AF:table after sorting
Hello
If 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:47Please 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
-
All the lines in the table of the ADF appear selected when the page loads
I have a web application which for some adf displayed tables, displays all the lines highlighted that if they were selected. Not all tables in the request to do so, but those who have this feature do it every time.
I see no difference between the declaration for tables that do not appear as well and those who aren't.
I use 11.1.2.1 on Windows 7.
Can someone point me in the right direction? The rowSelection property is set to unique and set apart from that I have no idea where to begin the search.Hello
Just a wild guess here,
You have the properl PKs defined in these tables?
Kind regards
Dimitris. -
Problem with white - style commentary on the first line of the select statement.
SQL * more error? :
It seems that the parser does not like "-" at the end of the first line of the request.
I see this error "ORA-00936: lack of expression" or "ORA-00933: not correctly completed SQL command.
SQL * Plus costs number not the 2nd line when I do that.
If a space follows-, '-', I still get the error.
a single "-" at the end of the line is ignored and the query works
But, "-." will not get the error.
I think that I had this problem before on the inside in the middle of a procedure from PL/SQL package.
--
It is of course easy to avoid. Is this just a quirk or am I missing something?
-----
SQL * more: 9.0.1.4.0 output
Oracle Database 10 g Enterprise Edition release 10.2.0.3.0
---------------------------------------------- -- These provoke an error ---------------------------------------------- SQL select 'a' -- from dual; select 'a' - from dual * ERROR at line 1: ORA-00936: missing expression /* the -- is "-- " */ SQL select 'a','b','c' -- from dual; select 'a','b','c' - from dual * ERROR at line 1: ORA-00936: missing expression SQL select -- select 'a' from dual -- ; select - select 'a' from dual - * ERROR at line 1: ORA-00936: missing expression SQL select 'a' from dual -- ; select 'a' from dual - * ERROR at line 1: ORA-00933: SQL command not properly ended ---------------------------------------------- -- These are OK ---------------------------------------------- SQL select 'a' --. 2 from dual; ' - a Elapsed: 00:00:00.00 SQL select 2 'a' -- 3 from dual; ' - a ------- a single "-" at the end of the line is ignored, query works SQL select 'a' from dual - ; ' - a SQL
Actually, it's in the docs, but we rarely know.
>
Continuing a long SQL More control on additional lines *.
You can continue a long SQL * more command by typing a hyphen at the end of the line and press return. If you want, you can type a space before you type the hyphen. SQL * Plus displays a right angle (>) support as a prompt for each additional line (not in iSQL * more).For example:
SALARY $99 999 COLUMN FORMAT-
SECTION "WAGES."
Since SQL * Plus identifies the hyphen as a continuation character, entering a hyphen in a statement SQL is ignored by SQL * more. SQL * more does not identify the declaration as a SQL statement until after the treatment of entry has joined lines together and removed the hyphen. For example, enter the following:SELECT - 200
100 DOUBLE;
Returns the error:>
It only happens for the first line of a sql statement, because at that time there you are not in the edit buffer. And the order could still be a sql * more order and not a sql command.
Published by: Sven w. on August 7, 2009 16:51
-
Select the first line of the annotations in a vm
Hello
I want to extract only the first line of the note annotations of a vm.
I tried WAT
$vm = get - vm host1
$vm.description | Select - 1 first
But I continue to receive the full description, which looks like this
Microsoft exchange server
support: 24 x 7
OTAP: Production
Status: In Production
Try something like this
$vm = get-vm windows1$vm.description -split '["\n\r"|"\r\n"|\n|\r]' | select -First 1
-
change the first line of a table to a cell style
Hello
I want to change the first line of a table to a cell style.
Is this possible in javascript?
Patrick
Hi patrickbcm,
Try the threshold.
app.activeDocument.stories.everyItem().tables.everyItem().rows[0].cells.everyItem().appliedCellStyle = app.activeDocument.cellStyles.item("row1");
THX,
csm_phil
-
How can I configure only the first row of a DataGrid as the selected line?
I have a "Go" button on a search form that retrieves data in a grid, already linked to data. After the data is read, I want to make the first line in the Datagrid control in the selected row, as if the user has clicked on it. If the result set is empty, I don't want the code down. (I want only one line can be selected at a time)
protected function btnGo_clickHandler(event:MouseEvent):void
{
getSBJsResult.token = baa_data_svc.getSBJs (cmbSrch.text);grdSBJs. // ????? What is happening here to select the first line?
}That should do it.
If this post has answered your question or helped, please mark it as such.
If (myDataGrid.dataProvider.length > 0) {}
myDataGrid.selectedIndex = 0;
}
Maybe you are looking for
-
Y40-70 battery delivers. Measures erroneous, sudden stops
Hi, I have a Y40-70, barely 1 year if this, still in warranty. Battery has serious problems, I never know what is the % real. Will often be State of satiety, and then turns off suddenly. When you restart will report a 0% battery. very incoherent ques
-
How is the setting of control determined reminder ID?
The reason why I ask, is that I seem to be getting unexpected results in a point of order. I have a Table control, which is then duplicated (multiple times) in the same position as the original. I switch between them by setting the ATTR_VISIBLE attri
-
I have a Dell with Windows XP Home Edition system that uses the internet connection. Friday, he had a problem with images in line being "pixel-ed", which means that the image was blurred and boxes. So I did a restore of the system back as much as she
-
HP Deskjet 1010 is stuck to remove
My new HP Deskjet printer is stuck in the remove mode. Does not print. Even if I try to erase Quebec by canceling all print jobs, it remains blocked to remove. I've erased successfully two times and then tried to print something and he went immediate
-
Display Manager Dell change the source of entry by cmd
Hello I'm changing my input between VGA & HDMI source using cmd. So far, I'm only able to switch to VGA but not HDMI: DDM.exe 1:SetActiveInput VGA-> work 1:SetActiveInput HDMI DDM.exe-> does not FYI, I use S2340L.