//
//  WOComponentAdditions.java
//  WOGroovy
//

package wogroovy.additions;

import com.webobjects.appserver.*;
import com.webobjects.foundation.*;
import com.webobjects.eocontrol.*;
import er.extensions.*;

public class WOComponentAdditions {

    //
    // instance creation
    //

    public static int intValueForBindingWithDefault(WOComponent self,
                                                    String binding,
                                                    int def) {
        return ERXValueUtilities.intValueForBindingOnComponentWithDefault(binding,
                                                                          self,
                                                                          def);
    }

    public static boolean booleanValueForBindingWithDefault(WOComponent self,
                                                            String binding,
                                                            boolean def) {
        return ERXValueUtilities.booleanValueForBindingOnComponentWithDefault(binding,
                                                                              self,
                                                                              def);
    }


    //
    // accessing
    //

    public static EOEditingContext ec(WOComponent self) {
        return self.session().defaultEditingContext();
    }

}
