0

Well, i have two commandLinks, see:

<h:commandLink action="#{cursoDetalheMB.deletarPagina()}"
                        title="clique para deletar a página">
                        <i class="fa fa-trash"></i>
                        <f:ajax execute="@this" render="depCursoDetalhe:frmcursoDetalhe:depbCursoDetalhe:tabPaginas" />
                    </h:commandLink>

                    <h:commandLink action="#{cursoDetalheMB.selecionarPagina()}"
                        title="clique para ver a página">
                        <i class="fa fa-pencil-square-o fa-fw"></i>
                    </h:commandLink>

Both within a h:form. When i click in second button everything works fine (the action is called and page is redirected), but if i click in first button and after in second button nothing happens, because of f:ajax in first button.

If i put this in second button :

<f:ajax execute=@this />

Everything works fine, but i don't know why. Another solution is change to this in first button:

                    <f:ajax execute="@this" render="@form" />

Works fine too but the TAB changes and i don't wanna this.

Ronaldo Lanhellas
  • 2,134
  • 4
  • 27
  • 58
  • Sounds related: http://stackoverflow.com/questions/11408130/hcommandbutton-hcommandlink-does-not-work-on-first-click-works-only-on-second – BalusC Nov 03 '15 at 19:56
  • i think this is not my case, because i click more then one time in same button and nothing works. – Ronaldo Lanhellas Nov 03 '15 at 20:04
  • 1
    I'd start pressing F12 in webbrowser and inspecting the console and network monitor. If not already done, of course. See also http://stackoverflow.com/tags/jsf/info – BalusC Nov 03 '15 at 20:05
  • I noted that the action is called and return the desired value, but the JSF don't redirect. – Ronaldo Lanhellas Nov 03 '15 at 21:26

0 Answers0