How to show more than description in appointment

69 views
Skip to first unread message

Osman

unread,
Oct 13, 2010, 8:30:55 AM10/13/10
to gwt-cal
Hello All,

I am using gwt-cal and its amazing and easy to use. I need to make
some modifications. Currently when the appointment is created it shows
description in its body. how can i modify it to display some other
attributes alonge with description.

Thanks,
Osman Ashraf

bradr

unread,
Oct 14, 2010, 10:48:13 AM10/14/10
to gwt-cal
The description field is rendered as html ... so if you want addition
data (like an image, or other fields), you can construct an html
string:
appointment.setDescription("appointment with image <img src='profile-
picture.png' /><div><b>Location:</b>Room 211</div>");

Osman

unread,
Oct 18, 2010, 1:46:26 AM10/18/10
to gwt-cal
Hello Bradr,

I have already done the same thing. It was just a query that may be
there is some other proper method for this. By the way thank you very
much for your response. Hope to get such response in future as well .

Regards
Osman Ashraf

Vivek Ghavle

unread,
Jun 27, 2012, 6:31:48 AM6/27/12
to gwt...@googlegroups.com
Try this code


 final DecoratedPopupPanel appointmentPopup = new DecoratedPopupPanel(true);
                appointmentPopup.setAutoHideEnabled(true);

                calendar.addMouseOverHandler(new MouseOverHandler<Appointment>(){
                   public void onMouseOver(MouseOverEvent<Appointment> event) {
                     Element element = (Element)event.getElement();
                    
                     String str ="<br>"+event.getTarget().getTitle()+"</br>"+event.getTarget().getDescription();
                     appointmentPopup.setWidget(new HTML(""+str));//event.getTarget().getTitle()));
                     //appointmentPopup.setWidget(new HTML(event.getTarget().getDescription()));

                     int left = element.getAbsoluteLeft() + 10;
                     int top = element.getAbsoluteTop() + 10;
                     appointmentPopup.setPopupPosition(left, top);
                     appointmentPopup.show();
                   }
                });
Reply all
Reply to author
Forward
0 new messages