日期:2014-05-16  浏览次数:20386 次

JSF参数传递方式说明

先说明一种:
-----------------------------------------

Html代码 ?收藏代码
  1. < h:commandLink ? value = "整理材料?" ? action = "#{documentPressBackingBean.cleanDatum}" ? target = "HideFrame" > ??
  2. ?< f:param ? name = "documentArchiveId" ? value = "#{pre.documentArchiveId}" > </ f:param > ??
  3. </ h:commandLink > ??
  4. < h:outputLabel ? styleClass = "icoArrange" ? id = "show" > ??
  5. </ h:outputLabel > ??
  6. < h:commandButton ? value = "整理材料" ? action = "#{documentPressBackingBean.cleanDatum}" ???
  7. onclick = "this.form.target='HideFrame';" ? style = "display:none" > ??
  8. < x:updateActionListener ? property ="#??
  9. {documentPressBackingBean.documentArchiveId}"?value = "#{pre.documentArchiveId}" ? /> ??
  10. </ h:commandButton > ??


------------------------------------------------

以下是其他方式:

JSF参数传递方式之一:f:param标签

页面到Bean的参数传递
页面中设置参数:

Java代码 ?收藏代码
  1. <h:form>??????
  2. ????????????<h:commandLink?value="Test2" ?action= "#{paramBean.test}" >??????
  3. ????????????????<f:param?name="name" ?value= "zhang" ></f:param>??????
  4. ????????????