1

According to the Primefaces 6.2 user guide the attributes stand for

Name | Default | Type | Description

[...]

url | null | String | Url to be navigated when menuitem is clicked

[...]

outcome | null | String | Navigation case outcome

where "outcome" is a synonym of the description for url. I would like to avoid using them wrongly.

pnuts
  • 58,317
  • 11
  • 87
  • 139
Kalle Richter
  • 8,008
  • 26
  • 77
  • 177
  • 1
    I would summarize it as: use url for navigation to external place, outcome for application internals. – Aritz Jul 30 '18 at 18:36

1 Answers1

0

The answer is :

  • outcome refers to a JSF page in your application or a navigation rule defined in your faces-config.xml
  • url simply opens the given address, which could be on another website.

Using outcome is a great feature, because if the targeted JSF page does not exist, the link is not produced, so you will not have a 404 response when clicking on it.

fxrobin
  • 590
  • 3
  • 9
  • That's too similar to @Melloware's answer to be a separate one. You're also ignoring the criticism expressed in the comments to not define navigation cases in `faces-config.xml`. – Kalle Richter Aug 03 '18 at 13:46
  • no, it's different. @Melloware said to use outcome, you must define it in faces-config.xml which is not true. And I don't agree with criticism about faces-config.xml, because in some cases, defining these rules are useful. – fxrobin Aug 03 '18 at 13:49
  • I agree with @fxrobin and deleted my answer. – Melloware Aug 03 '18 at 14:04