Hi Joshua,
> how to get the days of a week which is selected
Ok, to be precise: We are talking of the HTMLB date navigator?! And the question quotated is the question: How to get the concrete days when an onWeekClick event has occured?!
If this is the question, then this is the answer:
public void onWeekClick(Event event) throws PageException { DateNavigatorWeekClickEvent wcEvent = (DateNavigatorWeekClickEvent) event; GregorianCalendar gc = new GregorianCalendar(); gc.set(Calendar.YEAR, wcEvent.getYear()); gc.set(Calendar.WEEK_OF_YEAR, wcEvent.getWeek()); ... }
Now <i>gc</i> should be set to the first day of the week chosen. I have to admit that I didn't test it, but this at least is the way it <i>should</i> work...
> how to use addWeek(int week,int year) method
> which returns void.
See http://devnetmedia.sap.com/html/submitted_docs/htmlbManuals/HTMLB-DateNavigatorModel.html and the example given.
> actually what does the DayRanges class do?
Also see the link given above ("The DayRanges class specifies any number of days taht should be displayed in the selected state. Every day can have a tooltip.").
In addition, see the following links: http://devnetmedia.sap.com/html/submitted_docs/htmlbManuals/datenavigator_dev.html and http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html
Last but not least - it would be very nice if you would be a bit more responsive on answers given to your questions - by rewarding points and/or answering directly, so that the one who tried to help knows if it was correct as well as for other people running into the same issues, e.g. https://forums.sdn.sap.com/thread.jspa?threadID=23084 and https://forums.sdn.sap.com/thread.jspa?threadID=26573
Hope it helps
Detlev
Add a comment