Is it possible to use template with composite component in JSF 2?

前端 未结 1 1546
予麋鹿
予麋鹿 2020-12-17 03:36


    
        

        
相关标签:
1条回答
  • 2020-12-17 03:56

    This will indeed not work. You need <ui:decorate> inside the implementation instead.

    <ui:component
        xmlns="http://www.w3.org/1999/xhtml"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:cc="http://java.sun.com/jsf/composite"
    >
        <cc:interface>
            ...
        </cc:interface>
        <cc:implementation>
            <ui:decorate template="/WEB-INF/inputLayout.xhtml">
                <ui:define name="content">
                    ...
                </ui:define>
            </ui:decorate>
        </cc:implementation>
    </ui:component>
    
    0 讨论(0)
提交回复
热议问题