Examples of ChoiceListValue


Examples of org.jahia.services.content.nodetypes.initializers.ChoiceListValue

                                                     Map<String, Object> context) {
        Map<String, Action> map = templateService.getActions();
        List<ChoiceListValue> vs = new ArrayList<ChoiceListValue>();
        for (Map.Entry<String, String> action : actionsMap.entrySet()) {
            if (map.containsKey(action.getValue()) || action.getKey().equals("default")) {
                vs.add(new ChoiceListValue(action.getKey(), new HashMap<String, Object>(), new ValueImpl(
                        action.getValue(), PropertyType.STRING, false)));
            }
        }
        return vs;
    }
View Full Code Here

Examples of org.jahia.services.content.nodetypes.initializers.ChoiceListValue

                JCRSiteNode site = node.getResolveSite();
                String[] activeLanguageCodes = site.getActiveLanguageCodes();
                List<ChoiceListValue> listValues = new ArrayList<ChoiceListValue>();
                for (String activeLanguageCode : activeLanguageCodes) {
                    Locale localeFromCode = LanguageCodeConverters.getLocaleFromCode(activeLanguageCode);
                    listValues.add(new ChoiceListValue(localeFromCode.getDisplayName(locale), null,
                            node.getSession().getValueFactory().createValue(activeLanguageCode)));
                }
                return listValues;
            } catch (RepositoryException e) {
                logger.error(e.getMessage(), e);
View Full Code Here

Examples of org.jahia.services.content.nodetypes.initializers.ChoiceListValue

                if (!map.containsKey(subInitializer)) {
                    valid = false;
                }
            }
            if (valid) {
                vs.add(new ChoiceListValue(initializer.getKey(), new HashMap<String, Object>(), new ValueImpl(
                        initializer.getValue(), PropertyType.STRING, false)));
            }
        }
        return vs;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.