views:

251

answers:

1

Hi all! I want to change next example:

http://livedemo.exadel.com/richfaces-demo/richfaces/calendar.jsf?tab=organizer&cid=1157294

to have ability to set up weekends and hollydays.

And I have q few questions:

1) why I could use data.shortDescription/data.description in the next code:

            <div>
                <h:outputText value="{data.shortDescription.escapeHTML()}" />
            </div>
            <div>
                <h:outputText value="{data.description.escapeHTML()}"/>
            </div>

Can I use something else to show the text in the current date?

I want to add boolean isDayOff field to CalendarDataModelItemImpl, but I don't know, how I will retrieve it and show, and also save.

How can I set up or cancel weekends using richfaces Calendar (maybe using dataModel maybe not) Could anyone give me some ideas or example?

Also I need to show this new weekends with red color.

A: 

You can change the style of each day, using the dayStyleClass attribute. It should point to a javascript function, that takes an argument day and returns a css class selector. Check the "client side disable/styling" tab of the examples.

Bozho
Thanks for idea! I will take a look at it. But one more question is still bother me - why can I use "{data.shortDescription.escapeHTML()}" as a value of <h:outputText> tag and the same question about "{day}" in the <h:outputText value="{day}" style="align:center"/>Could you explain me please?
Elena