Warning messages with the option to continue or cancel

I am fairly new to the world of JSF and I need to have the ability to present a warning to the user, and allow them the option to continue or to cancel. I need to do this via a message on the page with a link rather than a javascript alert box. The basic usability would be this, the user uses the webapp to create an object, they can then go in and edit the object, while editing they have the option to delete the object, the "delete" control is a button. If they click on this button, I need a way to warn the user but allow them to continue anyway. Currently we have a facility to add a warning to the page, but what I would like to do is add a link or even a button to that page that will allow the delete to take place. Does anyone have any ideas? I've spent quite a few hours on google and haven't found anything similar to what I'm trying to do. The inability to use javascript has been dictated to me, so that is not an option.

Try this...
Create two similar "submit" buttons. The only difference is that one will reload the current page, with your warning message displayed. The second will actually execute the delete action.
When the page is first viewed, the first button will be rendered and the second button will not be rendered. You can facilitate this using the rendered attribute on the commandLink or commandButton, and then tying that to a boolean variable in the backing bean.
When the first delete button is clicked, you perform the necessary action to display the warning message, flip the rendered boolean, and return the same page again. The page will be reloaded, this time with the second button rendered and the first button not rendered.
When the second delete button is clicked, you perform the delete, flip the boolean again (especially if your backing bean is in session scope!) and return the user to the appropriate page. If the user chooses cancel, then remember to flip the boolean again.
Hope this helps!
CowKing

Similar Messages

  • Will not allow me to add caldav account (Calendar couldn't log in to the CalDAV server "webdav.skedge.me"error message)or I get the not a secure server message with the option to continue...but then it sticks it wont continue

    I WISH I HAD NOT UPGRADED...THIS IS A NIGHTMARE.  I need to sync my appointment scheduler that is embedded in my website to my ical (which was easily done through publishing with the previous version) since I have upgraded I dont have the option to publish...but can add the cal DAV account, which I tried to do but I get a "Calendar couldn't log in to the CalDAV server “webdav.skedge.me”." error message if I go through edit ccount> add other account  in system prefereneces otherwise I get a not secure server warning that will not continue when I select continue if I simply try to add an account using the + sign options at the bottom left of the systems preference pop up window
    found a potenital fix (that I think would work if I could understand how to do what they are telling me to do) it said to configure webdav sharing for active directory accounts...tried to follow the instructions...could not understand them (very techy instructions). 
    FYI to any one that may find it in thier heart to answer this...I AM NOT COMPUTER LITERATE I am a veterinarian not a computer programer...so please but things in terms I can understand...i dont know what root access or server admin means...I dont know how to edit config files or even open directories with terminal ...i dont know what pico is or how to open it on my computer.  Thanks
    If know one can help can someone please tell me how to un-upgrade..this *****!
    thanks
    Catherine

    Check the date and time in the clock on your computer: (double) click the clock icon on the Windows Taskbar.
    * https://support.mozilla.com/kb/Secure+Connection+Failed
    You can retrieve the certificate and check who issued the certificate and other details like when it is valid.
    * Click the link at the bottom of the error page: "I Understand the Risks"
    Let Firefox retrieve the certificate: "Add Exception" -> "Get Certificate".
    * Click the "View..." button to inspect the certificate and check who is the issuer.

  • Everytime I connect to iTunes the message ' iTunes was interrupted while restoring the contents of the iPhone. would you like to restore the phone again now? With the options cancel, continue restore and delete back-up??

    I upgraded to iOS 5 on my 3GS without any issues but now everytime I connect to iTunes the message ' iTunes was interrupted while restoring the contents of the iPhone. would you like to restore the phone again now? with the options of cancel, continue restore and delete back-up. what happens if i click delete back up?

    I'm not getting the message anymore!
    What I did:
    1.- Went to preferences in itunes/ Devices --> erased the corrupted backup (there were two backups)
    2.- Upgraded to iOS 5.0.1
    Done!
    PS: Maybe upgrading solves the problem without erasing the corrupted backup

  • How do I resolve this error message? The iPhoto library is on a locked volume.  Reopen iPhoto when you have read/write access, or reopen iPhoto with the Option key held down to choose another library.

    How do I resolve this error message? The iPhoto library is on a locked volume.  Reopen iPhoto when you have read/write access, or reopen iPhoto with the Option key held down to choose another library.

    Hi j,
    I don't know if this will work, but I'd try logging in to an admin account, going to your main library (not user library), opening it, opening Application Support, selecting iPhoto, hold down the command key and press i, click on the lock in the lower left, entering the password and making sure you have Read & Write privileges for System and Admin.

  • Everytime i link my iphone up to my laptop the message 'welcome to your new iphone' with the option restore from back up or new iphone. i once did restore from back up and it deleted all my recent pictures, music etc. how can i get pass this stage?

    everytime i link my iphone up to my laptop the message 'welcome to your new iphone' with the option restore from back up or new iphone. i once did restore from back up and it deleted all my recent pictures, music etc. how can i get pass this stage?

    Hi Khuram1981 - thank you thank you thank you!  All sorted!  dont suppose you know how to fix another problem I have??? for weeks now, since updating to ios5 I think, for some reason every time I have tried to log onto app store it says CANNOT CONNECT TO ITUNES STORE.  It's nothing to do with my computer, and I've been to the Geniius bar but they couldnt help and nothing I seem to do lets me update my Apps and even worse, I cant even buy any more.  Any suggestions?
    Again thank you SO much for helping with other problem = a real relief.
    Chatterwind xx

  • This message shows up when I try to access my auxiliary iPhone library: "The iPhoto library is on a locked volume. Reopen iPhoto when you have read/write access, or reopen iPhoto with the Option key held down to choose another library."

    This message shows up when I try to access my auxiliary iPhone library: "The iPhoto library is on a locked volume. Reopen iPhoto when you have read/write access, or reopen iPhoto with the Option key held down to choose another library."
    What did I do wrong?  I have been downloading all my photos into this same library since Janurary with no problems.

    What version of Mac OS X?
    Click the black Apple icon on the top left of the screen and select About This Mac. The next screen will show the information.

  • My Samsung Galaxy Strat. II was water damaged but after putting in rice I got it to come on. The problem is, when I try to charge it with my home or car charger, i get a warning message that the charger isn't compaitble. Is this a phone or battery issue

    My Samsung Galaxy Strat. II was water damaged but after putting in rice I got it to come on. The problem is, when I try to charge it with my home or car charger, i get a warning message that the charger isn't compaitble. Is this a phone or battery issue'

    I am sorry to learn that your phone has some water damage smreyn! Liquid damage can cause many different issues, including inability to recognize chargers and accessories. Do you have insurance on your phone? If you do, you can get a replacement very soon! Just submit your claim at this link http://bit.ly/07CrqPK
    AntonioC_VZW Follow us on Twitter at www.twitter.com/VZWSupport

  • I get a not enough storage message on my computer with the option to close or go to seting but nothing happens when i tap on the screen and it seems to be stuck there.cant even shut it down

    I get a not enough storage message on my computer with the option to close or go to seting but nothing happens when i tap on the screen and it seems to be stuck there.cant even shut it down

    Reset iPad
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.

  • How to load a warning message in the sub_VI in a true 'case' statement.

    I wrote a sub virtual instrument (sub_VI) containg a case structure in which a warning message is supposed to be shown only when a case is true, and this works fine by itself alone. However, when I put this sub_VI in the main VI program, the warning message doesn't come up even when the case under sub_VI is true. Is there any way to show this warning message even with the sub_VI under the main VI ?

    By default, sub VI's do not open their front panel when run. If you are putting your warning message on the front panel, then the message will appear when the VI is run on its own (as the main VI) but not when it is run as a sub VI.
    If you use one of the dialog functions such as the "One Button Dialog" fromt the "Time and Dialog" menu, then the message will appear even if used in a sub VI.
    The other option is to right click on your sub VI and set it's properties to open when run and close again afterwards.
    Rob

  • Infoobject Characterisitc created with the option of BW Application

    Hello,
    We have created Characteristics with the option of SAP BW as the application [and not as SAP APO].
    We have used some of the characteristics as navigational attributes. subsequently, we have loaded and activated the master data for the main characteristics.
    We have been able to successfully load the InfoCube [with the navigational attributes activated in the cube].
    We have used the same characteristics in the MPOS and generated the CVCs from the InfoCube.
    But when we try to load the data in the Planning area [linked to the above mentioned MPOS], we get an error message "Characteristics mapping: No data copied
    Message no. /SAPAPO/MSDP_REL120"
    Could you please let us know what possibly the reason could be for this?
    We suspect the reason to be the way the Characteristics have been defined.
    Regards,
    Sandeep Deolekar

    Sandeep
    I have seen this problem if you have 0CALDAYS defined in your time buckets profile, there is a program correction see SAP Note 774555 for the correction instructions:
    Symptom
    You are using transaction /SAPAPO/TSCUBE to load data from an InfoCube to a planning area. If the planning data is located in the InfoCube for exact days (InfoObject 0CALDAY exists in the InfoCube), no planning data is transferred.
    In the log, the warning "Characteristic assignment: No data was copied."
    Other terms
    /SAPAPO/TSCUBE /SAPAPO/MSDP_REL120
    Reason and Prerequisites
    This is caused by a program error.
    Solution
    SCM Release 4.1: The source code corrections can be implemented automatically using SNOTE before Support Package 4 is implemented.
    This is applicable for SCM4.1
    Hope this helps
    Regards
    Ian

  • I try connecting to I tunes i get an error message with the error message IxE000068 any ideas

    my ipod touch will continually be in the spinning wheel like it is shutting down mode and occasionally go to the start up screen nothing else. i tried connecting to the itunes and got an error message with the code IxE8000068 and saying itunes could not be connected to this ipod

    Did the error number really start with
    iPhone, iPad, iPod touch: Unknown error containing '0xE' when connecting

  • The iPhoto library is a Time Machine backup, and so cannot be used as the main library. Reopen iPhoto with the Option key held down to choose another library.

    I recently tried to look up my pictures on my time machine back up on an external hard drive. As soon as I try to open it I get the following message.
    "The iPhoto library is a Time Machine backup, and so cannot be used as the main library. Reopen iPhoto with the Option key held down to choose another library."
    I have tried holding down the option key but still couldn't few the photos.
    I want to know if there is anyway I can actually view these photos. I have over 85gbs of photos on the hard drive.  I have tried googling and looking at pervious forums with the same problem but nothing is working.
    Please help!

    Select Mac Help from the Finder's Help menu. Search for "Restore items backed up with Time Machine."

  • I tunes won't open. No warning message, just the first terms agreement opens and when i agree itunes stopes running. I just wiped and reinstalled everything including windows. I updated everything fully. Deleted spybot unintalled and reintalled new

    I tunes won't open. No warning message, just the first terms agreement opens and when i agree itunes stopes running. I just wiped and reinstalled everything including windows. I updated everything fully. Deleted spybot unintalled and reintalled the newest and one older version of itunes. still nothing. I tried to delete some files that is hidden as directed by apple. I have been trading emails with customer support but it has been no help at all. I am running Windows XP. Before i wiped my computer I ran itunes with no problem, on this computer, this week.

    WOOOOOOOOOOOO!!!! JUST WANTED TO UPDATE Y'ALL THAT BY SOME STROKE OF HEAVENLY GLORY, ITUNES DECIDED TO WORK AGAIN!!!
    WOOOOOOOOOOOOOO!!!
    How did I do it you ask??
    after all the stuff I updated you about, I tried one last time to install....still didn't work...so once again I wiped my system of everything itunes and apple related
    well today I was trying to watch a video that required me to get the quicktime plug in, and it too me to a page that was a quicktime install + itunes 7.blah blah blah instead of the other way around
    well, don't ask me why, but low and behold
    IT WORKS!!!!
    I HAVE MY ITUNES BACK!!! (JUMPS FOR JOY)
    Just wanted to share my shear elation

  • How to handle warning message for the fields in tab merging , PERSONAS 2.0

    Hi all,
    Please advice me on the below issue.
    In a transaction VA32 , I have merged the fields from one tab to another tab using tab caching.
    when i try to change the value of  a merged fields , it throws the warnings message. So it is continuously looping from one tab to another tab.
    So i tried to use the additional editor concepts in tab caching as below.
    Looping is stopped and throws warning message in the same tab.
    All the changes are saved successfully only when the enter button is clicked once in the main screen, else the changes are not saved and my previous value remains.
    Anybody have an idea on how we can use Additional actions in Tab caching concepts.
    Thank you,
    Arun

    Hi Kranthi,
    When i try to save the fields which i merged from different tab is not saving.
    Please find the below details.
    Green highlighted fields are custom fields which is merged from different screen like header or item overview screen. This is handled in script button.
    Red highlighted fields are merged from different tab like shipping or sales using tab caching concept.
    While changing the value of the fields which is merged from different tab , and press ENTER then it throws the Warning message if occurs.
    After warning message, if i try to save using the script button for copying all the custom fields which is merged from different screen , pasted it to their respective screens and also saved.
    Its working fine.
    When i try to save it before pressing ENTER button then the respective changes had made in the merged fields from different tab are not reflected.
    How we can handle this issue?
    Thank you,
    Arun

  • Show Warning Message near the field

    Hi all,
    I want to show my warning message near the field which is required instead of right at the bottom.
    I use the following onSubmit() Method when the user hits the submit button to check for required fields:-
    if (this.testfield == null) {
    this.setBackgroundColor(componentId : "testfield", color : "Red");
    this.focus(componentId : "testfield");
    this.setVisible(componentId : "testfield", visible : true, collapsed : false);
    this.showWarning(warning : "Testfield is Required");
    else {
    this.submit(text : "submit");
    This gives me the error message right at the bottom of the presentation as opposed below the field.
    How can I get this message to appear right below the field which is required?
    Any idea?
    I tried this.setText()
    But it does not work.

    The "showWarning" and "showError" methods used to be more useful when we had the option in earlier releases (5.7) to place them at either the top or the bottom of the presentation.
    I now never use either one of them.
    This is not what you want to hear and know you've thought of this, but what I do is add text attributes (errorMessage1, errorMessage2,...) to the BPM object and then place the text fields on the presentation as read-only, bold red foreground color text fields directly above the field causing the error. In my presentation's initialization method, I always use the setVisible method to false and collapse them. In your submit logic, you'd set the value of the error message attribute and set the error message field to be visible and not collapsed. You need to add an on change event for the field causing the error that will make the error field not visible and collapsed. Similarly, if you have a Save button, you need to make all the error fields not visible and collapsed.
    Dan

Maybe you are looking for