Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Not getting the postback to true

904010Feb 6 2012 — edited Feb 6 2012
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?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 5 2012
Added on Feb 6 2012
3 comments
257 views