Package com.adito.boot

Examples of com.adito.boot.TypeMetaListItem


            }
        } else if (definition.getType() == PropertyDefinition.TYPE_LIST) {
            List<Pair> listItemsList = new ArrayList<Pair>();
            if (!definition.getTypeMeta().startsWith("!")) {
                for (Iterator i = ((List) definition.getTypeMetaObject()).iterator(); i.hasNext();) {
                    TypeMetaListItem item = (TypeMetaListItem) i.next();
                    ServletContext context = CoreServlet.getServlet().getServletContext();
                    ModuleConfig moduleConfig = ModuleUtils.getInstance().getModuleConfig(request, context);
                    String mrKey = (item.getMessageResourcesKey() == null ? "properties" : item.getMessageResourcesKey())
                                    + moduleConfig.getPrefix();
                    MessageResources res = (MessageResources) context.getAttribute(mrKey);
                    String k = definition.getName() + ".value." + item.getValue();
                    String v = "";
                    if (res != null) {
                        v = res.getMessage((Locale) request.getSession().getAttribute(Globals.LOCALE_KEY), k);
                        if (v == null) {
                            v = item.getValue();
                        }
                    }
                    Pair pair = new Pair(item.getValue(), v);
                    if (item.getValue().equals(value)) {
                        this.value = pair.getValue();
                    }
                    listItemsList.add(pair);
                }
            } else {
View Full Code Here


        if (definition.getType() == PropertyDefinition.TYPE_LIST) {
            List<Pair> listItemsList = new ArrayList<Pair>();
            if (!definition.getTypeMeta().startsWith("!")) {
                for (Iterator i = ((List) definition.getTypeMetaObject()).iterator(); i.hasNext();) {
                    TypeMetaListItem item = (TypeMetaListItem) i.next();
                    ServletContext context = CoreServlet.getServlet().getServletContext();
                    ModuleConfig moduleConfig = ModuleUtils.getInstance().getModuleConfig(request, context);
                    String mrKey = (item.getMessageResourcesKey() == null ? "properties" : item.getMessageResourcesKey())
                                    + moduleConfig.getPrefix();
                    MessageResources res = (MessageResources) context.getAttribute(mrKey);
                    String k = definition.getName() + ".value." + item.getValue();
                    String v = "";
                    if (res != null) {
                        v = res.getMessage((Locale) request.getSession().getAttribute(Globals.LOCALE_KEY), k);
                        if (v == null) {
                            v = item.getValue();
                        }
                    }
                    Pair pair = new Pair(item.getValue(), v);
                    if (item.getValue().equals(value)) {
                        this.value = pair.getValue();
                    }
                    listItemsList.add(pair);
                }
            } else {
View Full Code Here

TOP

Related Classes of com.adito.boot.TypeMetaListItem

Copyright © 2018 www.massapicom. 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.