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;
}
}