ADF calendar styling

Hi
I am very new to ADF , I was trying to use styling for af:calendar component , but I could not find any sample code on the web , I tried using the instructions in the link but I was not succesfull
http://www.art2dec.com/documentation/docs/fmw11g1114documentation/web.1111/b31973/af_calendar.htm#CHDIFFGG , Can anyone please share a sample code or a tutorial link
I tried some sample code but getting a cast exception
public class CalBean {
private Set<String> tags;
public Set<String> getTags() {
return tags;
public CalBean() {
super();
HashMap<Set, InstanceStyles> activityColorMap = new HashMap<Set, InstanceStyles>();
Set set1 = new HashSet<String>();
set1.add("101");
activityColorMap.put(set1, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.ORANGE));
tags=set1;
Thanks
Gyanesh

Hi..
Hope you may helpful
ADF RC CALENDAR ACTIVITY STYLE-Suresh

Similar Messages

  • Unable to view data in ADF calendar.

    Hi,
    I am working on an adf application that uses the ADF calendar component. I have created view object(with Entity Object) and have dragged and dropped the associated component from the data controls as an adf calendar on a jsf page. But 'm unable to run this application. The following exceptions occurs :
    java.lang.NullPointerException
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlCalendarBinding$AdfmCalendarActivity.getStartDate(FacesCtrlCalendarBinding.java:1041)
         at oracle.adf.view.rich.model.CalendarModel.isActivityInRange(CalendarModel.java:189)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlCalendarBinding$AdfmCalendarModel._createCalendarActivities(FacesCtrlCalendarBinding.java:793)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlCalendarBinding$AdfmCalendarModel._getActvitiesListMap(FacesCtrlCalendarBinding.java:750)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlCalendarBinding$AdfmCalendarModel.getTimeActivities(FacesCtrlCalendarBinding.java:500)
         at oracle.adfinternal.view.faces.renderkit.rich.CalendarListRenderer.encodeAll(CalendarListRenderer.java:152)
         at oracle.adf.view.rich.render.RichRenderer.delegateRenderer(RichRenderer.java:1731)
         at oracle.adfinternal.view.faces.renderkit.rich.CalendarRenderer.encodeAll(CalendarRenderer.java:439)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:493)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:913)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:606)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:447)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$1500(PanelGroupLayoutRenderer.java:30)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:734)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:637)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:187)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:318)
         at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:283)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:360)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:493)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:913)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:606)
    What I understand is that the activity or timezone is not setting properly. However, I'm not able to figure out which is incorrect?
    Earlier it worked fine when an other view is used. Based on our requirements, I changed the view definition and few mappings. Now it is throwing this error.
    Please help me.

    Arun,
    Thanks for the response.
    The Jdev version is 11.1.2.0.0.
    Regarding the VO's, both are different VO's. The first VO(which worked fine) is a simple query and is based on EO.
    My Second VO (Based on a database view) is not based on EO. is it mandatory that the VO should be Enity based?
    However, in my pageDefinition file, I had all bindings as:
    <action IterBinding="JtfTasksCal1Iterator" id="ExecuteWithParams" RequiresUpdateModel="true"
    Action="executeWithParams">
    <NamedData NDName="startDate" NDValue="#{bindings.JtfTasksCal1.startDate}" NDType="java.sql.Timestamp"/>
    <NamedData NDName="endDate" NDValue="#{bindings.JtfTasksCal1.endDate}" NDType="java.sql.Timestamp"/>
    <NamedData NDName="tz" NDValue="#{bindings.JtfTasksCal1.timeZoneId}" NDType="java.lang.String"/>
    </action>
    <calendar IterBinding="JtfTasksCal1Iterator" id="JtfTasksCal1" xmlns="http://xmlns.oracle.com/adf/faces/binding"
    ActionBindingName="ExecuteWithParams">
    <nodeDefinition DefName="oper.model.uiview.JtfTasksCalVO">
    <AttrNames>
    <Item Type="id" Value="TaskNumber"/>
    <Item Type="providerId" Value="TaskStatus"/>
    <Item Type="title" Value="TaskName"/>
    <Item Type="startTime" Value="ScheduledStartDate"/>
    <Item Type="endTime" Value="ScheduledEndDate"/>
    <Item Type="tags" Value="TaskStatus"/>
    <Item Type="custom" Value="ScheduledEndDate"/>
    <Item Type="custom" Value="ScheduledStartDate"/>
    <Item Type="custom" Value="TaskId"/>
    <Item Type="custom" Value="TaskName"/>
    <Item Type="custom" Value="TaskNumber"/>
    <Item Type="custom" Value="TaskStatus"/>
    <Item Type="custom" Value="TaskType"/>
    </AttrNames>
    </nodeDefinition>
    <providerDefinition IterBindingName="JtfTasksCal1Iterator">
    <AttrNames>
    <Item Type="id" Value="TaskStatus"/>
    <Item Type="displayName" Value="TaskName"/>
    </AttrNames>
    </providerDefinition>
    </calendar>
    Is there anything missed here?
    And there is no Timezone specified in trinidad-config.xml. If the timezone is not specified here, then how it picksup the timezone?

  • How to configure the date format in toolbar of ADF Calendar

    Hi,
    In the weekly view of the ADF Calendar, the date on the toolbar of the calendar component is something like this "May 1,2011 - May 7,2011".
    Is there a way to configure this. What changes need to be done to show this as "1 May 2011 - 7 May 2011".
    Thanks,
    Deepak

    See Bug 13825615 - backport to 11.1.1.7.0 bug 13045234 - date format not supported in toolbar by ca

  • ADF Calendar : scroll bar in specific date

    Dear all,
    By default, the ADF calendar component displays many events found in a specif day as "+2 more", "+3 more" or "+X more" . . . . and as we click on the link, we view them in the day view.
    Is there any way to display all the events under the same day and view them by using a scroll-bar found inside the day square space? I need to view all events without going to the day view
    I need to view all events found on a specific day to be able to drag and drop it to any day directly on the Month view
    Thanks in advance

    Hi,
    You could use the following to get scroll bars around your table. It may not be ideal as the scroll bar is for the entire table, so when you scroll your headers will also scroll.
    You will need to hard code your height, and set some margin for vertical scroll bar in IE (thats why the 98% width!). But atleast its better than nothing..
    <af:table width="98%" id="xx" ...
    inlineStyle="overflow-x: hidden; overflow-y: auto;height: 450px;"
    rows="15">
    </af:table>
    HTH
    Jaimon

  • Clicking on 'ADF Calendar Component activity' should navigate to New page

    Jdeveloper Version - 11.1.2.0.0
    We implemented the ADF calendar component and it displays fine. However, we have a requirement that by clicking on the activity, it should navigate to another new page. For an activity, there are options like contextMenu, acitivtyHover, activityDetail etc.., where all shows the details in popup of the same page. We want to navigate to new page by clicking on the activity. Is it possible?
    Thanks in Advance.

    Hi,
    I don't think it is possible.
    All the facets you mentioned support only af:popup as child to them.
    http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_calendar.html
    -Arun

  • ADF Calendar Issue with MDS

    JDeveloper 11.1.1.4.0
    With the ADF Calendar, I able to programmatically control most of its features such as setting ActiveDay, View, etc.
    But, when I turn MDS on and I interact directly in the calendar (such as changing the views, or clicking on the day which switches the view), any programmatic control I do to it just stops refreshing the calendar.
    I inspected it and data is there, data shows up, activeDay is changed... But the calendar itself just doesn't change its view to the new activeDay.
    Eg. I'm viewing March and I changed the active day to somewhere in August, I will still end up viewing March. No refresh nor flicker.
    This issue is only happening when MDS is turned on.
    I wonder if anyone has got around this issue?
    -Marvin

    Hi Marvin
    I have a issue with Calendar component in ADF , I have similar requirement as you , I want to change the display month of Calendar on selecting the Month for Ex I select May I shud get May's Calendar and if March is selected I want to display March Calendar , I wanted to know how did you implement this ?
    I am trying to set the activeDay of RichCalendar on selection of Month and year , For example I select May 2011, Then in value Change Listener I pass the 01 May 2011 as Date to a method and trying to set the activeDay attribute of RichCalendar so that the Calendar will display the calendar for Month of May with 1st May as active Day. Now I have two questions is such a thing possible using
    below method, setActiveDayCompInstance()
    Second I am getting null pointer exception for the line , why so ??
    reqContext.getChangeManager().addComponentChange(context, calendar, aa);
    My Method for setting active Day
    public void setActiveDayCompInstance(Date activeDay)
    System.out.println(activeDay);
    RichCalendar calendar = getCalendarComponent();
    calendar.setActiveDay(activeDay);
    // Implicitly record a change for 'activeDay' attribute
    AttributeComponentChange aa =
    new AttributeComponentChange(RichCalendar.ACTIVE_DAY_KEY.getName(), activeDay);
    RequestContext reqContext = RequestContext.getCurrentInstance();
    FacesContext context = FacesContext.getCurrentInstance();
    System.out.println("reqContext"+aa +reqContext.getChangeManager());
    reqContext.getChangeManager().addComponentChange(context, calendar, aa); // Null Pointer exception
    Stack Trace for Null pointer
    at org.apache.myfaces.trinidad.change.BaseChangeManager.addComponentChange(BaseChangeManager.java:58)
    at org.apache.myfaces.trinidad.change.SessionChangeManager.addComponentChange(SessionChangeManager.java:64)
    at MyNest.Timesheet.calendar.TimesheetCalendarBean.setActiveDayCompInstance(TimesheetCalendarBean.java:1482)
    at MyNest.Timesheet.calendar.TimesheetCalendarBean.yearChangeListener(TimesheetCalendarBean.java:1196)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)

  • How to change ADF Calendar colors from different providers?

    Hello again, I am using JDeveloper 11.1.2.3.0,
    This might be the third question I am asking here about this and till now I got no answers.
    CAN ANYONE PLEASE PROVIDE AN EXAMPLE OR A TUTORIAL ON HOW TO CHANGE THE COLORS OF THE ADF CALENDAR COMPONENT?
    Excuse me for asking again but I am finding it very wired that nobody doesn't respond to these questions. Is there a bug or nobody really knows how to customize the calendar component?

    Thanks for the time you take to explain me,
    But, I'm no sur to understand all that you say.
    My VO have :: Name : Calendar
    Attribute
    Type
    idCalendar
    varchar2(20)
    provider
    varchar2(40)
    startDate
    oracle.jbo.domain.date
    endDate
    oracle.jbo.domain.date
    title
    varchar2(255)
    Question :
    1) The tags fields is mandatory or not for the activityStyles ? If Yes, how to define it ?
    I would be very obliged if you would send me a sample project. I'am lost and more i try more i don't understant.
    Thanks

  • Oracle ADF Calendar Component Customization

    Hi,
    I am starting my journey to learn ADF. I am using Oracle ADF Calendar component as read only calendar. We need to further customize the calender to incorporate CUD operations. I am using ADF BC @ business layer and which in turns talk to DB for Calendar entries.
    I am able to implement UI facets (like Hover effect, Detail Calendar Entry, Delete Entry) but I am not clear about how to implement the corresponding events (like delete event, edit event etc).
    I am using Dialog and which refers to a managed Bean component for listeners (e.g Delete Dialog refers to dialogListener="#{CustomCalendarBean.deleteListener}").
    My Question is,
    In the bean, to implement the listener, i would need to make use of Delete operation available in my Data Control (Exposed by ADF BC VO). I am not sure how to do the same. My managed bean is POJO and not sure how it can call Delete operation available in data control.
    Appreciate your help.
    Thanks, Mihir Parekh

    I am able to achieve this functionality with Operation Binding.

  • How I Can Close a Adf Calendar Popup in my managed bean ?

    Hi.
    I am using Adf Calendar.
    When i call the method to close popup:
    public static void hidePopUp(RichPopup popUp) {
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ExtendedRenderKitService service =
    Service.getRenderKitService(facesContext,
    ExtendedRenderKitService.class);
    String serviceScript ="AdfPage.PAGE.findComponent('" + popUp.getClientId(facesContext) +
    "').hide();";
    service.addScript(facesContext, serviceScript);
    and after call the method "AdfFacesContext.getCurrentInstance().addPartialTarget(this.calendar//my ADF Calendar);" the calendar refresh and my popup not close.
    If I not call the method "AdfFacesContext.getCurrentInstance().addPartialTarget(this.calendar//my ADF Calendar);" my popup close works normally.
    SomeBody Can Help me ?
    thanks advance

    Hi..
    To hide popup use following code stuff also set partialTriggers for popup
    <af:popup id="assignpoup" partialTriggers="componentIdThatCallHideThePopup" binding="#{SampleBean.samplePopUp}">
    private RichPopup samplePopUp;
    public void setSamplePopUp(RichPopup samplePopUp) {
    this.samplePopUp= samplePopUp;
    public RichPopup getSamplePopUp() {
    return samplePopUp;
    }to Close popUp use .hide() and after that do partialtrigger part for calender
    getSamplePopUp().hide();
    AdfFacesContext.getCurrentInstance().addPartialTarget(this.calendar//my ADF Calendar);"hope this will helpful

  • Changing the ADF Calendar

    Hi All,
    We have a requirement to create a Appointment Page where the Activity Providers can be more than 50 and we dont want to use colors to distinguish between the appointments created for various Activity Providers.
    What we need is something like this where we show the time at the top and the different Activity Providers on the left side. Currently in ADF calendar, we can show the Different Activity Providers as checkboxes at the top and different colors to distinguish various activity providers. Is it even possible to do change the checkboxes and have something like a grid format as show below.
    If not, what will be the best way to go about it.
    8 A.M 9 A.M ..... .5 P.M
    Activity 1
    Activity 2
    Activity 3
    Please Help.
    Thanks,
    Ajith

    I'm guessing the "Oracle JDeveloper Handbook" is the published McGraw-Hill book by Duncan Mills, Peter Koletzke and Avrom Roy-Faderman:
    http://www.amazon.com/Oracle-JDeveloper-11g-Handbook-Development/dp/0071602380/ref=sr_1_4?ie=UTF8&s=books&qid=1279005819&sr=8-4
    The 11g version of this book replaces the earlier releases, 10g, 9 etc.
    As a general text for understanding JDev & ADF it's a recommended read. As Michael says, I don't believe it covers internalization though.
    There is a more advanced guide the "Oracle Fusion Developer Guide" by Frank Nimphius and Lynn Munsinger:
    http://www.amazon.com/Oracle-Fusion-Developer-Guide-Applications/dp/0071622543/ref=pd_sim_b_1
    This is a more advanced text, not recommended for beginners, but a recommended read once you understand the basics.
    Back to the original question in this post, internalization is covered in section 21 of the ADF Web Guide:
    http://download.oracle.com/docs/cd/E14571_01/web.1111/b31973/af_global.htm#CHDGCAFI
    If you're looking to customize ADF BC error message it's covered in section 37.8 of the ADF Fusion Guide:
    http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/bcadvgen.htm#BABEFGCI
    I wrote a blog entry about the latter sometime back, which may or may not be relevant to the task at hand:
    http://one-size-doesnt-fit-all.blogspot.com/2007/05/dont-constrain-yourself-displaying.html
    CM.

  • ADF calendar hide the time in Calendar Activity

    Hi
    When I try to display data in a ADF Calendar as a Calendar activity , the date gets displayed , is there a way I can hide this Currently My Activity gets displayed as 8.30 PM Team Meeting. Is it possible to hide the time 8.30 pm and just display Team Meeting. Please let me know
    Thanks
    Ajay

    Please declare the activity as an all day activity. :-)
    -Gyanesh

  • ADF Calendar : change the calendar activity style

    Dear All,
    Is it possible to display the events found in the month view of the ADF calendar without the time ?
    By default the calendar displays it's events in the following format "12:00 AM Client X" i need to display only the event description without the time therefore i need to display only "Client X".
    Thanks for your supportĀ 

    Please declare the activity as an all day activity. :-)
    -Gyanesh

  • ADF Calendar Component

    Hi!
    Do you guys have some code you can share in order to initialize (like adding activities on page load, something simple) an af:calendar from a managed bean? not using bindings or VO
    I downloaded the adffacesdemo war but there are way too many classes and is really difficult just to add one activity and test the component
    is there an easier way?
    I use Jdev 11.1.2.3.0 and Jdev 12c
    thanks

    Well, there isn't much about the calendar component. My be ADF Faces Calendar Component is of help. Or http://www.gebs.ro/blog/oracle/oracle-adf-calendar-step-by-step-implementation/
    Timo

  • Adf Calendar multiple date range disabled.

    Hi,
    I have a requirement where I have few date ranges say 1st -5th march, 9th-11th march.. and while opening date calendar these date ranges should be disabled (blacked out ) . MinValue and maxValue attribute is only for single date range. I need for multiple date ranges

    No version number, no clear idea of what you mean by "adf Calendar"
    If you are talking about [url http://docs.oracle.com/cd/E16162_01/apirefs.1112/e17491/tagdoc/af_inputDate.html]af:inputDate, look at the disabledDays property
    John

  • Using ADF calendar to show employee absences

    Hi,
    (Actually this question belongs to ADF as well as HRMS..so posting in both the forums)
    We are having JDeveloper 11.1.2.4
    We need to show employee absence calendar in ADF page.
    Question 1) We believe we can use ADF Calendar component for this. Kindly confirm.
    I gone through "How to Use the ADF Faces Calendar" section in ADF Guide and tried to implement Employee Absence Calendar accordingly (based on seeded oracle table - PER_ABSENCE_ATTENDANCES.)
    However step 2 mentions creating 3 named bind variables in VO:
    A string that represents the time zone
    A date that represents the start time for the current date range shown on the calendar.
    A date that represents the end time for the current date range shown on the calendar.
    I created these 3 named bind parameters accordingly. However when I run the page with ADF calendar, it shows following error:
    Attempt to set a parameter name that does not occur in the SQL: timeZone
    Question 2) How to resolve this error?
    Kindly advise.
    Thanks,
    Vivek

    Hi minh-hieu,
    According to your description, you want to calculate YTD value of Sales Amount. Right?
    As we tested in our environment, the expression you assign in This function is correct. It can return the YTD values properly:
    So please pay attention to the set expression in your SCOPE statement. Try the code below:
    SCOPE(MEASURES.[YTD Sales]); --Calendar YTD
    SCOPE([DimDates].[Year].[Year].MEMBERS,[DimDates].[Year-Qtr-Month-Day].MEMBERS);
    THIS = AGGREGATE( PERIODSTODATE([Date].[Year].[Year], [Date].[Year].CURRENTMEMBER), [Measures].[Sales Amount]);
    END SCOPE;
    END SCOPE;
    Best Regards,
    Simon Hou
    TechNet Community Support

Maybe you are looking for