on 08-06-2007 10:44 AM
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);
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.