Iam having four select menus in my page. My problem is weird i.e. without selecting any of the dropdown menu if you click on submit, it is working fine. But when i select subgroup dropdown menu and later if i click the submit button it is not calling the method it intended to call... Heres my code..
<?xml version="1.0"?>
<f:view xmlns="http://www.w3.org/1999/xhtml" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html" xmlns:p="http://primefaces.org/ui" xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head/>
<h:body>
<h:form id="form">
<p:panel header="Service Details" style="width:800px">
<p:panelGrid columns="4">
<h:outputText value="Group: " />
<p:selectOneMenu value="#{helpDeskBean.group}">
<f:selectItem itemLabel="Select One" itemValue="" />
<f:selectItems value="#{helpDeskBean.createRequestDTO.groupsList}" var="item" itemLabel="#{item.groupdesc}" itemValue="#{item.groupid}" />
<p:ajax event="change" listener="#{helpDeskController.groupChange}" update="subGroupID" partialSubmit="true"/>
</p:selectOneMenu>
<h:outputText value="Sub Group: " />
<p:selectOneMenu value="#{helpDeskBean.subGroup}" id="subGroupID">
<f:selectItem itemLabel="Select One" itemValue="" />
<f:selectItems value="#{helpDeskBean.groupChangeList}" var="item2" itemLabel="#{item2.subGroupDesc}" itemValue="#{item2.subGroupCode}" />
<p:ajax event="change" listener="#{helpDeskController.SubGroupChange}" update="serviceID" />
</p:selectOneMenu>
<h:outputText value="Service: " />
<p:selectOneMenu value="#{helpDeskBean.service}" id="serviceID">
<f:selectItem itemLabel="Select One" itemValue="" />
<f:selectItems value="#{helpDeskBean.groupChangeList}" var="item1" itemLabel="#{item1.serviceDesc}" itemValue="#{item1.serviceCode}" />
</p:selectOneMenu>
</p:panelGrid>
</p:panel>
<p:commandButton value="Submit" actionListener="#{helpDeskController.createHDRequest}"/>
</h:form>
</h:body>