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