0

I have the following folder structure:

enter image description here

Basically I access LancarAutorizacaoFaturamento.xhtml which includes PainelFinanceiro.xhtml and form there I would like to have a link to cadastroConta.xhtml passing a GET parameter. However; it just won't work, when the page renders, that link has the following message: "This link is disabled because a navigation case can't be found."

Here is what I've tried:

<h:link value="#{painel.strContaAssociada}" outcome="../conta/cadastroConta">
    <f:param name="id" value="#{painel.getId()}" />
</h:link>

Here are my past outcome tries:

protected/financeiro/conta/cadastroConta.xhtml
/protected/financeiro/conta/cadastroConta.xhtml
../protected/financeiro/conta/cadastroConta.xhtml
../../financeiro/conta/cadastroConta.xhtml
../../financeiro/conta/cadastroConta
../financeiro/conta/cadastroConta.xhtml
../financeiro/conta/cadastroConta
/financeiro/conta/cadastroConta.xhtml
../conta/cadastroConta.xhtml
../conta/cadastroConta
/conta/cadastroConta
conta/cadastroConta
cadastroConta

This seems like a simple task, what am I missing here? Thank you.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Alexandre Krabbe
  • 727
  • 1
  • 13
  • 33
  • When you manually open the cadastroConta.xhtml page, what exactly is the URL which you see in webbrowser's address bar? That is the URL you ultimately want to map in the outcome. See also https://stackoverflow.com/q/30683584/ – BalusC Jul 03 '19 at 18:39
  • Hi BalusC, this is the complete URL of cadastroConta.xhtml: `http://localhost:8080/evop/protected/financeiro/conta/cadastroConta.xhtml` – Alexandre Krabbe Jul 03 '19 at 18:41
  • 2
    Then you should be able to use `outcome="protected/financeiro/conta/cadastroConta"` (as explained in the link in the previous comment). Is this true? It should also keep working if you add the `/` prefix and/or the `.xhtml` suffix. If this is however not true, then that's probably a bug in the JSF impl being used or a misconfiguration in the JSF mapping. You'd better tell JSF impl/version being used and how exactly you've mapped the `FacesServlet` in `web.xml`. – BalusC Jul 03 '19 at 18:55
  • Thank you, it worked with the ´/´ prefix, but not without it. None the less it worked using ´/´ as the prefix. Could you post that as an answer so I can accept it? By the way, just bought your book last week! – Alexandre Krabbe Jul 03 '19 at 18:59
  • 1
    @AlexandreKrabbe: Please do like BalusC requested and add your JSF version and implementation... Always do this when asking jsf question (or for any other framework) – Kukeltje Jul 03 '19 at 19:15

0 Answers0