如何不在JSF中呈现整个块? [英] How to not render whole block in JSF?

查看:83
本文介绍了如何不在JSF中呈现整个块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一个JSF 2.1组件可以让我有条件地呈现(或不呈现)其所有内容?像

Is there a JSF 2.1 component which lets me conditionally render (or not render) all its content? Something like

<h:component rendered="#{user.loggedIn}">

...a bunch of jsf components and HTML code...
...even more HTML code...

</h:component>

我正在使用PrimeFaces 3M4,因为这可能会影响您的答案!

I am using PrimeFaces 3M4 as this may influence your answer!

推荐答案

<h:panelGroup>

如果将属性设置为layout="block",则将具有<div>标签

If you set attribite layout="block", you will have a <div> tag

否则,您会有一个<span>标记.

Otherwise, you have a <span> tag.

这篇关于如何不在JSF中呈现整个块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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