0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

JSFの画面を表示したらjavax.el.ELException: Not a Valid Method Expression:となった時の対応方法

Posted at
  • 環境
    • Windows10 Pro 64bit
    • Eclipse Version: Oxygen.3a Release (4.7.3a)
    • (プロジェクト用)java version "1.7.0_79"
    • (Eclipse用)java version "1.8.0_231"

事象 : .xhtmlに試しにボタンを追加して表示したら怒られた

javax.el.ELException: Not a Valid Method Expression: 
    at com.sun.el.lang.ExpressionBuilder.createMethodExpression(ExpressionBuilder.java:311)
    at com.sun.el.ExpressionFactoryImpl.createMethodExpression(ExpressionFactoryImpl.java:96)
    at org.jboss.weld.util.el.ForwardingExpressionFactory.createMethodExpression(ForwardingExpressionFactory.java:43)
    at org.jboss.weld.el.WeldExpressionFactory.createMethodExpression(WeldExpressionFactory.java:53)
    at com.sun.faces.facelets.tag.TagAttributeImpl.getMethodExpression(TagAttributeImpl.java:240)
...

原因 : ボタンのアクション属性を指定していないから

javax.el.ELException: Not a Valid Method Expression: (JSF forum at Coderanch)

追加したボタン
<h:commandButton action="" value="ボタン" />

対応 : ボタンのアクション属性を指定する

追加したボタン
<h:commandButton action="{ponController.go}" value="ボタン" />
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?