ui:composition和ui之间的区别:Facelets中的装饰 [英] Difference between ui:composition and ui:decorate in Facelets

查看:125
本文介绍了ui:composition和ui之间的区别:Facelets中的装饰的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Facelets中 ui:composition ui:decorate 之间有什么区别?两者似乎都支持 ui:define 作为子标签。在什么情况下你会使用这些?

What are the differences between ui:composition and ui:decorate in Facelets ? Both seem to support ui:define as child tags . In what cases would you use each of these ?

推荐答案

以外的任何东西< ui:composition> 标记被忽略。对于< ui:decorate> ,情况并非如此,因此这对模板中的模板很有用。

Anything outside <ui:composition> tag is disregarded. This isn't true for <ui:decorate>, which is thus beneficial as "template-in-template".

通过查看以下答案中的一些真实世界示例,可以更好地理解这有什么意义:

How that makes sense can maybe be better understood by looking at some real world examples in the below answers:

  • What is the real conceptual difference between ui:decorate and ui:include?
  • Is it possible to use template with composite component in JSF 2?
  • Is there a way to run a JSF page without building the whole project?

这篇关于ui:composition和ui之间的区别:Facelets中的装饰的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆