// generated by FBuilder
package flexa.ff;
import flexa.fb.*;
import java.util.Map;
import java.util.HashMap;
import javax.script.*;
import java.util.ArrayList;
public class frequire extends FComponent {
    //
    // CONSTRUCTOR
    //
    public frequire() {
        super("ff.frequire");
    }
    
    // 
    // Methods
    //
    
    
    public void prepareContext(FContext acontext)  throws Exception { 
    		// @todo check if library is not empty, and with format module/name
		if( this.hasMember("library") ) {
		    
		    String tclass = this.getValue("library").toString();
		    Log.info("Open library " + tclass + " maincomponent " + acontext.mainComponent.getValue("name"));
		    FComponent tlib = CompManager.getInstance().getComponent(tclass);
		    tlib.bytecode = CompManager.getInstance().getBytecodes(tclass);
		    tlib.prepareContext(acontext);
		}

    }
    


    // 
    // Events
    //
	public void event(String aAction, FContext aContext) throws Exception {
        // Events
        
	    super.event(aAction, aContext);
	}
	
	
}