Problem JSF Posting back on comamndLink

I have a commandLink in JSF that is posting back instead of going to the desired destination. Does anyone know why this might be occuring? I don't get any exceptions and the browser seems to be making a request to the server, the action just never gets executed!
wines.jsp
<h:column rendered="#{wineBackingBean.renderWine}">
                    <f:facet name="header">
                         <h:outputText value="Wine"/>
                    </f:facet>
                         <h:commandLink action="#{wineBackingBean.showWine}">
                              <h:outputText value="#{wine.wineName}"/>
                         </h:commandLink>
               </h:column>faces-config
<navigation-rule>
          <from-view-id>
               /wines.jsp
          </from-view-id>
          <navigation-case>
               <from-outcome>
                    wineSelected
               </from-outcome>
               <to-view-id>
                    /showWine.jsp
               </to-view-id>
          </navigation-case>
          <navigation-case>
               <from-outcome>
                    wineEdit
               </from-outcome>
               <to-view-id>
                    /editWine.jsp
               </to-view-id>
          </navigation-case>
     </navigation-rule>
handler
     public String showWine(){
          Wine selectedWine = (Wine)ldm.getRowData();
          setWine(selectedWine);
          noteHandler.setNotes(new ListDataModel(new               AccessNotes().getNotesByWineID(selectedWine.getWineID())));
          System.out.println("wineSelected");
          return "wineSelected";
     

Are you sure that it is posting back? Sounds like a silly question, but if you e.g. just have a testing environment where you observe this, you might play with identical page designs. The URL you see in the browser will not be refreshed upon actions (server side redirect).
You should also check the rendered HTML to see, whether it meets your requirements.
Volker

Similar Messages

  • JSF AJAX post-back

    I have a javascript function for a POST request from XMLHttprequest object.The post-back is handled within the decode function of the component which generates the AJAX request. The javascript request looks as follows:
    function lookup(field) { .... if (window.XMLHttpRequest) { req = new XMLHttpRequest(); } else if (window.ActiveXObject) { req = new ActiveXObject("Microsoft.XMLHTTP"); } var formdata = "ajaxreq=true"; " var formAction = window.document.forms[0].action;\n" + "req.open(\"POST\",formAction,true);\n" + "req.setRequestHeader(\"Content-Type\",\"application/x-www-form-urlencoded\");\n" + req.onreadystatechange = processXMLResponse; req.send(formdata); } This request is generated from within the directoryBrowser.jsp itself. This request is not being recognized as a post-back by the JSF framework ,successful as it is not causing the decode method of the component to be executed. What is wrong? When i print out the responseText of the request object from the callback function, i get teh html of the page printed out.The responsexml is null.

    Maybe, you've already solved the problem.
    Anyway, I faced with a similar problem and (after days of debugging and googling) I solved it making the request object local rather than globa (and changing the request callback accordingly)l.
    function sendRequest()
      var req = createRequestObject(); // e.g. new XMLHttpRequest();
      req.open('GET', url, true);
      req.onreadystatechange = function{ handleRequest(req); };
      req.send(null);
    function handleRequest(req)
      if (req.readyState == 4)
        if (req.status == 200)
          // request done
    }Hope this help!!
    PS: I would thank the guys that made me see the light: [Ajax: The Basics (Part 1)|http://courses.coreservlets.com/Course-Materials/pdf/ajax/Ajax-Basics-1.pdf]

  • JSF and ADFBC: How to Run a method every time the page is posted back

    Hi everyone,
    I am using ADFBC and JSF in my project, and there is a page which runs the following logic: The page displays a set of radio options and a submit button. It has a total of 4 options, but they never display all at once. For example, when user enters the page for the first time, only selectItem 1 displays. When it clicks on the submit button, the page is posted back and hides the first select item, showing now the second, and so forth. The steps i did to achieve this are:
    1 - Created a method on the App Module that inserts a row corresponding to the select item choice.
    2 - Created another method that verifies which is the lastly entered row and returns a string containing the relevant attribute, for example, "E".
    3 - Created the methodAction binding to run the insertMethod (1) and retrieveMethod (2).
    4 - Created an invokeMethod executable for the retrieveMethod (2) and set the refresh property to "always".
    5 - Created a variableIterator with a variable to hold the retrieveMethod return, also setting the refresh to "always".
    6 - Lastly, bound the "rendered" attribute of each select item to the variable's value, for example "#{bindings.returnVariable == 'E'}
    When i run the page, the logic works almost fine, except for one detail: When the user clicks the button that calls insertMethod, the page is posted back, and i assume the selectItems should be re-rendered accordingly. Yet, the button click inserts the row in the DB (called insertMethod) but keeps showing the previous radio item. If i restart OC4J, when i enter the page again the radio is now correct, showing the next option.
    Do you know how can i tell the page that the model has been refreshed, so it runs the retrieveMethod again, alters the variable and the radio options without having to leave the page or restarting OC4J?
    Thanks in advance for your help!
    Regards
    Thiago Souza

    Hi all,
    It seems i have figured out the error. It was a logic mistake on my method, ADF was doing the refreshes just fine. There is another little question i wanted to ask now: I need to execute a JSF Navigation Case when the page loads, in order to navigate to another page due to a certain condition. is there any way to run some logic to redirect the request before the page has been rendered, just like the onLoad() javascript event runs on the body every time it gets loaded?
    What i'm trying to do exactly is this: When the login.jspx page runs the "success" navigation case, it goes to "page1.jspx". But before "page1.jspx" is loaded, i need to run an Application Module method to check for a certain situation; if this criteria is not met, i must run "fail" navigation case, from "page1.jspx" to "page2.jspx" without ever displaying page1.jspx.
    Is it clear enough? Can you guys give me some pointers on how to do it?
    Thanks a lot!
    Thiago

  • How to post back for activity confirmation

    Dear QM guru here,
    I have QM order link to inspection lot, order type is QL01.
    during i record result, i also confirm activity of labor processing.
    my problem is the screen of confirmation activity have only 3 field can input. 1. activity quantity 2. work center 3. plant.
    so every time i confirm activity system always record as system date.
    but i would like to post back to the previous. so can we config to change this screen to show date that allow to change during confirmation.
    Thank you in advance.
    Konnapa

    hi,
    Yes u may change the screen content but for that u need the screen no. and u may also take the help of an ABAPr, for screen modifications. and if u want back date posting than use user exit QLCO0002 for this.
    or if u simply want the proposed dates or confirmation dates (Previous) than u need to check ur config. -
    > Parameters for order Confirmation.
    Regards
    Edited by: D GURU on Jan 4, 2012 1:04 PM

  • How to post back to another view or skip restore view phase?

    Hi, I have a small application with a template used by every page. In this template there is a button to logout as shown below
    <h:form id="logoutForm" prependId="false">
       <h:commandButton id="logoutButton" action="#{loginBean.logout}" value="logout"/>
    </h:form>It works, but has the undesirable side effect of first triggering processing included in the constructor of other backing beans used in the page. This is because JSF first restore view of the page, and in doing that it instantiates every bean used in the view. Then after restoring the view it calls the method logout in the loginBean.
    I wanted a way to change the action of that logoutForm, but it seems it is impossible in JSF.
    Is there anything I can do to post back to another view, skipping unecessary processing that occurs in the restore view phase of the view that includes the template with the logout form?
    Thanks

    JSF is a stateful API - the stateful part is the building of the component tree server side. To be able to do this, the backing beans need to be invoked.
    So no, it is not possible to do this and keep JSF in the loop; if you really must bypass the creation of the beans, make sure the JSF servlet isn't invoked (for example, use a plain old servlet).

  • Problem with Portlet Backing Context

    Hi,
    I am having problem with Portlet Backing context.
    I have on portlet and one JPF associated with this portlet.
    Now in JPF action method i have Portlet Backing context object, using this object
    i tried to get the previous portlet state using portletCtx.getPreviousWindowState().
    But It always gives me null.
    can anyone help me out ? its very urgent.
    or you can suggest me anyother option to do this....
    Thanks,
    Vijay Patel

    Vijay -
    You might want to post this to the Portal newsgroup.
    Regards,
    Kunal
    "vijay patel" <[email protected]> wrote:
    >
    Hi,
    I am having problem with Portlet Backing context.
    I have on portlet and one JPF associated with this portlet.
    Now in JPF action method i have Portlet Backing context object, using
    this object
    i tried to get the previous portlet state using portletCtx.getPreviousWindowState().
    But It always gives me null.
    can anyone help me out ? its very urgent.
    or you can suggest me anyother option to do this....
    Thanks,
    Vijay Patel

  • Portlet will not post back after first time

    I have a portlet that is using WC 2.2 in version 5.0.4 of the portal. The portlet renders fine and posts back fine the first time. Subsequent clicks on any button requiring a postback go nowhere (just the cursor displaying as an hourglass). No request is made to the web server so it must be hung up in the postback javascript somewhere. Has anyone experienced this issue before. Thanks in advance.

    Then I don't know. In these situations I use Visual Studio to attach to IE and do client-side debugging. It's a bit tricky, but doable. Then you can trace where it goes after the second click (if anywhere). Unless someone had the same problem and knows the answer...
    Although, we did have a very similar problem where second post back did not work (it would freeze with a hourglass). In our case it was because PTWC 2.2 can't handle large viewstates generated by a data grid. When we disabled the view state, it worked.
    Ruslan.

  • HP Compaq 8510w, Windows XP Pro - Problem in restore back-up files

    HP Compaq 8510w, Windows XP Pro.
    Problem in restore back-up files.
    In order to solve a virus problem, I've made back-up of specific files.
    Then I've restored initial image of laptop.
    I obtained 7 back-up files, but restore procedure ask me for eight files.
    Some suggestions ?

    Hello, @felixcanetoad 
    Welcome to the HP Forums.
    It seems that you're having issues with unzipping files. I will try to assist you this.
    I would recommend that you read over this thread : Re: Restoring Files,
    the posts from @Great-Deku-Tree , provide you with everything that HP Supports when it comes to this. His last post on page 2, will provide the answer to 7-zip.
    Thank you for posting on the HP Forums.
    I worked on behalf of HP.

  • When I have video clips on my timeline, they do not play in the monitor screen. I hear the sound track but can not see the image. To test if my new files are somehow the problem, I went back and used video files that I used successfully a year ago, and th

    When I have video clips on my timeline, they do not play in the monitor screen. I hear the sound track but can not see the image. To test if my new files are somehow the problem, I went back and used video files that I used successfully a year ago, and they no longer play in the monitor window. I hear the sound track, but do not see any video. Have I changed some setting that controls video playback in the monitor window?

    Randy Ruttger
    Thanks for the follow up.
    Missing in this equation were the version of Premiere Elements that you were using and the computer operating system on which it was running. But...
    The deed is done. But.....Until now and after you went ahead and moved to version 12, we now learn what version of Premiere Elements you were using. We still do not know the computer operating system involved.
    You just said Premiere Elements 10. Premiere Elements 10 is hit by a serious known display issue if the computer uses a NVIDIA GeForce video card/graphics card. In this issue, the only remedy is to roll back the driver version to about May 2013. The description of the problem and how to do the roll back are described in one of the Announcements at the top of this forum. What video card/graphics card does your computer use?
    On another front, Adobe will be releasing a new version of Premiere Elements any day now. No one but Adobe knows the feature set for the new version. That type of information is announced at the moment of release of the new version.
    So the remedy to the problem that you presented in this thread could have been...
    1. Rolling back the NVIDIA GeForce driver version to about May 2013 if possible (Windows 8 or 8.1 64 bit, may not be possible)
    2. Move to another version of Premiere Elements (which you did)
    I offer the above for consideration so that you can review your decisions. We are pleased to learn that Premiere Elements 12/12.1 works for you.
    Please do not hesitate to ask questions and ask for clarifications, but remember that the answers are in the details.
    Best wishes,
    ATR

  • Problem while posting to accounts.posting period  002 2010 not open

    Hi experts,
    Im facing problem while posting to accounting.
    I ran the live payroll run and  while posting im got the incorrect document.
    System is showing the error message that  ""Posting period 002 2010 is not open"""
    How we have to open the periods.
    Please advice.
    Vi Sai.,

    Hi vicky,
    Goto t-code OB52.
    Variant :Posting Period variant, Account Type : +, From Account : space, To Account : ZZZ..Z, From Period : 2,Year :2010, To Period :2, Year : 2010
    Save.
    Regards,
    Dilek

  • Document Splitting problem while posting asset acquisition using F-90

    Hi,
    We are using ECC 6.0 with document splitting functionality and are facing problem while posting asset acquisition using F-90.
    The transaction entry details are as below:
    Document Type - KR
    Vendor Line Item PKey - 31
    Amount - 10000
    Asset Line Item with PKey - 70, Transaction Type - 100
    Amount - 10000
    The Document Splitting Rule - 0000000012 is used and the Field Status Group for the Vendor Reconciliation Account and Asset Reconciliation account have Cost Center, Profit Center and Segment as "Optional" field.
    The Balance Sheet Item - Asset Reconciliation Account has been created as
    Secondary Cost Element - 90.
    The Profit Center and Segment field have been made mandatory and zero balancing is also set in the settings for Document Splitting.
    While posting asset acquisition using F-90, we are getting the error message - "Balancing Field "Profit Center" in line item 001 not filled"
    The first line refers to the Vendor Line item.
    Please let me know how to overcome this error.
    Regards,
    Ramanand

    Please follow the below path and do config :-
    IMG>FA>Asset Accounting>Integration with the General Ledger>Additional Account Assignment Objects>Specify Account Assignment Types for Account Assignment Objects
    here you have to put KOSTL (Cost center) for both against APC and Dep run for each Dep area.
    Thanks
    Pyare

  • Getting problem while posting Invoice

    Hi all,
            Ofcourse this problem is related functional thing, i am posting in ABAP group. we are getting problem while posting invoice through f-43 transaction. The error is "Fiscal year 0000 not allowed for year-dependent commitment items". Please let me know if u have any solution.
    Thanks in advance.
    chandrasekhar.

    Hi chandrasekhar,
    pls post some infos:
    1) application aerea of the message and message no.
    2) document date / posting date
       and ohter date-fileds of the document
    3) SAP-Release
    Have you search in SAP-OSS with the message no. or
    message text ?
    regards Andreas

  • Problem in posting Service Entry Sheet for PO containing unplanned services

    Hi Experts,
    I am facing an issue with Service POs which are uploaded by a program as a part of Data Migration activity.
    Scenario-
    PO Document Type--> Framework Order
    Account Assignment Cat--> Unknown
    Limit Tab in Service PO--> Overall Limit and Expected Value are mentioned
    Service Tab- No planned service maintained
    Error Msg No- SE366
    Problem-
    While posting SES against this PO - I get a error msg- "No limit for unplanned services amounting to xxx.xx exists" (where xxx.xx is the amount).
    Trials-
    1) I have manually created the same PO in system which allow me to post SES without any problem.
    2) Considering this a a bug I tried to rebuild the PO with report - RMBESTK3 but no success.
    Can anyone please suggest?
    Regards,
    Amit

    Thanks all for prompt reply.
    The issue is resolved now. The porblem was under 'limit' tab there is a tab 'Other Limit'. Under this tab there is a check box 'No Limit' - if we manually create such PO then the box is automatically checked which the uploaded POs were lacking. After checking this box manually the problem is resolved.
    Thanks once again for suggestions.
    Regards,
    Amit

  • Problem in posting multiple documents in FB70 through BDC...

    Hi,
       I am facing a problem while posting multiple documents from a flat file in FB70 thourgh BDC batch input by using session method. However, the session is getting terminated after posting the first document. Please clarify my problem.
    Below is a sample of the data in my flat file -
    Customer,Invoice Date,Posting Date,Amount,G/L Account,Amount in doc. Curr.
    34,03.06.2009,03.06.2009,100,211000,100
    34,03.06.2009,03.06.2009,200,211000,200
    34,03.06.2009,03.06.2009,300,211000,300
    And below is the sample code of my program.
    REPORT ZANI2_BDC_FB70
           NO STANDARD PAGE HEADING LINE-SIZE 255.
    TYPES: BEGIN OF TY_STR_FB70,
             ACCNT(20)      TYPE C,     "Customer
             BLDAT(20)      TYPE C,     "Invoice Date
             BUDAT(20)      TYPE C,     "Posting Date
             WRBTR(20)      TYPE C,     "Basic Data - Amount
             HKONT(20)      TYPE C,     "G/L Account
             ITEM_WRBTR(20) TYPE C,
             "Line Item Amount In Document Currency
           END OF TY_STR_FB70,
          BEGIN OF TY_STR_FILEDATA,
             FIELDS TYPE STRING,
          END OF TY_STR_FILEDATA.
    *   data definition
    *       Batchinputdata of single transaction
    DATA:   BDCDATA LIKE BDCDATA    OCCURS 0 WITH HEADER LINE,
    *       messages of call transaction
            MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    DATA: IT_STR_FILEDATA TYPE STANDARD TABLE OF TY_STR_FILEDATA,
          WA_STR_FILEDATA TYPE TY_STR_FILEDATA,
          IT_STR_FB70 TYPE STANDARD TABLE OF TY_STR_FB70,
          WA_STR_FB70 TYPE TY_STR_FB70,
          G_STR_FILENAME TYPE STRING,
          G_FLG_ERROR TYPE I,
          G_INDEX TYPE I,
          G_STR_INDEX TYPE STRING,
          G_STR_FIELDNAME TYPE STRING.
    SELECTION-SCREEN BEGIN OF BLOCK INPUT.
    PARAMETERS: P_FILE TYPE IBIPPARMS-PATH,
                P_SES  TYPE APQI-GROUPID.
    SELECTION-SCREEN END OF BLOCK INPUT.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          PROGRAM_NAME  = SYST-CPROG
          DYNPRO_NUMBER = SYST-DYNNR
          FIELD_NAME    = 'P_FILE'
        IMPORTING
          FILE_NAME     = P_FILE.
    Continued in the next thread..

    ...Continued from the previous thread.
    PERFORM OPEN_GROUP.
        G_INDEX = 1.  
        LOOP AT IT_STR_FB70 INTO WA_STR_FB70.
           PERFORM BDC_DYNPRO      USING 'SAPMF05A' '1200'.
          PERFORM BDC_FIELD       USING 'RF05A-BUSCS'
                                         'R'.
         "Customer
          PERFORM BDC_FIELD       USING 'INVFO-ACCNT'
                                         WA_STR_FB70-ACCNT.  
          "Invoice Date
          PERFORM BDC_FIELD       USING 'INVFO-BLDAT'
                                        WA_STR_FB70-BLDAT.                               
          "Posting Date
          PERFORM BDC_FIELD       USING 'INVFO-BUDAT'
                                        WA_STR_FB70-BUDAT.                                
         "Basic data - Amount
          PERFORM BDC_FIELD       USING 'INVFO-WRBTR'
                                        WA_STR_FB70-WRBTR.     
          PERFORM BDC_FIELD       USING 'INVFO-WAERS'
                                        'EUR'.
          G_STR_INDEX = G_INDEX.
          IF G_INDEX < 10.
            CONCATENATE '0' G_STR_INDEX INTO G_STR_INDEX.
          ENDIF.
          CONDENSE G_STR_INDEX NO-GAPS.
          CLEAR G_STR_FIELDNAME.
          CONCATENATE  'ACGL_ITEM-WRBTR(' G_STR_INDEX ')' INTO
          G_STR_FIELDNAME.
          PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                        G_STR_FIELDNAME.
                                        "'ACGL_ITEM-WRBTR(01)'.
          "G/L Acct
          CONCATENATE  'ACGL_ITEM-HKONT(' G_STR_INDEX ')' INTO
          G_STR_FIELDNAME.
          PERFORM BDC_FIELD       USING  G_STR_FIELDNAME       
                                         WA_STR_FB70-HKONT.    
            "Amount .
          CONCATENATE  'ACGL_ITEM-WRBTR(' G_STR_INDEX ')' INTO
          G_STR_FIELDNAME.
          PERFORM BDC_FIELD       USING G_STR_FIELDNAME   
                                        WA_STR_FB70-ITEM_WRBTR.
          "PERFORM BDC_DYNPRO      USING 'SAPMF05A' '1200'.
          PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                        '=BU'.
          CLEAR WA_STR_FB70.
        ENDLOOP.
        IF G_FLG_ERROR IS INITIAL.
          PERFORM BDC_TRANSACTION USING 'FB70'.
        ENDIF.
        IF G_FLG_ERROR IS INITIAL.
          PERFORM CLOSE_GROUP.
          MESSAGE 'Session created successfully.' TYPE 'I'.
        ENDIF.
      ENDIF.
    Continued in the next thread..

  • I paid $20 to upgrade my iPod touch and it didn't go through for me. The person who assisted me said that if it didn't work out that I would get my $20 posted back into my credit card. Prior to this service I made a purchase from the iTunes Store.

    I paid $20 to a person from the apple customer support line to have my iPod touch upgraded but it never went down. The representative who assisted me said that I would have those $20 posted back into my Visa card if it didn't go through. The service never got to happen and failed. Prior to this I made a purchase from the iTunes Store for $7.00, which they never billed me. So until I pay for the previous iTunes purchase, I am not allowed to download any applications. This is the reason why I need the $20 back from the separate request I made with apple which never worked out. Cause as soon as I pay for the previous iTunes purchase that I made apart from apple, then I could once again start to download and install applications. I have a week already without downloading apps. Please refund my money back a.s.a.p.

    Not sure what this is all about...
    JamesAbreu55 wrote:
    I paid $20 to a person from the apple customer support line to have my iPod touch upgraded but it never went down. ...
    However... This is a user to User Forum.
    To Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

Maybe you are looking for