Command button remains disabled after a request redirect to a PDF Servlet

Hi All,
I've a command button to generate PDF on the fly and used to work in JDev 10.1.3.3.
When we migrated to 11g, it works for the first time on a page, and the file Open/Save dialog will come up.
But then the command button remains grayed out, and clicking doesn't generate a server call.
If I do something on the page which does a partial or full submit, then the button will get enabled again.
Any suggestions?
Thanks,
Jaimon
Sample code:
Facelets:
<af:commandButton text="Create PDF" action="#{fs02.createPDF}" />
Java:
public String createPDF() {
//Validation checks here. If there are any errors, it gets added to FacesMessages to display on the same page.
if(!validate()) {
//sf.addInfoMessage('message here..');
}else {
FacesContext ctx = FacesContext.getCurrentInstance();
HttpServletRequest request = (HttpServletRequest)ctx.getExternalContext().getRequest();
HttpServletResponse response = (HttpServletResponse)ctx.getExternalContext().getResponse();
RequestDispatcher rd = request.getRequestDispatcher("/pdfdownloader");
rd.forward(request, response);
ctx.responseComplete();
return null;
pdfdownloader is mapped as a servlet, which writes the actual PDF content as a stream.

Herewith the code which is triggered with the post-forms-commit trg. As far as I can see it, there is no code to disable/enable the save button in the menubar.
===
PROCEDURE validate_enbr_records IS
CURSOR c_enbr
IS
SELECT exlb.exlb_length
, enbr.enbr_ind_break
FROM dog_envelop_breaks enbr
, dog_extrnl_labels exlb
WHERE enbr_appl_cod = :flow_appl_cod
AND enbr_flow_cod = :flow_cod
AND enbr_sort_seqnr <> :enbr_sort_seqnr
AND enbr_appl_cod = exlb_appl_cod
AND enbr_exlb_cod = exlb_cod;
CURSOR c_exlb
IS
SELECT exlb_length
FROM dog_extrnl_labels
WHERE exlb_appl_cod = :flow_appl_cod
AND exlb_cod = :enbr_exlb_cod;
l_lengte_break_label NUMBER := 0;
l_lengte_sort_label NUMBER := 0;
l_length NUMBER := 0;
l_aant NUMBER := 0;
r_enbr c_enbr%ROWTYPE;
mi_id MenuItem;
BEGIN
FOR r_enbr in c_enbr LOOP
IF r_enbr.enbr_ind_break = 'Y'
THEN
l_lengte_break_label := l_lengte_break_label + r_enbr.exlb_length;
ELSE
l_lengte_sort_label := l_lengte_sort_label + r_enbr.exlb_length;
END IF;
l_aant := l_aant + 1;
END LOOP;
OPEN c_exlb;
FETCH c_exlb INTO l_length;
CLOSE c_exlb;
IF :enbr_ind_break = 'Y' THEN
l_lengte_break_label := l_lengte_break_label + l_length;
ELSE
l_lengte_sort_label := l_lengte_sort_label + l_length;
END IF;
IF l_lengte_break_label > 48
THEN
qms$errors.show_message('DOG-10194');
END IF;
IF l_lengte_sort_label > 50
THEN
qms$errors.show_message('DOG-10195');
--set_record_property(3,'enbr',status,changed_status);
END IF;
IF :system.record_status = 'CHANGED' THEN
set_menu_item_property('FILE_MENU.SAVE',ENABLED,'YES');
END IF;
END;
===
After the message has been throughn and the OK-button has been clicked, the code is never reaching the code:
IF :system.record_status = 'CHANGED' THEN
set_menu_item_property('FILE_MENU.SAVE',ENABLED,'YES');
END IF;
The save-button remains disabled.
Best regards
John.

Similar Messages

  • Commit Button Still Disabled After Table Edit

    I am using JDeveloper 11.1.1.6.
    I have a table on my page that is clickToEdit.
    I have CreateInsert and Delete buttons.
    I have Commit and Rollback buttons that are initially disabled.
    When I edit the value of an existing field and press Enter, the Commit and Rollbak buttons remain disabled.
    If I add a new record to the table, the Commit and Rollback buttons are enabled (as expected).
    I know I can add a partial trigger to the button with the id of the table, but the final application will have many tables.
    I don't want to add each table id to the partial trigger of the buttons.
    How can I set it up so the Commit and Rollback buttons are enabled after a table modification?
    Thanks,
    Ray

    Arun,
    Thanks for the info, but it looks like this thread has the same problem.
    The thread states "Do not forget to include the 'Commit' button as a PPR target in order the button to be refreshed."
    I assume this means I need to add the control's id to the commit button's Partial Triggers.  This results in the same problem as stated originally.
    Am I missing something?
    Ray

  • Command Button colors corrupt after switching back and forth from design view.

    I would say my experience level with Access is "getting there."
    I therefore don't thing I'm making a newbish mistake.
    Has anyone else noticed this?  As it's bugging me quite badly.
    1.  A command button has had it's color formatted (pressed, hover, etc. nothing fancy)
    2.  It works fine.
    3.  In my navigation form, if I switch to design view, then select a given sub-form... like "customers" - and switch back out of design view, to form view - then without fail, all customized command buttons within that sub forms' color will 'corrupt'
    ie, change.
    4. Closing and reopening the navigation form (ie, my main menu) restores it, but the same thing will happen should I go back to design view for the sub form.
    5.  Finally - this behaviour does not happen when switching back and forth between views on the original form that isn't a sub form in the navigation form.  (Ie,. the main 'customers' form). 
    Can any clever folk give me a solution? :(
    Thanks,  
    Eric Rowlands
    EDIT - My apologies, I am using Access 2013 for a desktop database.

    1) We will need to understand whether the issue is seen on any sample database.
    2) IS this seen only on your system, we would need to check on other system also
    3) If the issue is seen in all system & issue is not seen in the sample database then this could be database specific issue
    4) As per my understanding the issue is consistent, we would need to find what is the VBA code or which code is used while designing this form.
    5) We would need to see if the issue is seen only on that particular navigation form?
    6) Is the button gets corrupt I mean to say non-usable once it get discolored ?
    7) What is your end goal just in case if you are able to work on your database i.e. when working on the navigation form without going in design view is issue still seen there ?
    8) Since when are you experiencing this issue ?
    9) If possible please provide me the environment details of your system & Access application, whether the issue is seen only in access 2010 can we check in access 2007 or in access 2013.
    I would really appreciate if you can answers the above questions this will really help us to isolate the issue further
    in terms of technical troubleshooting after answering the above question I might come up with another question so that we can do extensive isolating the issue so the if required we can involve the developer also.

  • Page back button is disabled after clicking to another web page, causing me to lose the original page.

    When I click to follow a link from one of my home pages, the back button becomes disabled. This has the effect of "disappearing" the first page and "stranding" the link I traveled to.
    The only work around is enter the site again. Subsequent clicks from the page don't cause it to disappear again.

    I would suspect a slightly incompatible addon of causing that to happen.
    Do you have that problem when running in the Firefox SafeMode?<br/> ''A troubleshooting mode.''<br />
    You can open the Firefox 4.0 SafeMode by holding the '''Shft''' key when you use the Firefox desktop or Start menu shortcut. Or use the Help menu item, click on '''Restart with Add-ons Disabled...''' while Firefox is running. <br />
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut to open it again.''
    If not, see this: <br />
    http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes

  • Command Button not disabled properly

    I am using a commandButton and its partial trigger is set to a table. The reason being that I need to update the label with the number of rows selected in table. And if no rows is selected, it should be disabled. So for the startup I have set the "disabled" attribute to true.
    Now I am facing this problem. The button is disabled. But when I hover the mouse over it, I can see it being highlighted and it seems enabled and I can click it when the mouse is over it. Otherwise its disabled. Why is it behaving like this?

    JDev version = 11.1.1.6.2
    No skins applied.
    Code:
    <af:panelStretchLayout topHeight="30" id="psl1" styleClass="AFStretchWidth">
    <f:facet name="top">
    <af:panelGroupLayout layout="horizontal" id="pgl1">
    <af:commandButton text="MyButton"
    id="cb1"
    actionListener="#{pageFlowScope.MyBean.doSomething}"
    inlineStyle="margin-top:4px;margin-left:4px;margin-bottom:4px"
    partialTriggers="pc1:t1" disabled="true"
    partialSubmit="true"/>
    </af:panelGroupLayout>
    </f:facet>
    <f:facet name="center">
    <af:panelCollection id="pc1" styleClass="AFStretchWidth"
    featuresOff="statusBar wrap freeze formatMenu detachMenuItem">
    <af:table value="#{pageFlowScope.MyBean.tableData}"
    var="row" rowBandingInterval="0" id="t1"
    summary="My table"
    columnStretching="multiple"
    styleClass="AFStretchWidth"
    rowSelection="multiple" contentDelivery="lazy"
    verticalGridVisible="false"
    fetchSize="0"
    selectionListener="#{pageFlowScope.MyBean.onTableSelection}">
    <af:column sortable="true"
    width="50%"
    headerText="First Column"
    rowHeader="unstyled" id="c1">
    <af:outputText value="Some Text" id="ot1"/>
    </af:column>
    <af:column sortable="true"
    width="50%"
    headerText="Second Column"
    id="c2">
    <af:outputText value="Some Other Text" id="ot2"/>
    </af:column>
    </af:table>
    </af:panelCollection>
    </f:facet>
    </af:panelStretchLayout>

  • Back button dosnt work after a router redirect

    hi, i use British Telecom (BT) wifi hotspots frequently. this service will alow anyone to connect to a BT hotspot router and will redirect any request to a log in page provided by the router. once you log in you can use the service for an amount of time and then the router will again redirect you to a log in page.
    whenever im redirected to said log in page (provided by the router) the back button in firefox forgets all the history relevant to the tab that was redirected.
    for example i'm on www.google.com and i enter a search and the router redirects me to the BTwifi login page. now the back button for that tab is greyed out.

    Hello,
    Many site issues can be caused by corrupt cookies or cache. In order to try to fix these problems, the first step is to clear both cookies and the cache.
    Note: ''This will temporarily log you out of all sites you're logged in to.''
    To clear cache and cookies do the following:
    #Go to Firefox > History > Clear recent history or (if no Firefox button is shown) go to Tools > Clear recent history.
    #Under "Time range to clear", select "Everything".
    #Now, click the arrow next to Details to toggle the Details list active.
    #From the details list, check ''Cache'' and ''Cookies'' and uncheck everything else.
    #Now click the ''Clear now'' button.
    Further information can be found in the [[Clear your cache, history and other personal information in Firefox]] article.
    Did this fix your problems? Please report back to us!
    Thank you.

  • The back and forward button stay disabled after upgrading to Firefox 4

    I upgraded to Firefox 4 and the back and forward buttons are never enabled. I see them, but they are not working.
    History works, recently closed pages work, bookmarks work.
    I disabled all addons, uninstalled FF4, deleted \Program Files\Firefox, re-installed, kept extensions disabled, removed all backups from bookmarkbackups, deleted places.sqlite and still nothing.
    What else can I do?

    Norton has a fix out. See: http://community.norton.com/t5/Norton-Internet-Security-Norton/Norton-Toolbar-5-5-incompatible-with-Firefox-4-RC1/td-p/411556/page/2

  • IPhone remains disabled after Lost Mode turned off by owner

    Hi, my phone (iPhone 4, iOS7) was returned to me after I activated Lost Mode on iCloud. I have turned off Lost Mode on Find My iPhone, but my phone still shows 'iPhone is disabled' and I can only swipe to emergency calling. iTunes 'could not connect to the iPhone because it is locked and in Lost Mode’. Its location is accurate on iCloud/plays sounds so my 3G is fine. Please help, this is a real locked out owner and I am all ready to put in my legit Apple ID details and 4 digit passcode to enter my own (missing-and-found) iPhone.
    50 miles to nearest Apple store! T_T
    Thanks!

    If disabled, you'll either have to force into recovery mode & restore it, as described here:
    http://support.apple.com/kb/HT1808
    Or, login to iCloud.com, from your computer, find the phone, the erase it.

  • Check-out button is not disable after the check out request from the same user

    HI all,
            I want to use check out/ in procedure in solution manager along with email notification. For that, I have maintained required settings and maintenance project for the intended solution. I want to implement a team leader- manger hiearchy for any changes to the solution. When a team member requests for the check out for any process scenario/ step, the status goes to check out requested. But, the problem is, check-out button is not disable and same user can do the check out which I want to restrict. The check out can be done only by the project manger. I guess, this is related to authorization roles for both team member and manger. But I am not able to find out. Please help me to have the authorization roles for this.
    Thanks,
    Rutvik Upadhyay.

    Why not putting a af:fileDownloadActionListener inside the command button. In the bean you need an method like
        public void exportExcel(FacesContext aFacesContext, OutputStream aOutputStream)
    } You can use the output stream and when you finished just flush it. Don't close the stream and don't complete the response.
    Timo

  • JDev 10 - disable command button depending on which row is selected

    I am using JDeveloper 10, and I have a table which has some data columns and a selection facet with View and Edit command buttons.
    I would like all rows to be viewable. When you click the view event it goes to another .jsp with the view action.
    It does the same thing with the edit action, however I would like to only allow rows which have an EffectiveDate column in the future to be editable.
    Is there some way to disable the edit button when those rows are selected, or to throw a validation error when the edit button is clicked for that row?
    Thanks!
    Jeff
              <af:table value="#{bindings.RateList.collectionModel}" var="row"
                          rows="#{bindings.RateList.rangeSize}"
                          first="#{bindings.RateList.rangeStart}"
                          emptyText="#{bindings.RateList.viewable ? 'No rows yet.' : 'Access Denied.'}"
                          selectionListener="#{bindings.RateList.collectionModel.makeCurrent}"
                          selectionState="#{bindings.RateList.collectionModel.selectedRow}">
                  <af:column sortProperty="RateType" sortable="false"
                             headerText="#{bindings.RateList.labels.RateType}">
                    <af:outputText value="#{row.RateDescription}"/>
                  </af:column>
                  <af:column sortProperty="EffectiveDate" sortable="false"
                             headerText="#{bindings.RateList.labels.EffectiveDate}">
                    <af:outputText value="#{row.EffectiveDate}">
                      <f:convertDateTime pattern="dd-MMM-yyyy"/>
                    </af:outputText>
                  </af:column>
                  <f:facet name="selection">
                    <af:tableSelectOne text="Select and">
                      <af:commandButton text="View" action="view">
                        <af:setActionListener from="#{row.rowKeyStr}"
                                              to="#{requestScope.requestRowKey}"/>
                      </af:commandButton>
                      <af:commandButton text="Edit"
                                        action="edit"/>
                    </af:tableSelectOne>
                  </f:facet>
                </af:table>

    So, I first tried using Chan advice, I added a new editable property from the database and then added Edit buttons to each row in the table with disabled property set to the editable property.
    This correctly displayed buttons which were editable in the correct rows.
    However, I was no longer using the select functionality which passed the rowId of the selected row to the edit page.
    I wasn't able to quickly solve this problem so I tried John's solution.
    I feel really dumb, but after about 20 rereadings it was still completely Greek to me, I have no idea what he was recommending.
    So I added onclick="return editTest()" to the Edit button.
    The I added ID to the relevant locations, and the following javascript to the page, and this is working well enough now.
    (Oh, I display the date in a slightly odd dd-MMM-yyyy format, due to slightly odd customer requirements.)
    I've probably misspelled one of the months, haven't yet finished testing.
    A couple of gotchas I found
    - Do not add onclick="editTest()" or else it will continue processing and allow all rows to be edited.
    - Putting date = document.getElementById('mainFormId:tableId:'+i+':EffectiveDateId'); would work for the original search,
    but after filtering results i and found_it are not equivalent, and date was not found in the page.
               function editTest(){
                  var found_it;
                  var date;
                  for (var i=0; i < document.getElementsByName('mainFormId:tableId:selected').length; i++)  {
                     if (document.getElementsByName('mainFormId:tableId:selected').checked) {               
    found_it = document.getElementsByName('mainFormId:tableId:selected')[i].value;
    date = document.getElementById('mainFormId:tableId:'+found_it+':EffectiveDateId');
    var result = date.innerHTML.split("-");
    var day = result[0];
    if (day.charAt(0) == '0'){
    day = day.charAt(1);
    var month;
    var monthTxt = result[1];
    switch (monthTxt) {
    case 'Jan':
    month=0;
    break;
    case 'Feb':
    month=1;
    break;
    case 'Mar':
    month=2;
    break;
    case 'Apr':
    month=3;
    break;
    case 'May':
    month=4;
    break;
    case 'Jun':
    month=5;
    break;
    case 'Jul':
    month=6;
    break;
    case 'Aug':
    month=7;
    break;
    case 'Sep':
    month=8;
    break;
    case 'Oct':
    month=9;
    break;
    case 'Nov':
    month=10;
    break;
    case 'Dec':
    month=11;
    break;
    default:
    month=11;
    break;
    var year = result[2];
    var today = new Date();
    var effDate = new Date();
    effDate.setDate(day);
    effDate.setMonth(month);
    effDate.setYear(year);
    if (effDate < today) {
    alert ('Sorry, you cannot change a rate with an effective date in the past');
    return false;
    } else {
    return true;

  • Exchange 2013 request certificate remain pending after complete

    Hi Folks
    I have installed a standalone CA Windows 2008r2 on server joined to AD. Also I have installed Exchange 2013 SP1.
    After Exchange request certificate, I have submitted request to my standalone CA. Downloaded certificate on Exchange 2013 and then I have imported it (I have done complete from Exchange 2013 console) but certificate remain pending.
    I have seen using get-exchangecertificate, thumbprint are different. I mean from Exchange command I receive a thumbprint, but if i see thumbprint from certificate imported the two thumbprint are different.
    Any ideas?
    Many thanks
    Maximilian

    There is a separate section for pending requests. 
    if you look further down, there is a separate bit - including an example here::
    Cheers,
    Rhoderick
    Microsoft Senior Exchange PFE
    Blog:
    http://blogs.technet.com/rmilne 
    Twitter:   LinkedIn:
      Facebook:
      XING:
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

  • Cannot completely disable a dimmed command button

    Hi! Everyone,
    I thought this topic was solved before, but it comes back to me again.
    Please take a look at the code in the attached project.
    If the call of "Delay(5)" is placed after "ProcessSystemEvents()" call in the A_Callback() function, B-LED always light up no matter what!? 
    Dimming or making button B invisible doesn't disable the command button at all. 
    Only when I place the "Delay(5)" call in front of the "ProcessSystemEvents()", the B button will be disabled.
    Just by dimming button B, without "ProcessDrawEvents()" and "ProcessSystemEvents()", won't guarantee the button is disabled.
    I'm puzzled.  What is the correct way of completely disable a command button?
    Does this problem only happen in CVI 6.0?
    Solved!
    Go to Solution.
    Attachments:
    DimButtons.zip ‏5 KB

    Whether or not you need to call ProcessSystemEvents to ignore clicks on a button depends on what you are doing at the time and when you will undim the control.  The original question came up when the button was being dimmed and undimmed in a callback.
    CVI defers processing of events while you are in a callback.  If you're not currently in a callback, a click event will be processed when it occurs.  If the control is dimmed when that click occurs, (again, outside of a callback), the event will be processed and ignored and you don't need ProcessSystemEvents.
    Or if you dim the control from within a callback, then click on the control, then exit the callback without undimming the control, the event will be processed with the control dimmed and will therefore be ignored (without needing ProcessSystemEvents).
    So the big question is when will you undim the control?  If you undim it at the end of a long callback, then you need to call ProcessSystemEvents.
    But if, for example, you open a panel with a control dimmed, and then undim it after some other event, you don't need ProcessSystemEvents to ignore the click.
    Let's say you have a panel with a control for the user to select a filename, and a button to print the selected file.  You don't want Print to be active until the file is selected, so it's dimmed initially by default.  In a callback for the filename control, after the user selects a file, you can then undim the Print button without needing to call ProcessSystemEvents.  Any click on the previously dimmed Print button will have already been ignored.

  • Using Firefox 4 & Windows 7. Everytime I start Firefox from a shortcut to a website it comes up with the following error 'there was a problem sending the command to the program'. The requested website does load after this. with no problems.

    Using Firefox 4 & Windows 7. Everytime I start Firefox from a shortcut to a website it comes up with the following error 'there was a problem sending the command to the program'. The requested website does load after this. with no problems.
    If a shortcut is used while Firefox is already open the error does not occur.

    As reported in earlier replies, the annoyance disappeared after I upgraded to Roboform 7.5.6, from 7.5.4.
    Regards, Steve

  • How to get the page request parameters in Command Button code

    Hi everyone,
    I am new to JSF and working on some Command Buttons. I put my java code via Edit Event, it works fine. But I don't know how to get some parameters from HttpServletRequest.
    Can anyone give some guidance? It would be much appreciated.
    Mike

    Thanks a lot for your tip. Unfortunately I could not open the link you provided due to some network issue.
    Yes, I intend to get some parameters from URL. I did try to put your code and get the parameters predefined in the URL, however I got the null returned. By the way, I put the following code in the page source part and it works. Just don't know how to get the value being passed to the command button event code.
    <%
    String userID = request.getParameter("u");
    System.out.println("this is from head - the userID is :: " + userID);
    %>
    Thanks again and hope you could give me further advice.

  • Disable page display when back button is pressed after logout

    hi,
    I dont want the old pages to appear once the back button is pressed after loggin g out. That is .... when logged in, if the user presses back button then his previous pages must be shown....but once the user logs out and then if he presses back button then some message like session has been closed....like message should be displayed.
    Hope you understood the problem

    If you expire a page then back button will not take it to the previous page.
    expire is a HTTP-EQUIV meta tag in the header of the page. You can set the content to some time in the "past" when serving the page first time.
    Expires
    This tells the browser the date and time when the document will be considered "expired." If a user is using Netscape Navigator,
    a request for a document whose time has "expired" will initiate a new network request for the document.
    An illegal Expires date such as "0" is interpreted by the browser as "immediately." Dates must be in the RFC850 format, (GMT format):
    <META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT"> Hope this works for you, there are browser dependencies as well.
    vr,
    Sudhakar B.

Maybe you are looking for

  • 10.5.8 won't detect any external hard drives

    I want to update my 10.5.8 Macbook Pro which I bought in 2008.  It runs incredibly slow, and I want to reformat it before updating with Snow Leopard.  The problem is that my computer won't detect any external disc drives, so I can't back up my import

  • Crystal Reports Server XI - what files need to be backed up?

    I don't want to set up a fail over cluster which there seems to be plenty of information on. All I want to do is identify what files I need to backup incase I need to do a restore. We use Tivoli Storage Manageru2019s backup and recovery solution for

  • CA certificate problem in Arch Linux

    I installed nss by this : pacman -S nss #(in root) certutil -d sql:$HOME/.pki/nssdb -A -t ",," -n "Thawte SGC CA" -i "Thawte_SGC_CA.crt" #Only test for CA management, Thawte_SGC_SA is exported from Chromium Then I open Chromium, browse https://mail.g

  • Photoshop Imageready cannot read .mov files

    This is just one big pain. I got a new computer and had to reinstall everything, after doing so i decided to go make a vid sig, However now my photoshop imageready does not read/recognise .mov files, i check for about four hours and have been unable

  • Forms 9i PLSQL Compiler

    Ha1s anyone had any problems upgrading their Forms from 6i to 9i specifically due to PLSQL compiler problems? Presumably they are different versions. Does anyone know the PLSQL compiler version nos in Forms 6i and Forms 9i?