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.

Similar Messages

  • What is the correct way to add behaviors to text?

    I seem to be having trouble adding behaviors properly.
    What I'd like to do is select a few words of text and apply a behavior to them, in particular the behavior Open Browser Window when a user clicks on the selected text. I've gotten this work in what I'm sure is not the correct way. The only way I can get it to work is if the text link also has an a href link set up (through the Properties Inspector) pointing back to this same page. Now if I simply select some text and go to add a behavior to it through the tag inspector panel a lot of my choices are greyed out. I'm not super code-savy but do I understand that these behaviors should / can only be applied to tags? 
    You can see samples of what I'm talking about here: http://www.philasecurities.com/luncheon_meetings.html. In the luncheon schedule, click on the "more…" links and a new, small browser window should open. 
    How should I be applying these correctly?
    Thanks,
    John

    Pop-up Window in Dreamweaver (Behaviors Panel)
    1.  Insert an image or type some text.
    2.  Select it and go to the Properties Panel link field.  Browse for the file or type the full URL (http://example.com).
    3.  Go to the Behaviors Panel and hit the plus sign to add a new behavior.
    4.  Select Open Browser Window.
    5.  Browse to file or type the URL (Yes, a 2nd time).
    6.  Set the height, width and other optional attributes for your pop-up window. (See link below for details)
    http://help.adobe.com/en_US/dreamweaver/cs/using/WSc78c5058ca073340dcda9110b1f693f21-7b07a .html
    7.  Hit OK.
    8.  Verify that the behavior's trigger event is onClick.  If it's not, click the event box to show other trigger options.
    9.  IMPORTANT!  Go back to the Properties Panel and replace the first URL in the link field with javascript:() which makes the primary link into a null link.  If you don't do this, the link will open twice: once in the pop-up window and again in the parent window.
    Save your page and preview in browsers.
    PS. It takes longer to explain all these steps than it does to do it.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • The correct way to add a second CSS file

    Running Creator 2U1 on Windows XP
    What is the correct way to add a second CSS file to the project?
    here is a section of the Page1.JSP file:
    <ui:head binding="#{Page1.head1}" id="head1">
    <ui:link binding="#{Page1.link1}" id="link1" media="all" url="/resources/stylesheet.css"/>
    </ui:head>
    simply duplicating the line as such crashes the application:
    <ui:head binding="#{Page1.head1}" id="head1">
    <ui:link binding="#{Page1.link2}" id="link2" media="print" url="/resources/print.css"/>
    </ui:head>
    How to do it??
    Thanks

    The method provided does bring the css file into the current environment
    However, I need to actually have the pages use the information within the stylesheet
    I guess I need to know how to get the css entry into the JSP page
    As noted earlier, simply including the (second not counting the master) css file into project and duplicating the "stylesheet.css entry (changing the link1 to link2) causes the application to fail on the "link2" entry
    can anyone help me here..
    Thanks

  • What is the correct way to format file paths and names in the structapp file?

    I am trying to create a structured application to export fm files as xml, and probably read the xml back to fm.
    In the structured application file (structapp), I need to specify the locations of the various files (DTD, read/write, template, etc). I would like to place these files on a shared server so others can use the same structapp file (that is, a cop of it). What is the correct way to format the file paths and names? Can folders folder names and file names have spaces in them? I tried the following, for example:
    \\serverName\shareName\folder 1\folder 2\file name.dtd
    I use the same format for the template file and the read/write rules file.
    When I try to save an fm file to xml, FrameMaker says that it cannot read the DTD; however, the resulting xml file appears to be well-formed. The DOCTYPE element in the resulting xml is formatted with forward slashes and spaces replaced with %20.
    I tried using forward slashes and replacing spaces with %20, but then I get an error about reading the read/write rules.
    NOTE: I have another structured application to read xml into fm. This application does not have a DTD file. The template and read/write rules files are specified as above. Except for complaining about a lack of a DTD, the application works fine; it even applies an XSLT in the process. Again, when I DO add a DTD to this latter application, I get the same complaint about not being able to read the DTD.
    I am using fully patched FrameMaker 9 in Windows XP.
    Thanks,
    Van

    Hi Van,
    The XML parser and FrameMaker are not the same thing. The Error Log says which component created which message. The XSL processor is another option that can throw messages. The "\\server\path\some.dtd" syntax in structapps.fm seems to be fine for some tools, as Internet Explorer with XML tools successfully finds the DTD which appears as "//server/path/some.dtd" in the XML. But apparently Xerxes, the XML parser bundled with FrameMaker, does not like this notation.
    If you have a path with a drive letter, "H:\path\some.dtd", FrameMaker turns that into "file:///H:/path/some.dtd". It seems, Xerces would like to see "file:/" in front of absolute paths.
    This is what I have in structapps.fm:
    Template: \\server\path\projecttemplate.fm
    DTD: some.dtd
    Read/write rules: \\server\path\projectrules.txt
    DOCTYPE: …
    Entity locations
      Entity search paths
        1: \\server\path\
    In the structapps.fm I have the DTD without path information. The resulting XML (without XSL postprocessing) then contains just the file name with a relative path back to the book folder (when saving a book as XML). It therefore requires the DTD to be available at this place. I handle this using an event script that fires for NotePreSaveXml and copies the DTD to the folder of the original document.
    As I always use XSL postprocessing and using XSLT1 it is not possible to have the doctype-system as a parameter I have this in my XSL stylesheet:
    <xsl:output doctype-system="some.dtd" />
    For the resulting XML the DTD is expected to be in the same folder as the XML file. This is handled by the same event script as above, it therefore copies the DTD to the source and the target folder.
    Bottom line: If you want/have to use UNC paths, you have to do some programming to work around a FrameMaker bug.
    - Michael

  • What's the easiest way to add storage to a mac mini. (1TB hard drive but only 32G of real storage). External device, internal or partitioning?

    What's the easiest way to add storage to a mac mini. (1TB hard drive but only 32G of real storage). External device, internal or is there some way to partition? I tried doing so but received a message that there wasn't enough free space to partition. Seems like a 1TB drive should have more storage than my Ipad

    Its worth confirming what free space you have on your drive: 
    go to:   Apple Menu > About this Mac >  More Info > Storage
    The bar chart shows how much free space there is on the drive:
    Please realise that partitioning does not create extra space so this wont help you.
    If your free space is less than 20 % you should get extra storage with an external USB or Firewire drive, any make or model will work.

  • What's the right way to add a swipe handler to a DataGrid?

    H All:
    What’s the right way to add a swipe handler to a DataGrid?
    (Target = Android, AIR using Flash IDE)
    Adding a handler to the DataGrid works; but (as expected) it only works on  the datagrid itself. Like if you swipe on the background before rows are fully  added. Adding columns over the datagrid, prevents the datagrids’ swipe handler  from firing.
    Trying to add a swipe hander to the columns themselves, results in the  below error.
    //  Below code fails with
    //  1061: Call to a possibly undefined method addEventListener through a reference with static type
    //   fl.controls.dataGridClasses:DataGridColumn.  So ... DataGridColumn doesn’t support addEventListener...
    There must be a better way(?).
    Thanks
                import fl.controls.DataGrid;
                import fl.controls.dataGridClasses.DataGridColumn;
               // Works, but only on the grid itself; as when the rows do not  fill the space tor the datagrid.
                myDataGrid.addEventListener  (TransformGestureEvent.GESTURE_SWIPE, swipeGridHandler);
                var c1:DataGridColumn = new DataGridColumn("Notes"); 
                c1.width = 90;
                c1.cellRenderer = CenterAlignCell;
                c1.addEventListener (TransformGestureEvent.GESTURE_SWIPE,  swipeGridHandler);

    Adobe list of properties and methods:
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/dataGridCla sses/DataGridColumn.html

  • 1.4.2 - What is the correct way to format output in the java.io.PrintStream

    With Java 1.4.2:
    What is the correct way to format output in the java.io.PrintStream?
    The following is incorrect, even though it is still used in the The JavaTM Tutorial at: http://java.sun.com/docs/books/tutorial/essential/
    System.out.formatThis returns "cannot resolve the method 'format'"
    Any detailed suggestions or information is greatly appreciated.

    The following is incorrect, even though it is still
    used in the The JavaTM Tutorial at:
    http://java.sun.com/docs/books/tutorial/essential/
    The whole format thing has been introduced in 1.5. The tutorial also states it's been "updated to 1.5.".
    That's all I've got to say for I don't know how you can format a PrintWriter, let alone a PrintStream, prior to 1.5. I'm not really sure there is any way. Any "legacy way", that is. There almost certainly are third-party API which achieve similar results.

  • What is the easiest way to add a slide show to a dream weaver page?

    What is the easiest way to add a slide show to a dream weaver page?

    Copy & paste the following code into a new, blank document.  Change images to your own.  SaveAs test.html and preview in browsers. 
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5 with Cycle2</title>
    <!--help for older IE browsers-->
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <!--Latest jQuery Core Library-->
    <script src="http://code.jquery.com/jquery-latest.min.js">
    </script>
    <!--Cycle2 Slideshow Plugin-->
    <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery.cycle2/20130409/jquery.cycle2.min.js"></script>
    <style>
    /**Slideshow**/
    .cycle-slideshow {
        position: relative;
        z-index: 1;
        width: 400px; /**adjust width as required**/
        margin:75px auto;
        text-align: center;
    .cycle-slideshow img { max-width: 100% }
    /* prev / next links */
    .cycle-prev, .cycle-next {
        position: absolute;
        top: 0;
        width: 20%;
        opacity: 0;
        filter: alpha(opacity=0);
        z-index: 800;
        height: 100%;
        cursor: pointer;
    .cycle-prev {
        left: 0;
        background: url(http://malsup.github.com/images/left.png) 50% 50% no-repeat;
    .cycle-next {
        right: 0;
        background: url(http://malsup.github.com/images/right.png) 50% 50% no-repeat;
    .cycle-prev:hover, .cycle-next:hover {
        opacity: .7;
        filter: alpha(opacity=70)
    /**END SLIDESHOW STYLES**/
    </style>
    </head>
    <body>
    <h1><a href="http://jquery.malsup.com/cycle2/">JQuery Cycle2</a></h1>
    <!--begin slideshow-->
    <div class="cycle-slideshow"
        data-cycle-fx="fade"
        data-cycle-timeOut="2000"
        >
    <!-- prev/next links -->
    <div class="cycle-prev"></div>
    <div class="cycle-next"></div>
    <!--insert your images below-->
    <img src="http://jquery.malsup.com/cycle2/images/p1.jpg" alt="description">
    <img src="http://jquery.malsup.com/cycle2/images/p2.jpg" alt="description">
    <img src="http://jquery.malsup.com/cycle2/images/p3.jpg" alt="description">
    <img src="http://jquery.malsup.com/cycle2/images/p4.jpg" alt="description">
    <p>Mouse over image for previous / next links</p>
    </div>
    <!--end slideshow-->
    </body>
    </html>
    Nancy O.

  • What is the best way to add text to an image

    I used the draw ap div to add text to an image.  will that cause any problems?  If so, what is the best way to add text to an image?  Thanks!

    APDivs will kill your design unless you fully understand the css behind the scenes and plan accordingly. They really are completely unnecessary in the vast majority of situations.
    An easy way to add "web text over an image" would be to use the background-image attribute in css for a standard <div> tag, then just add the text within that same <div>.
    Something like this in the css (if you are using a 300x300 pixel image)...
    #yourdiv {
         background-image:url(yourpic.jpg);
         width:300px;
         height:300px;
    And then this in the html...
    <div id="yourdiv">Your text here</div>
    You would then position the <div> using css margins, floats and padding. Using position:absolute (APDivs) is typically something that will blow your design to pieces if the viewer changes their browser settings.

  • What is the best way to add hard disk space to macbook pro?

    I'm running out of disk space on my macbook pro. What is the best way to add disk space?

    another way of doing it is to replace your hard drive with a larger one.
    if you're technically capable, it takes 10 minutes for the swap and an hour minimum to clone your hard drive or do a data transfer.  all depends on how much data there is to trandfer or to clone.
    good luck.

  • What is the best way to add libraries to a project?

    What is the best way to add technologies to ADF? For example log4j. Or does the embedded logger have log4j features?

    HI,
    Hope helpful
    http://technology.amis.nl/blog/8380/manage-jdeveloper-external-libraries

  • What is the Best Way to add a shopping cart?

    What is the best way to add a shopping cart?
    Thanks.

    See that field at the top right that says "Search Forums"? Try Dreamweaver shopping cart. You'll get a lot of answers.

  • What is the correct way to upgrade 5.0.4 to 5.1 Universal?

    I just received Final Cut Studio Universal, and I have Final Cut Pro 5.0.4 installed what is the correct way to upgrade all the Final Cut Studio applications? Do install over or delete each application and then reinstall?
    As always thanks in advance for reading and replying to my Post,
    Sebastian

    WHEN I do it, I'm going to archive what's necessary and desirable to keep, erase my hard drive, reinstall Tiger, do the upgrades, then install 5.1 clean and do the upgrades.
    Might sound like overkill, but I really love a clean, fast machine and nothing does it better!

  • What's the correct way to handle changes in RDBMS/DBadapter?

    In my project all changes to the database are not done via Jdeveloper but via TOAD. This means DBadapters must be made aware of changes in the database.
    I tried to re-run the DBad.apter wizard twice (2 different services) - to make it aware of changes in the DB. Both times it failed. I think was after the import database tab. The next tab was just blank.
    So what's the correct way of reconile changes in the db backwards into Jdev?
    BTW, in the DBadapter wiz its not possible the remove a already imported table. How do I come across the situation where I want the DBadapter to point to af different table? - and possibly remove old references to another one - which might have been removed in the DB.
    As It is now - I have to re-work all my DBadapters, which is not very much fun...
    Rgds, Henrik

    Trust me, I hv done that umpteen nbr of times.
    I hate BA's coming to me with changes, for which I hv to modify the DB adapter.
    One big loop-hole with BPEL is if we try to modify the adapters/toplink, it doesnt tend to work properly.
    The manthra for such modifications is ... "recreate", which is definetely not a good practise.
    You may not like but gottu live with it, my friend.
    Pointing to a different table, I achieve it by doing a "Shift+Delete" to all the references of the old table in the BPEL project ... :|
    There isnt a specific provision in the wzd (I am not sure of the latest version, though).

  • What is the correct way to charge mac air battery?

    what is the correct way to charge macbook air battery? mine is a 2011 mac air

    Apple - Batteries - Notebooks

Maybe you are looking for

  • 3ivx.dll was not found

    When I try to open itunes I get this msg: this application has failed to start because 3ivx.dll was not found. If I completely uninstall itunes and reinstall it, it will work for that session. If I close it down and try to reopen I get the error msg

  • Inconsistent Errors when processing  IDocs using custom Function Module

    I am encountering a most perplexing error. Here is the situation. We have a custom function module to update data in the EH&S system. We are having a bizarre error occurring. This is the basic processing of the function module: 1. IDoc data is read a

  • Allowing only ONE instance of a PDF to be open

    I'm trying to work out a new system for proofreading and commenting in our business using the Comment and Markup tools in Acrobat 8 Professional. I'd like to allow multiple users on a network to interact and markup a PDF easily. I'd like to make it s

  • 'An unexpected error occurred' using AirPort Utility to configure an Extreme

    Hi all, I've been fighting with this problem for a while. I have a 2011 Mac Mini running OS X 10.7.5 and AirPort Ulility 6.2. I also have a new-ish AirPort Extreme A1408. They've never really seemed to work properly together. The only way to configur

  • Video playback on older (slower) computers

    I tested a Flex application I've been working on with my old computer and the playback of audio and video using the VideoPlayer component is essentially non-functional, even after waiting for the source to load completely. The computer in question: m