Navigation controller back button

Hi i have a viewcontoller a) controlling a view with an nstimer.
I want to suspend the timer if i switch to another viewcontroller b)
which is fine, but i want to resume the timer when pressing the back button
on the navigation controller.
How do i either know when this button is pressed, or how do i know when my viewcontroller a) is active again.
Please help me out folks.....

troutfly wrote:
or how do i know when my viewcontroller a) is active again.
viewWillAppear
For the button solution, you would need to create your own.

Similar Messages

  • [iPhone] - Add command to a navigation controller back button?

    I have a root navigation controller with a table view going to a normal view controller. The normal view controller plays a sound but I am wanting the sound to stop when the back button is pressed to go back to the root view. Currently, the sound will continue playing until it ends. Where do I put the code to stop the sound when the back button is pressed?
    Thanks!

    You could place it in the UIViewController delegate method - (void) viewWillDisappear:(BOOL)animated.

  • Navigation problem (back button)

    Hi all,
    I'm new to jsf and I'm having a problem with navigation.
    There are two pages one for the header information and one for the details, a button permit to add a row of details.
    What I need is to place e "back" button to allow to return to header pages.
    The problem is that all the fields in the detail page are mandatory so if I put a normal command button it makes a check on the fileds and throws an error (field must not be blank) .
    Which type of Componet should I have to use ?
    Thanks to all for the response

    Maybe u can try to put immediate="true" in the back command button

  • [iPhone] Invisible Navigation Back button item?

    I'm a little perplexed on this one. I've started a project based off the Navigation Controller template in Xcode, which is table based, and I push a view controller onto the stack, it shows up just fine.
    The problem is, after this new view is pushed, there's no Back button in the navigation Bar. Well, not visible at least. If I click on the navigation bar on the left side, where the Back button should be, it goes Back! But I can't figure out why it's not showing.
    There's a property like self.navigationItem.hidesBackItem or something like that, but setting it to NO had no effects.
    Anyone?

    Aha!
    You nailed it. Problem solved. And I guess that makes sense, the Back button I guess is derived from the title of the previous view (seems to me though it should have some default value like "Back").
    Thanks so much
    JB

  • [iphone] Remove back button from navigation bar

    I have an app set up with a navigation controller which is working fine. What I'd like to do is remove the back button when certain views come up. In fact I can't seem to manipulate the back button at all. I tried putting self.navigationItem.backBarButtonItem.title = @"TestTitle"; in the view controller for one of the views in the app, and the title doesn't change. Mainly I would like to remove the back button. Anyone have an idea? This is on beta 6.
    Thanks.
    Message was edited by: Lysandus

    Each view controller that is being managed by your UINavigationController has a property called navigationItem. You should do something like this in the managed viewController:
    self.navigationItem.hidesBackButton = YES;
    hope that helps

  • Firefox used to have an option on the navigation bar next to the back/forward buttons that showed navigation history - I could go back ten screens w/o hitting the back button ten times. Does the new version have this feature? If so, how do I enable it?

    It was a triangle button that provided a drop-down menu of my most recent navigation history within a site. Very convenient, esp for slide shows if I wanted to return to a slide that was 10-12 slides back.

    Firefox still has this feature, you just click and hold the back button or the forward button, depending on whether you want to go back or forward.

  • Back button not working after navigation using method navigate_to_account

    Hi,
    I have the following scenario.
    1. From Account Search navigating to one Account (Page 1 to Page 2)
    2. From Account there is a hyperlink with opens another page (Page 2 to Page 3). For this navigation I am using method  cl_crm_uiu_bp_tools=>navigate_to_account
    3. Page is opening successfully but when I am clicking on the BACK button for the first, nothing is happening. On the second click in the BACK button its navigating back to the Search page. (Page 3 to Page 1).
    So the history is not triggering for Account page (Page 2)
    Please help me with this issue.

    Hi Tapas,
    You actually need to explicitly record it using the below statement.
    RAISE EVENT history_trigger .
    Use this starement before calling the outbound plug.
    Please let me know if you still have any issues.
    Regards,
    Jotsaroop Singh

  • Problem with Back button in Top Level Navigation

    Hi all,
    We are facing a minor problem with the Back button in the Top Level Navigation in Portal. This button is present under the Roles and Worksets menu along with the History, Forward, and Add to Portal Favorites links.
    The problem is faced when we have some worksets under a single role. While browsing accross these worksets by randomly clicking on them, we wish to use the Back button as well to go back to the previous workset. But when we use the Back button, the Detailed Navigation panel in the last workset is not retrieved.
    I will explain with the System Administration Role. I open the worksets under this role in the following manner:
    First I open Transport;
    Next I open Portal Display;
    Next I open System Configuration;
    Now I wish to go back to Portal Display workset by clicking on the Back button. But when I do this, although the Portal Display workset opens up, but I cannot see the Detailed Navigation Panel. See the screenshot below:
    http://img399.imageshack.us/my.php?image=backbuttonkg6.jpg
    Please help me in solving this issue.
    Regards,
    Ankur

    I think I have found a resolution, although not very pleasant:
    [Note 950426 - Portal Back button not working correctly|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_ep_pi/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d393530343236%7d]
    Regards,
    Ankur

  • UIX Controller - using the browser back button

    I'd like to understand more about the controller and what is going on behind the scenes when I hit the back button. It would appear that some form of page caching is taking place and I want to know if I can effectively get a refreshed version of a page (although in some cases it might be just some elements of a page). My application scenario is this:-
    Having done a search, I select a row from a results table and add it to a short list (similar to shopping cart) which is then displayed. My search results page i.e. the previous page has a link to the shortlist with its text attribute databound to a string generated when items are added to the shortlist '3 items shortlisted'. When I hit the back button I get the state of the page before I added my item to the shortlist so the description is wrong. Hitting the browser refresh button displays the correct link text. Anyway I can force this behaviour? Is this what I should be trying to do or is there some best practice technique that I can use? There are several instances where I want to do this sort of thing.
    Hope that makes sense
    Thanks
    Ian

    Hi,
    In the Struts Framework, I have found code in the controller servlet, like this:
    * Render the HTTP headers to defeat browser caching if requested.
    * @param response The servlet response we are creating
    * @exception IOException if an input/output error occurs
    * @exception ServletException if a servlet exception occurs
    protected void processNoCache(HttpServletResponse response)
              throws IOException, ServletException
              if (!nocache)
              return;
              response.setHeader("Pragma", "No-cache");
              response.setHeader("Cache-Control", "no-cache");
              response.setDateHeader("Expires", 1);
    nocache is a boolean that gets initialized from a parameter specified in the web.xml!
    multiple header fields for all different web browsers.
    (how to set these header fields in JSP, over to someone else)
    I can not remember if, when the user uses the Back button to return to a page with these header fields, he gets a 'Page Expires' message, or if the browser will automagically refresh the page.
    (It might even be so that for example IE5 will refresh, and that IE6 will give the message)
    Luc

  • Browser Back Button and form navigation

    Some times when you use browser back button and adf-taskflow navigation buttons, validation on form fails, witout having made any change even with enabled token validation.
    Reproduction steps on HR schema:
    1. Create QueryDepartment and EditDepartment Views and navigation rules in adfc-config.xml
    2 Create ADF view only table page for QueryDepartment selectable, and add navigation button to go to EditDepartment
    3. Create EditDepartment form with navigation buttons and button to navigate back to QueryDepartment
    test:
    1.Run QueryDepartment and select a department
    2.Go to Edit Department using navigation button
    3.Navigate to next department pressing the 'Next' button
    4.Navigate back using the Browser Back button.
    5.Try to navigate back to QueryDepartment using the navigation button.
    My result is validation error on DepartmentId field 'Error: JBO-25013: '
    Is this a bug or am i doing something wrong?

    Hi,
    maybe I don't get it, but as I understood you have problem with focus on select button. So why don’t you set focus onLoad on another element of your page?
    Something like onload=”$x(‘ELEMENT_NAME’).focus()”;
    Regards,
    Przemek

  • The browser's back button doesn't work for portlet navigation

    I developed a simple portlet that uses webflow navigation to navigate within a
    portlet. I made this portlet visible on a portal's home page. When I view my
    main portal page, the URL is "http://localhost:7501/samplePortal/index.jsp "
    In this page I can see my portlet. When I click on a link inside of the portlet,
    it takes me to the page I want. Then, when I click the browser's back button
    to go back to the previous page(main portal page), it doesn't work. The URL changes
    back to "http://localhost:7501/samplePortal/index.jsp", but portlet itself doesn't
    take me to the previous page. Anybody have any ideas? I am guessing it's because
    the wfevent is null, but how do I resolve this problem?

    Hi Jay,
    I was able to get the back button to work for portals by commenting out the following
    lines in the portal.jsp:
    // prevent caching these pages at clients.
    // response.setHeader("Cache-Control", "no-cache"); // HTTP 1.1
    // response.setHeader("Pragma", "no-cache"); // HTTP 1.0
    // response.setDateHeader("Expires", 0); // prevents caching at proxy
    I also made sure my browser was set to allow the caching of pages.
    You are having problems, because we set the response headers to tell the browser
    to not cache the portal pages, and the portlet state has not changed back to it's
    original state.
    -John Bimson
    "Jay" <[email protected]> wrote:
    >
    I developed a simple portlet that uses webflow navigation to navigate
    within a
    portlet. I made this portlet visible on a portal's home page. When
    I view my
    main portal page, the URL is "http://localhost:7501/samplePortal/index.jsp
    In this page I can see my portlet. When I click on a link inside of
    the portlet,
    it takes me to the page I want. Then, when I click the browser's back
    button
    to go back to the previous page(main portal page), it doesn't work.
    The URL changes
    back to "http://localhost:7501/samplePortal/index.jsp", but portlet itself
    doesn't
    take me to the previous page. Anybody have any ideas? I am guessing
    it's because
    the wfevent is null, but how do I resolve this problem?

  • Disable/hide navigation Back button in particular overview page

    Hi All,
    I have to disable/hide navigational 'Back' button on Task overview page. I tried to achive this in WD_HISTORY mehtod but no luck.
    Please suggest me how to do this.
    Thanks,
    Nanaji

    Hi Laxmana,
    I did the same thing as you suggested, by commenting the super class method we can just stop to go to previous page but not all the pages which are stored in back button history.
    My actual requirement is, back button should not be visible to user or should not function anything. User should not use back button to navigate away. user must use 'save and back' or 'save' buttons.
    Thanks,
    Nanaji

  • Back Navigation and Browser Buttons

    What is the best way to implement back navigation in JSF, such that the application also behaves as expected when the user sometimes uses the browser's back button?
    Say, we have a page "index.jsp" and a page "results.jsp". From both pages it should be possible to navigate to the page "help.jsp" (which contains a back button). From "help.jsp" it might be possible to further navigate to, say, "about.jsp" (which also contains a back button and is, for example, also accessible directely from "index.jsp").
    After the sequence "index->help->about", the user expects to be at "index" again after clicking back on about.jsp and then clicking back on help.jsp. If the same sequence starts at "results.jsp", the user would expect to be at "results.jsp" after clicking the two back buttons, etc.
    What is the best way to achieve this behaviour? I guess I best store the entire navigation history in a session bean (something like a stack or so). Is that a good idea? I wonder how I best treat the case when the user hits the browser's back button (for example to navigate back from about.jsp to help.jsp). Any ideas? I could imagine that I could send a unique id (e.g. an increasing counter, or a long random variable) for every button click (using a hidden input, maybe?), such that I can always find the right point again in my navigation stack. But how would I nicely integrate something like this in JSF?
    Thanks for any hints!
    Michael

    This one is nice. But it doesn't redirect to a GET-formed URL.
    I just had taken 20 mins to refine it:
    test.jsp<h:form>
        <h:inputText id="paramname1" value="#{myBean.paramname1}" />
        <h:inputText id="paramname2" value="#{myBean.paramname2}" />
        <h:commandButton value="submit" action="#{myBean.action}" />
    </h:form>MyBeanpublic class MyBean {
        private String paramname1;
        private String paramname2;
        // + getters + setters
        public void action() {
            System.out.println("meep");
    }faces-config.xml<lifecycle>
        <phase-listener>mypackage.PostRedirectGetListener</phase-listener>
    </lifecycle>
    <managed-bean>
        <managed-bean-name>myBean</managed-bean-name>
        <managed-bean-class>mypackage.MyBean</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
        <managed-property>
            <property-name>paramname1</property-name>
            <value>#{param.paramname1}</value>
        </managed-property>
        <managed-property>
            <property-name>paramname2</property-name>
            <value>#{param.paramname2}</value>
        </managed-property>
    </managed-bean>PostRedirectGetListenerpublic void beforePhase(PhaseEvent event) {
        if (event.getPhaseId() == PhaseId.RENDER_RESPONSE) {
            FacesContext facesContext = event.getFacesContext();
            HttpServletRequest request = (HttpServletRequest) facesContext.getExternalContext().getRequest();
            if ("POST".equals(request.getMethod())) {
                Set paramKeys = facesContext.getExternalContext().getRequestParameterMap().keySet();
                List params = new ArrayList();
                for (Iterator it = paramKeys.iterator(); it.hasNext();) {
                    String componentId = (String) it.next();
                    UIComponent component = facesContext.getViewRoot().findComponent(componentId);
                    if (component instanceof UIInput) {
                        String paramname = componentId.substring(componentId.lastIndexOf(':') + 1);
                        Object value = ((UIInput) component).getValue();
                        String paramvalue = value != null ? value.toString() : "";
                        params.add(paramname + "=" + paramvalue);
                String url = facesContext.getApplication().getViewHandler().getActionURL(
                    facesContext, facesContext.getViewRoot().getViewId());
                for (int i = 0; i < params.size(); i++) {
                    switch (i) {
                        case 0: url += "?" + params.get(i); break;
                        default: url += "&" + params.get(i); break;
                try {
                    System.out.println("PRG to " + url);
                    event.getFacesContext().getExternalContext().redirect(url);
                } catch (IOException e) {
                    e.printStackTrace();
    public void afterPhase(PhaseEvent event) {
        // Do nothing.
    public PhaseId getPhaseId() {
        return PhaseId.ANY_PHASE;
    }For restoring facesmessages, just add the relevant code of the PRG thingy you have found.

  • How to avoid focus issue while navigating via Browser Back button

    Hi
    I'm facing some problem in setting focus on Buttons.
    Please refer application: http://apex.oracle.com/pls/otn/f?p=47869:2
    login credentials:
    Workspace: vsanthanam
    user: vijay
    pswd: apex_demo
    In this application, i have 2 pages.
    Page#2 has Submit button
    Page#3 has Cancel button
    Both buttons are HTML based and can be accessed using access Key ALT + s and ALT + c.
    The problem is:
    When i go back to previous page (pgid#2) of the application using IE Browser's Back Button from pgid#3,
    because of onFocus event set in Submit button, control comes back to pgid#3.
    Is there any possible way to set the focus to other items. so that whenever IE brower back button pressed, application would remain in
    page#2.
    Approaches i took:
    If we use onclick, instead of onfocus then again the problem remains since we have to have onfocus = "this.click();" to incorporate Accesskey features.
    Another way is onKeyup event. if we use onKeyup, we can avoid this browser back issue, but vanishes access key features.
    Any pointers on this would be of great help.
    Many Thanks
    --Vijay
    Please NOTE: I intentionally created two buttons in each page. This is required to have HTML buttons with access key features,
    otherwise application gives some flaws in HTML-accesskey.

    Thanks a ton Andy!
    This is what exactly we require, to change the focus to other items when we move away from page.
    application works perfect now.
    Thank you once again for your handy solutions.
    --Vijay                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Row validation with Browser navigation (back button)

    I have created two pages for adding/editing rows in a view object (one for the add/edit page and the other for the DataEditComponent page) as per posting:
    Re: New user's access to views
    Scenario:
    * User fills in only part of the form leaving at least one mandatory field blank.
    * The form is displayed again with the error message as per the JboException (specifically the AttrValException).
    * The user then hits the Back button on the browser to go to some other page that uses a <jbo:RowsetIterate> tag to display the values in some other ViewObject.
    * It seems that validation occurs whenever the current row is changed in the framework. So eventhough a different RowSet is being displayed on the other page, the same execption is thrown.
    How should this incomplete row that is now in the cache be handled when the user navigates to a different page using the back button.
    It is inevitable that the current row will be changed by some other page in the site, so how should "invalid" rows be handled.
    I wouldn't be able to assume that other RowSet iteration logic will not affect the current row.
    Seems like it would be a problem, whether the new row is created on the DataEditComponent page or on the add/edit page itself, after the form is submitted.
    Thoughts?

    I have created two pages for adding/editing rows in a view object (one for the add/edit page and the other for the DataEditComponent page) as per posting:
    Re: New user's access to views
    Scenario:
    * User fills in only part of the form leaving at least one mandatory field blank.
    * The form is displayed again with the error message as per the JboException (specifically the AttrValException).
    * The user then hits the Back button on the browser to go to some other page that uses a <jbo:RowsetIterate> tag to display the values in some other ViewObject.
    * It seems that validation occurs whenever the current row is changed in the framework. So eventhough a different RowSet is being displayed on the other page, the same execption is thrown.
    How should this incomplete row that is now in the cache be handled when the user navigates to a different page using the back button.
    It is inevitable that the current row will be changed by some other page in the site, so how should "invalid" rows be handled.
    I wouldn't be able to assume that other RowSet iteration logic will not affect the current row.
    Seems like it would be a problem, whether the new row is created on the DataEditComponent page or on the add/edit page itself, after the form is submitted.
    Thoughts?

Maybe you are looking for