[richfaces-issues] [JBoss JIRA] Assigned: (RF-1441) a4j:push: JS error.

Nick Belaevski (JIRA) jira-events at lists.jboss.org
Wed Nov 28 09:24:57 EST 2007


     [ http://jira.jboss.com/jira/browse/RF-1441?page=all ]

Nick Belaevski reassigned RF-1441:
----------------------------------

    Assignee: Alexej Kushunin  (was: Nick Belaevski)

> a4j:push: JS error.
> -------------------
>
>                 Key: RF-1441
>                 URL: http://jira.jboss.com/jira/browse/RF-1441
>             Project: RichFaces
>          Issue Type: Bug
>    Affects Versions: 3.2.0
>            Reporter: Ilya Shaikovsky
>         Assigned To: Alexej Kushunin
>             Fix For: 3.2.0
>
>
>             <a4j:form>
>                 <a4j:region>
>                 	<a4j:push reRender="msg" eventProducer="#{pushBean.addListener}" interval="2000"/>
>                 </a4j:region>
>                 <a4j:outputPanel id="msg" >
>                     <h:outputText value="#{pushBean.date}">
>                         <f:convertDateTime type="time"/>
>                     </h:outputText>
>                 </a4j:outputPanel>
>                 <a4j:commandButton value="Push!!" action="#{pushBean.push}" ajaxSingle="true"/>
>             </a4j:form>	
> package demo;
> import java.util.Date;
> import java.util.EventListener;
> import java.util.EventObject;
> import org.ajax4jsf.event.PushEventListener;
> /**
>  *
>  * @author Administrator
>  */
> public class PushBean {
>     /** Creates a new instance of TheBean */
>     public PushBean() {
>     }
>     private Date date;
>     private PushEventListener listener = new MyPushEventListener();
>     public void addListener(EventListener listener) {
>         synchronized (listener) {
>             if (this.listener != listener) {
>                 this.listener = (PushEventListener) listener;
>             }
>         }
>     }
>     public Date getDate() {
>         return new Date();
>     }
>     public void push() {
>         synchronized (this.listener) {
>             this.listener.onEvent(new EventObject(this));
>         }
>     }
> }
> class MyPushEventListener implements PushEventListener {
>    
>     public void onEvent(EventObject evt) {
>         System.out.println(evt.getSource());
>         //DO SOME ACTION IN HERE
>     }
>     
>     
>     
> }
> check that FireBug is disabled. click on the push button. JS error appears.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the richfaces-issues mailing list