I can see how one JavaScript might be dependent on another (although it seems
like such scripts should really be one script anyway) but that case is
definitely not universal.  In my experience, sometimes a Wicket user needs
to add an onclick or onchange event to an Ajax component and execution order
doesn't matter.  I think it would be better to have AttributeAppender work
consistently (but not address a special case) than to not work at all. 
There may be other technical reasons why applying an AttributeAppender to an
Ajax component without having its output overwritten would be a challenge,
but interdependency shouldn't be a reason.  Thoughts?

-Brandon


igor.vaynberg wrote:
> 
> well, the problem is you are trying to bind two things to the same event.
> the order of execution is not always clear....
> 
> if i call add(A) followed by add(B)
> 
> does it always execute A,B or can B,A be acceptable? if it is A,B does B
> still execute if A fails? do we need to somehow prevent A from doing a
> "return false;" and preventing B from executing? etc etc etc. there is
> just
> no easy way to do this automatically and get all the usecases right.
> 
> -igor
> 
> 
> On 9/25/07, UPBrandon <[EMAIL PROTECTED]> wrote:
>>
>>
>> I did that and it worked.  Thanks for a point in the right direction.
>>
>> But while I am writing, doesn't it seem like appenders should work more
>> consistently, regardless of what component the appender is added to?  Is
>> there a technical reason why that is not (and could not be) the case?
>>
>> -Brandon
>>
>>
>> igor.vaynberg wrote:
>> >
>> > you can putting your script into iajaxcalldecorator and giving that to
>> the
>> > behavior
>> >
>> > -igor
>> >
>> >
>> > On 9/24/07, UPBrandon <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> I am trying to use an AttributeAppender to append an onchange script
>> to
>> a
>> >> DropDownChoice that also has an OnChangeAjaxBehavior added to it.  But
>> >> only
>> >> the OnChangeAjaxBehavior's script is showing up in the markup.  Is
>> there
>> >> a
>> >> trick to adding JavaScript to a component that also has an Ajax
>> behavior?
>> >> Any help would be appreciated.
>> >>
>> >> -Brandon
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Appending-JS-to-an-Ajax-Component-tf4512114.html#a12869413
>> >> Sent from the Wicket - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Appending-JS-to-an-Ajax-Component-tf4512114.html#a12885637
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Appending-JS-to-an-Ajax-Component-tf4512114.html#a12929158
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to