0
我有一個複選框組件<f:attribute>
和<p:ajax listener>
。如何獲得<f:attribute>值<p:ajax listener>方法?
<h:selectManyCheckbox ...>
<p:ajax listener="#{locationHandler.setChangedSOI}" />
<f:attribute name="Dummy" value="test" />
...
</h:selectManyCheckbox>
我試圖讓如下聽者方法內的test
的<f:attribute>
值:
public void setChangedSOI() throws Exception {
FacesContext context = FacesContext.getCurrentInstance();
Map<String, String> map = context.getExternalContext().getRequestParameterMap();
String r1 = map.get("Dummy");
System.out.println(r1);
}
然而,印刷null
。我怎麼才能得到它?
BalusC嗨,使用你的第一選擇,我得到以下錯誤,2015年6月25日下午1時26分09秒org.apache.catalina.core.StandardWrapperValve調用 重度:Servlet.service( )for servlet Spring MVC Dispatcher Servlet拋出異常 javax.el.MethodNotFoundException:/WEB-INF/certificates/locationList.xhtml @ 162,118 listener =「#{locationHandler.setChangedSOI}」:找不到方法:com.csc.exceed.certificate .web.LocationHandler @ 1ecd6fb.setChangedSOI() \t at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:109) – pkn1230
是否有某些我們無法用Aja調用方法的問題xBehaviourEvent作爲使用primefaces的參數? – pkn1230
什麼是Spring MVC調度程序servlet在JSF請求中執行的操作?你瞭解/知道你在做什麼? http://stackoverflow.com/questions/18744910/using-jsf-as-view-technology-of-spring-mvc/ – BalusC