Package org.richfaces.model

Examples of org.richfaces.model.DeclarativeModelKey


            if (rowKeyConverter == null) {
                throw new ConverterException(MessageFormat.format(CONVERTER_FOR_MODEL_UNAVAILABLE, modelId));
            }

            Object modelKey = rowKeyConverter.getAsObject(context, (UIComponent) adaptor, modelKeyAsString);
            return new DeclarativeModelKey(modelId, modelKey);
        } catch (ConverterException e) {
            throw e;
        } catch (Exception e) {
            throw new ConverterException(e.getMessage(), e);
        }
View Full Code Here


            if (rowKeyConverter == null) {
                throw new ConverterException(MessageFormat.format(CONVERTER_FOR_MODEL_UNAVAILABLE, modelId));
            }

            Object modelKey = rowKeyConverter.getAsObject(context, (UIComponent) adaptor, modelKeyAsString);
            return new DeclarativeModelKey(modelId, modelKey);
        } catch (ConverterException e) {
            throw e;
        } catch (Exception e) {
            throw new ConverterException(e.getMessage(), e);
        }
View Full Code Here

    protected Object getWrappedKey() {
        Object modelKey;

        if (getComponent() != null) {
            modelKey = new DeclarativeModelKey(getComponent().getId(), getKey());
        } else {
            modelKey = getKey();
        }

        return modelKey;
View Full Code Here

            initialContextValue = contextMap.remove(var);
        }

        try {
            for (Object simpleKey : key.getSimpleKeys()) {
                DeclarativeModelKey declarativeKey = (DeclarativeModelKey) simpleKey;
                if (var != null) {
                    contextMap.put(var, data);
                }

                setupModelComponentContext(declarativeKey.getModelId());

                if (modelData == null) {
                    resetForDataNotAvailable();
                    break;
                }

                setupDataModelContext(declarativeKey.getModelKey());

                if (data == null) {
                    resetForDataNotAvailable();
                    break;
                }
View Full Code Here

        if (split.hasNext()) {
            throw new ConverterException(value);
        }

        return new DeclarativeModelKey(modelId, modelKey);
    }
View Full Code Here

    public String getAsString(FacesContext context, UIComponent component, Object value) {
        if (value == null) {
            return "";
        }

        DeclarativeModelKey declarativeModelKey = (DeclarativeModelKey) value;

        String convertedModelKey = delegateConverter.getAsString(context, component, declarativeModelKey.getModelKey());
        String keyString = SEPARATOR_CHAR_JOINER.join(declarativeModelKey.getModelId(), convertedModelKey);

        return escape(keyString);
    }
View Full Code Here

        while (split.hasNext()) {
            String modelId = unescape(split.next());
            String modelKeyAsString = unescape(split.next());

            DeclarativeModelKey declarativeKey = tree.convertDeclarativeKeyFromString(context, modelId, modelKeyAsString);

            declarativeKeys.add(declarativeKey);
        }

        return new SequenceRowKey((Object[]) declarativeKeys.toArray(new DeclarativeModelKey[declarativeKeys.size()]));
View Full Code Here

        AbstractTree tree = (AbstractTree) component;

        StringBuilder result = new StringBuilder();

        for (Object declarativeKeyObject : declarativeKeys) {
            DeclarativeModelKey declarativeKey = (DeclarativeModelKey) declarativeKeyObject;
            String modelId = escape(declarativeKey.getModelId());

            String modelKeyAsString = escape(tree.convertDeclarativeKeyToString(context, declarativeKey));

            if (result.length() != 0) {
                result.append(SEPARATOR_CHAR);
View Full Code Here

TOP

Related Classes of org.richfaces.model.DeclarativeModelKey

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.