use of org.alfresco.web.ui.common.component.UIListItem in project acs-community-packaging by Alfresco.
the class SidebarBean method getPlugins.
// ------------------------------------------------------------------------------
// Bean Getters and Setters
/**
* Returns a list of configured plugins
*
* @return List of UIListItem's representing the plugins available
*/
public List<UIListItem> getPlugins() {
if (this.plugins == null) {
FacesContext context = FacesContext.getCurrentInstance();
this.plugins = new ArrayList<UIListItem>();
// create a list entry for each configured plugin
for (String pluginId : this.sidebarConfig.getPlugins().keySet()) {
SidebarPluginConfig plugin = this.sidebarConfig.getPlugin(pluginId);
// resolve the label for the plugin
String label = plugin.getlabelId();
if (label != null) {
label = Application.getMessage(context, label);
}
if (label == null) {
label = plugin.getlabel();
}
if (label == null) {
label = plugin.getId();
}
// resolve the description (tooltip for the plugin)
String tooltip = plugin.getDescriptionId();
if (tooltip != null) {
tooltip = Application.getMessage(context, tooltip);
}
if (tooltip == null) {
tooltip = plugin.getDescription();
}
UIListItem item = new UIListItem();
item.setValue(plugin.getId());
item.setLabel(label);
if (tooltip != null) {
item.setTooltip(tooltip);
}
this.plugins.add(item);
}
}
return this.plugins;
}
use of org.alfresco.web.ui.common.component.UIListItem in project acs-community-packaging by Alfresco.
the class UsersDialog method getViewItems.
public List<UIListItem> getViewItems() {
FacesContext context = FacesContext.getCurrentInstance();
List<UIListItem> items = new ArrayList<UIListItem>(1);
UIListItem item1 = new UIListItem();
item1.setValue(VIEW_DETAILS);
item1.setLabel(Application.getMessage(context, LABEL_VIEW_DETAILS));
items.add(item1);
return items;
}
use of org.alfresco.web.ui.common.component.UIListItem in project acs-community-packaging by Alfresco.
the class RulesDialog method getFilterItems.
public List<UIListItem> getFilterItems() {
FacesContext context = FacesContext.getCurrentInstance();
List<UIListItem> items = new ArrayList<UIListItem>(2);
UIListItem item1 = new UIListItem();
item1.setValue(INHERITED);
item1.setLabel(Application.getMessage(context, INHERITED));
items.add(item1);
UIListItem item2 = new UIListItem();
item2.setValue(LOCAL);
item2.setLabel(Application.getMessage(context, LOCAL));
items.add(item2);
return items;
}
use of org.alfresco.web.ui.common.component.UIListItem in project acs-community-packaging by Alfresco.
the class UserMembersBean method getFilterItems.
/**
* @see org.alfresco.web.bean.dialog.FilterViewSupport#getFilterItems()
*/
public List<UIListItem> getFilterItems() {
FacesContext context = FacesContext.getCurrentInstance();
List<UIListItem> items = new ArrayList<UIListItem>(2);
UIListItem item1 = new UIListItem();
item1.setValue(INHERITED);
item1.setLabel(Application.getMessage(context, INHERITED));
items.add(item1);
UIListItem item2 = new UIListItem();
item2.setValue(LOCAL);
item2.setLabel(Application.getMessage(context, LOCAL));
items.add(item2);
return items;
}
use of org.alfresco.web.ui.common.component.UIListItem in project acs-community-packaging by Alfresco.
the class GroupsDialog method getViewItems.
// ------------------------------------------------------------------------------
// ChangeViewSupport implementation
public List<UIListItem> getViewItems() {
FacesContext context = FacesContext.getCurrentInstance();
List<UIListItem> items = new ArrayList<UIListItem>(2);
UIListItem item1 = new UIListItem();
item1.setValue(VIEW_ICONS);
item1.setLabel(Application.getMessage(context, LABEL_VIEW_ICONS));
items.add(item1);
UIListItem item2 = new UIListItem();
item2.setValue(VIEW_DETAILS);
item2.setLabel(Application.getMessage(context, LABEL_VIEW_DETAILS));
items.add(item2);
return items;
}
Aggregations