Another scenario of BACK button problem, pls help

search.jsp ---- search application by ID
view_app.jsp ---- display application details, has 4 commandLinks eg. (A, B, C, D), the commandLinks are displayed dependent on a
property in the ApplicationBean object.
Scenario as follow:
In search.jsp, I search application #1, it brings up view_app.jsp with #1 details and commandLinks A and B available.
Then go to search.jsp again through faces, search application #2, it brings up view_app.jsp again with #2 details and commandLinks C and D available.
Then I click BACK button twice, which bring me back to view_app.jsp with #1 details and commandLink A and B.
now I try to click commandLink A, it doesn't work because faces thinks I am in view_app.jsp with #2 details and commandLink C and D, there is no commandLink A available. Therefore it displays view_app.jsp with #2 details and commandLinks C and D.
I've put the Phase Listener, I can see from the log messages that it did go through the Faces life cycle, but in the 'Invoke Application' phase, the functions that I specified in the action (fucntionA) was not called, as it does not exist in the current View.
Anyone know how to solve this situation?
I try with client or server state saving, both produce same result. I also put <h:messages> in the view_app.jsp, no validation error message was shown.
search.jsp
==========
<h:form>
<h:outptuText value="application ID:"/>
<h:inputText value="#{facade.appID}"/>
<h:commandButton value="search" action="#{facade.searchApp}"/>
</h:form>
view_app.jsp
============
<h:form>
<h:inputHidden value="#{facade.appID}"/>
<h:panelGrid columns="2">
<h:panelGrid>
     <h:commandLink value="A" action="#{facade.functionA}" actionListener="#{facade.updateApp}" rendered="#{app.displayMenu}"/>
     <h:commandLink value="B" action="#{facade.functionA}" actionListener="#{facade.updateApp}" rendered="#{app.displayMenu}"/>
     <h:commandLink value="C" action="#{facade.functionA}" actionListener="#{facade.updateApp}" rendered="#{app.displayMenu}"/>
     <h:commandLink value="D" action="#{facade.functionA}" actionListener="#{facade.updateApp}" rendered="#{app.displayMenu}"/>
</h:panelGrid>
<h:panelGrid columns="2">
<h:outputText value="Application ID"/><h:outputText value="#{facade.appObject.appID}"/>
<%--
Other details
--%>
</h:panelGrid>
</h:panelGrid>
</h:form>
Facade.java
===========
ApplicationBean appObject = new ApplicationBean();
public void updateApplication(ActionEvent e) throws Exception {   
if ( appID != appObject.getAppID() ) {
logger.finest("Updating application ID from " appObject.getAppID() " to " +appID);
appObject = getApplicationFromDB(appID);
ApplicationBean.java
====================
public boolean isDispalyMenu() {
<%-- return 'true' or 'false' dependent on a property of the ApplicatinoBean object --%>
}

This is a very simple method for locking back button. It works fine. Maybe it will be usefull for you and it could resolve other problems with back button.
<f:view>
<script>
function windowunload()
//myform:_idcl is the hidden field on html page generated by JSF for navigation
//purposes
     if (document.forms['myform']['myform:_idcl'].value=="")
//erroraction - this is the name of the method in the backing bean; if there is no
//such a method (or action is not set in faces-config) the page will be reloaded;
//thanks to that one can forward to another for instance error page
          document.forms['myform']['myform:_idcl'].value='myform:body:erroraction';
          document.forms['myform'].submit();
          return false;
</script>
<body onunload="windowunload()">
<h:form id="myform">
</h:form>     
</body>
</f:view>
It submits with no action argument (no erroraction method or navigation not set in faces-config) the page on onunload event.
It reloads the page when when user presses back button or tries to change url address. So only one way to navigate is to use commandlinks and commandbuttons from your page.
I haven't found any weaknesses of this method yet.
Regards
M.

Similar Messages

  • Nokia X6 buttons problem - pls help

    Hi everyone,
    I just installed nokia v40 software on my Nokia x6 and after installing all new features, my answer, menu, and exit (hang up) buttons doesn't work.
    When someone calls me, I have to answer on touch screen. I cant always do that.
    Please help me if you have some solution to this problem.
    Thank you.

    do you mean the swipe to unlock feature, where you must drag your finger from right to left?
    that way you unlock the device.
    when the device is locked, press the menu or power key and the "swipe to unlock" sequence will start, then drag your finger and you will unlock it.
    Greece Nokia X6 RM-559 v40.0.002

  • Nokia N95-2 (8GB) Button Problem(Pls Help)

    Hello all.
    few days ago,my nokia n95 8gb started to making problems.
    The (*) star button is pushing itself...
    when i dont touch phone,its just typing (*) by itself...
    i though it was virus or something,so i first restarted it to factory settings,but it didnt worked.
    i even formated it with (Green,* and 3) buttons but it didnt helped.
    so the point is,i cant make calls,becouse its typing (*) by itself,and i can do nothing...
    Also the problem is,that there is no nokia center in Bosnia and Herzegovina,sto i dont know what to do....
    Any reply will help.
    Thanks in advance...

    unfotunately it looks like a physical problem, and the only solution would be care point, I would suggest contacting Nokia direct, and possibly posting the handset to the closeset repair centre.
    Good Luck
    If I have helped at all, a click on the White Star is always appreciated :
    you can also help others by marking 'accept as solution' 

  • I am not able to connect with another ipod via bluetooth can u pls help me

    i am not able to connect with another ipod via bluetooth can u pls help me

    Are yo trying to pair via an app that supports BT pairing?  If you are I would try:
    - Resetting the iPod:
    Reset iPod touch:  Press and hold the On/Off Sleep/Wake button and the Home
    button at the same time for at least ten seconds, until the Apple logo appears.
    -Resetting network settings on the iPod: Settings>General>Reset>Reset Network Settings

  • Urgent: Sessions problem pls help me

    Hi all,
    Its already late to post this problem.pls help me urgently.
    I have a servlet & two jsp's. first i request servlet, it processes something and forwards request to my first jsp. In that jsp on a button click, i'm displaying a new popup by calling showModalDialog. this dialog gets data from the same servlet but it forwards to my second jsp.(second jsp can be seen in dialog)
    Now if i submit form from my second(dialog) jsp, the servlet reports that session has expired. I tried a lot but invain. any one who helps me is appreciated well by all of our forum.
    waiting 4 u r reply,

    It could be that you have cookies turned off and you're not using URL Rewriting.
    In J2EE, the first time your browser makes a request to the server, the server responds and appends a SESSION_ID parameter to the request as well as storing a cookie with the SESSION_ID.
    The second time your browser makes a request, the server checks for the cookie. If it doesn't exist it checks for the parameter. If neither exist the server assumes its the first time your browser has made a request and behaves as describe in the previous paragraph.
    In your case when you submit the form if you have disabled cookies and the action attribute doesn't have the SESSION_ID paramter appended to the url, the browser will assume it's a first request. The user will not be logged in, hence your session has expired error.
    To fix this you need to encode the URL in your JSP. You can use the struts html:rewrite tag or the HttpServletReponse.encodeURL method, or if you're using JSP 2.0 the JSTL c:url tag.

  • Boot problem == pls HELP

    I have use the utility disk and format the machintos drive , and use  Extended (Journaled , Encrypted) , it ask me for a password (typed the password, confirmed the password - done) ,  after that i tried to install a fresh copy of Lion (i waited to be downloded from apple.com - done) after that it said that the fresh copy it will be installed and it will reboot by itself -> done ... from here the problem it's starting .... now my macbook air , it dosent start anymore it keep showming me, instaid of the apple sign from the start , a sign like the one from ghost busters (but without the ghost in it ) , i have tried to boot from cd , from usb , nothing dosent seams to be working.
    If anyone know a solution to this problem, pls HELP! Thank you in advance...
    p.s. before i had 2 hard drives that show up when i press the ALT button (machintos hd and utility drive, or something like that) now.. the only thing that it's showing me is : mac os base system , and if i try to use partition magic or something else, from a usb, it will tell me something about a bootguard , but i don't know how to insert the password.

    Glad your issue is fixed. Thanks for the update!
    Click if you want to Thank someone. If Problem is resolved, so that others can make use of it.

  • In IE 8 there is a "recent pages" tab next the forward / back buttons. It helps us jump back & forth the sites. Is there similar feature in FF 6 ?

    In IE 8 there is a "recent pages" tab next the forward / back buttons. It helps us jump back & forth the sites directly. Is there a similar feature in FF 6 ?

    The arrow to open the tab history of the Back and Forward buttons has been removed in Firefox 4 and later.
    Use one of these methods to open the tab history list:
    * Right click on the Back or Forward button
    * Hold down the left mouse button on the enabled Back or Forward button until the list opens
    You can look at this extension:
    * Backward Forward History Dropdown: https://addons.mozilla.org/firefox/addon/backforedrop/

  • How to solve this problem, pls help when I try to see remote camera system from home."Dual streaming is required for HTML viewing"

    How to solve this problem, pls help when, I try to see remote camera system(spec dvr) from home. The Error I get is "Dual streaming is required for HTML viewing"

    I had the same probelm and found that the problem lies with 64bit programs such as safari and microsoft internet explorer. I have resolved the issue on my PC based server by using a 32 bit ie and same on my mac by using the same running windows under parallels.
    So far the problem with the 64 bit side of it is still to be resolved.
    Hope this helps and gets you guys up and running until suchtime a 64 bit solution is found.
    Craig

  • Hi! I accidentally deleted my app store from the phone....how to retrieve it back...pls help me...just using the iphone

    Hi everyone
    I am a new user of iphone 4...i've accidentally deleted the app store from the iphone...pls tell me how to retrieve it back...pls help...tq

    To restore the missing App Store Icon, or other original Apple Icons on the iPhone, go to Settings / General / Reset (Don't worry, you will be presented with a number of options concerning resetting before anything happens. The iPhone will NOT reset just by selecting this option).
    Choose "Reset Home Screen Layout". This will restore the App Store Icon as well as other Apple Icons you may have removed or placed into folders.
    Please note. This also removes any folders you have set up and rearranges all of the apps you have, so it takes awhile to put everything back where it was.
    Unfortunately, I did not capture the placement of my Icons, so I had to recreate from memory...not that big a deal. If you elect to follow this procedure, make a note of where all of your icons are placed and then proceed.
    I followed links that talked about restoring through iTunes...never could make anything like that work. This is a quick and simple fix.

  • My imac stops(freezes) everytime when I try to extract ipod nano. So if I quit the connection by force, it stops again. Have no choice but to shut down the imac pushing power supply button. Pls help me solve out this problems.

    My imac stops everytime when I try to extract ipod nano. So if I do it by force it freezes agian. Have no choice but to shut down the computer
    by pushing power button. Pleas help me solve this out!!!
    It's not good to shut off the power forcibly, right? (I dun know what else I can do...)

    Hi Min! I'm having exactly the same issue - have been putting up with it now for months but have finally had enough! Every single time i eject either my iphone, ipad or ipod nano, itunes freezes up, the computer becomes unresponsive. Usually i can use the mouse to highlight icons but the system doesn't respond, the keyboard doesn't work and I have to do a hard reset.
    Arrrrrggggggh!!!!!!! lol
    Someone please help!!!

  • Session state and browser cache - Back button problem

    Hi all,
    I have a problem (and unless I'm missing something I think we all do) with session state and use of the browser's Back button. I really hope I'm just being dumb...
    Background scenario:
    Page P has a sidebar list allowing the user to select what content is displayed (e.g. 'stuff relating to X, Y or Z' where X, Y and Z are rows in, say, a table of projects). When a list entry is clicked, we branch to page P with the value of the list item placed in an application-level item (call it G_PROJECT). Reports on page P use G_PROJECT in their WHERE clauses.
    So, click list entry X and G_PROJECT is set to X and page P shows reports for project X.
    Page P also has a set of buttons which branch to various edit pages which allow attributes of page P's current project to be updated. These pages similarly use G_PROJECT in their WHERE clauses.
    Problem scenario:
    1. The user goes to page P and picks project X off the list. Project X's stuff is displayed (G_PROJECT = X).
    2. The user then picks project Y off the list. Project Y's stuff is displayed (G_PROJECT = Y).
    3. The user then clicks the browser's Back button. The page is served from browser cache, so project X's stuff is displayed, but G_PROJECT still = Y.
    4. The user clicks an 'Edit' button; we submit, and branch to an edit page which displays (and will edit) data for project Y because G_PROJECT still = Y.
    This is SERIOUSLY BAD NEWS - apart from being confusing, the user's edit permissions on projects X and Y may differ, and so the user may be able to perform 'illegal' updates.
    I've read what I can on this forum and the rest of the web looking for ways to a) inhibit browsers' 'Back' functions and/or b) prevent pages being cached by the browser, but none of them have worked for me.
    Short of waiting for browser manufacturers to recognise that the web is now full of applications as well as static pages, and enable robust programmatic control of cache behaviour, does anybody know how the problem can be avoided - or at least detected?
    Thanks,
    jd
    Failed attempts to date:
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="cache-control" content="no-store">
    <meta http-equiv="cache-control" content="private">
    <meta http-equiv="cache-control" content="max-age=0, must-revalidate">
    <meta http-equiv="expires" content="Wed, 09 Aug 2000 01:01:01 GMT">
    <meta http-equiv="pragma" content="no-cache">
    Disallowing duplicate submission (page attribute).
    window.history.go(1);

    Thanks Scott,
    I may be being dumb here but I don't see how that would help...
    P250_PROJECT and G_PROJECT are currently kept in sync by app logic. Whichever is used to drive, if the page is rendered from cache then the app logic is not executed, so the rendered page contents are not those keyed by P250_PROJECT, as illustrated in steps 1-4 of the problem above.
    The user sees X, the session items say Y. The engine doesn't know what the user is seeing.
    when page P is POSTed, its hidden item P250_PROJECT should always be used to derive the application item G_PROJECT. Then whether the page was pulled from cache or rendered anew via a click from the sidebar link, the project ID is determined by the contents of that page.
    As I said above I tried this, with the 'Edit' branch set to:
    Set these items: G_PROJECT
    With these values: &P250_PROJECT.
    but it makes no difference. The project ID is not determined by the rendered page contents - the engine gets the value of P250_PROJECT from session state.
    I can code the 'Edit' pages such that they check permissions and if necessary redirect back to p250 (conditional before-header branch), but that's a clunky cure rather than the prevention I was hoping for.
    Please tell me if my understanding is incorrect.
    jd

  • Import problem,pls help!

    Hi,there,
    I'm new guy here,I'v got a problem about Import in table mode,I found I can import back all records successfully, but it just appends all records into the orignal table,not overwrite
    it,for example, I made a export for a table with 2 records, after then I added some records into that table,
    finally I made an import for that table, I found the
    total of records is not recovered to 2,but just append
    the records from export file,why can't I recover it to 2
    record? pls help me,thanks!

    All that import does is to run a bunch of SQL statements based on the content of the export file. If you look at the export file in an editor (if its small), or through type (on Windoze) or more on *NIX you will see stuff like:
    CREATE TABLE x STORAGE ( ...)
    INSERT INTO x col12,col2, ...
    VALUES (:b1,:b2, ...
    If you give imp the paramter ignore=Y, then the error generated by the CREATE TABLE (table already exists) will be suppressed, but the ata will be inserted. Note that there are no DROP TABLE or TRUNCATE TABLE commands in the export file.
    If you want to restore your database to a particular point in time using import, then you will need to manually drop or truncate the tables first. You can generate the required sql from the data dictionary. something like
    SET lines 1000 pages 0 feedback off trimspool on;
    SPOOL drop.sql;
    SELECT 'DROP TABLE '||table_name||';'
    FROM user_tables;
    SPOOL OFF;
    @drop.sqlHTH
    John

  • Browser Back Button problem...

    Hai all,
    whn i will logout the page i will do the following...     
    session.removeAttribute("keyValue");
         session.invalidate();
    so session is invalidated, but whn i click on browser back button previos page has to expire automatically but whn i am doing manually refresh page then page will expire...
    the expire condition in each page i hav done is
    keyvalue=session.getAttribute();
    if(keyValue==null)
    response.sendRedirect("../sessionExpirepage");
    its working fine but i need to do the if u click on browser back buton the expired previous page can't display...
    even i tried this code..
    response.setHeader("Cache-Control","no-store"); //HTTP 1.1
    response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
    but it is also not working..or i dont know wher exactly thes above two lines are to insert n in a page.
    i hope u understud my point to say.
    pls tell me about this soln
    Thanks & Regards,
    Suryakant

    so session is invalidated, but whn i click on browser
    back button previos page has to expire automatically
    but whn i am doing manually refresh page then page
    will expire...there is no problem with your code as such , the page you get is from the history of you browser. Clear you history on every page load of your web page through javascript.
    Secondly a bit advance topic there is a concept of TOKEN in Struts which is used to overcome the bugs due to BACK button in browser.

  • HT204390 my ipad screen is black and it wound come back to nomal even if i try to reboot it,and if am offing it,i see blue screen and suddle it goes back to blank.pls help me

    my ipad screen just went black and wount come back to nomal even when i try rebooting it,i only see a blue screen any time i off it but after a second it goes blank again althuogh i can still hear voice over.pls help me.7

    Try this  - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.) No data/files will be erased. http://support.apple.com/kb/ht1430
    Frozen or unresponsive iPad
    Resolve these most common issues:
        •    Display remains black or blank
        •    Touch screen not responding
        •    Application unexpectedly closes or freezes
    http://www.apple.com/support/ipad/assistant/ipad/
    iPad Frozen, not responding, how to fix
    http://appletoolbox.com/2012/07/ipad-frozen-not-responding-how-to-fix/
    iPad Frozen? How to Force Quit an App, Reset or Restart Your iPad
    http://ipadacademy.com/2010/11/ipad-frozen-how-to-force-quit-an-app-reset-or-res tart-your-ipad
    Black or Blank Screen on iPad or iPhone
    http://appletoolbox.com/2012/10/black-or-blank-screen-on-ipad-or-iphone/
    What to Do When Your iPad Won't Turn On
    http://ipad.about.com/od/iPad_Troubleshooting/ss/What-To-Do-When-Your-Ipad-Wo-No t-Turn-On.htm
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/TS3281
    iPad: Basic troubleshooting
    http://support.apple.com/kb/TS3274
     Cheers, Tom

  • I was messing with the computer, not sure what i hit but now all my toolbars at the top of the screen are gone? (file, edit, history, tools and my forward and back button). Please help me get these settings back to the way they were?

    My file, edit, view, history, bookmarks, tools, and help buttons at the top of the screen are gone, along with my forward and back button.

    For details of how to restore it, see https://support.mozilla.com/kb/menu+bar+is+missing
    Once the menu bar is restored, you can use the Toolbars entry in the View menu to restore other toolbars such as the navigation toolbar.

Maybe you are looking for

  • Duplicate records in exported data

    I'm trying to export the inventory data with a wildcard (%) filter on the Workstation Name. If I run the same filter in a query from ConsoleOne, I don't see any duplicate records. If I run the data export, the exported data for some workstations will

  • A real puzzle to me when using Runtime.exec()

    Hi all, thank you for taking the time reading this. I am writing an application that runs tripwire using exec(). It runs tripwire as long as I do not need to type a password. I can see everything that is coming from tripwire except the line "Please e

  • Agent Desktop Error when CCM1 server fails..

    hi, I have configured IPCCX in HA environment.. so there are two CCM servers (CCM1 and CCM2) and two IPCCX servers (IPCCX1 and IPCCX2)..i have configured extension mobility service in redundant mode...I also associated the phone with RM JTAPI provide

  • BO Universe/webi

    Dear all, Please   help in following issues. we  have concepts like  calculated keffigure,restricted keyfigure,exceptions,condtions,Customer exits  in sap bw . how this can be achived in universe and webi. Thanks and Regards suresh.p

  • My mac os x 1.5.8 system preference in gone and i need help

    my mac system preference (os x 1.5.8) is gone and the computer keeps sleeping when i am watching videos