0

I use h link to navigate another page in new window. But after click link to navigate another page, h :command button not invoked.I have to click second times to invoke command button action.

Here my xhtml file :

...

<rich:column>
<h:link outcome="/demo/myUrl?faces-redirect=true" value="myValue" target="_blank" >
<f:param name="fn" value="myValue" /> 
</h:link>
</rich:column>

...

<h:commandButton value="x"  action="#{myBean.myAction}">
<a4j:param value="parameter1"  assignTo="#{myBean.myParameter}" />
<a4j:ajax execute="myTable" 
oncomplete="doComplete()" />
</h:commandButton>
  • Sounds like https://stackoverflow.com/questions/11408130/hcommandbutton-hcommandlink-does-not-work-on-first-click-works-only-on-second - except it shouldn't happen after a faces-redirect navigation. Maybe there is an AJAX request happening here, e.g. at the opening of another page? Btw, it's not clear, if the commandButton is on the source page or the target page. – Vsevolod Golovanov Jun 11 '17 at 20:21
  • Thank you Vsevolod for your answer. I already checked link " stackoverflow.com/questions/11408130/",but ı could not find solution :S Then I decided to use this workaround solution : I put invisible command link.And ı call this commandlink's action in onclick method of hcommand button. – Mobile Deniz Jun 17 '17 at 17:13

0 Answers0