Primefaces <p:outputPanel/> 或 <div/>。我应该使用什么来响应?
Primefaces <p:outputPanel/> or <div/>. what should I use for responsive?
使用 Primefaces 设计良好的响应式页面的最佳方式是什么?
在 Primefaces showcase 中我可以看到两个标签,div 和 outputpanel 之间有什么区别?
对于专业页面,什么是最佳选择?
也许面板网格?
我需要专业的观点。
来自 PrimeFaces 文档:https://primefaces.github.io/primefaces/8_0/#/core/performance
尝试在 JSF 标签上使用 HTML
如果您不需要转义或转换器等其他功能,请特别避免使用 h:outputText。只需在 XHTML.
中使用 EL 表达式
这同样适用于其他一些组件,例如 p:outputPanel。只需使用普通的 div。如果您需要使其可更新,您仍然可以使用 "passthrough elements" <div jsf:id="...">...</div>
或 jsf:rendered
。例如:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:jsf="http://xmlns.jcp.org/jsf">
<div class="userDetails" jsf:rendered="#{sessionController.authorized}">
Name: #{cc.attrs.value.name}
Details: #{cc.attrs.value.details}
</div>
</html>
使用 Primefaces 设计良好的响应式页面的最佳方式是什么? 在 Primefaces showcase 中我可以看到两个标签,div 和 outputpanel 之间有什么区别? 对于专业页面,什么是最佳选择? 也许面板网格? 我需要专业的观点。
来自 PrimeFaces 文档:https://primefaces.github.io/primefaces/8_0/#/core/performance
尝试在 JSF 标签上使用 HTML
如果您不需要转义或转换器等其他功能,请特别避免使用 h:outputText。只需在 XHTML.
中使用 EL 表达式
这同样适用于其他一些组件,例如 p:outputPanel。只需使用普通的 div。如果您需要使其可更新,您仍然可以使用 "passthrough elements"
<div jsf:id="...">...</div>
或jsf:rendered
。例如:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:jsf="http://xmlns.jcp.org/jsf">
<div class="userDetails" jsf:rendered="#{sessionController.authorized}">
Name: #{cc.attrs.value.name}
Details: #{cc.attrs.value.details}
</div>
</html>