Thanks I have looked at it and this is what I got so far

protected void onComponentTag(ComponentTag tag)
        {
                checkComponentTag(tag, "a");
                checkComponentTagAttribute(tag, "href", "#");

                CheckGroup group = (CheckGroup)findParent(CheckGroup.class);
                
                
                if (group == null)
                {
                        throw new WicketRuntimeException(
                                "LinkGroupSelector component [" +
                                        getPath() +
                                        "] cannot find its parent CheckGroup. 
All LinkGroupSelector components
must be a child of or below in the hierarchy of a CheckGroup component.");
                }
                
                Form form = (Form)group.findParent( Form.class );
                if (form == null)
                {
                        throw new WicketRuntimeException(
                                "LinkGroupSelector component [" +
                                        getPath() +
                                        "] Cannot find form for the given 
component");
                }
                
                
                tag.put(
                        "onclick",
                        "var cb=document.forms['" + form.getMarkupId() + 
"'].elements" +
                                "['" + group.getInputName() +
                                "']; if (cb!=null) { if (!isNaN(cb.length)) { 
for(var
i=0;i<cb.length;i++) { cb[i].checked=this.checked; } } else {
cb.checked=this.checked; } }");

                super.onComponentTag(tag);
        }


problem here is the this.checked in the javascript. The tag isn't a checkbox
so this.checked can not be used. any pointers on what toggle to use for a
link?
-- 
View this message in context: 
http://www.nabble.com/checkboxes-and-Link-tp16757399p16796153.html
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