Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我注意到 c:set 在“include of include”中不能很好地使用,因为重要的通知 facelets 文档也不推荐它。
现在我在 ui:include 中使用 ui:param,但是当包含没有附带关于 params 的注释时,它有点分散,还有其他方法来声明“全局变量”吗?
这实际上是一个尝试将旧的 JSP 编程融入 JSF 框架的问题。您应该使用支持 bean 来保存您的数据。
如果您尝试将数据直接硬编码到您的 xhtml 文件中,那么您就违背了 JSF 的 MVC 框架的目的。如果你有一个具体的例子来说明你想要做什么,我可以给你一个具体的建议。