Command button disabled after af:fileDownloadActionListener

Hello

Jdev 11.1.1.4.0

I have trigger af:fileDownloadActionListener for a CommandButton.
Because I have to call javascript before I implemented the approach described in this blog:
https://blogs.Oracle.com/jdevotnharvest/entry/how_to_ensure_custom_serverlistener_event_fires_before_action_events
<af:commandButton id="cbExport" text="Export" immediate="true"
                                binding="#{ExcelExportToolbarButton.exportButton}">
               <af:clientListener type="action" method="getCSSContent"/>
                <af:serverListener type="readCSSContentServerListener"
                                   method="#{ExcelExportToolbarButton.readCSSContentEventHandler}"/>
                
                 <af:fileDownloadActionListener filename="test_export.xls"
                                               contentType="text/html;chatset=UTF-8"
                                               method="#{ExcelExportToolbarButton.exportCollection}"/>
Problem:
Af: commandButton disabled guard after fileDownloadActionListener.
When I scroll in an af:table which is placed on the same page, then the new button gets activated.
I tried addPartialTarget and partialSubmit = true/false, but without success.

How to activate the button again?

concerning
Peter

Peter, that button is waiting for javascript is the whole point. There is a problem if you do it that way it (check this http://jobinesh.blogspot.de/2010/01/customizing-execution-of-to-validate.html). The solution is to queue action of javascript.
The checkBeforeDLButton method is no longer used for this reason.

Timo

Tags: Java

Similar Questions

  • Command button is not activated after action is completed

    Hi all

    I am creating an Excel since the command button using a method of bean support. The command button is not activated after that action is completed. but the information load in Excel and excel also created correctly.

    Code method as follows:


    public void exportToExcelEventForm () throws IOException
    {


    Date dt = new Date();
    SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd_HHmmss");
    String filename = fmt.format (dt) + ".csv".
    String contentType = "application / vnd.ms - excel";

    FacesContext fc = FacesContext.getCurrentInstance ();
    HttpServletResponse response =
    (HttpServletResponse) fc.getExternalContext () m:System.NET.FtpWebRequest.GetResponse ();
    response.setHeader ("Content-disposition",
    "attachment; filename ="+ filename);
    response.setContentType (contentType);
    PrintWriter out = response.getWriter ();
    out.println ();
    out.println ("event details");
    out.println ("testing");
    out. Close();
    fc.responseComplete ();
    FC. Release();

    }

    What is at stake in this? pls guide me

    Why not put an af:fileDownloadActionListener in the command button. In the bean you need a method like

        public void exportExcel(FacesContext aFacesContext, OutputStream aOutputStream)
        {...
    }
    

    You can use the stream output and when you finished just rinse. Do not close the stream and does not complete the answer.

    Timo

  • disable a command button based on the values

    Hello.

    I use jdev 11.1.5

    My scenario:

    I need to disable a command button if the values of the two attributes does not match

    More inf:

    I had used a command button called Confirm.

    This button should be disabled if the debit and credit attributes did not have the same values

    You can set the disabled property of the command button to an expression something like #{! bindings.creadit.inputValue eq bindings.debit.inputValue}.

    Make sure that you set the autoSubmit property to true text entry fields and ID them as partialTriggers for the commandButton control.

    Arun-

  • Disable the button "submit" after the presentation

    We have a form that we distributed to multiple users. The shape is defined so that presentations go to a predefined server location. The problem is that some users submit the form several times (don't know why). Maybe they do not notice the message that says 'submit form '. In any case, we want to disable the button send after submitting the form (even it is only for this "session"). I know that once the form is closed and reopened the button works again, and that's ok. If anyone has any suggestions I would be grateful. Thank you.

    Hello

    Modify the script above to:

    This.Access = "readOnly";

    your submit button will be set to read-only.

    Regards-

    Chalukya

  • Conditionally disable the command button

    I have a table with tableSelectOne and I want to disable a command button outside of the table based on the selected line. Here is what my code looks like:

    < af:table >
    < f: facet = 'selection' name >
    < af:tableSelectOne autoSubmit = "true" / >
    < / f: facet >
    < af:column >
    < af:column >
    < / af:table >

    < disabled af:commandbutton = "{#someCondition}" / >


    The code above does not work. No idea why?

    Thank you very much!

    Hello

    Did you remove the ID of the components manually? A suggestion of Shay working, you must have an ID for the button and table elements. Something like

    
    
    
    
    
    
    
    
    
    

    Arun-

  • disabled property - command button

    Hi people...
    I´d would like to know how can I set a deactivation of a button as fake... When I click on another button...
    for example...
    Button1 has disabled = true property...
    When I click in button2 property disabled of the Button1 should change false...
    Is this possible?
    Thank you.

    You set the binding on the command button property, that you want to disable - bind to a property in your backing bean - in this case, the previous poster used a property named "commandbutton1."

    John

  • After you click the command button, the user can not change form

    This form with a command button to the Page 5 that duplicates the page: http://pardons.delaware.gov/pdfs/pard_app.pdf

    If the user running this command button and then closes and opens again the form, the user is more able to add or change anything whatsoever in the form. Instead, the user gets an error message that says "this document enabled extended in Adobe Acrobat Reader DC. features." The document has been changed since its creation and use of the extended functionality is no longer available.  Please contact the author for the original version of this document. "Is there a way to fix this?  Thank you.

    FYI, the JavaScript code for the command button is the following:

    var fld;

    var arrayFields = new Array (this.numFields);

    (IT) {/ / default is 'this'}

    for (var k = numFields; k; k-) {}

    for (var k = 0; k < numFields; k ++) {}

    FLD = getField (getNthFieldName (k));

    If (fld.name == "txtCrimSumOff_Cnt") {}

    If (fld.value == 1) {}

    FLD. Value = This.PageNum + 1;

    } else {}

    FLD. Value = FLD. Value+ 1;

    }

    var page_start = fld.value;

    }

    }

    }

    Spawn of named model

    var t = this.templates

    strName = "CrimSumOff"; var

    for (var i = 0; i < Extremity; i ++) {}

    {if (t [i]. {(Name.IndexOf (strName)! =-1)}

    myPage var = t [i] .spawn (page_start, true, false); together second opt to false to keep the names of files

    Get the name prefix field that Acrobat will automatically add the new fields

    var f_prefix = 'P' + (page_start) + '.' strName + '1';

    Reset the newly created fields

    this.resetForm ([f_prefix]);

    Go to the new page

    this.pageNum = page_start;

    }

    }

    Yes. If you don't have the original version, unchecked, you can open the version activated in Acrobat and select: file > save a copy

    This will create an incompatible version. Note that it will automatically open in Acrobat when you do this.

  • best practices of command buttons

    Hello

    I would ask how others view their GUI with several command buttons (OK Boolean button).

    For example, it is a simple application where the user can start data acquisition by clicking on a button with text 'Start monitoring '. Instead of having another button with text "Stop monitoring", usually I just change the label text to "Stop monitoring" button, so it is obvious to the user that clicking on that will stop the process of monitoring the implementation (in the case of this button, I read the text of the actual label with property node in order to decide what message action to the loop the loop handler data acquisition of) GUI).

    If I have another button with the label as "Record of startup file" text, I do the same way: after saving the file, change the text 'Stop-save file.

    To avoid unnecessary additional programming, this button is in the enabled state if the application is already in the State of "monitoring". In addition, if there is a current folder (+ DAQ obviously), the user cannot press the button "stop monitoring". So according to the status of applications, some of the buttons are enabled, some in 'grey disabled' State.

    I wonder how others do their app/GUI?

    I don't know if it's a good way to do, but at least I can avoid check additional status of programming and by minimizing the number of buttons...

    I use the Boolean options text in the Properties menu where you can have different text for the States TRUE and FALSE to your buttons.  This eliminates some of the code that it sounds as you write.

    Play / Pause are the two options I usually use if buttons.

  • No button disable in don't plug ins display why?

    I have no buttons in the plug ins screen firefox 27other tha button to activate always, but even in this case when I click on that it doesn't do anything.
    I just installed quick time and that as all the available buttons, but no other plug in doesn't have any visible command button.
    What's past and how to fix it please?
    Also the flash payer decision-making shows 2 versions past and present, but I can not remove the old and screen displays, it has been disabled by Mozilla please updated but the update fails.
    Thank you.
    Assybish

    You must select 'never activate' in the drop-down list to disable a plugin.
    Only the extensions you have installed have a button Delete.

  • I have two problems: 1) a theme that does not change the look of my Firefox at all 2) there is no button 'disable' for my themes only 'delete '. Help, please!

    Okay, so my problems are...
    (1) I downloaded a theme for the first time and when I did, it worked perfectly fine. After updating, I download the theme again and it helped, but the theme will not change the look of my browser. When I tried one of the relevant articles, I cleared my cookies and cache and downloaded the theme (A Blue Fox), installed and turned on, and it worked perfectly fine! I tried to upload another (Pink Fox), one installed and activated, but it did not work. Instead, he returned to the default theme. So I tried to clear my cache and cookies again and repeat the process, but now after downloading, it says "error".... "I don't know if it says"Error Downloading"or"installation error ". Now, I tried to download it again after turning off my computer and turn it back on again, but (today), the two has not applied to my browser. They both had the same look... by default! Please tell me what is the problem!
    (2) in my "Add-ons Manager" page, on the appearance tab, there is no button disable for my modules. Only the "delete" button is present.

    Please help me!

    NOTE: I already tried to reset Firefox, but it does not solve my problem.

    You do not disable a theme, but you choose another theme if you want to change the theme.

    Remove button is for when you no longer want this theme.

    You must select a theme and then close and restart Firefox, if you want to use this theme.

    If this does not work, then you may have a problem with the prefs or something interferes.

    If you don't keep changes after a reboot then see:

  • Modules are disabled after every start.

    Add-ons are disabled after every start. I have to re - activate all add-ons after the start.

    It is possible that there is a problem with the files that store the registry extensions.

    Delete the files (extensions.sqlite, extensions.ini, extensions.cache) extensions.* and compatibility.ini in the profile folder of Firefox to reset the extensions registry.

    New files will be created if necessary.

    See "extension corrupted files:

    If you see disabled extensions, is not compatible, in "tools > Modules > Extensions ' and then click the Tools button, on the left side of the search bar (or click on the"Find updates"button in older versions of Firefox) to check if there is an available update compatibility.

    If that didn't help then also try to delete the file addons.sqlite.

    See also:

  • Why is - this much of my modules and extensions have been disabled after switching to firefox 6

    A lot of my modules and extensions have been disabled after switching to Firefox 6.
    No Java extensions can be used;
    my Microsoft Framework is disabled;
    my media player has disappeared;
    and my google with all of my important Favorites toolbar is missing.
    How can Firefox 6 be considered an "upgrade"?
    How can I 'recover Firefox 4 or 5'? -there is no point in using a browser which limits as many sites the necessary module!

    The Google toolbar options

    JAVA

    -> Download & install Java SE on your system:

    -> Using the Java with Firefox plugin

    Try to update all your modules in Firefox. You can also inquire by developers to Add - we for a version update & Firefox 6.0 took charge of the Add-ons that are not currently Compatible with Firefox 6.0.

    Check and tell if its working.

  • How LabVIEW can press a command button in the Access form?

    Situation: access database with a command button, which generate code after you have pressed

    Task: LabVIEW open the access database, you press the command button and read the code

    Status:

    • Use activeX to open data access - ready
    • Press the control button - open
    • code - open reading

    Problem: is there a possibility that LabVIEW automatically press the button in the Access form?

    Dear Mike,
    Thanks for the reply. You are right that MS Access is not really a database. ;-)

    When the operator will push the button, the program generates a serial number and add the new number in the article table.
    Therefore, by pushing the button means process this code.

    Solution
    After that I became the password to unlock the database, I have check the code behind the button and build it with LabVIEW.

    So it is not necessary to press the button :-)

  • Put in command button Mode loses the callback function

    NOR expensive.

    I have a code I want to change the buttons toggle robot (according to different scenarios). However, if I put the command Mode of the button disabling at VAL_INDICATOR or VAL_NORMAL for this button, the callback function ceases to be called when the button is pressed.

    What is the defined behavior?

    I use 8.0.1 (356) CVI

    Kind regards

    Brian

    Yep, the VAL_HOT did the trick.

    A big thanks to dsappet and jr_2005 for taking the time to investigate this.

    Much appreciated!

    Kind regards

    Brian

  • ProcessSystemEvents to make a command button

    Hello

    I put in a program that starts a long series of steps when you push the Start button. I would like to add a stop button to allow the user to interrupt the measurement process. First, I added a ProcessSystemEvents() in the measurement loop. The problem is that not only the Stop button active itself but the other command buttons (installation, read etc) too. I would like to disable all buttons except the Stop button. Is there a function like ProcessSystemEvents(), but only for a command button?

    Thank you

    Hello

    I did not understand what you mean by "button assets itself", but you can use the function SetCtrlAttribute (panel_handle, control_id, ATTR_DIMMED..), to allow or to ban the user input.

Maybe you are looking for