UITableView - detecting de-selection of row
In a UITableView I can touch the blank area outside any rows to deselect any selected rows in the table. I'd like to know how to catch the deselect event so I can reset something that depends on row selection. neither the "willSelectRow" or "didSelectRow" events is called for de-selection.
Thanks,
LMY
Override the scrollViewWillBeginDragging method for UIScrollView. When dragging begins, which causes the deselection, you check the indexPathForSelectedRow on the Table view, if it is nil, then you can reselect the previous selected row
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
NSIndexPath *path = [tableView indexPathForSelectedRow];
if(path)
return;
}else{ yada yada yada];
At least that is my hack. If you explore the iPhone, there is no instance in on the device where any app retains its selection on a scroll event. If anyone else has a better way, I'd like to hear it too.
Similar Messages
-
How can I display "detailStamp" facet selectively for rows in a table ?
Hi,
My JDEV version is Studio Edition Version 11.1.1.5.0
I am trying to display "detailStamp" facet selectively .
If I read api in link below
http://docs.oracle.com/cd/E26098_01/apirefs.1112/e17488/oracle/adf/view/rich/component/rich/data/RichTable.html
Use the "detailStamp" facet on the Table to include a collapsable content area for each table row. Please note that the height of the open detail area will be a set height based on the height of the detailStamp component. Adding a component that changes in height (like showDetail or panelBox) will by default produce strange results when the detailStamp component's height changes.
Detail Stamp can be selectively displayed for rows in the table by EL binding the "rendered" attribute of the "detailStamp" facet to "true" or "false". The EL binding can contain references to the table "var" attribute since during rendering it will be executed in the context of the row. Disclosure icon is displayed only for rows which have rendered="true".
I can see that i can achieve it by setting rendered property for that facet. BUT this property is not available in Studio Edition Version 11.1.1.5.0Hi Frank.
Thanks for your quick reply .
But I am using Studio Edition Version 11.1.1.5.0 . In this version the property RENDERED of f:facet name="detailStamp" is NOT allowed.
Edited by: user13764942 on Feb 7, 2013 5:48 AM
Put in another way , I want to render the "detailStamp" facet selectively for rows , so for that I need the RENDERED property of "detailStamp" facet. This property is ONLY available in Jdev version 11.2 . I am using Jdev 11.1.1.5.0 so I need some alternative to RENDERED property as this property is NOT available in Jdev 11.1.1.5.0.
Please suggest some way to achieve this behaviour of displaying "detailStamp" facet selectively ....
Thanks!
Edited by: Mangpal Singh on Feb 7, 2013 11:57 PM -
How to select multiple rows from List Of Values
Hello,
I use ADF 11g to create my list of values (LOV). I want to select multiple rows from it. but i can't.
so how i can select many rows to set them in my adf table.
Thank in advanceHi,
LOV is map to an attribute in the viewObject so it will return only one value or more values from selected row. You can't select multiple rows from LOV.
But you can do this by using popup which you can select multiple rows and insert the selected rows to another table.
This blog post explain how to achieve this :
http://husaindalal.blogspot.com/2009/11/search-from-popup-and-add-to-new-table.html#comments
Sameh Nassar -
F4IF_INT_TABLE_VALUE_REQUEST select entrie row
Hello All,
I have a VALUE_TAB internal table (<b>it_mngrp_mncod</b>) with 3 fileds. After selecting a row in F4 pop up, I need to get all the three column values. In return_tab I am getting only the last field, which is the value of CODE in it_mngrp_mncod. Is there any way to select the entire row in F4 pop up?
Here is the piece of my code:
*& Report ZCK_TEST
REPORT zck_test.
TABLES: viqmel, viqmfe.
CALL SCREEN 101.
*& Module code_pf4_i15 INPUT
MODULE code_pf4_i15 INPUT.
DATA: BEGIN OF it_mngrp_mncod OCCURS 0,
kurztext TYPE qtxt_code,
codegruppe TYPE qcodegrp,
code TYPE qcode,
END OF it_mngrp_mncod.
DATA: it_returntab LIKE ddshretval OCCURS 0 WITH HEADER LINE.
DATA: it_fieldtab LIKE dfies OCCURS 0 WITH HEADER LINE.
DATA p_field TYPE fieldname.
GET CURSOR FIELD p_field .
PERFORM code_pf4_f40 USING p_field.
ENDMODULE. " code_pf4_i15 INPUT
*& Form code_pf4_f40
FORM code_pf4_f40 USING p_field.
PERFORM get_f4_values CHANGING p_field.
ENDFORM. " code_pf4_f40
*& Form GET_F4_VALUES
FORM get_f4_values CHANGING p_field.
DATA: field1 TYPE fieldname,
field2 TYPE fieldname.
DATA: p_katalogart TYPE qkatart.
SPLIT p_field AT '-' INTO field1 field2.
IF field2 = 'OTGRP' OR field2 = 'OTEIL'.
p_katalogart = 'B'.
ELSEIF field2 = 'FEGRP' OR field2 = 'FECOD'.
p_katalogart = 'C'.
ELSEIF field2 = 'URGRP' OR field2 = 'URCOD'.
p_katalogart = '5'.
ELSEIF field2 = 'MNGRP' OR field2 = 'MNCOD'.
p_katalogart = 'A'.
ELSEIF field2 = 'TASK_CODEGRP' OR field2 = 'TASK_CODE' OR field2 =
'TXT_TASKCD'.
p_katalogart = '2'.
ENDIF.
SELECT codegruppe code INTO CORRESPONDING FIELDS OF TABLE
it_mngrp_mncod FROM qpcd WHERE katalogart = p_katalogart.
LOOP AT it_mngrp_mncod.
SELECT SINGLE kurztext
FROM qpct
INTO it_mngrp_mncod-kurztext
WHERE katalogart = p_katalogart
AND codegruppe = it_mngrp_mncod-codegruppe
AND code = it_mngrp_mncod-code.
MODIFY it_mngrp_mncod FROM it_mngrp_mncod TRANSPORTING kurztext.
ENDLOOP.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = p_field
PVALKEY = ' '
DYNPPROG = ' '
DYNPNR = ' '
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
value_org = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
value_tab = it_mngrp_mncod
field_tab = it_fieldtab
return_tab = it_returntab
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE it_returntab INDEX 1.
MOVE it_returntab-fieldval TO p_field.
ENDFORM. " GET_F4_VALUES
*& Module user_command_101 INPUT
text
MODULE user_command_101 INPUT.
CASE sy-ucomm.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " user_command_101 INPUT
*& Module status_101 OUTPUT
text
MODULE status_101 OUTPUT.
SET PF-STATUS '0101'.
ENDMODULE. " status_101 OUTPUTHi,
Paste following code as-is just before ENDIF. Then it should work fine.
data: w_dynpro_field type dynpread.
data: t_dynpro_field type standard table of dynpread.
refresh: t_dynpro_field.
move: sy-repid to d020s-prog,
sy-dynnr to d020s-dnum.
move: 'VIQMFE-OTEIL' to w_dynpro_field-fieldname,
viqmfe-oteil to w_dynpro_field-fieldvalue.
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = d020s-prog
dynumb = d020s-dnum
tables
dynpfields = t_dynpro_field
exceptions
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
others = 8.
Hope this helps...
Thanks,
Murali -
Select mutiple rows in ALV report output
Hi All,
I want to select the Multiple records i in ALV report output with out holding the CNTL(Control Key).
Is there any options in Layout?
Please let me know
regards,
Ajay
Edited by: Ajay reddy on May 30, 2010 3:27 PMHi Ajay,
To select several rows without Control button, if the rows are adjacent:
- select the first and the last of the desired rows with Shift button pressed
or
- select a row, keep the mouse button pressed, and pass over the desired rows
I don't know an option without Control if the rows are not adjacent.
http://help.sap.com/saphelp_bw/helpdata/en/d1/7d9d37664e4d45e10000009b38f8cf/content.htm
Regards,
Paulo Carvalho -
How to select multiple row in ALV report
Hi friends,
1. How to select multiple row in ALV report
( How to set tab in ALV report and want to select multiple line.)
Thanking you.
SubashHi Sahoo,
If you are using the class CL_GUI_ALV_GRID. In methods SET_TABLE_FOR_FIRST_DISPLAY.
in layout structure you will find field SEL_MODE
pass :
LS_LAYOUT-SEL_MODE = 'A'.
In PAI.
CALL METHOD GRID->GET_SELECTED_ROWS
IMPORTING
ET_INDEX_ROWS = T_ROWS
ET_ROW_NO = T_ROWID.
Hope these will solve your problem.
Regards,
Kumar M. -
ABAPer's ,
Does anyone can guide me to select single row only in ALV grid , without OO.Hello,
I did not get u.
But check the below code it may help u.
tables: mara.
TYPE-POOLS: SLIS.
data:repid like sy-repid.
data: itb type mara occurs 0 with header line,
IT_FIELDCAT TYPE STANDARD TABLE OF SLIS_FIELDCAT_ALV WITH HEADER LINE,
IT_LAYOUT TYPE SLIS_LAYOUT_ALV,
ITB1 TYPE MAKT OCCURS 0 WITH HEADER LINE.
selection-screen begin of block b.
parameters: p_matnr type matnr.
selection-screen end of block b.
select * from mara into table itb where matnr = p_matnr.
SELECT * FROM MAKT INTO TABLE ITB1 WHERE MATNR = P_MATNR.
repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'HANDLE_USER_COMMAND'
I_STRUCTURE_NAME = 'MARA'
IS_LAYOUT = IT_LAYOUT
IT_FIELDCAT = IT_FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = itb
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
FORM HANDLE_USER_COMMAND USING R_UCOMM LIKE SY-UCOMM RS_SELFIELD TYPE
SLIS_SELFIELD.
CASE R_UCOMM.
WHEN '&IC1'.
CLEAR IT_FIELDCAT[].
IF RS_SELFIELD-FIELDNAME = 'MATNR'.
READ TABLE ITB1 INDEX RS_SELFIELD-TABINDEX.
WRITE: / ITB1-MAKTX.
ENDIF.
ENDCASE.
ENDFORM. "HANDLE_USER_COMMAND
Regards -
How can i select some row from multiple row in the same group of data
I want to select some row from multiple row in the same group of data.
ColumnA
Column B
1 OK
1 NG
2 NG
2 NG
3 OK
3 OK
I want the row of group of
ColumnA if ColumnB contain even 'NG'
row , select only one row which Column B = 'NG'
the result i want =
ColumnA Column B
1 NG
2 NG
3 OK
Thank youThat's some awful explanation, but I think this is what you were driving at:
DECLARE @forumTable TABLE (a INT, b CHAR(2))
INSERT INTO @forumTable (a, b)
VALUES
(1, 'OK'),(1, 'NG'),
(2, 'NG'),(2, 'NG'),
(3, 'OK'),(3, 'OK')
SELECT f.a, MIN(COALESCE(f2.b,f.b)) AS b
FROM @forumTable f
LEFT OUTER JOIN @forumTable f2
ON f.a = f2.a
AND f.b <> f2.b
GROUP BY f.a -
How to select perticular row in table control for BDC
Hi all
I want to select perticular row in table control for deletion through BDC. My transaction is CA02, My input is material no and plant , then it display table control with work center. Now i want to select W999 cost center and delete through BDC.
Please Suggest me. it urgent.
Thanks& Regards,
RPHi all
I want to select perticular row in table control for deletion through BDC. My transaction is CA02, My input is material no and plant , then it display table control with work center. Now i want to select W999 cost center and delete through BDC.
Please Suggest me. it urgent.
Thanks& Regards,
RP -
How to select a row in a single-select table view?
Hello folks,
I have a table view with a 'details' button. When a row is selected and 'details' is pressed, the table view disappears and a form view is displayed (like the toggle button in PCUI). I have implemented this using a navigation link. When I press 'cancel' in the form view, another navigation link takes the user back to the table view.
My problem is, when the table view reappears, there is no row selected (the row that was selected previously, is de-selected). How do I make sure that the row remains selected?
I tried using the collection_wrapper->mark() method in the inbound plug of the table view, but it works only for multi-select table.Hi Masood,
Thanks for your reply.
I had already tried using MARK ( iv_index = lv_index ), but it did not work because the first statement in the MARK method is
check ME->MULTI_SELECT = ABAP_TRUE.
Mine is a single-select table. So, using the MARK of the iterator object, with either the IV_BO or the IV_INDEX parameter also does not work. Is there any other way for a table with single row selection?
Thanks!!!
Rohan. -
Select Multiple Rows in a Table without CTRL
Expecting the user to press "Ctrl" when selecting multple rows is very unfriendly and unintuitive. We'd like the row selection to work as in ALV where you just select multiple rows by clicking on them.
We've set the tables rowSelectable to true and selectionMode to 'multi' but we still cannot select multiple rows without the CTRL hotkey.
This issue apparently [arose before|About selection in the table] but wasn't resolved.
System Details
SAP_ABA 701 0006 SAPKA70106
SAP_BASIS 701 0006 SAPKB70106
SAP_AP 700 0019 SAPKNA7019Hello Marc,
you need to call IF_WD_CONTEXT_NODE->set_selected(index = lv_index) sorry for the typo in my previous comment.
by calling IF_WD_CONTEXT_NODE->set_selected method wont remove the lead selection.
to unselect the records, you can call the same method by passing the FLAG value as abap_false.
so for your usecase the logic will be like this in the ON_SELECT event handler
1. get the index of the new_lead_selection
2. check whether this is already seleted in the context node by calling IF_WD_CONTEXT_NODE->IS_selected
3. if already selected then call IF_WD_CONTEXT_NODE->set_selected( flag = abap_false index = lv_index)
if not selected then call IF_WD_CONTEXT_NODE->set_selected( index = lv_index )
Hope this solved your problem.
BR, Saravanan
Edited by: Saraa_n on Jul 6, 2011 11:52 AM -
Selecting multiple rows in a table
Hi All,
I have one problem with selecting multiple rows in a table.I tried with setting table property-selectionMode as Multi, but i dinn't get the solution.
please provide me solution for this.
Thanks & Regards,
Sreelakshmi.HI
Int leadSelection = wdcontext.nodemodelnode.getLeadSelection();
for(int i=0;i<wdcontext.nodeModelNode.size;i++)
if(wdcontext.nodeModelNode.isMultiselected(i) || leadSelection ==i)
String name = wdcontext.nodemodelnode.getnameelementatindex(i).getName();
String address = wdcontext.nodemodelnode.getaddresselementatindex(i).getAddress();
String age = wdcontext.nodemodelnode.getAgeelementatindex(i).getAge();
Create a method for the Table Property onLeadSelect() where you can open a popup window
Create a value node and with attributes same as Table attributes and then set the values of the table
to the value node attributes.
Thanks -
How can I select the row after a cfgrid refresh?
I have a form that is bound to a cfgrid. The grid is populated from a database. When you navigate in the grid the data displayed in the form changes to match the selected row. I can edit the data in the form and update the database. After updating the data I refresh the cfgrid, which then displays the updated data.
Unfortunately the cfgrid always highlights the first row, row 0, after a refresh. I want to highlight the same row that was highlighted when the data was edited and saved. Can anyone advise as to how I can do that?
I have tried setting a listener when the grid is initiated that responds whenever the store is refreshed and triggers the function refreshSelection():
g.getStore().on('load', refreshSelection) ;
Before the form data is saved, the row number is stored in selectedRow[0]. When the grid is refreshed, refreshSelection is run:
function refreshSelection() {
if (0 >= selectedRecords.length)
return;
alert('Selected row is Row ' + selectedRecords[0] ) ;
g.getSelectionModel().selectRow(selectedRecords[0]) ;
selectedRecords[0] = 0 ;
The alert shows the correct row number each time, but highlighting the last row viewed works intermittently, and only if the alert line is active. If I comment out the alert, this fails every time, with row 0 being highlighted. selectedRecords[0] is reset to 0 after the attempt to select the row so that navigation through the grid, such as choosing "Next Page," will properly highlight the first row of the page rather than the last row number that was edited.
-RickMassage?
Why not ask the masseuse who gave you the massage? -
Error after using a servlet in ADF - unable to select another row in table
Hello,
I have a go button and when I select a row in a table it call a download servlet. After I open or save the document I'm unable to make other selection in the table or make another action.
The table has single row selection active.
The servlet make part from a task-flow.
Here is the code for the sevlet and my jdev version is 11.1.1.2.0
public class DownloadServlet extends HttpServlet {
@Override
public void init(ServletConfig config) throws ServletException {
super.init(config);
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
String id= null;
String den= null;
InitialContext ic;
try {
ic = new InitialContext();
} catch (NamingException e) {
DataSource ds = null;
Connection conn = null;
PreparedStatement cStmt = null;
ResultSet rset= null;
byte[] bdata = null;
String rezult_null = "";
id_fisier_lcl = request.getParameter("id");
den_fisier_lcl = request.getParameter("fileName");
rezult_null = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<Body>Fisierul a fost arhivat</Body>";
try {
ic = new InitialContext();
ds = (DataSource)ic.lookup("jdbc/ConnDS");
conn = ds.getConnection();
cStmt = conn.prepareStatement("commit");
cStmt.execute();
conn.commit();
cStmt= conn.prepareStatement("SELECT a.item FROM table a WHERE a.id = " + id);
rset = cStmt.executeQuery();
if (rset.next()) {
weblogic.jdbc.wrapper.Clob clob =
(weblogic.jdbc.wrapper.Clob)rset.getClob("content");
oracle.sql.CLOB oclob = (oracle.sql.CLOB)clob.getVendorObj();
bdata = new byte[(int)oclob.length()];
InputStream is = oclob.getAsciiStream();
is.read(bdata);
rset.close();
cStmt.close();
} else {
bdata = new byte[(int)rezult_null.length()];
bdata = rezult_null.getBytes();
rset.close();
cStmt.close();
} catch (NamingException e) {
} catch (SQLException e) {
String username_lcl = null;
username_lcl =
ADFContext.getCurrent().getSecurityContext().getUserName();
OutputStream outputStream =response.getOutputStream();
String mimetype = "";
FacesContext facesContext =FacesContext.getCurrentInstance();
response.setContentType( (mimetype != null) ? mimetype : "application/x-download" );
response.setHeader( "Content-Disposition", "attachment; filename=\"" + den_fisier_lcl + ".xml\"" );
try {
outputStream.write(bdata);
outputStream.flush();
outputStream.close();
catch (Exception e) {
e.printStackTrace();
FacesMessage msg =
new FacesMessage(FacesMessage.SEVERITY_ERROR, e.getMessage(),
facesContext.addMessage(null, msg);
How can I fix it?
Thank you.Hi,
have you seen this ?
http://download.oracle.com/docs/cd/E21764_01/apirefs.1111/e12419/tagdoc/af_fileDownloadActionListener.html
If you want to continue with your approach, then a way out of your problem could be to add an af:clientListener onto the command button. The JavaScript function would be
function onDownload(evt){
evt.noResponseExpected();
}Frank -
How do I select a row from the middle of a recordset?
UserID QuestionID Answered
10 9 N
10 8 N
10 7 N
10 6 N
10 5 Y
10 4 Y
10 1 Y
From the table sorted by QuestionID DESC, how do I select the first row from the bottom going up with Answered value equal to 'N'?
Which in the example above would be:
10 6 N
I need to select this row and get the QuestionID value equal to 6.
Right now I have:
select QuestionID
from tblMap
where Answered = 'N'
and ROWNUM = 1
order by QuestionID ASC;
This always the top most row, which would be:
10 9 NHere i used DUAL to generate a list of numbers for me.
ME_XE?select *
2 from
3 (
4 select row_number() over (order by col1 desc) as rn, count(*) over() as cnt, col1
5 from
6 (
7 select level as col1 from dual connect by level <= 9
8 )
9 )
10 where ceil(cnt/2) = rn
11 /
RN CNT COL1
5 9 5
1 row selected.
Elapsed: 00:00:00.07
ME_XE?Edited by: Tubby on Jul 8, 2009 1:47 PM
Seems i misread the question :)
Maybe you are looking for
-
Is connection pooling and sharing available on Oracle 9i RDBMS ?
Hello, I would like to connect from oracle to sql server through db link and ODBC (Heterogenous connectivity). But every session in oracle launch session in sql server. Is it possible to have connection pooling and sharing from Oracle RDBMS level ? I
-
NULL oracle_process_id in FND_CONCURRENT_REQUEST table
Friends I am having a strange issue in Production environment. and it has happened twice in the last 1 months. Issue -- few custom jobs run long but when I try to see the corresponding SQL, it has 0 hash value in the FND_concurrent_request table. All
-
Is there a way I can use my macbook to project the audio and visual on my apple tv?
I just purchase an apple tv. It was my goal to use the apple tv to match video tutorials of a certian website onto my tv. I am now realizing that I do not think this is possible correct? To clarify it is a website that is vimeo, youtube, or anything
-
Error: while configuring logs for changes in infotype data
Hi All, I am configuring the following Tables for maintain logs for changes in infotype data. V_T585A, V_T585B and V_T585C While configuring V_T585B, when i input * in 'field name' column it gives me an warning message " All data fields in **** infot
-
Bug Report: Original image location sometimes displayed in PDF created with Word 2013
I found a non-critical security bug in Office 2013. Here is the issue: If you drag and drop an image into Word 2013 (I'm using x64 version in Windows 7 if that matters) and then save as PDF (using the default settings) it saves the full file path of