f:view
<f:view locale="#{sample.locale}" encoding="UTF-8" contentType="text/html">
Referencef:actionListener
f:setPropertyActionListener
f:event
- attritube
- name: preRenderComponent, PostAddToView, preValidate, postValidate
- listener: #{bean.method}
f:attritube Facelet<h:commandLink value="invoke" actionListener=#{controller.invoke} >
<f:attritube name="id" value="321" />
<h:commandLink/> Managed Bean@ManagedBean
@SessionScoped
public class Controller {
public void invoke(ActionEvent e){
// assert(id, "321")
String id = e.getComponent().getAttributes().get("id").toString();
}
}
h: outputStylesheet 指向一個層疊樣式表 h: outputScript 指向一個JavaScript f:event 註冊一個規範定義的或用戶自定義的事件。 f:ajax 使相關的組件能夠調用Ajax f:metadata 為視圖聲明一個元數據facet。 f:viewParam 在<f:metadata>內部使用,定義一個視圖參數,該視圖參數將請求參數與模型屬性關聯起來。 f:validateBean 將對本地值的驗證代理到Bean的Validation API f:validateRegex 使用模式屬性來驗證所包含的組件。 f:validateRequired 保證需要的值存在。
|