myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Problems with ValueChangeListener and FacesMessages
Date Mon, 05 Dec 2005 09:06:21 GMT
Hi All!

I have problems with a ValueChangeListener and FacesMessages.
In my JSP Site there is a Selectbox with a ValueChangeListener. Although I have set the immediate=True
Attribute at this Selectbox, messages are shown after the ValueChangeListener has been executed..
Can you tell me why this happens??Is it perhaps the Context.setViewRoot?

Here is my code:(JSP)

<h:selectOneMenu binding="#{newPartnerDto.SMstatus}"
id="newPartnerstatus" styleClass="mustfield"
value="#{newPartnerDto.statusId}" required="true"
	<f:selectItems value="#{queryHelper.status}" />

Here is my code:(ValueChangeListener Method:)

public void setEndDate(ValueChangeEvent event) {
		editDto = (EditDto) FacesUtil.getManagedBean("editDto");
		sessionDto = (SessionDto) FacesUtil.getManagedBean("sessionDto");
		newPartnerDto = (NewPartnerDto) FacesUtil
		if (((Long) event.getNewValue()).compareTo(new Long(1)) == 0
				&& editDto.getEndDate() == null
				&& event.getComponent().getId().equalsIgnoreCase("status")) {
			editDto.setEndDate(new Date());

			String viewId = "/edit.jsp";
			FacesContext context = FacesContext.getCurrentInstance();
			UIViewRoot view = context.getApplication().getViewHandler()
					.createView(context, viewId);


THX for help, 


This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
your system manager.
This footnote also confirms that this email message has been swept
for the presence of computer viruses. 

View raw message