ZK Calendar nextPage() not changing month

asked 2013-06-21 04:07:14 +0800

JustinFrost gravatar image JustinFrost
145 1 6

Hi All,

I have a Calendars object in month mold which I have extended and put some custom controls to change the month.

When I click on the right arrow it executes the following on the Calendars object:


However the calendar month is not changing. Do I need to do anything else to refresh the calendar on the page ??

delete flag offensive retag edit

3 Answers

Sort by ยป oldest newest most voted

answered 2013-06-21 07:04:51 +0800

hswain gravatar image hswain flag of India
1763 3 10

first notify calendars object.

or use invalidate() method to reset calendars.

link publish delete flag offensive edit


The calendars object is a child of a Popup, this maybe what is causing an issue. I have tried invalidate on the calendar. What do you mean by notify the calendars object ??

JustinFrost ( 2013-06-21 08:06:13 +0800 )edit

if you use wire for calendars no need to notify but without wire you have to notify calendar instance variable.

hswain ( 2013-06-21 08:21:20 +0800 )edit

answered 2013-06-21 16:12:40 +0800

JustinFrost gravatar image JustinFrost
145 1 6

Just to clarify. I have created a custom popup :

CalendarPopup extends popup {
    Calendars cal = null;
    Label monthLabel = null;

    public void CalendarPopup(){
       Div controlDiv = new Div();
       Image left = new Image("/images/left.png");
       Image right = new Image("/images/right.png");
       monthLabel = new Label();


       cal = new Calendars();

    public getCalendar(){
        return cal;

    public setCalendar(Calendars cal){

    public getMonthLabel(){
        return monthLabel;

    public setMonthLabel(Label label){
        monthLabel = label; 

I have setup listeners on the right image to do the following:


And then included this component in my zul page as a custom component:


All renders ok, but the calendar does not update when I click the right arrow, although the nextPage() code is executed in debug.

link publish delete flag offensive edit

answered 2013-06-24 13:43:43 +0800

hswain gravatar image hswain flag of India
1763 3 10

updated 2013-06-24 13:44:13 +0800

add this new Method then use it

 public void goNext(){
link publish delete flag offensive edit


Thanks for your reply hswain. Is this not the same as getCalendar().nextPage() ? getCalendar returns cal...

JustinFrost ( 2013-06-26 02:05:29 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2013-06-21 04:07:14 +0800

Seen: 19 times

Last updated: Jun 24 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More