JSF Unified Expression Language How to Use it看似簡單的#{bean.property}, 會因為場合的不同而對應呼叫getter or setter方法, 所以在class裡定義property時, 記得加上getter and setter方法 #{bean.property}的對應 @ManagedBean class Bean{ private type property; public type getProperty(){ return property; } public void setProperty(type property){ this.property = property; } } Ex. #{userManagedBean.password} value="#{userManagedBean.name}, #{userManagedBean.password}" Request parametersRequest parameters are now defined in the page itself, using the f:metadata tag. Simply use a f:viewParam to bind each request parameter to a property of your model: <f:metadata> If the parameter value isn't specified in the request then the value will be null, so make sure the property receiving the parameter value isn't a primitive (i.e. it must be nullable). Using request parameters are a great way of achieving bookmarkable URLs, and of developing a stateless application. http://infocenter.apusic.com/help/index.jsp?topic=/operamasks-sdk/v2.3/el.html 隱含物件(implicit object)<%=request.getContextPath()%> -> #{request.getContextPath}
|