Sorry, for "quick&dirty" response :)...
You can add AjaxEventBehavior to your checkbox and override
getAjaxCallDecorator() method, thus decorating the wicket onclick script
with your own script.
Alex Objelean wrote:
>
> Use AttributeAppender behavior instead..
>
>
> kubino wrote:
>>
>> Hi. We are trying to put some own javascript code in the onClick method
>> of the checkbox component. Unfortunately we need also the wicket code
>> which is generated in onComponentTag method when
>> onSelectionChangeNotifications is true. So I need to execute my
>> javascript code before the wicket's. I can do this easily with Radio
>> component, becouse it doesnt have onComponentTag final.
>>
>>
>> E.g.
>>
>> @Override
>> protected void onComponentTag(ComponentTag tag) {
>> super.onComponentTag(tag);
>>
>> CharSequence myScripts = new
>> AppendingStringBuffer("setPageLocationByFormID('"+ formId +"');if
>> (!wasClicked('"+ formId + "')) {"+
>> tag.getString("onclick") +"}");
>>
>> tag.put("onclick", myScripts);
>> }
>>
>> Any suggestions?
>> Thanks in advance.
>>
>> K
>>
>
>
--
View this message in context:
http://www.nabble.com/CheckBox-and-final-method-onComponentTag-tf4017607.html#a11410336
Sent from the Wicket - User mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user