Skip to Content
0
Former Member
Jun 16, 2009 at 10:16 PM

Pre-select dropdown by key.

23 Views

I am using this code to pre-select dropdown by key...

// Pre-select the selected competency
	for(int i = 0; i < wdContext.nodeCoreCompetency().size(); i++){
		if(wdContext.nodeCoreCompetency().getElementAt(i).toString().equals(wdContext.currentCourseDetailsElement()
					.getCoreCompetency())){
						wdComponentAPI.getMessageManager().reportSuccess("Match found: "+i);
						  wdContext.nodeCoreCompetency().setLeadSelection(i);
						  break;
		}
	}

What is wrong with above code.

Thanks

Srinivas