view flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/UserRGDState.java @ 5798:febeb4bb10a5

StaticWQKmsArtifact: implement WaterLineArtifact .
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 24 Apr 2013 08:21:52 +0200
parents 11c853b0854a
children
line wrap: on
line source
package de.intevation.flys.artifacts.states;

import org.w3c.dom.Element;

import de.intevation.artifacts.CallContext;
import de.intevation.artifacts.common.utils.XMLUtils.ElementCreator;
import de.intevation.flys.artifacts.FLYSArtifact;


public class UserRGDState
extends DefaultState
{
   @Override
    protected String getUIProvider() {
        return "user_rgd_panel";
    }

    @Override
    protected Element createStaticData(
        FLYSArtifact   flys,
        ElementCreator creator,
        CallContext    cc,
        String         name,
        String         value,
        String         type
    ) {
        Element dataElement = creator.create("data");
        creator.addAttr(dataElement, "name", name, true);
        creator.addAttr(dataElement, "type", type, true);

        Element itemElement = creator.create("item");
        creator.addAttr(itemElement, "value", value, true);

        creator.addAttr(itemElement, "label", getLabel(cc, value), true);
        dataElement.appendChild(itemElement);

        return dataElement;
    }

    public static String getLabel(CallContext cc, String value) {

        return value;
    }


}

http://dive4elements.wald.intevation.org