Hi Nina,
You can customize the entry renderer of t:schedule with "entryRenderer"
property. Please check the schedule4.jsp of tomahawk's simple example. Here is
the sample to add an imgage for entry.
In jsp,
<t:schedule ...
entryRenderer="#{myEntryRenderer}" />
In "#{myEntryRenderer}" Java Bean,
public class TaskScheduleEntryRenderer extends DefaultScheduleEntryRenderer {
public void renderContent(FacesContext context, ResponseWriter writer,
HtmlSchedule schedule, ScheduleDay day, ScheduleEntry entry,
boolean compact, boolean selected) throws IOException {
writer.startElement(HTML.IMG_ELEM, null);
writer.writeAttribute(HTML.SRC_ATTR, <YOUR_IMG_SRC>, null);
writer.writeAttribute(HTML.TITLE_ATTR, <YOUR_IMG_TITLE>, null);
writer.endElement(HTML.IMG_ELEM);
writer.write(" ");
super.renderContent(...);
}
}
Good luck,
Zhi
----- Original Message -----
From: Hintringer Nina
To: [email protected]
Sent: Monday, July 24, 2006 5:04 PM
Subject: How to display an image within a schedule entry?
Dear all,
I use the schedule component and I'd like to display an image within every
schedule entry. When I put the html-code of the image (e.g. <img
src='/images/myImage.png' border='0' alt=''>) for example into the subtitle-tag
then the image-tag is shown in plain-text (like that: <img src='/images/
myImage.png' border='0' alt=''>) in the schedule entry because the
HTMLEncoder-Class encodes following special characters:
case '"': app = """; break; //"
case '&': app = "&"; break; //&
case '<': app = "<"; break; //<
case '>': app = ">"; break; //>
In the tooltip the image is rendered correct.
Is there any possibility to show images within a schedule entry to?
Regards,
Nina