You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by saty <sa...@gmail.com> on 2012/11/12 23:46:14 UTC

stange error, OnChangeAjaxBehavior() executed only once

I am right now struggling to find the cause of this strange error, spangly
the OnChangeAjaxBehavior() is executed only once on first change, subsequent
changes do nothing.


private final IModel<Date> datamodel= new Model<Date>(new Date());

private void addDateSelection(Form<?> filterForm)
	{
final DateTextField df= new DateTextField("snapshot.date", datamodel,new
StyleDateConverter("S-", true)) 
		{
			private static final long serialVersionUID = 1L;
			@Override
			public Locale getLocale() {
				return Locale.getDefault();
			}
		};
		df.add(new DatePicker());
		filterForm.add(df);
		
		df.add(new OnChangeAjaxBehavior() 
		{
			private static final long serialVersionUID = 1L;
			@Override
			protected void onUpdate(AjaxRequestTarget target) 
			{				
		           //do something
			}
			
		});
		
	}

thanks and please excuse typos.
	



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/stange-error-OnChangeAjaxBehavior-executed-only-once-tp4653798.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: strange issue, OnChangeAjaxBehavior() executed only once

Posted by saty <sa...@gmail.com>.
Thanks martin.

I see that i have two java script errors and these could be causing the
problem.

ReferenceError: Prototype is not defined 

TypeError: Tip is not a constructor



These are related to prototype.js and wicketstuff-minis (tool tip)

Any help on resolving these?

Thanks



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/strange-issue-OnChangeAjaxBehavior-executed-only-once-tp4653798p4653862.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: strange issue, OnChangeAjaxBehavior() executed only once

Posted by Martin Grigorov <mg...@apache.org>.
It means that there is a running Ajax request.
Wicket sends one Ajax request per channel (see AjaxChannel.java).


On Tue, Nov 13, 2012 at 11:28 PM, saty <sa...@gmail.com> wrote:

> Thanks, using the debug mode i see that it prints
>
> INFO: Channel '0' is busy - scheduling the callback to be executed when the
> previous request finish.
>
> not sure what it means.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/strange-issue-OnChangeAjaxBehavior-executed-only-once-tp4653798p4653858.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Re: strange issue, OnChangeAjaxBehavior() executed only once

Posted by saty <sa...@gmail.com>.
Thanks, using the debug mode i see that it prints

INFO: Channel '0' is busy - scheduling the callback to be executed when the
previous request finish.

not sure what it means.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/strange-issue-OnChangeAjaxBehavior-executed-only-once-tp4653798p4653858.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: strange issue, OnChangeAjaxBehavior() executed only once

Posted by Uwe Schäfer <us...@thomas-daily.de>.
On 11/13/2012 04:13 PM, saty wrote:
> Anyone?

wild guess, but could it be that the component with this behavior is 
rerendererd on the way back, but it's URL is now pointing to the initial 
version's behavior? (means you do not get different URLS for the callback)

i tricked myself the other day this way.

if so, solution is recreate the url when rendering.

cu uwe


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: strange issue, OnChangeAjaxBehavior() executed only once

Posted by saty <sa...@gmail.com>.
Anyone?



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/strange-issue-OnChangeAjaxBehavior-executed-only-once-tp4653798p4653834.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org