Re: Possible Bugs in Ajax's theme BindDiv

Ian Roughley <[email protected]>
Newsgroups gmane.comp.java.open-symphony.webwork
Message-ID <[email protected]>

tm_jee wrote:
> Hi guys, 
>
> I think there's some bugs in ajax's theme BindDiv
>
> 1] in BindDiv.js
>  
> [code]
>        this.start = function() {
>                 if (running) return;
> 		       running = true;
> 		if (self.delay > 0)  
> 			self._nextTimeout(self.delay);
> 		}
> 	}
> [/code]
>
> should instead be, if not mistaken,
>
> [code]
>          this.start = function() {
> 		if (self.delay > 0) {
> 		    if (running) return;
> 		       running = true;
> 			self._nextTimeout(self.delay);
> 		}
> 	}
> [/code]
>
> We don't really want to make running = true when delay is less than or equals to 0. 
I think it is fine the way it is - otherwise, if you issue a 
winow['binddiv_id'].start it will not fire a refresh unless the delay > 
0 - which may not always be the case.
> The consequences would be if a div is listening to a topic fired by an achor (<saf:a ..>)  the div will automatically make a remote call although the delay is zero. since running is set to true.
>
>   
In several cases this is exactly what I use.  No delay, but I want the 
div to refresh on a topic.
> 2] In DivTag... 
>
> [code]
>      protected String delay = "1";
> [/code]
>
> should probably be 
>
> [code]
>     protected String delay;
> [/code]
>
> else if delay attribute is not specified it will still fire by itself.
>   
I believe I added this because is the user doesn't set a delay it will 
be 0, in this case the JS timer can be setup before the DOM is parsed, 
causing JS exceptions.  The exceptions cause the div to no longer work.  
A delay of 1 prevents this from occurring.
> What do you guys think?
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.opensymphony.com/thread.jspa?threadID=32505&messageID=62988#62988
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.