RichFaces 传参数

转自:http://livedemo.exadel.com/richfaces-demo/richfaces/actionparam.jsf?c=actionparam

 

 

<a4j:commandButton value="Set Name to Alex"  reRender="rep" >
	<a4j:actionparam name="username" value="Alex" assignTo="#{userBean.name}"/>
</a4j:commandButton>

要后台的BackBean自动设置Alex给userBean.name

或者也可以通过:

Map params = FacesContext.getCurrentInstance().getExternalContext()
				.getRequestParameterMap();
String username = (String) params.get("username");
 

你可能感兴趣的:(C++,c,Richfaces,JSF,C#)