1

是否可以让自定义组件将其呈现委托给标准 JSF 组件:

@FacesComponent(value = "compositecomp")
public class CompositeComponent extends UIComponentBase {

    @Override
    public String getFamily() {
        return "composite";
    }

    @Override
    public void encodeEnd(FacesContext context) throws IOException {
        HtmlOutputText hot = new HtmlOutputText();
        // set some attributes here then...

       // delegate rendering
        hot.encodeEnd(context);
    }
}
4

0 回答 0