Table View Navigation

I've a table view with one column being an image (clickable). I have 40 rows of records (say for example) and I display 15 at a time in my table view.
When I navigate to page 3 of my tableview (for example) and click on row to edit (lineedit mode) my view page stays put on page 3 of table view (that's the way it should be). However, after row selection, when I click on my image (which generates a server event and I do my stuff) it goes back to the 1st page of the tableview. The point to note that it does keep the rowselection (on the 3rd page) and changes the icon image as it suppose to but somehow it navigates to the 1st page every time.
Is there a way to control the navigation?
Thanks,
Partho

I've added
runtime->keep_context = 1. in my do_handle_event
and also added
keepSelectedRow       = "TRUE" in my htmlb:tableview
but still it navigates to the 1st page.
It is this section in the render cell iterator
    IF p_edit_mode IS INITIAL.
    ELSE.
       img->onclick = 'image_click'.
    ENDIF.
which fires the server event and always goes back to the 1st page.
Please help.
Thanks,
Partho

Similar Messages

  • Multi layer table view/navigation controller hierarchy best practice

    Hi,
    I am new to iPad/iPhone development and wondering what the best practice for multiple layers of table views is? I understand the principle of a navigation controller providing the framework for moving up and down a list but have not yet quite got my head around if you should have one navigation controller for the whole tree or several navigation controllers.
    In my app I need to have the following:
    Main view -> window view showing some interactive elements (picker, buttons etc.)
    Setup view -> Hierarchy managed by nav controller/table views
    The setup view needs to manage the following hierarchy...
    - Level A:
    - Global app variables (one table view)
    - Level B Items (table view showing list of items at belonging to Level B)
    - Level B Item 1 (table view showing list of items at level C belonging to level B item 1)
    - Level C Item 1 (table view showing list of items at level D belonging to level C item 1)
    - Level D Item 1 (table view showing list of items at level E belonging to level D item 1)
    - Level E item (table view for properties of item at Level E)
    - Level D Item n
    - Level C Item n
    - Level B Item n
    Each level in this has some properties and then a list of child items.
    What would be the best way of structuring this? I would assume that creating a class that extends a view controller for each level is a given but what about the control of the navigation? Should this be handled by one navigation controller or one per level? I think I know the right answer but have not seen a neat way of implementing
    I think I am also best off having each level in it's own xib but, once again, am not 100% sure that this is the best design pattern.
    Many thanks in advance for any help/pointers!
    Cheers
    jez

    Hi Julian,
    I have struggled with the same questions you are addressing. On a previous project we tried to model based on packages, but during the course of the project we encountered some problems that grew overtime. The main problems were:
    1. It is hard to enforce rules on package assignments
    2. With multiple developers on the project and limited time we didn't have time to review package assignment
    3. Devopelers would click away warnings that an object was already part of another project and just continue
    4. After go-live the maintenance partner didn't care.
    So, my experience is is that it is a nice feature, but only from a high level design point of view. In real life it will get messy and above all, it doesn't add much value to the development. On my neew assignment we are just working with packages based on functional area and that works just fine.
    Roy

  • Set a JS client script for a table view navigation event

    Friends:
    I need to run a JS script,when the navigation buttons
    of a tableview are clicked.
    Even if I override the FooterRenderer, how can I set the
    client JS function name ?
    Thank you very much for your suggestions,
    Prasad Nutalapati

    I've added
    runtime->keep_context = 1. in my do_handle_event
    and also added
    keepSelectedRow       = "TRUE" in my htmlb:tableview
    but still it navigates to the 1st page.
    It is this section in the render cell iterator
        IF p_edit_mode IS INITIAL.
        ELSE.
           img->onclick = 'image_click'.
        ENDIF.
    which fires the server event and always goes back to the 1st page.
    Please help.
    Thanks,
    Partho

  • Database objects Tables, Views, Indexes not expand in Connections navigator

    In SQL Developer tool when I clicked on any database object: Tables, Views, Indexes, Packages, Procedures, Functions, and Triggers none of them expands in Connections navigator so I am not able to see all tables, Views, Indexes in this schema objects.
    Please advise
    Thanks a lot
    Vincent

    If the user you're connecting with is not the owner of the objects, you can access them through the Other Users node.
    Hope that helps,
    K.

  • Navigating to new row in table view

    Hi,
    I have a table view which displays only 10 rows in one screen. When there are more than 10 rows, links are displayed to navigate to other pages. If 'new' button is pressed, a new row is created at the end of the table. If there are multiple pages and user presses 'new' when she/he is in the first page, the user cannot view the new row until she/he navigates to the last page. My problem is, I need to automatically navigate to the last row where the new row is displayed. How can I do that?
    Regards,
    Rohan.

    Hi Rohan,
    I thought that this could be achived by setting the row index to be focussed to the attribute 'selected_index' of the table view. But this was not working when I tried in debugging.
    Easier option will be to insert a new row at the starting of the table view.
    Most of the standard views work that way.
    Regards,
    Masood Imrani S.

  • 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.

  • Table View in View-based Application

    Hi.
    I want to use an UITableView in a View-based Application.
    All examples I found are for Navigation-based Applications.
    I Found only one example for View-based Applications, but it create all components himself without the Interface-Builder.
    I search an example with Interface-Builder.
    My main problem is, when i create a view with Interface-Builder, the controller class does not inherit from UITableViewController.

    GrinderFX wrote:
    I want to use an UITableView in a View-based Application.
    Hi, and welcome to the Dev Forum!
    Firstly, I would point out that you don't need to use UITableViewController to control a table view. The table view controller is just more convenient. So for example, you could simply drag a table view from the library in IB and drop it onto your view. Then you could hook up the table view's dataSource and delegate outlets to the File's Owner. Then you would add the data source and delegate protocols to the @interface of your UIViewController subclass and add the required data source and delegate methods to the @implementation.
    I mention the above because building your table view that way is very instructive. If you want to learn more about table views in general I would recommend Chapter 8 of +Beginning iPhone Development: Exploring the iPhone SDK by Mark and LaMarche+, which includes 3 table view projects that don't involve a navigation controller.
    My main problem is, when i create a view with Interface-Builder, the controller class does not inherit from UITableViewController.
    Returning to your specific question, IB allows you to change the class of an object. Here are the steps to use the View-Based Application template as you described (In the following I'm using Grinder as the name of the project; e.g. the app delegate class is named GrinderAppDelegate, and the view controller subclass is named GrinderViewController):
    1) _Change parent of view controller subclass in your code_
    In GrinderViewController.h, you only need to change the superclass from UIViewController to UITableViewController:
    @interface GrinderViewController : UITableViewController {
    However it will be easier later on if you make new files from the UITableViewController file template:
    a) Ctrl-click on GVC.h and GVC.m in the Groups & Files tree; select Delete->Also Move to Trash;
    b) Ctrl-click on Classes; select Add->New File->iPhone OS->Cocoa Touch Classes;
    c) Select UITableViewController subclass from the right center panel and click Next;
    d) File Name: GrinderViewController.m; check Also create GrinderViewController.h;
    e) Make sure the name for these new files is exactly the same as the ones you deleted; if you make a mistake here, delete the new files and start over, because that name must be the same in several other files;
    f) Click Finish; the replacement files should now appear under Classes.
    2) _Change the view controller class in IB_
    a) Double click on MainWindow.xib under Resources in the Groups & Files tree;
    b) Make sure the MainWindow.xib window is open by selecting Window->Document from the IB menu;
    c) Locate the View Mode switch, upper-left, in the xib window, and select the Center position;
    d) The xib window should now be displaying two columns with small icons on the left;
    e) Select the Grinder View Controller icon;
    f) Select Edit-Delete to delete that icon;
    g) Select Tools->Library from the menu, and expand Controllers in the Library Panel;
    h) Drag a Table View Controller to the xib window and drop it right under the app delegate icon;
    i) Select Tools->Identity Inspector from the menu to open the Grinder View Controller Identity Panel (the new Table View Controller should still be selected in the xib window);
    j) Under Class Identity, select Grinder View Controller from the list; tab out of the Class field to be sure the selection is recorded;
    k) Ctrl-Click on Grinder App Delegate and connect the view controller outlet (ctrl-drag) to Grinder View Controller;
    l) Expand GVC in the xib window and delete the Table View icon (since we want it in the other xib file);
    m) Reselect the GVC icon and open the Grinder View Controller Attributes panel;
    n) Under View Controller, select GrinderViewController from the NIB Name list;
    o) In the Table View Controller IB Editor window, select GrinderViewController.nib to open the other xib file;
    p) Make sure the GrinderViewController.xib window is open in small icon mode as in steps b-d above;
    q) The class of the File's Owner should be GrinderViewController;
    r) Delete the View icon;
    s) Drag a Table View from the Library to where the View icon was;
    t) Ctrl-click on File's Owner and connect (ctrl-drag) it's view outlet to the Table View;
    u) Ctrl-click on Table View: connect both the dataSource and delegate outlets to File's Owner;
    v) File->Save both xib files.
    3) _Make some rows in the table view and test_
    a) Open GrinderViewController.m in Xcode;
    b) Add the commented lines (be sure to use the correct line for your target OS);
    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 20; // <-- change to more than zero
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *CellIdentifier = @"Cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
    cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
    // Configure the cell
    // add this line for OS 2.x
    cell.text = [NSString stringWithFormat:@"Row %d", indexPath.row];
    // add this line for OS 3.0
    // cell.textLabel.text = [NSString stringWithFormat:@"Row %d", indexPath.row];
    return cell;
    c) Build and Go.
    I should add that the procedure might be a little easier if you start with the Window-Based Application Template. But the above is good practice in editing xib files.
    Hope that's helpful!
    - Ray

  • Light table View error

    when i swith from navigator view to lighttable view I get a error message that flashes causing the screen to flicker. I can only get out force quitting.
    any ideas on the error? i'm getting on a few different presentations.
    I'm on Keynote 5.1 with OS x 10.6.8

    The same problem is happening to me in Keynote '09 v. 5.1.   The Light Table view triggered a crash and I lost a lot of work. Shame on me for not hitting Command-S regularly to save along the way.
    It might have something to do with fonts and/or formatting with shadows. I had some text that had shadows behind it, without the shadow feature being clicked in Inspector. Then when I clicked the feature in Inspector, I got a double-strength shadow. Maybe this was an error, and light table couldn't resolve it, so it chose to crash. Right now I am missing my Windows AutoRecover feature.

  • Best way to pass back data from hierarchical table view?

    Hi,
    I have a view hierarchy using a navigation controller that's working pretty well. One of the bottom level views is a table view where the user selects an item from the list. This bottom view checks the list item, saves the selected item in a property, and then pops the view off the stack.
    What's the best way to alert the parent view that the child view has been popped off so it can retrieve the value in the property? The calling push returns immediately, so it doesn't appear to be a modal call. I want to be able to use the same controller from other parent forms, so I need to be able to do this without referencing the parent in the child form ideally.
    Thanks
    Ray

    Hi, well let me try to explain it a bit more
    - Add a "delegate" property to your child-viewcontroller-class
    - Define a protocoll within each chil-viewController-class
    In this example let us name it "didSelectValue:(NSString *)value"
    - In the parent-viewcontroller before pushing a child-viewcontroller set it's delegate property to "self" (parent-viewcontroller)
    - In the parent-viewcontroller implement to protocoll-method "didSelectValue:(NSTring *)value"
    - In the child view-controller in (assuming it is a tableViewcontroller) add some code in didSelectRowAtIndexPath that checks if the delegate is set and check if it responds to selector "didSelectValue:(NSString *)value". If so, call it with the selected value.

  • Complete table view controller with XML

    Hello, I'm from Brazil and am new to ios.
    Today I am making an example where I use a table view controller and fill it witharray (NSMutableArray).
    However I would do the same using XML so that now, I'm having so many difficulties to the point of not knowing where to start.
    The code I use to populate this array was.
    It is possible to use something like XML?
    #pragma mark - View lifecycle
    - (void)viewDidLoad
        [super viewDidLoad];
        // Uncomment the following line to preserve selection between presentations.
        // self.clearsSelectionOnViewWillAppear = NO;
        // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
        // self.navigationItem.rightBarButtonItem = self.editButtonItem;
        registros = [NSMutableArray arrayWithObjects:@"1", @"2",@"3",@"4",@"5",@"6",@"7",@"8",@"9",@"10",@"11",@"12",@"13",@"14", nil];
    - (void)viewDidUnload
        [super viewDidUnload];
        // Release any retained subviews of the main view.
        // e.g. self.myOutlet = nil;
    - (void)viewWillAppear:(BOOL)animated
        [super viewWillAppear:animated];
    - (void)viewDidAppear:(BOOL)animated
        [super viewDidAppear:animated];
    - (void)viewWillDisappear:(BOOL)animated
        [super viewWillDisappear:animated];
    - (void)viewDidDisappear:(BOOL)animated
        [super viewDidDisappear:animated];
    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
        // Return YES for supported orientations
        return (interfaceOrientation == UIInterfaceOrientationPortrait);
    #pragma mark - Table view data source
    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
        // Return the number of sections.
        return 1;
    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
        // Return the number of rows in the section.
        return [registros count];
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
        static NSString *CellIdentifier = @"listax";//este é o identificador da celula
        UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
        cell.textLabel.text = [registros objectAtIndex:indexPath.row];
        return cell;

    If you have a custom XML schema (not a plist), consider two approaches.
    1. Before showing your table view, use NSXMLParserto deserialize the XML document into an NSMutableArray that will be the table view data source.  Typically the array contains custom class instances; one or more class properties are used to set table cell properties in cellForRowAtIndexPath.  If you have never worked with NSXMLParser (or any other SAX parser) before, start by creating a sample app so you understand how that works.
    2. Use a 3rd-party DOM parser like GDataXML.  Load your XML document into a class property in your table view's viewDidLoad.  Then the XML document will be the table view data source since elements and attributes can be directly queried using XPath in cellForRowAtIndexPath.  If you have never worked with XML DOM and XPath before, start by creating a sample app so you understand how that works.
    If your have a lengthy complex XML document, option #1 might be more efficient because indexed array access is faster than XPath queries.  Theoretically that is why Apple's Cocoa provides DOM support on OS X but not iOS.  There are strategies to improve efficiency if necessary, including your own indexing scheme.  The best solution depends on many factors.  For example, if your XML document includes thousands of rows, but users rarely scroll past the first 10, option #1 would waste time parsing everything.
    Both of these approaches keep all data in memory, which is fast but not friendly.  Perfectly fine for reasonably sized data sets.

  • RSS Table View with Tab Bar Code Error

    I created an iphone app with a navigation controller that has a table view which displays an rss feed. My client wants it able to display multiple rss feeds through a tab bar. I have attempted several times and have messed up. If anyone could help me with this it would be greatly appreciated.

    Hi Guy, and welcome to the Dev Forum!
    I would recommend starting as follows:
    1) Start a new project with the Tab Bar Application template;
    2) Open MainWindow.xib and select Window->Document from the IB menu to make sure the xib window (the icon winow) is visible;
    3) Locate the "View Mode" switch in the upper-left corner of the xib window and make sure it's in the Center position to display a 2-column table showing the view hierarchy as a tree of small icons to the left;
    4) Expand the Tab Bar Controller branch, then delete (select and Edit->Delete) each of the two view controllers under the Tab Bar Controller. The only child of that controller should now be the Tab Bar;
    5) Open the Library window (Tools->Library), drag a Navigation Controller into the xib window and drop it when it's on top of the Tab Bar Controller icon;
    6) Repeat step 5 until you have as many nav controllers (one for each RSS feed) as you want (for this example, assume 4 RSS feeds);
    7) The Tab Bar Controller should now have 5 children: the Tab Bar plus the 4 nav controllers; if not, drag the nav controllers until each of their icons is shown indented under the Tab Bar Controller just as the Tab Bar is;
    8) Expand the first Navigation Controller branch, and expand it's Root View Controller; you should now see that root controller's Navigation Item;
    9) Select the nav item, open the Attributes Inspector (Cmd-1), and change the Title to "RSS 1 Root";
    10) Repeat 8-9 for the remaining 3 nav controller branches, so the root views will be labeled "RSS 2 Root", ... "RSS 4 Root" respectively;
    11) Save the xib, return to Xcode, and click "Build and Go". The project should build and run without any warnings or errors. If not, return to step 1 and try to see where things went wrong.
    Let us know if you need more help after you get the above skeleton app working. The next step will be to change the class of the "RSS 1 Root" controller to the class of the first table controller in your original project, and to add that controller's xib (you can delete FirstViewController.h/.m and SecondView.xib by selecting each in the Groups & Files tree of the Xcode project window and selecting Edit->Delete).
    Please avoid the temptation to merge the above steps into your original project. In my experience, moving each of your files into the new skeleton, and testing at each buildable stage will reduce the chances for error while making it easier to spot any incompatibilities in your old code. The process shouldn't involve touching any of your XML parse or table display code, but you may need to override some additional table view controller methods such as viewWillAppear:
    Btw, in case this hasn't been discussed yet, be aware you'll face a major decision soon: When tabbing to feed no. 2, what happens on the return to feed no. 1? If the user will return to the same detail view that was last displayed, you might need lots more memory and there will be lots more to go wrong. If the user will return to the home menu, the whole project will be much simpler. Estimate your effort accordingly.
    Also be prepared for your client to say something like this during beta: "Oh... one or two of the links in feed no. 3 might be a mp3 or mp4 next month. That won't be a problem, will it?".
    Hope that helps!
    \- Ray

  • Icons in light table view?

    In light table view, some of my slides have blue triangles at the bottom right, others do not.  Some have three horizontal lines in the top right, some do not.
    What do these icons stand for?  Do they have an interactive function?  Nothing seems to happen when I click/right click.
    Thanks.

    The blue triangles in the bottom RH corner (also visible in Navigator view) indicate that you have a transition for that slide which affects the next one. The three horizontal lines in the top RH corner indicate that you have Presenter notes for this slide. And the three dots in the bottom LH corner indicate that you have builds on this slide.
    D

  • Listing tables/views/objects

    Hi all,
    The database I am working employs schemas to restrict accesses. When I use metadata to describe some objects (thought to be views), they turns out to be synonyms instead of being a table/view! As a result, using:
    conn->getMetaData("object", MetaData::PTYPE_TABLE) fails.
    However, using apps like toad/navigator, they are able to list the views/tables accessible in the schema. How do I use the metadata class to list objects like schemas and views?

    I doubt navigator uses OCCI either. The most straightforward way is simply query the metadata directly from the catalog. ALL_VIEWS (for example) probably has the mtadata you want for any view (or USER_VIEWS for a connected user).
    SQL> desc all_views
    Name Null? Type
    OWNER NOT NULL VARCHAR2(30)
    VIEW_NAME NOT NULL VARCHAR2(30)
    TEXT_LENGTH NUMBER
    TEXT LONG
    TYPE_TEXT_LENGTH NUMBER
    TYPE_TEXT VARCHAR2(4000)
    OID_TEXT_LENGTH NUMBER
    OID_TEXT VARCHAR2(4000)
    VIEW_TYPE_OWNER VARCHAR2(30)
    VIEW_TYPE VARCHAR2(30)
    SUPERVIEW_NAME VARCHAR2(30)
    SQL>

  • [iPhone] UI Design pattern for table views with properties and children?

    Hello,
    I'm getting started with iPhone development and I have a question about the proper way to display a list that has both properties of the list itself as well as the ability to drill down into the members of the list. For example, my data is a Group (of people say). The Group itself can have properties - the name of the group, group email address, web page, etc. - and it obviously has members which also have properties - name, address, etc.
    In my table view, I want to show the Group members and have accessory/disclosure buttons on each row to show the details of a person, but I also want to be able to edit the properties of the group - Group name, etc. What's the UI pattern for editing the properties of the table itself?
    I thought about having a tabbar that toggles between the list and the properties of the list.
    I also thought about having a parent table that lists the groups (so I could have more than one) and then have accessory buttons on each group row. The UI would then have to be that the user taps the row to drill down to the group members and taps the accessory button to edit the properties of the group. Is that "proper" - tap the bar or tap the accessory icon in a table row?
    Thanks

    I don't think I'd use a tab bar.
    You could break the table up into 2 sections, section 0 being the properties, section 1 the list.
    Make section 0 just say 'Properties', then when you tap that row you drill down to a properties table, slap an edit button in the navigation bar to go into edit mode.

  • Gray Box Light Table View

    OK, after search for some time, I have no idea why I have a gray box on the upper right corner of some of my slides in light table view (see attached photo). Anybody have an idea why this is there? Both of these slides use the same master template (title only).
    Thanks
    -- Earl

    OK, I figured out that the gray box in the upper right corner lets me know that there are Presenter Notes attached to that slide. The boxes also show up in Navigation View IF you select to show presenter notes.

Maybe you are looking for