Re: Any indicator for Ajax-Rendering?

2010-04-29 Thread MattyDE

Yeah you're right... but i think i have to describe my problem i another way.

I have two linked DropDownBoxes and i want intially on Page-Rendering that
the second (child) drop downbox is filled by the initial value of the first
box.

the linking is done with my own "onChange" handler

protected void onChange(AjaxRequestTarget target, T newSelection){ };

the best would be, i could use this  handler for initial rendering and
ajax-onChange, cause there i've implemented the processing of filling the
second drop down box By "newSelection"!

Thanks for any Hints!
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Any-indicator-for-Ajax-Rendering-tp2016955p2075498.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Any indicator for Ajax-Rendering?

2010-04-20 Thread Ernesto Reinaldo Barreiro
Then it should come from an AJAX request as the code above shows...??

Ernesto

On Tue, Apr 20, 2010 at 10:00 AM, MattyDE  wrote:

>
> I know. But i breakpointed there... and AjaxRequestTarget.get() is not null
> in onBeforeRender
> --
> View this message in context:
> http://n4.nabble.com/Any-indicator-for-Ajax-Rendering-tp2016955p2017047.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Any indicator for Ajax-Rendering?

2010-04-20 Thread MattyDE

I know. But i breakpointed there... and AjaxRequestTarget.get() is not null
in onBeforeRender
-- 
View this message in context: 
http://n4.nabble.com/Any-indicator-for-Ajax-Rendering-tp2016955p2017047.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Any indicator for Ajax-Rendering?

2010-04-20 Thread Ernesto Reinaldo Barreiro
That's really weird because the code of get is like

public static AjaxRequestTarget get()
{
final RequestCycle requestCycle = RequestCycle.get();
if (requestCycle != null)
{
if (requestCycle.getRequestTarget() instanceof
AjaxRequestTarget)
{
return (AjaxRequestTarget)requestCycle.getRequestTarget();
}
}
return null;
}

Best,

Ernesto

On Tue, Apr 20, 2010 at 9:32 AM, MattyDE  wrote:

>
> I thought the same.. but... its not true ;) .. it returns not null
> --
> View this message in context:
> http://n4.nabble.com/Any-indicator-for-Ajax-Rendering-tp2016955p2017020.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Any indicator for Ajax-Rendering?

2010-04-20 Thread MattyDE

I thought the same.. but... its not true ;) .. it returns not null
-- 
View this message in context: 
http://n4.nabble.com/Any-indicator-for-Ajax-Rendering-tp2016955p2017020.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Any indicator for Ajax-Rendering?

2010-04-20 Thread Ernesto Reinaldo Barreiro
Not 100% sure but I think AjaxRequestTarget.get() will return null if
request is not AJAX. Maybe you could use that as a "flag".

Best,

Ernesto

On Tue, Apr 20, 2010 at 8:31 AM, MattyDE  wrote:

>
> Hi Folks,
>
> is there any indicator in onAfterRender() or onBeforeRender() inside a
> Component which tells me that this Component is now rendered (updated)
> through ajax (AjaxTarget.addComponent()), instead of the "normal"
> page-rendering?
>
> I need to know this, because i want to update an DropDownChoice by another
> DropDownChoice with "on change" handler. But if this second DropDownChoice
> has been updated, i want to update some other TextFields too... and the
> only
> "indicator" i have is, that the second DDC has been re-rendered
>
> Thanks for any Hints ;)
> --
> View this message in context:
> http://n4.nabble.com/Any-indicator-for-Ajax-Rendering-tp2016955p2016955.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Any indicator for Ajax-Rendering?

2010-04-19 Thread MattyDE

Hi Folks,

is there any indicator in onAfterRender() or onBeforeRender() inside a
Component which tells me that this Component is now rendered (updated)
through ajax (AjaxTarget.addComponent()), instead of the "normal"
page-rendering?

I need to know this, because i want to update an DropDownChoice by another
DropDownChoice with "on change" handler. But if this second DropDownChoice
has been updated, i want to update some other TextFields too... and the only
"indicator" i have is, that the second DDC has been re-rendered

Thanks for any Hints ;)
-- 
View this message in context: 
http://n4.nabble.com/Any-indicator-for-Ajax-Rendering-tp2016955p2016955.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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