af:Calendar ActivityStyles

Trying to utilize Activity Styles on Calendar without success - what am I doing wrong?
Have created in my Calendar Bean the following:
private Map<Set, InstanceStyles> activityColorMap = new HashMap<Set, InstanceStyles>();
public void setActivityColorMap(Map<Set, InstanceStyles> activityColorMap) {
this.activityColorMap = activityColorMap;
Set red = new HashSet<Key>();
activityColorMap.put(red, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.ORANGE));
public Map<Set, InstanceStyles> getActivityColorMap() {
return activityColorMap;
and set in my Calendar property AcivityStyles the value of activityColorMap ie activityStyles="activityColorMap"
getting the following error
java lang String cannot be cast to java lang Map
Also replaced the <Key> with <String>

dear all ,
I have the same problem but the solution is not clear by s1979 can you explain what to be in the PubCalendarActivity "CalendarActivity Constructor" ?
thanks All ,
i found my problem ,i just want to set the tags to my key value of the color based property in my custome activity bean
Edited by: Wa'el Abu Rahmeh on Jul 5, 2010 12:47 AM

Similar Messages

  • What is the correct way to add styling to drag-and-drop created calendars?

    I have a working instance of a rich client calendar. I generated the view with the required fields (start, stop, provider, ...), put it into the App Module, and dragged it onto a JSF page to create a calendar.
    Next I created an activityScope object in a class called CalendarBean (no inheritance)
    Class CalendarBean()
    private HashMap<Set<String>, InstanceStyles> activityColorMap;
    +..+
    +public CalendarBean() {+
    super();
    activityColorMap = new HashMap<Set<String>, InstanceStyles>();
    HashSet setEd = new HashSet<String>();
    HashSet setLen = new HashSet<String>();
    setEd.add("Work");
    setLen.add("Home");
    activityColorMap.put(setEd, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.ORANGE));
    activityColorMap.put(setLen, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.RED));
    +}+
    +}+
    Next, I linked this up as a backing bean and associated the ActivityStyles of CalendarBean to it:
    +#{backingBeanScope.calendarBean.activityColorMap}+
    I populated some records in the database with properties "Work" and "Ed', but they show default blue.
    As I understand it, I need to do something with the getTags() method of the underlying CalendarActivity class, but I'm not quite sure how to do that.
    Took a stab at creating a class, CalendarActivityBean, that extended CalendarActivity, and pointed all the CalendarActivity references I had to the new class, but it didn't seem to fire (in debug), and I got into trouble, when inserting records, with
    public void calendarActivityListener(CalendarActivityEvent calendarActivityEvent) {
    currActivity = (CalendarActivityBean) calendarActivityEvent.getCalendarActivity();
    being an illegal cast
    What is the correct way to add provider-based styling to drag-and-drop create calendars?
    Ed Schechter

    A colleague of mine was kind enough to solve this:
    The calendar has ActivityStyles property = #{calendarBean.activityStyles}
    CalendarBean looks something like this:
    package com.hub.appointmentscheduler.ui.schedule;
    import java.util.HashMap;
    import java.util.HashSet;
    import java.util.Set;
    import oracle.adf.view.rich.util.CalendarActivityRamp;
    import oracle.adf.view.rich.util.InstanceStyles;
    +public class CalendarBean {+
    private HashMap activityStyles;
    private String dummy;
    +public CalendarBean() {+
    +// Define colors+
    activityStyles = new HashMap<Set<String>, InstanceStyles>();
    HashSet setPending = new HashSet<String>();
    HashSet setArrived = new HashSet<String>();
    HashSet setApproved = new HashSet<String>();
    HashSet setCompleted = new HashSet<String>();
    setApproved.add("APPROVED");
    setPending.add("PENDING");
    setArrived.add("ARRIVED");
    setCompleted.add("COMPLETED");
    activityStyles.put(setApproved, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.GREEN));
    activityStyles.put(setPending, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.ORANGE));
    activityStyles.put(setArrived, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.PLUM));
    activityStyles.put(setCompleted, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.LAVENDAR));
    +}+
    +public void setactivityStyles(HashMap activityStyles) {+
    this.activityStyles = activityStyles;
    +}+
    +public HashMap getactivityStyles() {+
    return activityStyles;
    +}+
    +}+
    Now, go into the Bindings tab on the calendar page, double click the calendar binding, and specify the column you've defined as the calendar's Provider in the Tags dropdown.
    Should show colors.

  • 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

  • How can I see Calendar event END times at a glance?

    How can I display my Calendar event titles exactly as I type them? I do not want Calendar to remove duration from the titles of my events. Otherwise I can't see event END times at a glance in month view; only start times. How can I "trick" Calendar to just show my titles as I type them - as I always could before I upgraded. I used to be able to enter "Seminar 9am-5:45" and it would appear that way regardless of how or what I chose to enter (or not enter) for duration.
    I am running OSX 10.9.3.

    It's a bit weird, but if you type in the time info TWICE into the event title then Calendar uses/deletes one of them to populate the event details and leaves the other.
    Apple - Mac OS X - Feedback

  • Looking for Daily Calendar At-a-Glance App

    I'd love to find an app that will post an alert to my iPhone each morning listing out my day's calendar events. Anyone know of one? For what it's worth, I have 4 active calendars in Calendar app.

    I don't know of any apps like the one you want; however, there is probably something out there that will do the job. I did want to suggest Google Calendar, which will send you email and SMS reminders about events and things you have put on your calendar. You might already be aware of this, so if you are, just disregard. I just wanted to suggest it in case you weren't aware of it. I use it all the time, and it's very handy. 

  • Can I show a color bar instead of a color bullet in iCal Monthly view for all my events in all calendars?

    In the Monthly view of iCal the only events that show a color bar in the event is the Birthday Calendar. All other events in all my other calendars only show a color bullet next to the event (unless I click on that event which then shows as a color bar). I would like to know if it is possible for all the calendar events to have a color bar in the monthly view instead of just that tiny color bullet.

    Greetings Judith,
    Before making any attempts at deleting calendar data, backup what you have just in case:
    Click on each calendar on the left hand side of iCal one at a time highlighting it's name and then going to File Export > Export and saving the resulting calendar file to a logical location for safekeeping.
    iCal has an automated function located in iCal > Preferences > Advanced > Delete events "X" days after they have passed.  By typing in a value for days you can tell iCal to delete all events before that time frame.
    Example:
    Today is 4-16-2012.
    If I wanted to delete all events prior to 1 year ago (4-16-2011) I would type in "365" for the number of days.
    Once you type in the number of days you want kept in iCal, close the preferences and then quit iCal.
    Re-open iCal and check to see if the events are gone.  If not you may want to leave it open for several minutes and then quit again.
    Once the events are removed go back to  iCal > Preferences > Advanced > Delete events "X" days after they have passed and make sure the check mark is removed to prevent future deletion.
    Hope that helps.

  • I create a birthday calendar in iCal and then click on it in iphoto at the begining of the calendar project each year.  Some how the birthday did not populate the photo calendar.  Is there a way to add the birthday iCal calendar into the calendar project?

    I created a birthday calendar to use in iphoto for calendar.  When a new calendar project is started each year, I click on it in.  Some how the birthday did not populate the photo calendar this year.  The photo calendar is almost complete.  Is there a way to add the birthday iCal calendar into the calendar project? I would prefer not to start over.

    Hi,
    If you first select the calendar on the left, so that its background is highlighted blue/grey, when you make a new events they should be added to that calendar.
    Best wishes
    John M

  • Cannot send email from iPhone5--calendar syncing issues also

    I have an iPhone 5 and am not currently using iCloud.  I have 3 email accounts. 
    The first is a yahoo email account--and it both receives & sends emails just fine. 
    I use Outlook for the other two email accounts (one is an IMAP and the other is a POP).  Both receive email, but I cannot send out emails from my iPhone.  When I try to send an email from either account, I get this message: 
    "A copy has been placed in your Outbox.  The sender address "[address I used]" was rejected by the server.
    Also, I don't know if it is related, but my iPhone calendar isn't syncing with Outlook.  I add an appointment on my iPhone or in Outlook, and it won't appear in the other location (Outlook/iPhone). 
    Thanks for your help. 

    Check your settings, maybe the mail index is at fault.
    Setup Wizard and troubleshooting tips:
    http://www.apple.com/support/mail
    Also has a link to Mail community section.

  • Get all calendars from root

    Hi guys,
    I am developing an integration with EWS based on php. I am using a library I found https://github.com/jamesiarmes/php-ews
    In my case users have various calendars hanging from the root, I get access to the default calendar by this:
    $request->ParentFolderIds->DistinguishedFolderId->Id = EWSType_DistinguishedFolderIdNameType::CALENDAR;
    $response = $ews->FindFolder($request);
    I also get access to shared calendars by this:
    $request->ParentFolderIds->DistinguishedFolderId->Id = EWSType_DistinguishedFolderIdNameType::PUBLIC_FOLDERS_ROOT;
    $response = $ews->FindFolder($request);
    But I am getting crazy to get all calendars hanging from the root. If I asked for all folders on the root I don't get those calendars. What service and params do I need to send to get all calendars from the root?
    Thanks!!

    If you make a FindFolder Request set the Traversal to Deep and use a restriction on the FolderClass to IPF.Appointment that should return all the Calendar folders in a mailbox eg
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="
    http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://sc
    hemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xml
    soap.org/soap/envelope/">
    <soap:Header>
    <t:RequestServerVersion Version="Exchange2013_SP1" />
    </soap:Header>
    <soap:Body>
    <m:FindFolder Traversal="Deep">
    <m:FolderShape>
    <t:BaseShape>AllProperties</t:BaseShape>
    </m:FolderShape>
    <m:IndexedPageFolderView MaxEntriesReturned="1000" Offset="0" BasePoint=
    "Beginning" />
    <m:Restriction>
    <t:IsEqualTo>
    <t:FieldURI FieldURI="folder:FolderClass" />
    <t:FieldURIOrConstant>
    <t:Constant Value="IPF.Appointment" />
    </t:FieldURIOrConstant>
    </t:IsEqualTo>
    </m:Restriction>
    <m:ParentFolderIds>
    <t:DistinguishedFolderId Id="msgfolderroot" />
    </m:ParentFolderIds>
    </m:FindFolder>
    </soap:Body>
    </soap:Envelope>
    Cheers
    Glen

  • Hi, I was trying to copy and paste a lot of  info for one day on my calendar to another day and an error message popped up saying that the system responded with an error. Msg won't go away I force quit ical

    Need help for trying to unfreeze a message on my ical.  I was trying to copy and paste some appointment info from one day to another on my ical and a message popped up saying the system responded with an error.  All of my info was below the message.  I can't get that message to go away or work on the ical now at all.  I try to force quit ical and have shut down the computer and it still comes up.  Any suggestions?

    K,
    Try removing the com.apple.iCal.plist file from your Macintosh HD/Users/yourusername/Library/Preferences Folder. To find that Library folder, if you are using Lion, use Finder>Go Menu>Depress the "Option" key>Library. Drag the .plist file to your desktop, and log out/in or restart.
    Next, make sure that you are not connected to the internet. Then to to your Macintosh HD/Users/yourusername/Library/Calendars Folder and remove any files with "Cache" as a part of the file name. Use the same method as listed above to get to the correct Library Folder. Log out/in, or restart and check iCal for functionality.

  • How can I get ALL of my Google Calendars to show on the iCal on my iPhone? I see all of my Google Calendars on the iCal on my Mac, but I do not see them in the iCal on my iPhone. I only see one Google Cal, but not the others.

    How can I get ALL of my Google Calendars to show on the iCal on my iPhone?
    I see all of my Google Calendars on the iCal on my Mac, but I do not see them in the iCal on my iPhone. I only see one Google Cal, but not the others.

    https://www.google.com/calendar/iphoneselect

  • I need help with Sunbird Calendar, how can I transfer it from one computer to the other and to my iphone?

    I installed Sunbird in one computer and my calendar has all my infos, events, and task that i would like to see on another computer that i just downloaded Sunbird into. Also, is it possible I can access Sunbird on my iphone?
    Thank you in advance,

    Try the forum here - http://forums.mozillazine.org/viewforum.php?f=46 - for help with Sunbird, this forum is for Firefox support.

  • How do my partner and I share our calendars on our iPhones?

    Hello.  I am completely new to all of this so I apologise if I don't follow any protocols correctly.  I would love some help to figure out the best way for my partner and I to share our calendars on our iPhones please.  I have done a lot of research but I still have no idea where to start.  I guess I am leaning towards some kind of app but open to all options.  I would love us to be able to view and edit each others calendars and also a "shared" calendar which stores appointments and events that we are both committed to.  It would be handy if an event was added to the "shared" events calendar, for it to be automatically added to each of our individual schedules.  I should also mention that the apple devices we have are my iPhone 4, my partners iPhone 4s, and also the latest iPad (I think it is a 4 with retina?), but no Mac desktop or laptop computer.
    I have read a lot of good things about the app "Fantastical" and like the look of it but not sure if it is a personal calendar or if we can both use it to add and edit from our seperate devices.  Doesn't look like it has a task manager though.  Also, do I have to have a gmail account to link to these apps?  Information that I've read seems to talk about syncing with other calendars but we don't currently use any kind of digital calendar.  I would be open to creating one if necessary but if it could all be done in the one app that would be great.
    Open to suggestions on other apps - I have downloaded a few free couples ones such as "Avocado", "Cozi" and "Simply Us" to preview and would be open to purchasing full versions if I knew they were right for me - so far it doesn't look to me like there is a big enough emphasis on the calendar feature, they are about messaging and photos which aren't a priority at all for us.  Cozi seems to have a lot of the features I'm after, but when I view the "Shared" calendar it shows shared events, but then they do not show up in our individual calendars.  Also the To Do section doesn't seem to correspond to days, just a general list, so you can't assign certain tasks to certain days.  The features I am after is mainly a calendar with the specifications I have listed above (individual and shared calendars that can all be viewed and edited by both parties, and shared calendar events automatically booked on to individual calendars as well - also daily or weekly views as well as monthly).  A To Do or Task Manager feature would also be great, preferably where you could see who added which item to the list, or seperate lists.  And lastly, a grocery list that we could both view and update.  But I mainly would just like a great shared calendar and a task manager/to do as a bonus!
    Does anyone have any advice for me?  I think I am after a little more than the standard calendar app that comes with the iPhone?  Also, we don't have iCloud set up and have no idea how to do this or really even what it is - as you can see I'm a bit of a beginner and pretty hopeless.  Really don't know where to start.
    Sorry for the length of this post, I am just very confused!  Thank you so much in advance to anyone who is kind enough to take the time to respond.
    Message was edited by: kelliemd
    One more thing sorry, it would also be great if my partner was alerted when I added or edited something, and visa versa.  Thanks again.

    Hi,
    the content was purchased using two different Apple-IDs / Accounts?
    If above is the case, then I fear you cannot merge the content using now one combined account. Content always belongs to one dedicated account. As well as a iTunes library can only belong to one dedicated Apple-ID. And also the iPhone can only belong to one dedicated iTunes library and also Apple ID (for the store stuff, for iCloud stuff you can use a second ID)

  • How can I have one calendar on one machine with 2 users

    I just replaced my macbook with a mac mini.  I created a second account, for my wife, on the machine.  Being 2 retired people, we don't need separate calenders. In fact, we often need to see what the other is doing.  So, what i'd like to do is have one shared library for each of the following:
    Calender, Address Book, and of course IPhoto.
    I believe the way to do this is to have the library file for each application stored under the system top level library that is shared system wide.  But, I don't have a clue how to do this.  We do not use iCloud do to security concerns.

    To move Contacts, calendar data, etc. information from Android to iOS you can use third party Apps on both devices the Apps will move this information to the "Cloud" with one App and back to your other device with another App.
    See, for example, PhoneCopy at http://www.phonecopy.com/en/

  • ICal Calendar Colors Changing On Their Own; iCloud Connection

    AGGRAVATING PROBLEM:
    Many in this forum have written recently about a problem ongoing for people with multiple iCal calendars where iCal calendar colors change "automatically" when you haven't selected those colors, or even "change back" before your eyes to some color your DIDN'T select after you select a new one.  If you log into iCloud on the Web and try to change the color of certain calendars, they refuse to change.  Try as you might, the color you want for your calendar won't "stick" and it is forced to be the wrong color on all your devices.  In some cases, even the names of some of the calendars cannot be changed.  On other calendars in your list, the colors and names will change fine. 
    Related symptoms:  Calendars you have deleted "come back."   Or, calendars you did not create yourself show up in your calendars list, such as "Calendar" or "Home" or even "Untitled."  Note that the problem seems to be most prevalent with calendars with names "Home," "Work," OR either of these words in the NAME of the calendar.  For instance, "Bob's Work" might get snagged (it can't be deleted without coming back or its color is stuck and "comes back"). 
    I spent a long time on the phone with a helpful Apple senior advanced specialist on this problem today.  We conducted a very large number of "experiments". Our family has two iPads, 2 iPhones, and 2 iMacs, so it was easy to rule things in or out.  I will present some information that may help.
    SOME OF WHAT APPEARS TO BE GOING ON:
    First, Apple has not resolved this.  But the problem appears to be related to iCloud, and NOT to individual devices.  After de-linking all of my individual devices from iCloud, I could change any of the colors or names at will on any given device, create new calendars and then change their colors to whatever I wish, delete calendars, change names...no problem.  However, after re-linking calendars to iCloud, all the problems mentioned above returned.  The chances that my iMacs, iPhones, and iPads are all causing the problem independently is very low. They also have slightly different OS versions on them, so it is not likely an a particular device OS, though that could be indirectly related.  Also, the colors "change back" within about the same time (usually a few seconds to up to 30 seconds) that it takes to do a "refresh" (i.e. an update) to the iCloud servers.  This when iCloud is turned on, and the absence of it when iCloud is turned off (for calendars), strongly suggests that it is the iCloud server and its interaction with your devices that the fundamental cause of the problem.
    Apple has said that they are aware of this problem and their engineers are working on a fix.  Historically, this can mean just a few days, or it could be a few months, years, or "whenever."  They don't give estimates of when it will be fixed.  Exactly WHY this is happening is unclear, but my guess is that it is a modification to the iCloud server code that Apple implemented without testing it thoroughly enough to discover this problem.  Apple does not admit to that, of course and I don't know if I am correct.
    A WORKAROUND SOLUTION THAT WORKED FOR ME:
    Please note this is a workaround and not a full fix.  Apple needs to run a patch on their iCloud server code.  Until then, I did the following which seems to have worked for me for now.  Read the whole list before deciding whether to proceed.  I don't guarantee it will work in all situations.
    Note...I found I was stuck for now with the color of ONE of my calendars.  If you are like me, you want to keep that one and work around it....
    Backup first... Make sure that your iCloud copy of your calendar data has the calendar event information you want to save - even if the color is wrong.  Log in at www.icloud.com and do a refresh to sync to the Cloud.  Check over your calendars online to make sure the event data appears to be there for all of your calendars (even if their color or name is not what you want).
    Steps:
    1.     Go to every device that you have linked to iCloud separately. Go into Settings, iCloud, and then uncheck the "Calendars" option.  This delinks your calendars for that device to iCloud.  As you do this on each device, when prompted, select "Keep On My" ..iPAD...iPhone...iMac... etc.  This will preserve the calendar information on the device so it won't be deleted.  I think this is safer, but you can click on "Delete" if you want, too.  Note - if one of your devices is an iMac, with OSX Lion and before, you may be forced (I was) to delete the iCloud calendars from the iMac.  So again, make sure they are backed up to the Cloud first (or somewhere else).
    3.     With the iCloud Calendars Option on all your devices still turned off, go to the WEB and log into iCloud.com.  You need to figure our which calendar iCloud won't let you change the color for.  You probably already know.  On iCloud.com, click on "Calendars," then click open your calendar list and select "EDIT" at the bottom of the dialog box.  One at a time, click on the color dots next to each calendar name and try to change the color (you can put any back after the test if you want). You will probably see a certain one that just goes right back to what you don't want.  This is the one for which the color is stuck, but you may be able to change the name of it now that your devices are unlinked from iCloud.
    4.     Still in iCloud.com, change the names and colors of any of the other calendars you wish to change.  Delete any empty calendars that mysteriously appeared without your wanting them.  Take note of all the calendars, names, and colors that are on the final list of calendars.
    5.     On EVERY device, BEFORE turning iCloud back on on ANY of them: Change the colors and/or names of calendars, delete calendars, etc. so that the calendar names and colors on the device are exactly the same as what you left in iCloud.com in the last step.
    6.   One at a time on each device, go back to Settings and then "iCloud" and check again the box for "Calendars."  You will be asked whether you want to "MERGE" your data with iCloud.  I selected MERGE to ensure I didn't lose anything.  Link each device again into iCloud one at a time.
    7.  When each device is back, go back to iCloud on the Web, or go into iCAL on one of your devices.  Set to view ALL calendars.  Look for duplicates of some of your events.  I found quite several as an artifact of "merging", but in my case it only took me about 5 minutes to go through quickly and delete the duplicates.  It deleted the duplicates on all of the devices at once, so I only needed to delete dups on one device.  I did not find that I lost any events as long as I kept one valid copy.
    Again, no guarantees...hope this works for others.  Good luck.

    I'm getting the same thing and it's really bugging me! Keeps changing colour to one I do not want and I have tried everything to get it to stay the colour I have chosen!!

Maybe you are looking for

  • How do I find the pixel size of a photo?

    I have taken a photo or found one online. It's now on my ipad. How do I tell the pixel resoution of the photo via the ipad? I have two of the same photos on my device at the moment and want to delete one.  They may both be 2048/2048, but without emai

  • Custom dynpro in CL24N

    Hi experts! I'm trying to use a custom dynpro in the CL24N transaction, but something doesn't work. From the SPRO transaction I go here: Cross-Application Components-> Classification System -> Classes -> Maintain Object Types and Class Types here I c

  • Unable to install adobe flash

    Unable to install adobe flash despite forum help.  Any advice?

  • Strange PriorityQueue behaviour

    Hey all, Im observring somr rather peculiar behaviour with a PriorityQueue. Essentially I make a check that PriorityQueue pq has some elements in it i.e. if(pq.size()>0){ // Then, I try and access (pop) the element at the head of the queue: element =

  • Shuffle locks up when songs are added

    I have Reset, Restored, Reinstalled, and I am still having trouble with the Shuffle. It syncs fine to iTunes and shows up in the Devices section. As soon as I drag a song, or any number of songs to the device to add them, the display in iTunes reads