1 | |
package org.kuali.student.lum.program.client.core; |
2 | |
|
3 | |
import com.google.gwt.user.client.ui.VerticalPanel; |
4 | |
|
5 | |
import org.kuali.student.common.assembly.data.Data; |
6 | |
import org.kuali.student.common.ui.client.configurable.mvc.binding.ModelWidgetBinding; |
7 | |
import org.kuali.student.common.ui.client.mvc.DataModel; |
8 | |
import org.kuali.student.common.ui.client.widgets.KSLabel; |
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | 0 | public class CredentialProgramsBinding implements ModelWidgetBinding<VerticalPanel> { |
14 | |
|
15 | |
@Override |
16 | |
public void setModelValue(VerticalPanel widget, DataModel model, String path) { |
17 | 0 | throw new UnsupportedOperationException("Operation is not supported"); |
18 | |
} |
19 | |
|
20 | |
@Override |
21 | |
public void setWidgetValue(VerticalPanel verticalPanel, DataModel model, String path) { |
22 | 0 | verticalPanel.clear(); |
23 | 0 | final Data credentialPrograms = model.get(path); |
24 | 0 | for (final Data.Property property : credentialPrograms) { |
25 | 0 | verticalPanel.add(new KSLabel(property.<String>getValue())); |
26 | |
} |
27 | 0 | } |
28 | |
} |