1

I have defined a flow:

<flow-definition id="locking">
    <view id="locking">
        <vdl-document>/views/locking/locking.xhtml</vdl-document>
    </view>
    <view id="summary">
        <vdl-document>/views/locking/locking-summary.xhtml</vdl-document>
    </view>
    <inbound-parameter>
        <name>targetId</name>
        <value>#{lockingBean.targetId}</value>
    </inbound-parameter>
    <flow-return id="exit">
        <from-outcome>#{lockingBean.getExitNode()}</from-outcome>
    </flow-return>
    <initializer>#{lockingBean.initializeBean()}</initializer>
    <finalizer>#{lockingBean.finalizeBean()}</finalizer>

</flow-definition>

As you can see i have inbound parameter, with is need for proper initialization in method passed in <initialize> tag. Problem is with accesing its value during initialization method lockingBean.initializeBean(). During its execution parameter targetId is null. It is passed correctly, because on view i'm placing its value as a text. This all means, that method passed in <initialize> is executed, and after that inbound parameters are being passed into a bean. In my opinion this order is incorrect.

Is it possible to chage this order, or is there a clean way around?

At this point i'm not doing anything in initialization method. All initialization has been temporary moved to other method with is called from view file ti set renderer on panel group. It all works, but this solution is far from being right.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
T.G
  • 1,913
  • 1
  • 16
  • 29

1 Answers1

0

This behavior has actually been accepted as a bug in Mojarra:

https://java.net/jira/browse/JAVASERVERFACES-3475

I can confirm the same problem behavior occurs with MyFaces 2.2.7.