I am trying to submit a form, when I am keeping managed bean scope as view or request the action method is not getting invoked and it is showing me blank page. Where as when I am keeping the managed bean's scope as "session" action method is getting invoked and can see the desired result.
I am using jsf 2.1, primefaces 3.5, EL 2.2, tomcat 7
Below is my xhtml code:
<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui"
xmlns:c="http://java.sun.com/jsp/jstl/core"
template="globalTemplate.xhtml">
<h:messages />
<ui:define name="title">UserForm</ui:define>
<ui:define name="content">
<h:form id="userForm">
<ui:repeat value="#{loginBean.userMap.keySet().toArray()}" var="entry">
<h:inputText id="usrId#{entry.key}" value="#{loginBean.userMap.get(entry)}" />
<ui:repeat value="#{loginBean.userMap.get(entry)}" var="item" varStatus="loop">
<h:outputText id="msgDesc" value="#{item.userDesc}" />
<br/>
</ui:repeat>
<p:inputTextarea rows="6" cols="33" id="replyId#{entry.key}" value="#{loginBean.userInput}"
onkeypress="if (event.keyCode == 13) {submitUsr(); return false; }"/>
<p:commandButton id="submitInput#{entry.key}" value="Click" action="#{loginBean.submitUser}" />
</ui:repeat>
</h:form>
</ui:define>
I am not getting what is not allowing me to call the action method when I am submitting the page keeping managed bean's scope as view/request.
Thanks for your help in advance.