Package com.nexirius.jnex.example.command

Source Code of com.nexirius.jnex.example.command.EditCategoryCommand

package com.nexirius.jnex.example.command;

import com.nexirius.framework.datamodel.DataModel;
import com.nexirius.framework.htmlview.HTMLCommand;
import com.nexirius.framework.htmlview.HTMLSessionVariable;
import com.nexirius.framework.htmlview.DefaultHTMLCommand;

public class EditCategoryCommand extends DefaultHTMLCommand {
    public boolean requiresMapping() {
        return true;
    }

    public boolean execute(HTMLSessionVariable sessionVariable) throws Exception {
        DataModel category = sessionVariable.getSelectedChildren().firstItem();

        if (category == null) {
            return false;
        }

        sessionVariable.setChildName(sessionVariable.getApplicationModel().getChildName(category));

        return true;
    }
}
TOP

Related Classes of com.nexirius.jnex.example.command.EditCategoryCommand

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.