Af:inputListOfValues popup : selecting first row
Hi,
Is there a way to select first row inside lov popup, the by default behaviour is it selects the rowHeader rather than row itself.
When the lov popup is opened , there is no focus on table resides in the popup
- to focus on table, user has to press down arrow key - which will just focus on rowHeader and not the actual row itself
- to focus row for currently selected rowHeader user has to press right arrow key which will then select the table row itself
its cumbersome everytime when you open lov and do these extra steps to just to select a value from lov
any ideas?
Thanks,
Dev
so, why it supports keyboard navigation at all? either support full features or nothing. the fact that user can use up/down arrow keys which selects rowHeader of every row , rather than actual row
regarding "Search and Select : " it could be anything it has nothing to do with row selection,
Thanks,
Similar Messages
-
How to select first row of each group in a group by statement
Table
ProdCode PackType BatchCode ExpDate
BURSLO 1 BS20GO-2001 01/12/2004
BURSLO 1 BS20GO-2011 01/01/2007
BURSLO 2 BS20GO-2027 01/02/2003
BURSLO 3 BS20GO-2060 01/02/2004
BURSOI 9 BU10F12 01/02/2006
BURSOI 9 BU10GO-1301 01/05/2005
BURSOI 11 BU10GO-131 01/06/2008
BURSOI 2 BU10GO-1311 01/06/2007
BURSOI 13 BU10GO-1328 01/07/2006
Output
ProdCode PackType BatchCode ExpDate
BURSLO 1 BS20GO-2011 01/01/2007
BURSLO 2 BS20GO-2027 01/02/2003
BURSLO 3 BS20GO-2060 01/02/2004
BURSOI 9 BU10F12 01/02/2006
BURSOI 11 BU10GO-131 01/06/2008
BURSOI 2 BU10GO-1311 01/06/2007
BURSOI 13 BU10GO-1328 01/07/2006
i need first row after group by ProdCode, PackType and decreading order of ExpDate
Please Help me.
Thanks.
Try the below:
;With cte
as
(Select *,Row_Number()Over(partition by Prodcode,Packtype Order by expdate desc) Rn From Tablename)
Select * From cte where rn=1 -
Af:tableselectmany always selects first row and ONLY first row
My table in jsp:
<af:table value="#{bindings.AluNoExpeAluM1.collectionModel}" var="row"
rows="#{bindings.AluNoExpeAluM1.rangeSize}"
first="#{bindings.AluNoExpeAluM1.rangeStart}"
emptyText="#{bindings.AluNoExpeAluM1.viewable ? \'No rows yet.\' : \'Access Denied.\'}"
binding="#{cient20uSeleccionAluBean.tablaMultiple}">
<af:column sortProperty="Vnumdocu" sortable="false"
headerText="#{bindings.AluNoExpeAluM1.labels.Vnumdocu}">
<af:outputText value="#{row.Vnumdocu}"/>
</af:column>
<af:column sortProperty="Vapeynombre" sortable="false"
headerText="#{bindings.AluNoExpeAluM1.labels.Vapeynombre}">
<af:outputText value="#{row.Vapeynombre}"/>
</af:column>
<f:facet name="selection">
<af:tableSelectMany text="Select items and ..." autoSubmit="true">
<af:commandButton text="commandButton 1"
action="#{cient20uSeleccionAluBean.elegirAlumnoAction}"
partialSubmit="true" immediate="true"/>
</af:tableSelectMany>
</f:facet>
</af:table>
Table don't have SelectionListener and SelectionState, but the method only select the first row from iterator.
This method "elegirAlumnoAction":
public String elegirAlumnoAction() {
Iterator itRs = this.getTablaMultiple().getSelectionState().getKeySet().iterator();
while(itRs.hasNext()){
Key k = (Key) itRs.next();
System.out.println(k.toString());
Row r = IteratorUtil.obtenerIteradorPorDefecto(this.ITERADOR_RESULTADO).getRow(k);
System.out.println(r.getAttribute("Vnumdocu"));
IteratorUtil.obtenerIteradorPorDefecto(this.ITERADOR_RESULTADO).setCurrentRow(r);
return null;
Message was edited by:
jortri
Message was edited by:
jortriMaybe the following can help you:
http://andrejusb.blogspot.com/2007_02_01_archive.html
http://andrejusb-samples.blogspot.com/2007/02/jdevadf-sample-multi-selection-feature.html -
Hi,
I have a page with two tables - Master-Detail. Upon first load of the page, I would like the first row in the master table got selected automatically, and so the detail table is displayed with the corresponding data for the master. I have implemented similar page before, and the first row always got selected automatically. But not sure why, for this page, none of the rows in the table got selected upon first load of the page. I have to manually highlight a row in the master table, then the detail table will display the corresponding data.
Any ideas?
Thanks.
-MinaYes, I did set the partial trigger. That's why when manually select the row on the master table, the detail table get refreshed. The problem is the first time entering the page, and not row get selected automatically in the master table. Here is the code snipplet of the detail table:
<af:table value="#{bindings.ItasLookupCodesVO1.collectionModel}"
var="row" rows="#{bindings.ItasLookupCodesVO1.rangeSize}"
emptyText="#{bindings.ItasLookupCodesVO1.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.ItasLookupCodesVO1.rangeSize}"
rowBandingInterval="0"
filterModel="#{bindings.ItasLookupCodesVO1Query.queryDescriptor}"
queryListener="#{bindings.ItasLookupCodesVO1Query.processQuery}"
filterVisible="true" varStatus="vs"
selectedRowKeys="#{bindings.ItasLookupCodesVO1.collectionModel.selectedRow}"
selectionListener="#{bindings.ItasLookupCodesVO1.collectionModel.makeCurrent}"
rowSelection="single" id="t2" partialTriggers=":::pc1:t1"
editingMode="clickToEdit" summary="Lookup Codes">
The table is a child of a panelCollection.
Any more ideas?
Thanks.
-Mina -
Alv colour row select first row
Hi. I hava an alv with colour in some rows. When i want to select another row distint the first, it always goes to de first row and it doesn't allow me select other row.
how can i solve this to select for example the third row.
thanks.Hi,
Are you programatically setting the selection of the ALV row anywhere in your program? This might happen if you set the lead selection of the node in the WDDOMODIFYVIEW method of your view. Can you please check that ? Also you can try changing the selection mode of your ALV:
lo_config_model_value = lo_interfacecontroller->get_model( ).
lo_config_model_value->IF_SALV_WD_TABLE_SETTINGS~SET_SELECTION_MODE(CL_WD_TABLE=>E_SELECTION_MODE-AUTO).
Best Rgds,
Viqar. -
How to select first row of JTable by default
Hi,
I have a JTable with 5 rows.
When the software starts, none of the rows are selected.
I wish to keep the first row selected by default.
How do I do it?
I couldnt find any method like setSelectedRow() !!!
Does anyone have a sample code plz?
Thanks.
Anujcouldnt find any method like
setSelectedRow()You need to use getSelectionModel() first.
Another way is to use:
table.changeSelection(0, 0, false, false); -
Problem: I search for 20 companies with highest turnover in a table. Its a dynamic SQL (created at runtime), I can not use a hard coded fetch of 20 rows.
(Example is a simple table with companyID, turnover and a key)
I read in documentation, that first rowno is applied, then the order (to be fast and not access the whole big table). Ok.
Oracle goes same way, this is the work around:
SELECT * FROM (SELECT t1.Firmid_i AS t1_Firmid_i, SUM( t1.Amount_dc ) AS t1_Amount_dc FROM DEMO.turnover t1 GROUP BY t1.Firmid_i, t1.Productid_i ORDER BY 2 desc ) WHERE rownum <= 20
I try this on a MaxDb :
SELECT * FROM (SELECT t1.Firmid_i, MAX( t1.Amount_dc ) FROM DEMO.turnover t1 GROUP BY t1.Firmid_i ORDER BY 2 asc) WHERE rowno <= 20
-> an error occur (General error;-5016 POS(103) Missing delimiter: ), the order in the inner sql is not allowed
I can change the statement:
SELECT * FROM (SELECT t1.Firmid_i, MAX( t1.Amount_dc ) FROM DEMO.turnover t1 GROUP BY t1.Firmid_i) WHERE rowno <= 20 ORDER BY 2 asc
Now I got 20 row (20 rows sorted), but not the results I need (sort is used to late).
Does anyone knows a workaroud?
TIA
ChristianHello Christian,
Unfortunately, MaxDB does not support the ORDER BY/GROUP BY condition in sub-selects to achieve such a result set limitation, nor does it support a kind of LIMIT statement
as MS-SQL does.
Anyway, to give the correct results, the query will anyway
create the complete result set, to apply the correct sorting (as the rows can only be sorted when for all rows the values are known).
There is unfortunately no way to formulate such a query
in a single SQL statement, and so you can only
fetch as much rows you need, and discard the rest,
which you said is not possible for you.
Sorry
Alexander Schröder -
Select first row from every set
id num dtl sdate udate
4 4JQ010907 MO601159736142323333 09-NOV-03
4 4JQ010907 MO601159736142323333 09-NOV-03 08-DEC-03
4 4JQ010907 MO601159736142323333 09-NOV-03 08-NOV-04
4 4JQ010907 MO601159736142323333 09-NOV-03 09-DEC-03
4 4JQ014529 W436-5902-285308-17-00 30-JAN-04
4 4JQ014529 W436-5902-285308-17-00 30-JAN-04 02-FEB-04
4 4JQ014529 W436-5902-285308-17-00 30-JAN-04 08-NOV-04
For each record having the same num, i want only one record picked, and that one should not have udate blank.
How can I do this using ROWNUM?...but there is a pitfall when the columns in selection list are not the same to
columns in order by. Here unique can't help (while row_number() will
also return one row (another question is it wnat you need or not):
Compare:
SQL> select ename, deptno,sal from emp_1 order by 2,1;
ENAME DEPTNO SAL
CLARK 10 1225
CLARK 10 2450
KING 10 2500
KING 10 5000
MILLER 10 650
MILLER 10 1300
ADAMS 20 550
ADAMS 20 1100
FORD 20 1500
FORD 20 3000
JONES 20 1487,5
JONES 20 2975
SCOTT 20 1500
SCOTT 20 3000
SMITH 20 500
SMITH 20 1000
ALLEN 30 900
ALLEN 30 1800
BLAKE 30 1425
BLAKE 30 2850
JAMES 30 560
JAMES 30 1120
MARTIN 30 625
MARTIN 30 1250
TURNER 30 750
TURNER 30 1500
WARD 30 725
WARD 30 1450
28 rows selected.
SQL> select ename, deptno, sal from
2 (select ename, deptno, sal,
3 dense_rank() over(partition by deptno order by ename) rn
4 from emp_1) where rn = 1
5 /
ENAME DEPTNO SAL
CLARK 10 1225
CLARK 10 2450
ADAMS 20 550
ADAMS 20 1100
ALLEN 30 900
ALLEN 30 1800
6 rows selected.
SQL> select unique ename, deptno, sal from
2 (select ename, deptno, sal,
3 dense_rank() over(partition by deptno order by ename) rn
4 from emp_1) where rn = 1
5 /
ENAME DEPTNO SAL
CLARK 10 1225
CLARK 10 2450
ADAMS 20 550
ADAMS 20 1100
ALLEN 30 900
ALLEN 30 1800
6 rows selected.
SQL> select ename, deptno, sal from
2 (select ename, deptno, sal,
3 row_number() over(partition by deptno order by ename) rn
4 from emp_1) where rn = 1
5 /
ENAME DEPTNO SAL
CLARK 10 1225
ADAMS 20 550
ALLEN 30 900Rgds. -
Selecting The First Row Of h:dataTable after getting new DataModel f
Hi Friends
If any one knows how to select first row of a dataTable on change of a DataModel it is representing please give the replyI haven't understood the answer of UlrichCech
I am not using IRDA for my development purpose.
and abt your reply ..
I have already tried tht way but the problem is that
whenever I selects different row page gets postback and selects
the first row again and there is no way to trap posback event in JSF
like ASP.NET
I think my answer is some where related to DataModelListener.. -
Select top row in Single Query?
Hi
Can somebody help me to write a query to get the first row after order by clause using single query alone.
Example:
I can write following query to select first row
select * from (selec * from t order by col1) where rownum = 1;
But here I should not use inline view to get the result. Because my original requirement needs to use this query in select list and it needs to use a column (of a table from the FROM clause) in the where clause of inline query. Because there is restriction that we can not use the column (of a table from the FROM clause) more than one level of inline query.
Please help me.Raghav.786 wrote:
Hi
Can somebody help me to write a query to get the first row after order by clause using single query alone.
Example:
I can write following query to select first row
select * from (selec * from t order by col1) where rownum = 1;
But here I should not use inline view to get the result. Because my original requirement needs to use this query in select list and it needs to use a column (of a table from the FROM clause) in the where clause of inline query. Because there is restriction that we can not use the column (of a table from the FROM clause) more than one level of inline query.
Please help me.
What Oracle version are you?
If you have 12c you can use
select col1,...
from t
order by col1
fetch first 1 row only;
If less than 12c, you have can't do it without a subquery.
What are you actually trying to do? Read Re: 2. How do I ask a question on the forums?
and follow the advice there by giving example create table and insert sample data statements and
explaining clearly what you are trying to do. Then we can help more. -
How to pass the selected table row data from popup to source view
Hi ,
I have requirement of passing the data from popup view to source. , searching some data in popup view and displaying in table,
Like i am passing some input and click search button will display the data in table, when select any of the row in the table and click on the another button , i should be able to pass the select row to the source view and also should close the popup.
When i implement , In the popup windiw, when i enter the customer no, and click on search button, it is closing the popup itslef. not able to see the data in popup.
Can u tell me what is that soultion.
Regards
VijayHi Harsimran
Thanks for the reply,
1) Source view
In "Source View" i have input field called Customer_no. But, the end user will not have any idea , what customer no to enter. so i am searching the customer no in the popup view.
1) Customer_no( This is an inputfiled , to get the customer no from the popup view)
2) Get Customer NO( This is a button to call the popup view)
"Get Customer NO" This button action will open the popup view.
In this popup, i have
1) Input field (To enter the search term)
2) Search (To seach the customer no based on the search term)
3) Table ( To display the search data)
4) Button in Table tool bar called "Select" .( To close the popup view after selected the required data in the table to pass it back to the source view).
so in the popup view what happening is, when i click on the search button itself , it is closing the popupview by transfering the first row of the tbale ,with out select the required row in the table.
i need to close the window after click on the "Select" button in the toolbar , after selected the required row data to trasfer in the table.
Can u pelase tell me what are the modifcations i need to do it.
Regards
Vijay -
How do I set only the first row of a DataGrid as the selected row?
I have a "Go" button on a search form that fetches data into an already data bound grid. After the data is fetched, I want to make the first row in the Datagrid the selected row, as if the user clicked on it. If the result set is empty, I don't want the code to crash. (I only want one row to be able to be selected at a time)
protected function btnGo_clickHandler(event:MouseEvent):void
getSBJsResult.token = baa_data_svc.getSBJs(cmbSrch.text);
grdSBJs. // ????? What goes here to select the first row?This should do it.
If this post answered your question or helped, please mark it as such.
if(myDataGrid.dataProvider.length > 0){
myDataGrid.selectedIndex = 0; -
How to disable first row selection in a table
Hi,
I have three tables which have master child relationship. I need to enable a button for each table based on row selection of corresponding table.But first row is being selected automatically and the buttons are enabled.
what should i do in order to avoid first row selection in a table.I tried by removing selected Row Keys.But still i am getting the same problem.can anyone suggest on this.
Thank You,
SukumarI know a hack but I don't recommend it, anyway here it goes:
Remove selected Row Keys
Change selectionListener from the default and create a custom action listener (You can call the default one inside of it) (Tip: use makeCurrent function in this PDF
This will make sure that there is no selected row highlighted for the first time, but it actually means that the first row is selected, it's just not shown.
This method is tested with 11.1.1.7 -
How to set the first row as selected in single selection of table
when the page renders how do we make the first row as selected for single selection in a table.
Thansk a lot for your helpset the selection Attribute's value to 'Y' for the first row. Thats enough.
eg;
Row row=vo.first();
row.setAttribute("SelectionAttribute", "Y");
--Prasanna -
How to make the first row selected before the display of ALV grid
Hello Experts,
I created a ALV grid using custom container in a screen . Now i want do the follwing:
1. i want that, the <b>first line must be selected before the display of ALV.</b>
2. I have selection buttons . But i dont want the multiselect button and the
standard toolbar in the ALV grid.
Could any one please help me regarding the above?
Thanks & Regards
Sudhansucan u pls explain in more details with an example?
I am telling u the scenario.
1. i have a screen(Modal dialog Box) containing ALV grid with selection buttons for each row (top part) and a subscreen(second part).
Now when i click on a selection button, it will display the corresponding values in the subscreen.
When this screen will display for the first time , then first row of the ALV grid should be selected and the corresponding values should be displayed in the subscreen.
i wrote the following code in the PAI. But when i select a record its not triggering the PAI.
DATA:
gi_index_rows TYPE lvc_t_row, " Internal table for indexes of selected rows
g_selected_row LIKE lvc_s_row, " Information about 1 row
l_lines TYPE i.
CLEAR g_wa_vdmeko.
*get selected row
CALL METHOD g_alv_grid->get_selected_rows
IMPORTING
et_index_rows = gi_index_rows.
DESCRIBE TABLE gi_index_rows LINES l_lines.
LOOP AT gi_index_rows INTO g_selected_row.
READ TABLE g_int_vdmeko INDEX g_selected_row-index INTO g_wa_vdmeko.
SELECT SINGLE *
FROM vdmepov
WHERE bukrs = g_wa_vdmeko-bukrs AND
styp = g_wa_vdmeko-styp AND
sbez = g_wa_vdmeko-sbez AND
svym = g_wa_vdmeko-svym AND
svnr = g_wa_vdmeko-svnr.
ENDLOOP.
I am displayinng the ALV using method "set_alv_for_first_display".
Please help if u have any idea..................
Thanks
Sudhansu
Maybe you are looking for
-
Multiple devices using the one Apple ID
Hi We have multiple devices (2 x iPhone and 2 x iPod Touch) that use the one Apple ID for our family. As we all have separate email accounts, calendars and contacts, do we need to create individual Apple ID for iCloud syncing and iTunes purchases or
-
How to connect windows 8 HP laptop to Toshiba TV using HDMI
HI I really need someone to help me, its been months and I cant figure it out... I connected my laptop to my Toshiba TV, the screen from my computer displayed on my TV. Great it worked but the sound on the TV isn't working at all and no sound on comp
-
Hello, I'm using N8 for more than 2 years, but after updating to belle refresh geo taggin info gets removed automatically after phone restarts. All my previous photos clicked with geotag info before updating still have location details and I can see
-
XML Generation Using DBMS_XMLQuery
Hi, I am generating XML using "DBMS_XMLQuery". Requirement: To generate blank xml tag(Without data). e.g : Table XXX has A,B,C,D columns. I am using SQL : SELECT a AA,b BB,c CC,d DD FROM XXX; <AA>1 </AA> <BB>2 </BB> <CC>3 </CC> (Note : Columns A,B an
-
Can't add files or file aliases to the dock
I can't add files or file aliases to the dock. All the help viewer says about this is this issue? "If you can't add icons to your Dock, your administrator may be preventing you from doing so." I am the administrator of this computer, as it turns out.