public class MethodExpressionActionListener extends ObjectSE implements ActionListener, StateHolder
MethodExpressionActionListener は、MethodExpression
をラップする ActionListener
です。ActionEvent
を受信すると、MethodExpression
で識別されるオブジェクトに対してメソッドを実行します。
TO_FLOW_DOCUMENT_ID_ATTR_NAME
コンストラクターと説明 |
---|
MethodExpressionActionListener() |
MethodExpressionActionListener(MethodExpression methodExpressionOneArg) MethodExpression を含む ValueChangeListener を作成します。 |
MethodExpressionActionListener(MethodExpression methodExpressionOneArg, MethodExpression methodExpressionZeroArg) |
修飾子と型 | メソッドと説明 |
---|---|
boolean | isTransient() true の場合、このインターフェースを実装するオブジェクトは、状態の保存または復元に参加してはなりません。 |
void | processAction(ActionEvent actionEvent) コンストラクターで渡された MethodExpression を呼び出します。 |
void | restoreState(FacesContext context, ObjectSE state) コンストラクターに記述されている両方の |
ObjectSE | saveState(FacesContext context) コンストラクターで記述されている両方の |
void | setTransient(boolean newTransientValue) このインターフェースを実装するオブジェクトが状態の保存または復元に参加する必要があるかどうかを示します。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public MethodExpressionActionListener()
public MethodExpressionActionListener(MethodExpression methodExpressionOneArg)
MethodExpression
を含む ValueChangeListener
を作成します。ActionEvent
引数を取る代わりに引数を取らないメソッド式ターゲットに対応するには、このクラスの実装は引数 methodExpressionOneArg
を取り、その式文字列を抽出し、期待されるパラメーター型がゼロ引数メソッドのものと一致する別の MethodExpression
を作成する必要があります。これらの MethodExpression
インスタンスの両方の使用要件は、processAction(jakarta.faces.event.ActionEvent)
で説明されています。
methodExpressionOneArg
- void
を返し、型 ActionEvent
の単一の引数を取るメソッドを指す MethodExpression
public MethodExpressionActionListener(MethodExpression methodExpressionOneArg, MethodExpression methodExpressionZeroArg)
public void processAction(ActionEvent actionEvent) throws AbortProcessingException
コンストラクターで渡された MethodExpression
を呼び出します。まず、このインスタンスのコンストラクターに渡された MethodExpression
を呼び出して、引数 ActionEvent
を引数として渡します。MethodNotFoundException
がスローされた場合、このインスタンスのコンストラクターに渡された MethodExpression
から派生したゼロ引数 MethodExpression
を呼び出します。それが何らかの理由で失敗した場合は、失敗の原因を含めて AbortProcessingException
をスローします。
ActionListener
の processAction
actionEvent
- 発生した ActionEvent
NullPointerExceptionSE
AbortProcessingException
- Jakarta Server Faces 実装に、現在のイベントでこれ以上の処理を実行しないことを通知します public ObjectSE saveState(FacesContext context)
コンストラクターで記述されている両方の MethodExpression
インスタンスを保存する必要があります。
StateHolder
の saveState
context
- Faces コンテキスト。public void restoreState(FacesContext context, ObjectSE state)
コンストラクターに記述されている両方の MethodExpression
インスタンスを復元する必要があります。
StateHolder
の restoreState
context
- Faces コンテキスト。state
- 状態。public boolean isTransient()
StateHolder
true の場合、このインターフェースを実装するオブジェクトは、状態の保存または復元に参加してはなりません。
StateHolder
の isTransient
true
、それ以外の場合は false
。public void setTransient(boolean newTransientValue)
StateHolder
このインターフェースを実装するオブジェクトが状態の保存または復元に参加する必要があるかどうかを示します。
StateHolder
の setTransient
newTransientValue
- このオブジェクトが 状態の保存または復元に参加しない場合はブール値 true
を渡し、それ以外の場合は false
を渡します。Copyright © 2018,2020 Eclipse Foundation.
Use is subject to license terms.