Estimated require = true behavior in a composite component?

I am a bit confused about the rquired="true" attribute in composite components.

 <composite:interface> <composite:attribute name="value" required="true" /> </composite:interface> <composite:implementation> <h:outputText value="Value: '#{cc.attrs.value}'" /> </composite:implementation> 

I expect an error when using this composite without a value such as <my:test/> , but the code will be displayed without any errors or warnings! I am using Mojarra-2.1.19-jbossorg-1 and tested this problem with @Named @ViewScoped and @SeesionScoped beans.

It's almost the opposite. The component component, the required attribute, throws an exception in Mojarra 2.0.3 , but it actually asks about the behavior of value="" .

+4
source share

Source: https://habr.com/ru/post/1494659/


All Articles