0

I am working with JSF trying to do a .xhtml as simple as :

<ui:composition ...>    
    <span class="fr">
        <a4j:commandLink value="#{msg.label_return}"
            action="#{backingBeanRef['navigateBack']()}"
            rendered="#{backingBeanRef['returnValueStackBean']['returnValueStack']['size']() ne 0}"
            render="#{render}"/>
    </span>
</ui:composition>

so I can include it in several views. It works as expected in most of them but one, in which the action method is never called.

I have tried to call the method without parameterization (#{myBean.navigateBack()}) and it still doesn't works.

I have also tried to write #{backingBeanRef'navigateBack'} above the commandLink and the method is called so the backingBeanRef is correct and everything should work but it doesn't.

At this point I have no clue about what is happening, does anyone knows?

Thanks in advance

Aldeguer
  • 821
  • 9
  • 32

1 Answers1

0

I had two <h:form> in my code. Once I removed one of these, this got fixed.

Aldeguer
  • 821
  • 9
  • 32
  • Two of what????? – Kukeltje Jul 25 '17 at 13:03
  • Forgot to add code sample – Aldeguer Jul 26 '17 at 06:12
  • See why you **always** need to create a [mcve]? The code that caused the problem was not visible in your question. – Kukeltje Jul 26 '17 at 06:14
  • Yep, but I simply didn't know where the wrong code was. If I had to write it all, it would be about three thousands lines. That's why I just wrote the code which was most probably wrong – Aldeguer Jul 26 '17 at 06:16
  • Read what an [mcve] is... it is **not** about all code, on the contrary. See also http://www.stackoverflow.com/tags/jsf/info. It is one of the most important steps in debugging and **requested as required** in [ask] – Kukeltje Jul 26 '17 at 06:30