I am using jsf 1.1
I need to check if postback event or not and act accordingly.
I am having the below code inside form. And after I press command button and perform submit() method in a bean and return from there, its a postback right?
But eventhough postback is done, its not going thro that condition.
Its always going to <c:otherwise>
<%
FacesContext context = FacesContext.getCurrentInstance();
%>
<c:choose>
<c:when test="${UserBean.responsexml == null} && <%=!context.getExternalContext().getRequestParameterMap().isEmpty()%>">
<script type="text/javascript">
alert('${UserBean.serviceType}');
</script>
</c:when>
<c:otherwise>
<script type="text/javascript">
alert('Not a postback');
</script>
</c:otherwise>
</c:choose>
Is my checking correct?