Tooltips on AjaxButton

2011-12-15 Thread codix
I have this code:


class ExportToolbar extends AbstractToolbar {
public ExportToolbar(final DataTable table,
AjaxButton addbtn,
AjaxButton delbtn,
ExportPredefinedListButton savebtn, 
DropDownChoice ddc) {
super(table);
WebMarkupContainer span1 = new 
WebMarkupContainer(span1) {
@Override
protected void onComponentTag(ComponentTag tag) 
{
tag.put(colspan, 
table.getColumns().length);
}
};
add(span1);
span1.add(ddc);
span1.add(addbtn);
span1.add(delbtn);
span1.add(savebtn);

}
}


How do you add tooltips for the buttons?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Tooltips-on-AjaxButton-tp4202945p4202945.html
Sent from the Users forum 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: Tooltips on AjaxButton

2011-12-15 Thread Martin Grigorov
Hi,

The easiest way is to use AttributeAppender and add 'title' attribute
to each of them.
E.g. addbtn.add(new AttrributeAppender(title, Add));

If you need more fancy tooltips then you'll need to use some JavaScript library.
Check in WicketStuff Git repo. There are few integrations.

On Fri, Dec 16, 2011 at 3:55 AM, codix jackeblag...@yahoo.com wrote:
 I have this code:


    class ExportToolbar extends AbstractToolbar {
                public ExportToolbar(final DataTable table,
                                AjaxButton addbtn,
                                AjaxButton delbtn,
                                ExportPredefinedListButton savebtn, 
 DropDownChoice ddc) {
                        super(table);
                        WebMarkupContainer span1 = new 
 WebMarkupContainer(span1) {
                                @Override
                                protected void onComponentTag(ComponentTag 
 tag) {
                                        tag.put(colspan, 
 table.getColumns().length);
                                }
                        };
                        add(span1);
                        span1.add(ddc);
                        span1.add(addbtn);
                        span1.add(delbtn);
                        span1.add(savebtn);

                }
        }


 How do you add tooltips for the buttons?

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Tooltips-on-AjaxButton-tp4202945p4202945.html
 Sent from the Users forum 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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com