cancel
Showing results for 
Search instead for 
Did you mean: 

data into a checkbox group

Former Member
0 Kudos

Hi all,

My conttext is MonthsOfYear--Node

MonthName--attribute

here i have to populate checkbox group with values as "Jan","Feb"....."Dec"and display the selected months in to a table....

Wat the problem here is By default Jan is getting selected and getting displayed in table eventhought we select something else than jan it is not getting considered...

the code i used for this is


String[] monthNames = new String []
		{

		   "January", "February", "March", "April",
		   "May", "June", "July", "August", 
		   "September", "October", "November", "December",
		};

	List monthsOfYear = new ArrayList();
	for (int i =  0; i < monthNames.length; ++i)
	{
		IPrivateChkView.IMonthsOfYearElement  Myear=wdContext.createMonthsOfYearElement();
		Myear.setMonthName(monthNames<i>);
		monthsOfYear.add(Myear);
		
	}
	wdContext.nodeMonthsOfYear().bind(monthsOfYear);

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

My guess is that the "initializeLeadSelection" property is set to true for context node "MonthsOfYear". Therefore, the first element in the checkbox group is selected by default. Either unset this property at designtime or clear the lead selection in the controller (e.g. in the wdDoInit method or the supply function of the node).

To keep the table in synch with the selected checkboxes, assign an action to the CheckBoxGroup.onSelect event. In the action handler, update the table data source node according to the selected entries (or invalidate the node and update its elements in a supply function).

Armin