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

Tags: Java

Similar Questions

  • iPhone 5 home button does not work after ios 10

    My 5 Iphone Home button does not work after update final IOS version of 10.

    The home button works on the first push to wake the phone but it will not open the phone the second button.

    I activated the assist button, which does not work either. But what I discover is if I open device for assistance then touch and lock screen click on the button home will work once to open the phone. If I open any app I can't close it unless I go through the same routine.

    You attempted to restart your phone?

    You can do so by holding the sleep/wake button and the Home button simultaneously until the Apple logo appears

  • Stop button is not active

    Hello
    When I run my program a can on the stop button, but after choosing N1 in the menu button is not active. How do active?
    Thank you

    It's one of the reasons why you do not "long" inside the event tasks.  What you really need is a state machine.

    But what is happening is that your case of event is set on "Lock panel until that case end of event.  This means that all the buttons are disabled until the end of this case for the event.  It is not complete until this loop ends, that will never happen since it is based on a button that has been locked.

  • Delete buttons do not work after the update of 10.11.16.

    Delete buttons do not work after the update of 10.11.16.  The delete button works if I pointed out and then delete, but not if I use the "back" button or try a removal of uniqueness.  It is a problem in all applications.  I tried it in textedit, search google chrome, safari search and find finder engine.  There seems to be a 'problem' of the keyboard' as far as I know nothing happened to my keyboard, IE the spilt coffee, that recent warming has been updated to 10.11.16.  I use an iMac (27-inch, late 2009) with i5 clocked at 2.66 GHz, running OS X El Capitan.

    Any suggestion would be appreciated.

    Greetings, r.fromstouffville!

    It seems that the 'Delete' on your iMac keyboard key works as it is supposed to be after update to OS X 10.11.6. I'll be happy to help you get these keys working again.

    Reset of the controller management system (SCM) on your Mac - sometimes it's a matter of simply resetting your iMac SMC. Open this article and scroll down to "Reset the SMC on Mac desktop" section and follow the steps there.

    Try safe mode if your Mac does not start -even if your iMac, safe mode startup make sure it starts successfully.

    How to test one question in another user on your Mac account - use this article if restarting in safe mode did not help.

    Use Time Machine to back up or restore your Mac - if your keyboard does not always work as it should, I recommend you save your iMac to ensure that your personal data are safe. It is always better "to have" a backup for a backup "need."

    On OS X Recovery - if you have reached this point, you encounter the same problem in a test user account, that would mean it is a system-w. Start your iMac into Recovery Mode and reinstall the operating system.

    Thank you for the communities of Apple Support!

  • Envy 15: Airplane Mode button does not work after update of Windows 10

    My airplane on my HP envy mode button will not work after the upgrade to Windows 8.1 for Windows 10. I can turn on and off airplane Mode but not the button. Grateful for the help

    Hello:

    The only suggestion I can offer would be to see if installing the W10 wireless button driver solves the problem.

    http://h20564.www2.HP.com/hpsc/SWD/public/detail?sp4ts.Oid=6943827&swItemId=ob_150986_1&swEnvOid=4192

  • plugged an external mouse and now the keys and mouse pad do not work. in the properties it shows activated but the Activate button is not active.

    plugged an external mouse and now the keys and mouse pad do not work. in the properties it shows activated but the Activate button is not active.

    You can start in safe mode and restore the system.

  • Start test button does not appear after installation.

    "Start trial" button does not display after the first Pro Trial installed.

    I am sorry to inform that the Apps like Premiere pro CC, after effects CC, Lightroom CC 2015, these all applications requires 64 bit support.

    Premiere Pro cc is not compatible with 32-bit computers, so you cannot start.

    Please check the link for more details below:

    System requirements | Adobe Premiere Pro

    Only 4 CS version is available for 32-bit computers.

  • Whose action command button does not redirect me to another page. Why?

    Hello

    I have a command button in a jspx page and an unlimited workflow with two pages, where there is a rule of flow control between them, which needs to redirect the user from the first page to the second page. However when the user clicks the button, the updated page actually without having to navigate to the second page. Why does this happen?

    Here are the details:

    ADFC-config:

    <-flow-control id rule = "__42" >
    <-activity-id id = "__43" > first < /-activity-id >
    < control-flow-case id = "__44" >
    < result id = "__49" > go < / de-results >
    <-activity-id id = "__45" > second < / to-activity-id >
    < / control-flow-case >
    < / control-flow-rule >

    command button:

    < af:commandButton text = 'Go' id = "cb1" action = "go" / >

    Well, can you give more details?
    Jdev version?
    You start the app with a url ending with ".jspx' by chance?
    If so, you must remove this ".jspx" ending as it does not start the workflow.

    Timo

  • How can I make the submit button that is activated after the user enters a digital signature?

    I have a form that contains a digital signature field. Once the user enters their digital signature, my "submit" button is disabled. I wanted that this remains activated for the user can submit the form with their digital signature and the form (in PDF format) as an attachment.

    I'd appreciate any help.

    Kind regards

    Fanny

    You can configure the fields of lock after the signing of the digital signature. In Livecycle Designer across this field properties: object-> TAB Signature properties. Here can exclude the button submit or any other field, if necessary, do not lock after signing.

    -Rambeau.

  • Satellite U500-1F5: eco and FN buttons do not work after BIOS update

    Hello world

    I hope I can find a solution for my problems here.

    I bought a new Toshiba Satellite U500 (PSU9ME),
    I'm updating my laptop regularly whenever I get alert through TEMPRO or Toshiba service center.

    Last week I received an alert to updat the BIOS and I did. Since then, I've noticed the following problems:

    1 eco utility does not work, and when I tried to uninstall, it says (not supported BIOS)
    2. on screen funtion buttons that appear at the top of the screen when you press the Fn key no longer not apear
    3. the touchpad lock / unlock button does not work, and even by pressing Fn + F9 doesnot lock

    I hope you can give me an answer about my problems,
    I already downloaded the latest updates for the eco and value-added packege of the toshiba site and install,

    BUT

    does not my prob

    still eco utility does not work. The msg (not supported BIOS), appear when I run the update.

    The bar of buttons on the top of the screen does not (even after I uninstall the package of value of toshiba and re - install the last being) and the locking/unlocking back touch button does not work.

    I hope Toshiba can find me a solution, coz I don't have time to go to the DEPOT
    PSU9ME00D00XAR model U500-1F5

    Windows 7 (64)

    Thanks in advance

    Hello

    First one comment:
    * I am updating my laptop regularly whenever I get alert through TEMPRO or Toshiba service center. *
    That s is nice, but certainly not necessary. When the system is working, do not touch or change anything. Maybe stupid sounds now, but I recommend you to remove the TEMPRO system. Believe me you don't need. I have 2 years old Satellite A300 and original BIOS. It works perfectly and I don't want to take any chances and to change what anyone. Since last month, I have the Satellite U500-1EX and will do the same. TEMPRO is already removed, and I am happy with the factory settings.

    All that you have done is OK, but at least you can try to reinstall entire OS now using HDD recovery option (F8 at startup) to see if everything works well again. Sorry, but if this will not help, I think that you need the BIOS downgrade to the old version.

  • Click the command button DOES not

    Hello

    I have a single command button on an UIR embedded in a dll I call TestStand. The button does nothing when you click sort, but when I press or , it works fine. Does anyone can say why this is happening?

    int CVICALLBACK TERMINATE_BUTTON (int, int int event, control panel,
    void * callbackData, int eventData1, int eventData2)
    {
    switch (event)
    {
    case EVENT_COMMIT:

    event action

    break;

    case EVENT_LEFT_CLICK:

    event action

    break;

    case EVENT_LEFT_CLICK_UP:

    event action

    break;

    }
    return 0;
    }

    Thank you in advace,

    JulianC

    Hello JulianC, a little research on the forum showed this thread that describes nearly the same situation as yours: you might find helpful advice, especially in LuisG post marked as solution and following.

  • Windows 7 is not activated after the replacement of the motherboard

    Hello

    I got my V570 motherboatd & cpu replaced after the masssive failure (as seen here several times in the forum) and now my win 7 is not activated... What can I do with it? I have 2 days more before it runs

    Thank you


  • Stop button does not reset after each program start

    Newbie here, so when I start the program with the arrow of departure or, my Start button is always in the right position, but the stop button is not. How do reset you the default user as the stop button control.

    Lol it doesn't have the same effect.  They are completely different actions.  If they were the same, then NEITHER would never have created the other.  I've never seen a practical use for 'Up to this that freed'.  Read the help files on the mechanical actions to see the difference.  There is a real difference, delicate and subtle.  But there is a difference.

    If you clean the Boolean logic and put the start in case structure button.  It works very well.  See attachment.

  • Wifi button does not work after upgrade to windows 7 to windows 8

    Hi all

    I use a computer hp laptop pavilion. My wifi button stopped working after the upgrade to Windows 8. I installed the latest drivers wifi but the wifi button does not work on wifi. Help, please

    Concerning

    Wandi

    Hello

    I use a hp pavilion dv6 7030ei.

    I solved the problem of my wireless button not switching not wifi enabled or disabled. My laptops wifi button now works perfectly.

    I have has been Manager of access devices, then selected, network adapters

    -Click with the right button on intel Centrino Wireless - N 2230,

    -then click on uninstall and then uninstall. Restarted my PC.

    Then bang! my wireless button started working! I don't update this driver up to what Microsoft or intel acknowledges this problem caused by the wifi drivers 8 windows and provides an updated driver that is causing the problem I encountered.

    Thank you all for your comments.

    Concerning

    One_D

  • apply the filter command button does not

    Hello experts, I have the code to apply the filter of order button below, but when I click on the command button, it runs under code but works.   Array is not be filtered:

    {} public void applyTableFilters (ActionEvent actionEvent)

    FilterableQueryDescriptor qd = (FilterableQueryDescriptor) myTable.getFilterModel ();

    QueryEvent queryEvent = new QueryEvent (searchResultTable, qd);

    myTable.queueEvent (queryEvent);

    AdfFacesContext.getCurrentInstance () .addPartialTarget (myTable);

    }

    < af:commandButton text = "ApplyFilter".

    ID = "applyFiltersCB" styleClass = 'blue '.

    actionListener = "#{viewScope.myBean.applyTableFilters} '"

    Binding = "#{viewScope.myBean.applyFilterCB} '"

    immediate = "true" >

    < / af:commandButton >

    < af:table value = "#{bindings.myList.collectionModel}" var = 'row' "

    Rows = "#{Bindings.myList.rangeSize} '"

    emptyText = "#{bindings.myList.viewable?" "{'No RECS found': 'Access Denied.'}".

    fetchSize = "#{bindings.myList.rangeSize} '"

    disableColumnReordering = "true" rowBandingInterval = "1".

    inlineStyle = ' height: 400px; "

    filterModel = "#{bindings.myListQuery.queryDescriptor} '"

    queryListener = "#{bindings.myListQuery.processQuery} '"

    filterVisible = "true" varStatus = "vs."

    selectionListener = "#{viewScope.myBean.currentSelectionListener} '"

    rowSelection = "#{viewScope.myBean.rowSelectionMode} '"

    ID = "t1".

    Binding = "#{viewScope.myBean.MyTable}" >

    < af:column sortProperty = 'year' filterable = "true" sortable = "true".

    shortDesc = 'AnnΘe Prg'

    headerText = "Year" Prg"id = 'c4' >

    < af:outputText value = "#{row.yearCode}" id = "ot6" / > "

    < f: facet = name 'filter' >

    < af:inputText label = "" id = "it1" shortDesc = "Prg Yr Filter" "

    value = "#{vs.filterCriteria.yearCode} '"

    maximumLength = "5" >

    < / af:inputText >

    < / f: facet >

    < / af:column >

    ......................................

    < / af:table >

    Appreciate any help.

    Finally it worked.    The question is the table PPR using backing bean does not display the filtered data rather than it shows full data.  If I use UI PPR, then apply filter method works very well.

Maybe you are looking for