package org.jcon.test.app3;

import org.jcon.df.edit.Task;
import org.jcon.df.edit.TaskLogicFascade;
import org.jcon.df.edit.widget.WidgetSet;
import org.jcon.util.service.ContainerServices;

/**
 * This class is a test for task infrastructure.
 * Disabled 12/28/98 - JH since not used, will not compile
 * @author Jack Harich
 */
public class TestTask1 { // *** disabled implements Task {

//---------- Private Fields ------------------------------
//----- Properties
private TaskLogicFascade  taskLogicFascade;
private ContainerServices containerServices;
//----- Internal
private WidgetSet widgetSet;

//---------- Task Implementation -------------------------
public void setTaskLogicFascade(TaskLogicFascade fascade) {
    taskLogicFascade = fascade;
}
public void setContainerServices(ContainerServices services) {
    containerServices = services;
}
public void start() {
    // *** do - populate view
    print(".start() - Entered");
    widgetSet = taskLogicFascade.getWidgetSet("MainView");
    
    widgetSet.setControlValue("UserIDField", "1234");
    widgetSet.setControlValue("PasswordField", "");
    
    widgetSet.setControlValue("AdminCodeField", "CodeA");
    widgetSet.setControlValue("IsAdminField", "true");

}
public void closeWindowRequested(String viewName) {
    taskLogicFascade.close(); // ** Later check for dirty
}
//---------- Private Methods -----------------------------
//--- Std
private static void print(String text) {
    System.out.println("TestTask1" + text);
}

} // End class
