Composite component required attribute throws exception in Mojarra 2.0.3

前端 未结 3 423
日久生厌
日久生厌 2021-01-13 12:03

I\'ve been playing around with JSF 2.0 composite components but I\'m a bit confused as to what the require attribute in the composite:attribute tag is meant to

相关标签:
3条回答
  • 2021-01-13 12:34

    I don't know if it is a bug, but it is the nature of el-expressions. Default expression type is String and empty string translated as null.

    0 讨论(0)
  • 2021-01-13 12:38

    We have simular issues with required="true" in combination with @ViewScoped bean.

    I our case the bean no longer behaves like a @ViewScoped bean (new constructor call every time).

    Your problem might be that because the bean looses its scope the variabels are null again?

    Either case the only awnser I can give you is to not use required="true" or use a @SessionScoped bean.

    (Possibly this relates to the problem of Mojarra not being able to handle bindings to properties in @ViewScoped beans)

    0 讨论(0)
  • 2021-01-13 12:56

    This seems to have been this issue, which seems to have been closed a while ago, although I cannot seem to find in which version it was included.

    0 讨论(0)
提交回复
热议问题