cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to insert multiples markings in a DateNavigator ?

Former Member
0 Kudos

Hi Experts !

I'm currently creating a DateNavigator, and the person for who I works would like to have 5 differents markings in one DateNavigator.

But in the Outline view, I have already one marking in the DateNavigator, and I can't add another with a right click on the DateNavigator...

So I ask myself if it is possible to have multiples marking in just one DateNavigator...

Please : Do you know if it possible ? And if yes, do you know how to do this ?

Thank you for advance,

Louis

Accepted Solutions (1)

Accepted Solutions (1)

former_member201361
Active Contributor
0 Kudos

Hi Louis,

But in the Outline view, I have already one marking in the DateNavigator, and I can't add another with a right click on the DateNavigator...

So I ask myself if it is possible to have multiples marking in just one DateNavigator...

it is not possible to add mutiple marking element to Date Navigator in Outline View of ur View. But u can have multiple marking in just one Date Navigator. uisng the semantics property in the Marking element, u can distinguish between other marked dates in date navigator.

for this u need to have a context attribute say "Semantics" of type "WDtableCellDesign" in the node which u have bound to date marking element.

let say : to high light date 1 and 3 , u can use "Calendar_Red" to highlight and to highlight 4 and 6 , u can use "Calendar_Green" sematic.

Hope it helps,

Thanks and Regards

Former Member
0 Kudos

Hi Fazal, thank you for your answer .

I therefore have two problems : it is written everywhere to take a WDTableCellDesign, but when I do this, I can't bind the context, because the Marking UI element says it inly accept "TableCellDesign" (but no WDtableCellDesign". So I don't know what type I should give to the Category attribute I created to stock which semantic I want.

In an other way, I go into the code, and I add a line in the date creation code, which is, in the end :

	  Calendar cal1 = Calendar.getInstance();
	  cal1.set(Calendar.YEAR,2009);
	  cal1.set(Calendar.DAY_OF_MONTH,22);
	  cal1.set(Calendar.MONTH,11);
	  ITestElement element1 = wdContext.nodeTest().createTestElement();
                        Date sqlDate1 = new Date(cal1.getTimeInMillis());
	  element1.setDate(sqlDate1);
	  element1.setTextMessage("Vacances annuelles");
	  element1.setCategory(Calendar_Red);
	  wdContext.nodeTest().addElement(element1);

But the Calendar_Red is underlined with the error message : "Calendar_Red cannot be resolved".

If I change this line but the following : element1.setCategory("Calendar_Red");

Then in this case, this is the setCategory which is underlined, with the error message :

The method setCategory(WDTableCellDesign) in the type

IPublicZtest02CompDateNavigator.ITestElement is not applicable for the arguments (String)

So please, do you have any idea of what I could have done wrong ?

Thank you for advance,

Louis

former_member201361
Active Contributor
0 Kudos

Hi Louis,

just change the Type of Category attribute. just select trhe attribute --> select Browse button --> simple Type > here navigate to com.sap.... UIdefinations> TableCellDesign.

in ur code, set the category as shown below.

element1.setCategory(WDTableCellDesign.CALENDAR_RED); /// calendar red or any colour

u will get a error , just click --> ctrlShiftO (organize imports).

Thanks and Regards

Former Member
0 Kudos

Thank you for this Fazal !

Just want to precise that it is CALENDAR_BLUE for example, but unfortunately, CALENDAR-RED doesn't exist

Answers (1)

Answers (1)

srinivas_sistu
Active Contributor
0 Kudos