Thanks for your reply. I have some follow up questions to your respond: -

1. Do you mean ListChoice.onSelectionChange is not invoked instead of
ListChoice.onchange which is on client side?

2. What and when do I use getCallbackUrl()?

3. Am I right to presume the implementation in
AjaxFormComponentUpdatingBehavior.onUpdate(...) is to populate palette on
client side? Why does your implementation keep adding components to target?
My assumption is for target is "add the component you are referring to
target"

Thanks 
 

Nino Wael wrote:
> 
> With Listchoiec are no longer invoked, I meant listchoice.onchange.
> 
> 
>  
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Nino Wael
> Sent: 8. december 2006 12:51
> To: [email protected]
> Subject: Re: [Wicket-user] Help with AjaxFormComponentUpdatingBehavior
> 
> As you write ListChoice are no longer invoked. The ajax event are called
> afaik after all updates of model has occurred. I actually changed my
> coding style after this and began using abstract models, its actually much
> easyer coding this way, and all of your components will be ajax
> prepaered...:)
> 
> Heres a code sniplet of what I do:
> 
>               dropdown.add(new AjaxFormComponentUpdatingBehavior("onchange") {
>                       public CharSequence getCallbackUrl() {
>                               // hack since url is not encoded and so will 
> fail xhtml
>                               // validation
>                               String s = getCallbackUrl(true).toString();
>                               return s.replaceAll("&wicket", "&wicket");
>                       }
> 
>                       protected void onUpdate(AjaxRequestTarget target) {
>                               AJAXpopulatepaletteList();
>                               if (submit) {
>                                       target.addComponent(paletteSubmit);
>                                       if (addit) {
>                                               Iterator iter = 
> additional.iterator();
>                                               while (iter.hasNext()) {
>                                                       
> target.addComponent((Component) iter.next());
>                                               }
>                                       }
>                               } else {
>                                       target.addComponent(palette);
>                                       if (addit) {
>                                               Iterator iter = 
> additional.iterator();
>                                               while (iter.hasNext()) {
>                                                       
> target.addComponent((Component) iter.next());
>                                               }
>                                       }
>                               }
>                       }
>               });
> 
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of TH Lim
> Sent: 7. december 2006 07:03
> To: [email protected]
> Subject: Re: [Wicket-user] Help with AjaxFormComponentUpdatingBehavior
> 
> 
> Yes, the examples are good and it is where I started off when I look into
> Wicket's AJAX. 
> 
> I have questions: -
> 
> 1. ListChoice.onSelectionChanged is not invoke when I add
> AjaxFormComponentUpdatingBehavior to ListChoice. Does this mean ListChoice
> behavior is handled thru AjaxFormComponentUpdatingBehavior after it is
> added
> to the component?
> 
> 2. AjaxFormComponentUpdatingBehavior.onEvent is called when there is an
> AJAX
> event. What is AJAX event?
> 
> 
> igor.vaynberg wrote:
>> 
>> see this example
>> 
>> http://www.wicket-library.com/wicket-examples/ajax?wicket:bookmarkablePage=:wicket.examples.ajax.builtin.ChoicePage
>> 
>> -igor
>> 
>> 
>> On 12/6/06, TH Lim <[EMAIL PROTECTED]> wrote:
>>>
>>>
>>> Hi,
>>>
>>> Where do I find more information about AjaxFormComponentUpdatingBehavior
>>> class and classes related to it? I presume this is the starting point
>>> when
>>> I
>>> want to add AJAX / JS feature to my application. Am I right to say so?
>>>
>>> I have an usecase where I would like to use to JS resolve because this
>>> is
>>> what I normally do with my previous web applications. I have 2
>>> ListChoice
>>> (LC_A and LC_B), 1 ListMulitpleChoice (LMC_C) and 1 DropDownChoice
>>> (DDC_D
>>> ~
>>> in DISABLED state). What I want to do is I choose from LC_A and LC_B
>>> will
>>> be
>>> populated with items based on what I have chosen in LC_A. Subsequently
>>> LMC_C
>>> will populated with items depending on what I have selected in LC_B.
>>> Finally, when I click on any item in LMC_C, DDC_D will be ENABLED. If I
>>> select another item in either LC_A or LC_B, DDC_D will be DISABLED. What
>>> is
>>> the way to accomplish this using AjaxFormComponentUpdatingBehavior or
>>> other
>>> Wicket AJAX components? Thanks
>>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Help-with-AjaxFormComponentUpdatingBehavior-tf2768381.html#a7770576
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to