How to highlight days in IWDDateNavigator

Dear Web Dynpro Java experts,
I try to highlight vacation days dynamically in a DateNavigator element.
I didn't understand the UI elements guide and I'm desperately looking for an example how to
assign a Datenavigator legend to a datenavigator and how to highlight some days dynamically.
What I don't understand is how to assign a marking to a legend and how to assign a special date to a marking/legend.
IWDView thisView = (IWDView) wdControllerAPI;
IWDDateNavigator DateNavigator = (IWDDateNavigator) thisView.getElement("DateNavigator");
DateNavigator.setFirstSelectedDate(Date.valueOf("2009-03-24"));
DateNavigator.setLastSelectedDate(Date.valueOf("2009-04-21"));
IWDDateNavigatorLegend DateNavigatorLegend = (IWDDateNavigatorLegend) thisView.createElement(IWDDateNavigatorLegend.class, "DateNavigatorLegend" );
DateNavigatorLegend.setText("test");
IWDDateNavigatorMarking DateNavigatorMark = (IWDDateNavigatorMarking) thisView.createElement(IWDDateNavigatorMarking.class, "DateNavigatorMark" );
DateNavigatorMark.setCategory(WDDateMarkingCategory.ONE);
DateNavigator.setLegend(DateNavigatorLegend);
DateNavigator.setMarking(DateNavigatorMark);
Edited by: Daniel Wetzler on Apr 16, 2009 7:25 PM

Okay, it's not too difficult if you know where to search...
But since I searched for a long time for a manual to solve this problem I don't want to keep secret my findings :
I will describe what I've done since I wasn't able to find an example here in a forum or the other docmentation :
(I used Netweaver 2004.)
Prerequisite is an Context Node with 3 Attributes in my case :
Node "Data" with 3 attributes
category (type : type     com.sap.ide.webdynpro.uielementdefinitions.DateMarkingCategory)
date (type: date)
tooltip (type : string)
First I created the Datenavigator using the View Designer.  After selecting the DateNavigator element I could click using the right mouse button on the DataNavigator in the Outline.
I chosed "Insert Legend" and "Insert Markup" to create the DateNavigatorLegend and DateNavigatorMarkup instances and bind them to the DateNavigator.
The Tree view showed the Legend and the markup object.
By clicking onto these objects and editing the properties window for them I could assign the node I described above as data source for the Legend and the Marking. I also filled the fields for tooltip, category and so on with the suiting parts of my structure.
For example :
Legend :
category = Data.category
datasource = Data
text = Data.tooltip
Marking
category = Data.category
datasource = Data
tooltip = Data.tooltip
date = Data.date
The only thing I had to do now was to fill my node with the data to display
marked days (in my example I did it in the wdDoInit of my view):
java.util.Date mydate;
mydate = Date.valueOf("2009-04-21");     
IWDNodeElement Dataele = wdContext.nodeData().createElement();
Dataele.setAttributeValue("category", WDDateMarkingCategory.ONE );
Dataele.setAttributeValue("date", mydate );
Dataele.setAttributeValue("tooltip", "Date" );
wdContext.nodeProjectData().addElement(Dataele);
To display marks of another Category I only had to add another elements to my node.
Of course it is much better to create an extra node for Legend data.

Similar Messages

  • How to highlight days in Calendar Week view

    I miss the old system of highlighting the current day's column (in "Week View"). It was eye-catching. The red dot doesn't do it for me.
    Is there any way to get that feature back?
    P.S. - I wish Jon Ive would go back to designing hardware. There is such a thing as "over minimization".

    I miss the old system of highlighting the current day's column (in "Week View"). It was eye-catching. The red dot doesn't do it for me.
    Is there any way to get that feature back?
    P.S. - I wish Jon Ive would go back to designing hardware. There is such a thing as "over minimization".

  • How to highlight an event in monthly calendars

    How to highlight an event in monthly calendars

    If they are All-Day events, then they will be overlaid with the Calendar color. If they are not all-day, then they will just have a dot. There is no way to alter that behavior.

  • How to highlight/indicate particular tree Node in Tree UI element

    Hi All
    Can anybody let us know how to highlight/indicate specific node in a tree struture.
    currently i am able to display the tree struture with all the nodes & elements but it is always tasking firstnode as highlighted one or indicated one.
    if i want to highlight specific node in a tree struture...what was the procedure or any sample code then it would be great help to us.
    Thanks
    Trisha rani

    Hi Krishna
    Thanks for your reply
    I displayed the tree structure and i want to highlight specific parent node/child element , what was the sample code??
    for example my tree was displayed in the below struture and at the runtime specific child node i wanted to be highlighted i want to make selectable particular nodeType......
    Can you pls send sample codee code??
    my requirement
    A
    A1
       A2
       A3
    B
    B1      
       B2
       B3
       B4
       B5     
    now i want to make selectable or highlighted B4,B5 etc  or A2,A3 at runtime.
    The other guy who replied for this thread it is working for Parent nodes to make highlighted  like it is working for parent nodes which is have child nodes. i am able to hightlight at runtime for Nodes A,B etc .
    Now i want to highlight or make selected one for B4,A3 etc, pls provide sample code??
    it  would be great help to us
    Thanks
    Trisha Rani

  • Please give me idea how I highlight the gird row which have

    Sir
    I have gird with 5 column
    Vno
    Code
    Dept
    Date
    Amount
    Sir my need is which record have above 5000 amount that color read and other color blue
    It means above 5000 highlight in grid
    Please give me idea how I highlight the gird row which have above 5000 maount
    Thank
    aamir

    PROCEDURE pr_Set_VA (p_VA IN VARCHAR2) IS
    v_Feld VARCHAR2 (30);
    v_Item VARCHAR2 (61);
    v_Block VARCHAR2 (30);
    BEGIN
    v_Block := :SYSTEM.CURSOR_BLOCK;
    v_Feld := Get_Block_Property (v_Block, FIRST_ITEM);
    WHILE (v_Feld IS NOT NULL) LOOP
    v_Item := v_Block || '.' || v_Feld;
    Set_Item_Instance_Property (v_Item, CURRENT_RECORD, VISUAL_ATTRIBUTE, p_VA);
    v_Feld := Get_Item_Property (v_Item, NEXTITEM);
    END LOOP;
    END;

  • How to highlight the messages in the WDA?

    hi experts,
                     Iam new to Webdynpro.i just want to know how to highlight the texts displayed . like BOLD,italic etc and also colors.
    Regards,
    murthy.

    I dont think you have it via standard message area. Probably you can have a TextView UI element and use the properties Design and semanticColor to achieve this. If you have a contextNode , thats mapped to the texview and message manager writing text to this node. Solution should work.
    Greetings
    Prashant

  • How to highlight a text in Pqges?

    Hi, does anyone knows how to highlight a text in Pages for iPad??

    If you would like to see this very basic function added to Pages for iOS in the future, let the good folks at Apple know of your needs:
    http://www.apple.com/feedback/

  • How Do highlight text in the body of an email message in Mac Mail?

    Can anyone tell if IF and HOW I can highlight text in the body of an email message using Mac Mail (in Yosemite).  I do NOT mean MARKUP an attachment.  I want to highlight a word or phrase in the body of my email message.  I know I can change the font color, but can't seem to add a highlight!  Thanks!

    Hi,
    is is possible, - link is below. Works on Yosemite, btw.
    http://www.mihalick.us/how-to-highlight-text-in-yellow-using-apple-mail/

  • How to highlight the whole row of a particular line item of sale

    How to highlight the whole row of a particular line item of sales order depending on condition?
    Please help its urgent..
    Looking forward your reply.
    Moderator message: please do more research before asking, show what you have done yourself when asking, do not flag posts as "urgent".
    [Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
    [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers]
    Edited by: Thomas Zloch on Aug 9, 2011 9:30 AM

    Any ideas on what would cause this NOT to work? I added this row right after the table is created and populated and it is still not highlighted when I enter the form. The snippet of code that does this is:
    MyTableModel modelS = (MyTableModel)dataModel.get("S");
    jTable1 = new JTable(modelS);
    jTable1.setRowSelectionInterval(0,0);MyTableModel is this:
    class MyTableModel extends DefaultTableModel {
      public MyTableModel(Object[] columnNames, int numRows) {
        super(columnNames, numRows);
      public boolean isCellEditable(int row, int column) {
        if (TableKey == 'S') {
          if (column == 6) {
            return false;
        if (TableKey == 'O') {
          if (column == 0 || column == 4 || column == 5) {
            return false;
        if (TableKey == 'P') {
          return false;
      return true;
    }Can anyone help? Thanks.
    Allyson

  • How to highlight text in JTextField?

    Hi all, I know this is a very simple question but I just couldn't find its solution and I'm rushing for my project.
    My question is: how to highlight all the text in JTextField when it gets focus?
    Thanks a lot in advance!
    Janet

    You have to add a FocusListener in the JTextField and override the focusGained() method to select all the text with JTextField.selectAll().
    class MyFrame {
      JTextField text = new JTextField();
      // when creating the frame
      text.addFocusListener(new FocusAdapter() {
        public void focusGained(FocusEvent e) {
          doSelectAllText(); 
      void doSelectAllText() {
        text.selectAll();
    }Hope this help.

  • How to highlight text in the iCloud web app

    Hi,
    My computer recently broke so I had to use my mom's windows computer to do my homework. I had to use the iCloud web app Pages to do my homework. My assignment requires to be able to highlight stuff so does anyone know how to highlight text in the iCloud web apps?

    You can do this easily by using a "modify class" parameter in your web template.
    Following methods are of your interest to change char/KF headers.
    CAPTION_CELL          changes formats/values of characteristic headers
    STRUCTURE_CELL          changes formats/values of key figure headers
    Hope it helps.
    Hari Immadi
    http://immadi.com
    SEM BW Analyst

  • Can I buy an unlock iphone 5 in US now?  If I can, how many business days can I get it?

    Can I buy an unlock iphone 5 in US now?  If I can, how many business days can I get it?  Thank you!

    Yep, officially for sale now. Apple's online store shows it ships immediately, so should be in stock at just about every Apple store.

  • How to view day wise depreciation report .

    Dear experts,
    How to view day wise depreciation report .
    Regards,
    hari.guntupalli

    Hi
    IMP -
    Go to T code AFAMA - select Day to the day check box And period control according to the fical years
    Then Go to AW01N
    Thanks
    P J Anil kumar

  • How to highlight the repeated records in a BO crystal report?

    Hi ,
    How to highlight the repeated records in a BO crystal report?
    we want to highlight the rows for which account number is same.
    thanks
    sriram

    You don't even need to create a group.  Just sort the records on the fields that define "duplicate".  Then you can just use
    if {field} = PreviousValue({field}) then crYellow else crNoColor
    in the format's Background Color formula.  This will cause the background to be yellow on duplicates.  (If you need to check more than one field in order to determine duplicates, just insert
    and {field2} = PreviousValue({field2}
    and so on for each field that needs to be checked.
    HTH,
    Carl

  • How to highlight invalid component in custom validator?

    Hi
    I have created a custom validator to verify two DateField components, and the doValidation() is working so far so good.
    The question is, how to highlight the two DateField components when the validation failed?

    The problem is solved by override the actualListeners() to return the two DateFields.

Maybe you are looking for

  • WebDynpro, Table, selected rows, multiselect

    Hi together, I've got a problem with my "table-control" in WebDynpro. I just want to read the selected rows in the tablecontrol. To read one row is no problem: wdContext.currentnode..... But if there are more selected rows I don't know how to handle.

  • ICI CCM Extractor - allocation of SolMan installation Number

    Hi experts When configuring the iCI extractors via the measurement platform setup, the installation number for the local solman is being picked rather than the installation number for the managed system.  This results in the extractor failing with a

  • Cannot create shortcut on Mac

    <?xml version="1.0" encoding="utf-8"?> <jnlp spec="1.0" xmlns:jfx="http://javafx.com" href="Test.jnlp"> <information> <title>PriceBook</title> <vendor>XXXXXXX</vendor> <description>XXXXXXXX</description>      <icon href="XXXXXXX" kind="shortcut" /> <

  • CS 3 Design Premuim Installation

    I have never owned a program with such LOUSY SUPPORT. I went from all of the Cs3 working except the help files. Foolishly I let Adobe convince me to unload the program and then try to re install. After every fix they could come up with and 2 weeks I

  • Help!!! Photoshop can't open

    'I used frequently Photoshop, but last week i cannot open these application. Double click doesn't open Adobe Photoshop CS2 for Macintosch, no message. 'I have read all the topics on the forum : : I have deleted three times correctlly this application