users@woodstock.java.net

upgrade from 4.1.1 to 4.2 breaks subscribe

From: Steven Bell <bell.steven_at_gmail.com>
Date: Fri, 14 Mar 2008 08:45:38 -0700

Hello,

I'm trying to upgrade from 4.1.1 to 4.2, but I can't seem to get my
subscribes to work.

Under 4.1.1 I used the following code (this is one of a few that I
have, but all the same pattern). The init method is called

 <w:body id="body" onLoad="setTimeout('init();',0);"

function UpdateFriends(props){
  if(props.id != this.srcID) { return; }
  setTimeout('doRefresh();',0);
};

HeaderDropDownListener.prototype.notify = UpdateFriends;

function init(){
  /*
  * Event Listeners.
  */
  var listener = new HeaderDropDownListener();
  dojo.subscribe(webui.suntheme.widget.dropDown.event.submit.endTopic,listener,listener.notify);
}

Based on the release notes for 4.2 I changed that to the following.

 <w:body id="body" onLoad="setTimeout('init();',0);"

var UpdateFriends = {
  update: function(props) {
    if(props.id != this.srcID) { return; }
    setTimeout('doRefresh();',0);
  }
};

function init(){
  /*
  * Event Listeners.
  */
  var domNode = document.getElementById("PayableForm:totalDueCurrency");
  domNode.subscribe(domNode.event.submit.endTopic, UpdateFriends , "update");
}

Any ideas?
-- 
Regards,
Steven Bell