From jira-events at lists.jboss.org Mon Jul 29 13:56:26 2013 Content-Type: multipart/mixed; boundary="===============0838100399867615230==" MIME-Version: 1.0 From: Brian Leathem (JIRA) To: richfaces-issues at lists.jboss.org Subject: [richfaces-issues] [JBoss JIRA] (RF-13108) rich:calendar nested a4j:ajax event not firing Date: Mon, 29 Jul 2013 13:56:26 -0400 Message-ID: In-Reply-To: JIRA.12497370.1374784538000@jira02.app.mwc.hst.phx2.redhat.com --===============0838100399867615230== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable [ https://issues.jboss.org/browse/RF-13108?page=3Dcom.atlassian.jira.pl= ugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D12793565#com= ment-12793565 ] = Brian Leathem commented on RF-13108: ------------------------------------ Thanks for reporting this [~nathandennis]. Would you please update the des= cription with: 1) What you actually to observe 2) What you expect to observe This will help me get up-to-speed with the details of the bug you are obser= ving. = > rich:calendar nested a4j:ajax event not firing > ---------------------------------------------- > > Key: RF-13108 > URL: https://issues.jboss.org/browse/RF-13108 > Project: RichFaces > Issue Type: Bug > Security Level: Public(Everyone can see) = > Components: component-a4j-core, component-validators > Affects Versions: 4.3.2 > Environment: jboss 7.1.3 richfaces 4.3.2.final, chrome > Reporter: nathan dennis > Labels: a4j:ajax, rich:calendar, rich:message > > nested a4j:ajax change event isn't functioning as expected. > ajax event isn't always fired. after speaking with ppitonak it seemed as = if the order of the ajax with relation to the validators was import. howeve= r after closer inspection (and may be a different problem), the value wasnt= making back to the bean even when the event was fired. > {code:xml} > > > xmlns:h=3D"http://java.sun.com/jsf/html" > xmlns:f=3D"http://java.sun.com/jsf/core" > xmlns:ui=3D"http://java.sun.com/jsf/facelets" > xmlns:c=3D"http://java.sun.com/jsp/jstl/core" = > xmlns:a4j=3D"http://richfaces.org/a4j" > xmlns:rich=3D"http://richfaces.org/rich" = > template=3D"/resources/scaffold/pageTemplate.xhtml"> > > > > > > = > > > popup=3D"true" datePattern=3D"dd/M/yy hh:mm a" requir= ed=3D"true" = > showApplyButton=3D"true" > > > = > > > > popup=3D"true" datePattern=3D"dd/M/yy hh:mm a" > showApplyButton=3D"true" > > > = > = > = = > > > >
> action=3D"#{screeningBean.updateScreening(2)}" = > execute=3D"@form" > onclick=3D"this.disabled=3Dtrue; var that =3D this; setTimeout(functio= n() that.disabled=3Dfalse;},500);" = > styleClass=3D"btn btn-primary btn-primary-a4j" /> >
>
>
>
> {code} > {code:title=3DDateRangeValidator.java} > /************************************************************** > * Copyright (c) 2012 - 2013, Monarch, All rights reserved. > * = > * @author Nathan Dennis > * = > */ > package org.monarchnc.view.validators; > import java.text.DateFormat; > import java.text.SimpleDateFormat; > import java.util.Date; > import javax.faces.application.FacesMessage; > import javax.faces.component.UIComponent; > import javax.faces.component.UIInput; > import javax.faces.context.FacesContext; > import javax.faces.validator.FacesValidator; > import javax.faces.validator.Validator; > import javax.faces.validator.ValidatorException; > import javax.persistence.EntityManager; > import org.apache.deltaspike.core.api.provider.BeanProvider; > import org.monarchnc.view.ScreeningBean; > // TODO: Auto-generated Javadoc > /** > * The Class DateRangeValidator. > */ > @FacesValidator("dateRangeValidator") > public class DateRangeValidator implements Validator { > = > = > /* (non-Javadoc) > * @see javax.faces.validator.Validator#validate(javax.faces.context.= FacesContext, javax.faces.component.UIComponent, java.lang.Object)f > */ > public void validate(final FacesContext ctx, final UIComponent compon= ent, final Object value) throws ValidatorException { > = > ScreeningBean screeningBean =3D BeanProvider.getContextualReference= (screeningBean.class, false); > = > Date date =3D(Date) value; = > if(screeningBean.getScreening().getBeginTime() !=3D null && dat= e !=3D null) > if(!date.after(screeningBean.getScreening().getBeginTime())){ > throw new ValidatorException(new FacesMessage(FacesMessage.SEV= ERITY_ERROR,"End Date must be after Start Date!!.\n","End Date must be afte= r Start Date!!\n")); > = > } > = > = > } > } > {code} > {code:title=3DScreeningBean.java} > @Named > @Transactional > @ConversationScoped > public class ScreeningBean implements Serializable{ > Screening screening =3D new Screening(); > public Class claim(){ > if (this.conversation.isTransient()) > { > this.conversation.begin(); > }... > } > public Screening getScreening() { > return screening; > } > public void setScreening(Screening screening) { > this.screening =3D screening; > } > } > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira --===============0838100399867615230==--