我正在使用javascript方法从jsf 1.2中的jsp页面调用支持bean方法.javascript方法正在解雇,但是没有从jsp页面调用支持bean。我发布了我在这里所做的事情
<h:panelGroup styleClass="panelGroup" id="grpMemDep">
<h:selectOneMenu id="memDepCode" styleClass="inputfont" onchange="getMemberDepInfo();">
<f:selectItem itemLabel="----SELECT----" itemValue="0"/>
<f:selectItems id="selectItems32"
value="#{searchUserProfileBean.memberDependentList}" />
</h:selectOneMenu>
</h:panelGroup>
<hx:commandExButton type="submit" value="submit"
styleClass="commandExButton"
id="getAllMemberDepInformation" action="#{pc_userManagementProfile.doGetAllMemDepInfoAction}" >
<hx:behavior event="onclick" id="behavior21" behaviorAction="get"></hx:behavior>
</hx:commandExButton>
这是javascript代码
function getMemberDepInfo(){
//alert(document.getElementById('vwmyUserProfile:myUserProfileForm:getAllMemberDepInformation').value);
document.getElementById('vwmyUserProfile:myUserProfileForm:getAllMemberDepInformation').click();
}
支持bean方法
public String doGetAllMemDepInfoAction(){
System.out.println("coms in the method");
System.out.println("Information :"+getMemDepCode().getValue().toString().trim());
return "";
}
这是faces-config
中的条目<managed-bean>
<managed-bean-name>pc_userManagementProfile</managed-bean-name>
<managed-bean-class>pagecode.com.metlife.eservice.member.UserManagementProfile</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
问题是提交按钮不起作用,我是JSF的新手,请帮忙。谢谢。