Onclick validation and action for a4j:commandbutton

Hi, I have a requirement: when i click on a button, it has to show ok/cancel dialog box and if it is ok, then we have to call server code in ajax manner, else just be there doing nothing.
I implemented like below:
Case 1:
JSF code:
<a4j:commandbutton id="id1" value="Delete" onclick="showValidation()" action="#{bbean.deleteAction}" />.
JS code:
function showValidation()
if(confirm("Are you sure you want to delete?"))
return true;
else
return false;
It showed me the validation, but irrespective of Ok/Canel button that i clicked, the action's bbean.deleteAction gets executed.
I changed the JSF Code a little by providind return in the onclick as below,
Case 2:
<a4j:commandbutton id="id1" value="Delete" onclick="return showValidation()" action="#{bbean.deleteAction}" />.
This time, It showed me the validation, but irrespective of Ok/Canel button that i clicked, the action's bbean.deleteAction is NOT executed
I have tried several combinations, but no use. can anyone in the java world help me resolviing this issue? Thanks in advance and any small help in acheving my task is greatly appreciated.

On the initial 'Delete' button change action to be action="javascript:void();"
In your confirmation dialog have two buttons. Ok will invoke the original delete action, and cancel will simply close the confirmation dialog.
m

Similar Messages

  • Why does my app store account tell me that my payment method does not match my bank's records. my card is valid and works for iTunes but not the app store.

    While trying to change my Credit Card info: The app store tells me that my payment method information does not match my bank records and to try again or enter a new payment method. My CC is valid and its the same CC ive had for a while. This CC info works for iTunes but is not being accepted for the App store.I have changed this info online but cannot change it on my iPhone. Can anyone tell me what i need to do?

    Apple Store Customer Service at 1-800-676-2775 or visit online Help for more information.
    To contact product and tech support: Contacting Apple for support and service - this includes
    international calling numbers..
    For Mac App Store: Apple - Support - Mac App Store.
    For iTunes: Apple - Support - iTunes.

  • Edit the default workspace and actions for a group of computers?

    I am a high school yearbook teacher, and I have a group of Windows 7 desktops running CS6. I want to replace the default workspace and actions on them to increase productivity. Where would I place the workspace and action files on the computers so they would be applied to all the users on the computer?
    Thank you!

    Hi,
    I want to purchase a Macmini with SL Server and create a photo competition solution for a camera club. The solution needs to be able to accept uploaded images and the solution needs to let the user associate a set of images to a competition and from there the solution needs to make sure that the filename, format, size and embedded metadata is correct before storing and processing them further. Friends I have talked to say I need a classic CMS solution so I may need to investigate instead of my planned AppleScript/Automator solution.
    Also - thank you for offering to develop, but I had kinda planned to do this myself to build some knowledge and also get to know the server better.
    Anyone else using the SnowLeo server for a solution like this?
    Kjell Are Refsvik
    Norway

  • Software or website for validating and correcting for XHTML syntax

    I have some jsp pages and html pages.
    I would like to format all of them so that all are conform to XHTML standard.
    Is there any software or online website that provide the functionality of validate HTML and if possible auto-correct it?

    If you search google for 'Eclipse Europa', you can download the free IDE which a large bulk of users are using. When you open an html or jsp file in that IDE, it opens with a JSP editor. The editor will tell you if there are any problems. Its also a good idea to develop in an IDE. Alternatively, you can also use Dreamweaver for editing html and JSP, if you like spending money.

  • Validation and Subtitution for accounting document (FB01) by EXIT method

    hi experts,
      i want to modify the bseg-vbund field while posting in FB01. for this i  need to insert my logic to find out the vbund value and i need to subtitute  the new value for  posting the document.
    for this requirement i wriiten my logic in exit U102 ( by copying the program RGGBS000 to ZRGGBS000  and assigned in ( GCX2 transaction ) and uncomment the code for form U102 )
      i created one (OBBH) substitution and selected the 'ONLY EXIT'  option then i saved .but the system througing error as ' EXIT U102 has the incorrect type' .if i remove the type reference in form it is saving but the field is reset to original value while saving and not taking my substitution.
      and i want to change the field BSEG-VBUND which is not in the substitution list is it possible?
       is this is correct or any other method is correct?
       i checked in BTE,user-exits and BADI  which is applicable for FB01 ,i am not getting any suiteable solution.
      please suggest me.

    (1) don't duplicate posts Fb01 - enhancement
    (2) Look at parameters when filling the EXITS table
      use a C_EXIT_PARAM_NONE parameter under Line Item node.
      Also use a TABLES BSEG declaration and directly udpate the BSEG-VBUND field.
      OR
      put your Step rule under the Complete Document node and update the value in
      a LOOP AT the received parameter.
    Regards

  • If I buy an iphone second hand, how can I check that is valid and purchased for real?, If I buy an iphone second hand, how can I check that is valid and purchased for real?

    Hello
    I'd like to buy an iphone second hand and although I trust the source I'd like to be able to check with certainty that the phone was bought instore.
    I was thinking to ask for the receipt and check the serial number. is the serial number written on the back of the phone and the recipt(if the phone is sealed)?
    Similarly, if I buy an ipad 3 or 4 second hand, how do you check this again?
    Please let me know with some details about this.
    Thanks
    Anthony

    Ask the person you are buying the phone from to provide the original proof of purchase for the phone. If you do not know the seller personally I would be very cautious about purchasing the phone. There are many many stolen, hacked and jailbroken phones out there and these will only cause you grief down the road.

  • Image Sequences and Batch Processing: Can opening files from different folders as image sequences be set up as an action for batch processing?

    I have an ongoing series of tasks that necessitates opening the contents of a series of folders as image sequences.
    I'm used to setting up some fairly complex actions, including ones that are intended to be applied to all of the contents of materials in various subfolders, but for some reason I cannot get an Open-with-Image-Sequence-Checked action to set up in a way that will batch process correctly.
    Complicating matters is that the file prefixes (i.e., the letters before the sequential numbers) and the folders will always have different names from the last time the process had to be carried out.
    The steps I would like the action to carry out would be the following:
    1. Open Subfolder 1 - that is, Photoshop shouldn't be looking for a specific folder. It's just *any* subfolder to the current parent folder.
    2. Select first file in sequenced set of files.
    3. Open as an image sequence.
    4. Open Subfolder 2.
    5. Select first file in sequenced set of files.
    6. Open as an image sequence.
    ...rinse and repeat until Photoshop runs out of subfolders to check.
    Am I asking the impossible?
    Thanks!

    I'll look around there,  because I had posted something about this and was told to look here ps-scripts - Browse /Image Processor Pro/v3_0 at SourceForge.net  
    then this is the image here:
    is the result I received.  Granted I'm new to using scripts and actions for image processing large amounts of files.  

  • Two par biddig and live action for sinle document

    Hi,
    I have a requirement for a sngle shopping cart at the time of sourcing is it possible to carry out live action process and bidding (RFx process) simultaneously for single shopping cart document.

    only one JAy is correct.
    SC Item will not agian appear in the cockpit once it was converted to next follow on docuement and Object links are created.
    OR
    You can create an auction by converting an RFx into an auction. This enables you to process converted auctions more efficiently and use bids copied from an RFx to drive competitive bidding. You can choose to copy full-quantity bids without attributes from the RFx to the auction; only valid bids created for the current external version of the RFx are transferred during conversion.
    Muthu

  • Problem accessing /config_general/null/Default.action   Reason:There is no Action mapped for namespace/ config_general and action name default

    in use:
    vRO 5.1
    eclipse 3.7.2
    vRo plug-sdk 5.1
    steps:
    1.create a plug-in project from samples(choose solar system)
    2.find the dar package and upload it by vRo configuration
    3.vRo configuration said upload successfully,but the solar system configuration is not properly configued..
    problem:
    Problem accessing /config_general/null/Default.action   Reason:There is no Action mapped for namespace/ config_general and action name default
    How to solve it??
    Thanks so much!!

    There was problem from crm side...its working now..

  • I can't get FaceTime or iMessage to connect, I enter valid password (tested and works for Apple account) and it won't connect. I have checked all settings, upgrades iOS to 8.3 rebooted, changed Apple acount PW still wont connect. My internet connecti

    I can't get FaceTime or iMessage to connect, I enter valid password (tested and works for Apple account) and it won't connect. I have checked all settings, upgrades iOS to 8.3 rebooted, changed Apple acount PW still wont connect. My internet connection is fine Safari works and I can access all sites. I have an iPad 2. Any help on this will be greatly appreciate.  iPad 2, iOS 8.3

    This is an ongoing problem as you will see by searching the forum. 
    Out of curiosity, do you have 2 step verification enabled?  It was recently extended to include iMessage & FaceTime & I'm wondering if it might be causing some of the issues that some users are experiencing.

  • Can we create a dynamic action for Training and Event Management???

    Hi All
    i need to configure automatic email generation for an employee when he gets booked for a training program in the training and event management module. can we use a dynamic action for it? and how to configure it?? I also guess that i have to use the Feature MAILS for it. but i am not sure abt it and also not sure how to configure it. I will really appreciate if someone can provide me with a step to step configuration for the same. Its urgently sought.
    Thanks and Regards

    Notifications in T&E are done through Workflow.Dynamic Actions are only for PA Infotypes.
    ~Suresh

  • Apple changed my Apple ID to the email address associated with my iTunes account. I now can no longer access my account because the old user name is no longer valid and has no password. I have been on the phone with tech support for hours trying to fix.

    Apple changed my Apple ID to the email address associated with my iTunes account. I now can no longer access my account because the old user name is no longer valid and has no password. I have been on the phone with tech support for hours trying to fix this. I can not update any of the apps associated with that user name.

    Is this itunes on the iPad or on my computer? Thank you for the reply.

  • HT2731 How do I remove an email address that is no longer vaild for the iTunes Store?  A really old email address keeps popping up on my iPhone, the email address is not valid and I have no idea what the password was.  It's been over two years.

    How do I remove an email address that is no longer vaild for the iTunes Store or my iPhone?  A really old email address keeps popping up on my iPhone, the email address is not valid and I have no idea what the password was.  It's been over two years.

    Hello tcnolen1,
    It sounds like you are trying to change the Apple ID logged into the iTunes & App Stores on your iPhone.  Use these steps:
    Changing your Apple ID account
    Tap Settings > iTunes & App Stores, then tap the Apple ID signed in.
    Sign out of the current Apple ID account and then sign in with another account or create a new Apple ID.
    You can find the full article here:
    iOS: Changing the signed-in iTunes Store Apple ID account
    http://support.apple.com/kb/ht1311
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Configuration Settings for Postal Adress Validation and Duplicate Check

    Hi,
    What are The Configuration settings for Postal adress validation and Duplicate Check for Accounts(BP'S) in CRM 7.0 version
    Can some one send me the configuration settings for Postal Adress validation and Duplicate Check
    Thanks & Regards
    Kishor Kumar

    Hi kishore kumar,
    For the Postal code Validation you need to install and configure the following
    Outside of your SAP system:
    1. Install Data Services and the Address Directories.
    2. Install Data Services Component.
    3. Install the RFC Server.
    On your SAP system:
    4. Install the BAdIs from the previous version of this product.
    5. Install the BAdIs support package from this version.
    6. Run the post-installation tasks required of a new installation of the BAdIs.
    7. Activate the IC WebClient, if desired.     
    Thanks
    Jayakrishnan Nair

  • How do i add a download action for dxf files. firefox assumes its a text file and just opens it with no download action dialog box

    I want to add a download action for dxf files so they open in Autodesk trueview. The steps described here (http://support.mozilla.com/en-US/kb/Managing%20file%20types#w_adding-download-actions) say to click on a link for the filetype you want to add an action to but firefox thinks the dxf is a text file and just opens it in a new tab with no download action dialog box.

    Use the right-click context menu and choose "Save Link As" or hold down the alt key and left-click the link.

Maybe you are looking for