jsf - How to pass timestamp based dynamic parameter to a URL in h:outputLink? -


i need call third party application jsf page, return html content. html content displayed on pop-up window.

the third-party url service expects key based on current unix time-stamp. can generate complete request url when user clicks on hyperlink otherwise key invalid (key valid 5 minutes only)

i tried below option, in case key generated when page rendered , if user clicks on hyperlink after 5 mintues link invalid.

also, authentication key generation process, not want in javascript due security reasons.

<h:outputlink onclick="window.open('#{testmbean.thirdpartylink}','thirdparty','menubar=no, status=no, scrollbars=yes, resizable=yes, toolbar=no, location=yes'); return false; "> link number </h:outputlink> 

i tried well, same behavior

<h:outputlink onclick="#{indexbean.jspopup()}">#{indexbean.linkname}</h:outputlink>  public string jspopup() {     return "javascript:void window.open('" + getredirectlink() + "','" + linkname + "','width=700,height=500,toolbar=0,menubar=0,location=0,status=0,scrollbars=0,resizable=1,left=0,top=0');return false;"; } 

can please provide input, how can achieved?

this call actual generated url:

    <h:panelgroup id="linkblk">         <script type="text/javascript">             function openit() {                 var url='#{indexbean.thelink}';                 window.open(url);             }         </script>     </h:panelgroup>     <p:commandbutton value="get popup" ajax="true" partialsubmit="true" process="@this" update="linkblk" actionlistener="#{indexbean.buildlink()}" oncomplete="openit()"/> 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -