한 가지가 ICS를 감싸는 유틸리티는 기본적으로 ical4j입니다 : THER 첫 번째 경우, 선택은 (HTML, ...)는 후자의 경우에 아래 복사 예 here이 활짝 열려있다 체재.
또 다른 것은 당신이 웹 인터페이스는 당신을 위해 OK 경우 사용할 수있는 우리 운, Primefaces 가진 좋은 JSF 컴포넌트있다,
:-) 달력/일정에 대한 프론트 엔드입니다하지만. 기본적으로
http://www.primefaces.org/showcase/ui/data/schedule.xhtml, 당신이 필요 단지 ICS에서 데이터를 구문 분석하고 primefaces 구성 요소 데이터 모델을 공급하는 것입니다 (링크 위의 JSF와 구성 요소를 사용하는 방법의 관리 빈의 예를 모두 가지고)
그래서 당신은 지금이
private static final SimpleDateFormat SDF = new SimpleDateFormat("yyyyMMdd");
@PostConstruct
private void loadIcs() {
eventModel = new DefaultScheduleModel();
CalendarBuilder builder = new CalendarBuilder();
try {
net.fortuna.ical4j.model.Calendar calendar = builder.build(this.getClass().getResourceAsStream("canada.ics"));
for (Iterator i = calendar.getComponents().iterator(); i.hasNext();) {
Component component = (Component) i.next();
//new event
Date start = SDF.parse(component.getProperty("DTSTART").getValue());
Date end = SDF.parse(component.getProperty("DTEND").getValue());
String summary = component.getProperty("SUMMARY").getValue();
eventModel.addEvent(new DefaultScheduleEvent(summary,
start, end));
System.out.println("added "+start+end+summary);
}
} catch (IOException e) {
e.printStackTrace();
} catch (ParserException e) {
e.printStackTrace();
} catch (ParseException e) {
e.printStackTrace();
}
}
출처
2014-02-14 00:13:03
Leo
같은 것을 당신은 이미 그 코드를 사용하고이 http://ical4j.sourceforge.net/introduction.html – Leo
을 시도 할 수해야 할 것이다, 그러나 문제는 어떻게 Calendar 객체를 표시하려면, ics 파일에서 어떤 캘린더 스타일로 볼 수 있습니까? – Gedas