Link doesn't work on the same page Twice

I have implemented a module in JSF where the page displays a datatable and one the columns is a command link which when clicked opens up a dialog box to save a CLOB from the DB as a csv on the local desktop.
All this is working fine.
The problem is that once the user clicks on one link in the datatable and then the user again clicks on any other link on the page or tries to use the Logout link the page is directed to the welcome page and in the logs the following exception is there.
01/12 16:19:01 ERROR [com.common.jsf.lifecycle.FrameworkLifecycle] Exception handled for view: /restricted/reportSummary
com.common.jsf.filter.postback.PostBackValidationException: The view id: /restricted/reportSummary does not match the previous post back view id as well as it is not in the postBackValidationExcludeList.
     at com.common.jsf.filter.postback.PostBackValidationPhaseListener.validatePostBackViewId(PostBackValidationPhaseListener.java:177)
     at com.common.jsf.filter.postback.PostBackValidationPhaseListener.afterPhase(PostBackValidationPhaseListener.java:146)
     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:211)
     at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
     at com.common.jsf.lifecycle.FrameworkLifecycle.execute(FrameworkLifecycle.java:1123)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
     at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:208)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:165)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:138)
     at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
     at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
     at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
     at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
     at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
     at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
     at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
     at java.lang.Thread.run(Thread.java:595)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

The jsf jsp is:
<h:form>
    <tr:panelHeader styleClass="titleText" text="Report Summary"/>
    <tr:outputFormatted rendered="#{empty reportList}" styleClass="titleText"
                        value="No Match Found"/>
    <h:dataTable rows="31" rowClasses="oddRow,evenRow" styleClass="font_size"
                 binding="#{downloadBean.summaryBindingReport}" value="#{reportList}"
                 var="reportSummary" rendered="#{! empty reportList}">
        <h:column>
            <f:facet name="header">
                <h:outputText styleClass="titleText" value="Date"/>
            </f:facet>
            <h:outputText value="#{reportSummary.reportDate}">
                <f:converter converterId="customDateConverter"/>
            </h:outputText>
        </h:column>
        <h:column>
            <f:facet name="header">
                <h:outputText styleClass="titleText columnSpace"
                              value="File Name"/>
            </f:facet>
            <h:commandLink value="#{reportSummary.reportName}"
                           action="#{downloadBean.downloadcsv}"/>
        </h:column>
    </h:dataTable>
</h:form>The backing bean is :
public void downloadcsv()
    throws IOException, ServiceLocatorException, ReportServiceException
    ReportSummary selectedReportId =
      (ReportSummary) summaryBindingReport.getRowData();
    ReportContent reportObj =
      getReportService().getReportContent(selectedReportId.getReportId());
    // Prepare.
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ExternalContext externalContext = facesContext.getExternalContext();
    HttpServletResponse response =
      (HttpServletResponse) externalContext.getResponse();
    BufferedInputStream input = null;
    BufferedOutputStream output = null;
    try
      // Init servlet response.
      response.reset();
      response.setContentType("plain/text");
      response.setHeader("Content-disposition",
                         "inline; filename=\"" + selectedReportId.getReportName() +
      output =
          new BufferedOutputStream(response.getOutputStream(), DEFAULT_BUFFER_SIZE);
      char[] strReportContent = reportObj.getReportText();
      Utility.logMessage(Constants.SEVERITY_INFO,
                         "**** Report Content ****" +
                         String.valueOf(strReportContent), this);
      // Write the Report Content as Comma Separated values
      output.write(String.valueOf(strReportContent).getBytes(), 0,
                   strReportContent.length);
      // Finalize task.
      output.flush();
    finally
      // Close streams.
      close(output);
      close(input);
    // Inform JSF that it doesn't need to handle response.
    // This is very important, otherwise you will get the following exception in the logs:
    // java.lang.IllegalStateException: Cannot forward after response has been committed.
    facesContext.responseComplete();
  private static void close(Closeable resource)
    if (resource != null)
      try
        resource.close();
      catch (IOException e)
        e.printStackTrace();
  public void setSummaryBindingReport(HtmlDataTable summaryBinding)
    this.summaryBindingReport = summaryBinding;
  public HtmlDataTable getSummaryBindingReport()
    return summaryBindingReport;
  }

Similar Messages

  • How do you do anchors - the three ways listed did not work.  I am using the jQuery mobile template 11.  I want to link to a spot on the same page.

    How do you do anchors - the three ways listed did not work.  I am using the jQuery mobile template 11.  I want to link to a spot on the same page.

    How do you do anchors - the three ways listed did not work.  I am using the jQuery mobile template 11.
    You have aroused my curiousity, what are three ways listed that do not work? At risk of being labeled as an ignoramus, could you also tell me where to get the other 10 templates?
    I usually give an element an ID and use that in my link as in
    <a href="#mySpot">Go to my spot</a>
    <div id="mySpot">
    </div>

  • How to create links to different files on the same page?

    Good day to all again,
    can someone please guide me through creating several links to different files on the same page. In other words, I am creating a photo page where my links are called Gallery 1, Gallery 2, etc... I would like to create links so when the User clicks on Gallery 1, they see Gallery 1 slide show in the frame; when the user then clicks Gallery 2, then they see Gallery 2 slide show in the window.
    My slide show files are done and I am using GoLive CS2. I have no knowledge of JavaScript or ActionScript/Flash.
    Any suggestions are highly appreciated.
    Thank you
    Alek

    Hi Diana,
    I'm a professional photographer and in the process of getting
    my finished site published. I used Coffeecup Photo Gallery. You can
    create multiple albums on the same page. Do a Google search for the
    address. It's easy, inexpensive, and it works. I tried to do this
    with the Photo Gallery in DW and FireWorks--but couldn't get it
    right. CC uses Flash and Javascript.
    Good Luck

  • Linking to an anchor within the same page

    Anyone know how to link to an anchor within the same page?
    For instance, im making a FAQ page. at the top of the page I would like to list all the questions. i would like the viewer to be able to click a question which brings them to the answer on the bottom of the page.
    looked in inspector couldn't find it. linking to anchors is pretty basic, so id be really suprised if iweb doesn't have this feature. so im assuming im missing it.......
    how do i do this?

    Anyone know how to link to an anchor within the same page?
    how do i do this?
    Linking to an anchor within the same page is no more than scrolling to it, and can be (easily) emulate with javascript window.scroll function.
    See my post here: http://discussions.apple.com/thread.jspa?messageID=7676908&#7676908
    All javascript is linked to the example page.

  • Two JavaScript widgets won't work on the same page [was: Not the first time]

    I ran into this a few months back and gave up on it. I have a page that has several javascripts running on it. They are:
    vnu_datestamp.js
    a flashing neon text script (inline)
    DW's own rollover image (MM_swapimgRestore) script (also inline)
    jquery1.2.2_pack.js
    overlapviewer.js
    lightbox.js (which also relies on scriptaculous.js, prototype.js and an "effects.js" to run)
    I know that's a "garbage pail" of javascripts to all be on the same page. Frankly I'm surprised that they don't all give me problems. But there is one.
    The lightbox and overlap viewer just will not play together.
    Depending on which one I list first in the header, the other one quits. Whichever one I lose goes from the image display effect to acting like a straight hyperlink to the designated image.
    It isn't a huge deal, but I'd like to be able to have the two of these on the same page and working. I have them running alone on other pages and can link to them, but it sort of defeats the purpose of making a web page to show the variety of things I can do for someone who whats a website built, if one or more of the things won't work.
    [Subject line edited by moderator for clarity]

    Please don't use cryptic subject lines for posts. The value of a forum is that other people might be searching for the answer to a similar problem. Meaningless subject lines prevent others from finding useful replies. They also discourage others who might be able to provide help more quickly if they knew what you're asking about.
    I've had a quick look at your page. Quite honestly, I find all the flashing rather nauseating, but if that's the way you want to design a page, it's your choice...
    The conflict is caused by the fact that overlapview.js seems to rely on jQuery, while lightbox.js relies on Prototype and script.aculo.us. Both jQuery and Prototype use $() as a shortcut, so you cannot mix the two libraries on the same page without taking special measures to prevent the conflict. In jQuery, you do this by loading all the jQuery, Prototype, and script.aculo.us libraries first, and then using the following script:
    jQuery.noConflict();
    Then load overlapview.js, replacing all instances of $ with jQuery. So, for example, the following line:
    $(t).fadeTo('normal', overlapviewer.endopacity, function(){
    needs to be rewritten like this:
    jQuery(t).fadeTo('normal', overlapviewer.endopacity, function(){

  • Create A Link to More Text on the Same Page?

    I want to know how to make a link that says "MORE" that will reveal additional text on the same page.
    I am NOT referring to a link that will scroll the user to a different part of a page.
    I am talking about a page with a lenghty amount of text that is kept hidden, until the user clicks on the word "MORE" to expand it. (Or, I usppose, "LESS" to make it disappear again.)
    Thanks in advance.

    Have you looked at Spry Widgets?  Accordion or Collapsible panels might work.
    http://labs.adobe.com/technologies/spry/samples/accordion/AccordionSample.html
    http://labs.adobe.com/technologies/spry/samples/collapsiblepanel/CollapsiblePanelGroupSamp le.html
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • How to open a link from search engine in the same page

    I just noticed that my links are opening in new windows instead of on the same page on Safari. Is there anyway I can change it back to where if I click on a link in the Yahoo search engine that it would just open within the same page without opening a new tab or window, where I can go back and forth between pages? For example, say I type in "wikipedia" on Yahoo home page and click search. Then it takes me to the Yahoo! Search Results page with a link to the Wikipedia website. When I click on that link, the Wikipedia home page loads right within the same page instead of opening a new tab or window and loading into that new tab or window. If I wanted to go back to the search results, I can just click the back button. I remember Safari doing that before, is there anyway to get back to that? Thanks.

    You can set the Integer pref <b>browser.link.open_newwindow.override.external</b> to "<i>1</i>" on the <b>about:config</b> page.
    *http://kb.mozillazine.org/about:config
    The browser.link.open_newwindow.override.external pref uses the same values as this pref for JavaScript window.open() calls.
    *http://kb.mozillazine.org/browser.link.open_newwindow.restriction

  • Inappropriate renderings  while dynamically including the same Page twice

    Hi,
    I am including same page twice with only one backing bean. It works fine when I execute the first included page or the second included page alone. But after executing the first included page and then if I clicked second included page which comes in a modal panel I am getting inappropriate rendering of components. i reckon the form is not initialized properly though the pages are using same backing bean and JSF code. Kindly give me some valuable inputs on this regarding.
    Thanks in advance!!

    I am very Sorry BaluC!!!
    yes I am using h:messages and also reads appserver logs .My application is constant per session(per user). So I am using session scoped bean for all the pages. the page which I had mentioned here loaded twice
    1. loaded individually by clicking the link from the left navigation,
    2. Also loaded from an other page as a modal panel by clicking a button in that page.
    I have used only one jsp code and backing bean which is included using <jsp:include>.
    Here is an example code where the page is loaded from the left navigation
    Page1:
    <html>
    <body>
    <h:form>
    <jsp:include page="sample.jsp" flush="true" />
    </h:form>
    </body>
    </html>Here is an example code where the page is loaded from the modal panel of an other page
    In Page2:
    <html>
    <body>
    <h:form>
    // Codes of Page2
    *//Here I will set some values in the session and pass it to the included page(sample) on a button click and the included page is loaded in a modal panel.*
    </h:form>
    <rich:modalPanel>
    <jsp:include page="sample.jsp"  flush="true"/>
    </rich:modalPanel>
    </body>
    </html>This is the included page
    sample.jsp:
    <f:verbatim><html>
    <body> </f:verbatim>
    <f:subview id="samplePageId">
    <h:form binding="#{SampleBean.initFom}">
    // Codes of sample JSP
    </h:form>
    <f:verbatim>
    </body>
    </html>
    </f:verbatim>In the initform(HtmlForm)
    SampleBean.java
    private HtmlForm initForm;
    public HtmlForm getInitForm()
            assignPageAttributes(); // void method in the backing bean "SampleBean"
            return initForm;
    private void assignPageAttributes()
      //code to get the session values which comes from page2.jsp
    if(sessionValues != null)
        // Included page loaded in a modal panel from page2.jsp
    else
    // Included page loaded from the left navigation if the session values doesnt contains any session values
    }In this way I am binding to the form of SampleBean.java. if I used the session scope the h:form component of the included page is shared . If I used request scope means the action is not performed properly. there are the problems i am facing right now.

  • Why the jsp tag jsp:forward page="page.jsp" / works when i work with web server iPlanet in a Solaris machine and doesn't work with the same web server, in a Windows 2000 machine ?

    The request parameters don't go to the "page.jsp"...

    If someone else runs into this, here is how I solved the problem -
              If you create a PrintWriter object with the autoflush option, it
              doesn't flush the underlying buffer till you call println on it. I
              looked through the generated code for the servlet, and it was doing a
              JSPWriter.print() to output information.
              So, I changed the ResponseWrapper to keep a handle to the PrintWriter
              object, and then flush it in the filter, and that works.
              Why the same code behaves differently in JRun & Weblogic, I'm not sure
              --Sridhar
              

  • TS2570 doesn't work, still the same problem when using Rapidweaver software. NOT with other software.

    i tried everything in this article, but still have the same problem when using Rapidweaver software. NOT with other software. I am converting my iWeb site  to Rapidweaver, whenever there is a calmer period in my office. I have 16 Gb RAM on my NEW iMac and have Parallels desktop, mail, safari, iWeb and Rapidweaver running simultanious.
    I never have the problem if i don't use Rapidweaver, but after i have added several pages to Rapidweaver, the problem begins. my iMac won't start up. the only thing that works is re-installing Macos OS X 10.8. i tried even whiping the completeharddrive, and reinstalling with a complete new user, the same problem.
    I had it on my previous iMac also, and bought a new one because i thought the problem was in the iMac first. i hadn't noticed it only happens with using rapidweaver.
    i sent my complete rapidweaver project to the programmers from rapidweaver at Realmacsoftware, but they couldnt reproduce my problem, there macs started up without any problem.
    i deleted all the rapidweaver addons and extra stacks, and started a complete new project.
    saterday i had the problem again, after adding about 5 new pages to my rapidweaver site.
    i think i have reinstalled Macos OS X 10.8.2 20 or 30 times by now
    does anyone have a sollution?

    Type '''about:support''' in the URL bar and hit Enter.
    Scroll down almost to the bottom of that listing and see if you have '''user.js Preferences''' just above the '''''Graphics''''' category.
    If you do have that, click on '''user.js file''' in this sentence. <br />
    ''Your profile folder contains a user.js file, which includes preferences that were not created by Firefox.''
    Does that "different homepage" appear in that user.js file?

  • Multiple portlets using javascripts not working on the same page!!!

    Does anyone know a work around for this problem????
    I have two seperate dynamic pages. Each page has a drop down menu which is built from javascript and dhtml. Individually they both work fine. However they stop working when placed on a page together. Even when in seperate regions. I need to keep both of them as seperate portlets so i cannot solve the conflicts in the javascript as i would if they were coded together.
    Any Ideas????
    Anyone?????

    Daniel,
    It could be a script conflict - "any duplication in variable declaration, function name, or event-handler access in two scripts can cause at least one, if not both scripts to become inoperative." Check this site to see if this applies to you:
    http://www.javascriptkit.com/javatutors/multiplejava2.shtml
    Good luck!

  • Why does Firefox Security Updates 3.6.8 & 3.6.9 say installed on Dec.31, 1969? Details link doesn't work. The 3.6.7 was installed on July 21, 2010.

    I saw a quick Firefox notice at the lower corner of my screen about security updates available or being installed so when I checked to see what they were, I found an installed update 3.6.7 on 7-20-2010, and the next one 3.6.8, said installed on 12-31-1969, the next one 3.6.8 says installed on 12-31-1969, and the last one 3.6.10 installed on 9-16-2010. I've clicked on the details link but nothing happens. Firefox has been acting a little strange lately (won't get out of Firefox when I click out of it unless I shut down my laptop, using 100% CPU and freezing so I have to shut down through Task Manager) can it be some kind of bug/glitch?

    Firefox safe mode is meant for diagnostic purposes and not for permanent usage.
    Possible suspects can be the BitDefender extensions (BitDefender QuickScan, BitDefender Antiphishing Toolbar) and plugin (BitDefender QuickScan Web Netscape Plugin)
    You can also remove the Java Console extensions and disable the Java Quick Starter extension.<br />
    See http://kb.mozillazine.org/Java#Multiple_Java_Console_extensions
    Disable the Java Quick Starter extension: Tools > Addons > Extensions
    Control Panel > Java > Advanced tab > Miscellaneous >Java Quick Starter (disable)
    See http://www.java.com/en/download/help/quickstarter.xml - What is Java Quick Starter (JQS)? What is the benefit of running JQS? - 6.0
    If it does work correctly in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.<br />
    See [[Troubleshooting extensions and themes]]

  • Submit button with multiple email addresses doesn't work while the same form with one email address does.  The multi email version works on windows computer.

    The email comes up when I press the "Submit" button but the email to field is blank.

    Hi,
    What is the separator character between two email addresses?  Is it a comma (,) semicolon(;) or something else?
    According to the mailto URI scheme (RFC 6068), you need to use a comma (,) to separate multiple email addresses.
    You can see the third example in the following Wikipedia page.
    mailto - Wikipedia, the free encyclopedia
    Would you double check the mailto value in your PDF form?

  • Macbook Pro Retina Display - Sound and video doesn't work at the same time.

    I just bought a macbook pro retina display and tried to watch a movie by connecting my macbook pro via hdmi to my home theater receiver (Onkyo TX-SR309) and into my HDTV (Sony Bravia 42"). My problem is, i don't get sound from the speakers connected to the receiver.
    When i disconnect the HDTV from the receiver (only the receiver is connected to the macbook pro), then sounds will comes out from the speaker.
    Can somebody help me to fix this problem?

    With the HDMI connected and the Onkyo powered on, open system preferences, go to the sound panel, and select the HDMI choice.
    Frank

  • Can you create an image map that will link to a different element on the same page?

    I have used image maps before and know how to create an image map to link to a new page.  In this case, however, I want to be able to click on my image using an image map and load a new image with text on the same page as the image map.  Is this even possible?  Is there some sort of behavior that allows you to create same-page links, perhaps using AP divs?  I want the end result to be a type of gallery that loads different images depending on where you click on the main image.
    Again, I don't even know if this is possible.  Any suggestions on how to make this work would be greatly appreciated.
    Thank you!

    Go to this site and mouse over the image map of South America.
    http://alt-web.com/testing.html
    Is that what you are looking for?
    Insofar as linking to a position on the same page, do a Help search (F1) in DW for "named anchors."
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

Maybe you are looking for