Skip to Content
avatar image
Former Member

DateNavigator colour

Hi!

I have a problem with date navigator.

I have add legend and marking and I have bound it to context.

The Legend String is visible but there is no color in front of the Text.

And in the date Navigator the committed dates are not marked.

If somebody can tell me what I have to do to get color for my dates.

Thanks

Hermann

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Dec 14, 2006 at 09:36 AM

    Hi,

    1. Create a DateNavigator UI element.

    2. Insert a marking in the context of the DateNavigator element.

    3. Create a value node in the context and and 2 value attributes inside the node. one attribute say va_Date of type date and another attibute say va_Category of type com.sap.ide.webdynpro.uielementdefinitions.DateMarkingCategory.

    4. Bind the value node to the datasource property of the Marking.

    5. Bind the valuenode.va_Date to the date property of the Marking.

    6. In the implementation just do the following code.

    For Example do this in ur Init method.

    //Selecting a value by default

    java.sql.Date jsqlD = java.sql.Date.valueOf( "2006-11-30" );

    IPrivate<view>.I<nodeelement> ele = wdContext.create<nodeelement>;

    // Setting color to the given date.

    ele.setVa_Category(WDDateMarkingCategory.TWO);

    ele.setVa_Date(jsqlD);

    wdContext.nodeVn_Marking().addElement(ele);

    This should do.

    Regards,

    Nagarajan.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 14, 2006 at 01:01 PM

    Hi!

    Niagara thanks for your help.

    Now i have one Color in the Astronavigation but i wont 4 Colors.

    I made it so:

    java.sql.Date date = Java("2006-12-20");

    Privateers dele = wdContext.createMarkingElement();

    ele.setVa_category(<b>WDDateMarkingCategory.TWO</b>);

    ele.setVa_date(jdate);

    wdContext.nodeMarking().addElement(ele);

    jdate = java.sql.Date.valueOf("2006-12-30");

    ele = wdContext.createMarkingElement();

    ele.setVa_category(<b>WDDateMarkingCategory.ONE</b>);

    ele.setVa_date(jdate);

    wdContext.nodeMarking().addElement(ele);

    but on the screen there is only one color.

    In the Legend there is also no Color in front of the Description.

    What can i to get 4 Colors?

    thanks,

    Hermann

    Add comment
    10|10000 characters needed characters exceeded