Java Code Examples for org.apache.struts.util.LabelValueBean#setLabel()

The following examples show how to use org.apache.struts.util.LabelValueBean#setLabel() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SummariesControlAction.java    From fenixedu-academic with GNU Lesser General Public License v3.0 5 votes vote down vote up
private List<LabelValueBean> getAllDepartments(Collection<Department> allDepartments) {
    List<LabelValueBean> departments = new ArrayList<LabelValueBean>();
    for (Department department : allDepartments) {
        LabelValueBean labelValueBean = new LabelValueBean();
        labelValueBean.setValue(department.getExternalId().toString());
        labelValueBean.setLabel(department.getRealName());
        departments.add(labelValueBean);
    }
    Collections.sort(departments, new BeanComparator("label"));
    return departments;
}
 
Example 2
Source File: RhnAction.java    From uyuni with GNU General Public License v2.0 4 votes vote down vote up
protected void localize(Collection lvList) {
    for (Iterator i = lvList.iterator(); i.hasNext();) {
        LabelValueBean lv = (LabelValueBean) i.next();
        lv.setLabel(LocalizationService.getInstance().getMessage(lv.getLabel()));
    }
}
 
Example 3
Source File: RhnAction.java    From spacewalk with GNU General Public License v2.0 4 votes vote down vote up
protected void localize(Collection lvList) {
    for (Iterator i = lvList.iterator(); i.hasNext();) {
        LabelValueBean lv = (LabelValueBean) i.next();
        lv.setLabel(LocalizationService.getInstance().getMessage(lv.getLabel()));
    }
}