Pushing new view controller from UITableView on a TabBar application

Hi,I have an app with two bar in it. one of the tab .xib includes TableView, when the user select one of the cells i want to show another viewcontroller (.xib file) that includes information about his selection.
now, i've tried this:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath*)indexPath
NextViewController *nextController = [[NextViewController alloc] initWithNibName:@"NextView" bundle:nil];  
if(!self.navigationController)
     NSLog(@"self.navigationController IS NIL!!!");
[self.navigationController pushViewController:nextController animated:YES];     [nextController changeProductText:[arryData objectAtIndex:indexPath.row]];
and then in the console
2011-06-16 16:08:55.886 TabBarLastChance[269:207] self.navigationController IS NIL!!!
so i know self.navigationController is nill.
What should I do?

Well, you need to create an instance of UINavigationController-class on your own. It's not created autmatically.
Create one with your TableViewController as RootViewController. Than you will be able to push nextViewController.
Dirk

Similar Messages

  • Calling a method in the view controller from the component controller

    Hi
    Is there anyway to call a method in the view implementation from the component controller??
    Thanks
    jack

    Thanks for all your replies. I want this kind of a functionality because Im trying to invove a DC (Child DC) from a Parent DC such that the Child DC's view is displayed onto the view container of the Parent DC. I have embedded using 'interface view of a component instance' in the Parent Window and am able to create the component and set usage though the onPlugDefault of the Child View.
    But I observe that when i make a call from the parent, the flow is like this:
    1. The wdDoInit of the Child Component Controller gets triggered first.
    2. Then the wdDoInit of the Child's <b>VIEW</b> gets triggered
    3. and <b>THEN</b> the onPlugDefault of the Child Component Interface View
    What I had actually wanted was to Fire onPlugDefault where Im calling a method LoadData(), after which the Child DC's view must be triggered so it can display the fetched data.
    What is actually happening is the view gets displayed, but no data is displayed in the view.
    Right now I have just given a work around where Im triggering <b>LoadData()</b> of the <b>COmponent COntroller</b> from the <b>wdDoInit</b> of the <b>VIEW</b>.
    Is there a better way to do this? I find it strange that I have to load the Data from the view.
    Thanks
    Jack

  • How to fire event in view controller from component controller.

    I have a component usage that fires an event wich i have subscribed in the component controller.
          iv_usage->subscribe_event( iv_event_name = 'TAKE_IT'
                                     iv_handler = me ).
    After the event the method IF_BSP_WD_EVENT_HANDLER~HANDLE_EVENT in the component controller is called.
    method if_bsp_wd_event_handler~handle_event.
    endmethod.
    The usage component is opened as a popup window. After pressing a button, the data is transfered via context node binding to the calling component. But now i want to close the popup.
    My intension is to fire a event for the view controller in the IF_BSP_WD_EVENT_HANDLER~HANDLE_EVENT method that closes the popup.
    Is this possible?
    Or let me explain it this way:
    I want to close a popup after a button in the popup is pressed.
    best regards
    Jürgen

    Hello Juergen
    I am assuming your target pop-up is of type ref to IF_BSP_WD_POPUP.
    1.Make this a view controller class attribute.
    2. After the code to create the pop-up, you can add the following block :
    gv_target_popup->set_on_close_event( iv_view = me iv_event_name = 'CLOSEPOPUP').
    3. Now define event handler EH_ONCLOSEPOPUP where you can write the logic for on_close.
    You can access the same reference gv_target_popup at the event handler level as well.
    Hope this helps.
    Regards
    Nisha

  • Error in Creation of a New View Object from Existing Entites

    I define a Complex JOIN in the expert mode of the View Object Creation Mode. On trying to access the VO, the system returns an error, unable to creat View Objecy.
    THe SQL Statement begins with
    SELECT * from ( select ...My actual Query)
    Is it possible to define ur own view objects with the same flexibility as the Data Tables

    Hi Saket,
    Following will be required for created a custom business object.
    1. Object Type - ZTEST (Internal Techincal Key)
    2. Object Name - ZTESTNAME (Technical Key Name)
    3. Name - TEST (Name of BO, it is used while selecting the object type)
    4. Description - (Short Description of BO)
    5. Program - ZTESTPROGRAM (ABAP program in which the methods of the object type are implemented)
    6. Application - A or B.. etc (Area to which your BO is related)
    Please remember that you can learn these basic things by giving F1 help on those fields and in HELP.SAP.COM.
    Regards,
    Gautham Paspala

  • UINavigationBar not displaying items for root view controller

    Hi,
    I've stumbled on something that has me completely stumped.
    This works: Add a UINavigationItem and UIBarButtonItems to a .xib (linking up the necessary outlets), push the view controller on to a navigation controllers stack. Result: You see the title and buttons on the nav bar correctly displayed.
    This doesn't work: Repeat the same process, but put these items in the root view controller of a navigation controller.
    The fix: Disconnect the UINavigationItem from the root view controllers "File's Owner" navigationItem outlet, override viewDidLoad in the root view controller class; and programatically set the items there.
    What am I missing? Why does the technique for configuring nav bar items work for additional view controllers pushed on to an existing navigation controllers stack, but not if the view controller is the root view controller? I have a sample project demonstrating this if this doesn't make sense!
    Thanks

    Hi,
    I've stumbled on something that has me completely stumped.
    This works: Add a UINavigationItem and UIBarButtonItems to a .xib (linking up the necessary outlets), push the view controller on to a navigation controllers stack. Result: You see the title and buttons on the nav bar correctly displayed.
    This doesn't work: Repeat the same process, but put these items in the root view controller of a navigation controller.
    The fix: Disconnect the UINavigationItem from the root view controllers "File's Owner" navigationItem outlet, override viewDidLoad in the root view controller class; and programatically set the items there.
    What am I missing? Why does the technique for configuring nav bar items work for additional view controllers pushed on to an existing navigation controllers stack, but not if the view controller is the root view controller? I have a sample project demonstrating this if this doesn't make sense!
    Thanks

  • How to get the search option when we are creating new view

    Hi,
    How to get the search functionality when we are creating new view.
    Ex:- if we see the standard component BT112S_SC. Under this
    AdvancedSP  is the view,
    same kind of view if i want to create new view with same bol entity in my new component. I am unable to get that search functionality.
    for search functionality,,i think view should inherit the super class CL_BTSRV_ADVS_CNTRL, but in my new view controller class, i am unable to find this class.
    Can anybody give me some inputs on this.
    Thanks,
    neelam

    In case you are still not able to proceed please refer the following blog.
    http://blogs.moovar.com/sap/sap-crm-web-ic-create-a-new-search-view-and-result-view
    Regards,
    Harshit

  • Change base view state from a custom component

    I'm pretty new to flex and I'm having a small issue in change the view state from a component.
    My Application have 2 custom components called userlogin and main menu. In the main application page I have userlogin component in one state and the main menu component in another. I'm trying to change the state if the login in successful from user login to main menu. I have the following function written inside the login component.
    private function IsUserLoggedIn(evt:ResultEvent):void
                    if (evt.result.islogin.toString() == "true")
                        currentState = "MainMenu";
                    else
                        Alert.show("Login failed, please try again.", "Login Failed");
    This code worked when I had all the controls in the main page. But then I created components and included them in to components and now when the login is success, its giving the following error.
    ArgumentError: Undefined state 'MainMenu'.
        at mx.core::UIComponent/getState()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UI Component.as:9908]
        at mx.core::UIComponent/findCommonBaseState()[E:\dev\4.0.0\frameworks\projects\framework\src \mx\core\UIComponent.as:9928]
        at mx.core::UIComponent/commitCurrentState()[E:\dev\4.0.0\frameworks\projects\framework\src\ mx\core\UIComponent.as:9750]
        at mx.core::UIComponent/setCurrentState()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\ core\UIComponent.as:9701]
        at mx.core::UIComponent/set currentState()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:6087 ]
        at components::UserLoginForm/__btnSubmit_click()[C:\Projects\WarrantyAutomation\src\componen ts\UserLoginForm.mxml:60]
    I'm sure this has something to do with accessing the states from a custom component, but I do not know how to change the state to the main menu. Please help me with this. Any help is greatly appriciated.

    Hi dasun1981,
    private function IsUserLoggedIn(evt:ResultEvent):void
                    if (evt.result.islogin.toString() == "true")
                        currentState = "MainMenu";
                    else
                        Alert.show("Login failed, please try again.", "Login Failed");
    If I am right the above function is in your userlogin component and the two components "userlogincomponent" and "maincomponent" are in main application file and the states were also defined in main application file.
    But in the function above the currentState refers to the state of the userlogin component and not the main application ...but the states are defined in main application file...that's the reason why the exception was thrown...
    Instead you replace the line in the above function with the below line:
    Application.application.currentState = "MainMenu";
    Please mark it as answer if it helped you.
    Thanks,
    Bhasker Chari

  • New Viewer Window disappears

    I am running Yosemite 10.10.1 on my Air. This evening my mail viewer window shrank to two (from three) columns, then to a single message preview (quite wide, I must add), then disappeared. When I select New Viewer Window from the File menu, this very brief window flashes by, then disappears.
    I have repaired the disk and permissions to no improvement. The console log reads thus:
    12/19/14 6:29:14.811 PM Mail[210]: Unable to simultaneously satisfy constraints:
        "<NSAutoresizingMaskLayoutConstraint:0x7fe953662580 h=--& v=--& V:[MailboxesContainer(0)]   (Names: MailboxesContainer:0x7fe9532959b0 )>",
        "<NSLayoutConstraint:0x7fe953757b80 V:|-(0)-[MailboxesPane]   (Names: MailboxesPane:0x7fe9530afb80, MailboxesContainer:0x7fe9532959b0, '|':MailboxesContainer:0x7fe9532959b0 )>",
        "<NSLayoutConstraint:0x7fe953434dc0 V:[MailboxesPane]-(0)-|   (Names: MailboxesContainer:0x7fe9532959b0, MailboxesPane:0x7fe9530afb80, '|':MailboxesContainer:0x7fe9532959b0 )>",
        "<NSLayoutConstraint:0x7fe950e3c230 V:[ActivityPaneView:0x7fe953b8f760(23)]>",
        "<NSLayoutConstraint:0x7fe953ef14e0 V:[activityView]-(0)-[ActivityPaneView:0x7fe953b8f760]   (Names: activityView:0x7fe953e95fd0 )>",
        "<NSLayoutConstraint:0x7fe953b7b480 V:[activityView(0)]   (Names: activityView:0x7fe953e95fd0 )>",
        "<NSLayoutConstraint:0x7fe953812220 ActivityPaneView:0x7fe953b8f760.bottom == MailboxesPane.bottom   (Names: MailboxesPane:0x7fe9530afb80 )>",
        "<NSLayoutConstraint:0x7fe950ea2890 V:[NSScrollView:0x7fe950d1a480]-(0)-[activityView]   (Names: activityView:0x7fe953e95fd0 )>",
        "<NSLayoutConstraint:0x7fe953f2b000 V:|-(0)-[NSScrollView:0x7fe950d1a480]   (Names: MailboxesPane:0x7fe9530afb80, '|':MailboxesPane:0x7fe9530afb80 )>"
    Will attempt to recover by breaking constraint
    <NSLayoutConstraint:0x7fe950e3c230 V:[ActivityPaneView:0x7fe953b8f760(23)]>
    Set the NSUserDefault NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints to YES to have -[NSWindow visualizeConstraints:] automatically called when this happens.  And/or, break on objc_exception_throw to catch this in the debugger.
    This is repeated five times with the same timestamp.  Then
    12/19/14 6:35:15.368 PM Mail[210]: No worthy mechs found
    How can I get out of this mess?

    See from
    Mail viewer window closes immediately after starting Mail.
    See
    Re: Mail only works in classic layout under yosemite
    Edit
    Also see
    http://www.macambulance.co.uk/apple-mail-message-viewer-disappears-launch-wont-o pen/

  • Problem displaying modal view controller.

    I have created a view controller with view in IB, and am trying to display it as a modal view. But when I press the button all I get is a blank screen. If I look at the view object within the new view controller, I can see it has loaded the subviews, but nothing is shown. I created a test project, so I could figure out what I am doing wrong, but here is the code I have to display:
    ModalView *newView = [[ModalView alloc] initWithNibName:@"ModalView" bundle:nil];
    SubViewNewAppDelegate *delegate = [[UIApplication sharedApplication] delegate];
    [[delegate viewController] presentModalViewController:newView animated:YES];
    ModalView is a generic UIViewController created by Xcode.
    And the xib looks like:
    File's Owner (Class set to ModalView, Outlet view to View)
    First Responder (Blank)
    ViewController (Class set to ModalView, Outlet view to View)
    -View
    --Label

    Hi Maksim
              Info sent to me was very useful.
    I have performed the steps which u have sent in the link,but I didn't get the desired result.
    when I hit the "Exit" button for the first time nothing happens but when agained clicked,It gave me a error saying that "Your Application is Expired :errCode,500"
    Pl tell me wht could be the problem
    Thanks a lot
    sethu

  • Oracle.jbo.JboException: JBO-34010: The "adf/tabs/view/DataBindings.cpx" descriptor appears in the application classpath more than once:

    Hello
    We are using JDeveloper 11.1.1.6
    We have three 3 separate viewcontroller projects and one Master projects which i supposed to integrate all these projects into one.
    Issue:
    After putting all three together into the Master project, the app fails to deploy due to this error:
    oracle.jbo.JboException: JBO-34010: The "adf/tabs/view/DataBindings.cpx" descriptor appears in the application classpath more than once:
    We did some digging and found out that it is because of the fact that "DataBindings.cpx" in all three projects falls withing the default package. How do we rectify this issue. We cannot even Refector this file because that option is not available for this file. We have a demo soon, What can we do?
    Thanks...

    Hi,
    this error typically comes from name clashes. Apparently you created ADF libraries (or projects) that contain a DataBindings.cpx file. The DataBindings.cpx file seems to be located in the same folder structure and thus could not be merged but are found to be added twice. When you create new view controller projects then best practice is to ensure the root package name is unique to avoid such issues.
    Frank

  • Call method with an argument from another view controller

    I have a UIViewController MainViewController that brings up a modal view that is of the class AddPlayerViewController. When the user clicks 'Save' in the modal view I need to pass the Player data (which is a Player class) from the modal view to the MainViewController in addition to triggering a method in the MainViewController. What's the best way to accomplish this? I'm new to cocoa and have only tried using delegates and some ugly hacks to no avail.
    Thanks for the help.

    If I understand correctly, you have:
    1. A model object, Player.
    2. A top view controller, MainViewController.
    3. Another view controller, AddPlayerViewController, which MainViewController displays modally.
    I'm guessing that AddPlayerViewController creates a new Player object and lets the user set its values, and you need a way to get that new Player into MainViewController once they're done.
    So, here's what I'd do:
    1. Create an AddPlayerViewControllerDelegate protocol. It should declare two methods, "- (void)addPlayerViewController:(AddPlayerViewContrller*)controller didAddPlayer:(Player*)newPlayer" and "- (void)addPlayerViewControllerNotAddingPlayer:(AddPlayerViewController*)controll er".
    2. Add an attribute of type "id <AddPlayerViewControllerDelegate>" called delegate to AddPlayerViewController. Also add a property with "@property (assign)" and "@synthesize".
    3. Modify AddPlayerViewController so that if you click the "Save" button, addPlayerViewController:didAddPlayer: gets called, passing "self" and the new Player object as the two arguments. Also arrange for clicking the "Cancel" button to call addPlayerViewControllerNotAddingPlayer:.
    4. Modify MainViewController to declare that it conforms to AddPlayerViewControllerDelegate. Implement those two methods (addPlayerViewControllerNotAddingPlayer: might be an empty method if you don't want to do anything).
    5. When you create your AddPlayerViewController, set its delegate to your MainViewController.
    If you need more detail, let me know what parts you need me to elaborate on.

  • Passing field values from View Controller to Custom Controller

    Hi Experts,
    I am working on a customer requirment in which customer want to see the values of field from one view in another view. The Context node & Context node attribute are the same in both the views.
    I am aware that we need to pass the field values from view controller to custom controller in order to see the field in the subsequent view. I would like to kow how i can achieve that technically?
    Kindly let me your valueable suggesions.
    Best Regards,
    Prabahar

    Hi Carsten,
    Thank you for the detailed feedback.
    I want the fields ID_TYPE & ID_TYPE_DESCRIPTION from IUICMD/SearchAccount to be available in IUICMD/DetailAccount. I have created a context node u201CSEARCHu201D in view IUICMD/DetailAccount. I have created the context node with out choosing u201CCreate with Instanceu201D.  This Context node (SEARCH) is already available in IUICMD/SearchAccount as part of the standard.
    Below given is contents of the Method CREATE_SEARCH of my context class ZL_IUICMD_DETAILACCOUNT_CTXT of view IUICMD/DetailAccount, which is created by the Wizard during enhancement.
    method CREATE_SEARCH.
        DATA:
          model        TYPE REF TO if_bsp_model,
          coll_wrapper TYPE REF TO cl_bsp_wd_collection_wrapper,
          entity       TYPE REF TO cl_crm_bol_entity,    "#EC *
          entity_col   TYPE REF TO if_bol_entity_col.    "#EC *
        model = owner->create_model(
            class_name     = 'ZL_IUICMD_DETAILACCOUNT_CN00'
            model_id       = 'SEARCH' ). "#EC NOTEXT
        SEARCH ?= model.
        CLEAR model.
    bind to custom controller
      owner->do_context_node_binding(
               iv_controller_type = CL_BSP_WD_CONTROLLER=>CO_TYPE_CUSTOM
               iv_name = 'IUICMD/CuCoMD' "#EC NOTEXT
               iv_target_node_name = 'BUILHEADERSEARCH'
               iv_node_2_bind = SEARCH ).
    endmethod.
    I have enhanced the Custom Controller. Now it have new implementation class u201CZL_IUICMD_CUCOMD_IMPLu201D
    Let me know where I am doing mistake
    Thanks in advance
    Best Regards,
    Prabahar
    Edited by: Prabahar Raju on Sep 2, 2009 10:47 AM
    Edited by: Prabahar Raju on Sep 2, 2009 10:52 AM

  • Call methods from view controller to another (enhanced) view controller!

    Dear All,
    Is it possible to use/call methods from view controller to another (enhanced) view controller? Iu2019ve created a view using enhancement in standard WD component. I would like to call one method from standard view controller in the enhanced view controller.
    Is it possible to include text symbols as enhancement in standard class?
    u2026Naddy

    Hi,
    If you have just enhanced an existing view then you can call the standard methods in one of the new methods which you will create as part of enhancement.
    If you have created a totally new view using enhancement framework option ( Create as Enhancement ) then in this new view you won't be able to use existing methods in other view as a view controller is private in nature. So all the view attributes, context nodes and methods are Private to that view only.
    Regarding text elements, I guess adding a new text element is just a table entry in text table and is therefore not recorded as enhancement.( Not very sure about this, need to double check )
    Regards
    Manas Dua

  • How to call another view controller's method from a view controller?

    Hi,
    Iam new to webdynpro . so pls clarify my doubt.
    How to call another view controller's method from a view controller in the same Web Dynpro Component?
    Thanks,
    Krishna

    Hi,
         The methods in a view are only accessible inside same view. you cannot call it outside the view or
         in any other view although its in same component.
         If you want to have a method in both views, then create the method in component controller and
         from there you can access the method any where in whole component.

  • How to add a new view in Factsheet to collect data from R3

    Hi Experts,
    I need to add a new view in Account Factsheet called  'Open Delivery data'
    which will collect the delivery data from R3 system.
    As I know we have two Function Modules (at CRM) 'CRMT_ERP_FACT_SHEET_RETRIEVE'
    (at R3) 'CRM_CCKPT_EXPORTSUMMARY'
    All We need to do is create view which calls the data from R3 Via these modules.
    How should I proceed.
    Is this relevent steps :-
    http://wiki.sdn.sap.com/wiki/display/CRM/Howtodisplayaz-tableinanassignmentblock
    Regards,
    Ram

    Hi Sandeep,
    To add a new currency in Metadata, just add in Currencies dimension, and to add in Data form-just send the script what you are using as of now for rest of the currencies, or follow the same steps as specified above. or just add the script A#CLORATE.w#Periodic.C2#XYZ in rows of your data form (where XYZ- is the new currency).
    To add a new location in FDM login to FDM web client- click on Metadata--> locations and select the Controls review location where you want to add the data load location, right click and add the new location.

Maybe you are looking for

  • How to get order by  values at a time in PL/SQL?

    Hi, create table dept_table(deptno number, Id number); insert into dept_table values(10, 21); insert into dept_table values(10, 28); insert into dept_table values(10, 25); insert into dept_table values(20, 105); insert into dept_table values(20, 50);

  • How to install Windows 7 on E20 with only DOS and no DVD/floppy driver?

    I am considering buying the cheapest E20 - with following configurations: ProcessorIntel Pentium G6950 Processor (2.80GHz 1066MHz 3MB) - 73W Operating system DOS (No Software Preloaded) Tower 4x5 Mechanical with Intel 3450 Motherboard 1GB PC3-10600 1

  • French Characters in File Names

    Hello, Despite my instance not use French and/or other special characters in files names, we have inherited a project (approx 2500 topics) with French characters in the file name. When we generated the project and post it on an Apache server, the top

  • Zen Firmware Error (1.10.

    After upgrading from .03.04 none of my m4a files are supported. Anyone got a link to the old firmware so I can go back till this issue is fixed?

  • Transfer iPod Touch to new user

    How do I transfer my iPod Touch to someone else and then register my new one with Apple and my iTunes account? Thanks