3 Replies Latest reply on Jan 14, 2015 1:56 PM by edilmar

    commandLink target="_blank" stopped to work

    edilmar

      Hi,

       

      My environment is: NetBeans 8.0.1 + Glassfish 3.1.2.2 + JSF 2.1.29 + Richfaces 4.5.1 + CDI/Weld 1.1.8 (original) + Apache DeltaSpike 1.2.1 + JPA 2 + Hibernate 4.2.7 + RDBMS Firebird 2.5.2 + JasperReports 5.5.… last week I change from my old enviroment:

      - old JSF 2.1.6 to new JSF 2.1.29

      - old RF 4.3.7 to new RF 4.5.1

      - old CODI 1.0.6 (ConversationScoped) to new DeltaSpike 1.2.1 (GroupedConversationScoped)

       

      I have commandLinks with target="_blank" that worked fine in old environment with many new versions of Firefox and Chrome.

      Now, it doesn't work in new enviroment only in Chrome, Firefox continues to work fine.

      When I am in a JSF page and clicks in a commandLink with target="_blank" in Chrome, it opens a new tab with the new page I need but it does a "strange refresh" and goes back to the same page from the first tab. Do you have any idea about this strange problem?

        • 1. Re: commandLink target="_blank" stopped to work
          michpetrov

          I'm assuming you're using h:commandLink, since a4j:commandLink doesn't have the @target in which case this isn't an issue with RichFaces (although you can try removing RichFaces from your project and see if that changes anything). If it worked before with the same browser there was probably some change in implementation.

          • 2. Re: commandLink target="_blank" stopped to work
            edilmar

            I discovered that if I remove <h:head>, where it doesn't matter if <h:head> is empty or not, the refresh doesn't occur. But without <h:head> Richfaces doesn't render correctly the components. I have no idea of this stranged behaviour of Chrome with my new enviroment.

             

            This is the "head" generated:

             

            <head>

                <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

                <link href="/sitesat2/css/default.css" rel="stylesheet" type="text/css" />

                <link href="/sitesat2/css/cssLayout.css" rel="stylesheet" type="text/css" />

                <script language="JavaScript" src="/sitesat2/js/md5.js"></script>

                <script language="JavaScript" src="/sitesat2/js/funcoes.js"></script>

                <title>SAT - Sistema Online para Transportadoras</title><link type="text/css" rel="stylesheet" href="/sitesat2/org.richfaces.resources/javax.faces.resource/org.richfaces.staticResource/4.5.1.Final/Packed/classic/org.richfaces.css/skinning.css" /><script type="text/javascript" src="/sitesat2/javax.faces.resource/jsf.js.jsf?ln=javax.faces&amp;stage=Development"></script><script type="text/javascript" src="/sitesat2/org.richfaces.resources/javax.faces.resource/org.richfaces.staticResource/4.5.1.Final/Packed/org.richfaces/jquery.js"></script><script type="text/javascript" src="/sitesat2/org.richfaces.resources/javax.faces.resource/org.richfaces.staticResource/4.5.1.Final/Packed/packed/packed.js"></script><link type="text/css" rel="stylesheet" href="/sitesat2/org.richfaces.resources/javax.faces.resource/org.richfaces.staticResource/4.5.1.Final/Packed/classic/packed/packed.css" /><script type="text/javascript" src="/sitesat2/javax.faces.resource/windowhandler.js.jsf?ln=deltaspike"></script></head>

            • 3. Re: commandLink target="_blank" stopped to work
              edilmar

              I think the problem is in DeltaSpike <ds:windowId/>, not JSF or RichFaces.

              If I comment <ds:windowId/> all works.

              Thanks for your response.