2015年11月10日 星期二

在 JSF Page 中如何依條件顯示特定元件

在 JSF Page 中如何依條件顯示特定元件? 例如, 當 user login 後在 nav bar 上顯示 logout icon. 若尚未login 則顯示 login icon. 
請參考 Stackoverflow 中的這則討論 How to use if, else condition in jsf to display image. 可以使用的選項:
  • c:if
  • c:choose
  • render attribute for the UIComponent

沒有留言: