Skip to Content
0
Former Member
May 30, 2007 at 04:43 PM

bindSelectedKey Question

14 Views

I have the below context structure and am trying to create DropDown UI objects and lists dynmically. Further below is the code I have

thus far; most of it taken from the example. I think I understand what is happening up to this point however I don't undstand

what to pass to the bindSelectedKey to get the "response_text" shown in the picklist but have the "response_value" stored as the

selected option.

Any help would be much appreciated.

/Greg

C_Quest_Resp (0..n, s=true)
 - question_text
 - ...
 - ...
 + Responses (0..n, s=true)
    - response_text
    - response_value	
    - ...

// Multiple questions each having an element (Responses) which contains list of applicable responses.



 if (firstTime) {
    	
		IC_quest_respElement qNode;
		int noQuestions = wdContext.nodeC_quest_resp().size();
		
		for ( int i = 0; i < noQuestions; i++ ) {
			
			qNode = wdContext.nodeC_quest_resp().getC_quest_respElementAt(i);
			
			IWDDropDownByKey dropDown = (IWDDropDownByKey)view.createElement(IWDDropDownByKey.class,
			                                                                 "inp" + i );

			/** Trying to understand how I will handling binding. **/											 
			// dropDown.bindSelectedKey()
			
			
		}
    	
    }