JSF Action vs Outcome Attribute

前端 未结 2 1380
悲&欢浪女
悲&欢浪女 2020-12-17 01:41

I\'m new to JSF and am trying to understand what the difference is between the action vs the outcome attributes? This is not the difference between buttons and command butt

2条回答
  •  难免孤独
    2020-12-17 02:10

    Difference is that while action defines a server method to be executed, outcome specifies a view-id which will be destination of your page. You must use JSF inputs depending on the goal you're trying to achieve:

    • targets you to the user management page. Imagine it as kind of link.
    • If you return "user-management" in your action method, is doing the same as the outcome but it allows you to execute some logic into the server side. It must be embedded into a h:form tag.

    Also there's no difference between or , as far as your server side getter method returns "user-management" value.

提交回复
热议问题