Package com.webobjects.appserver

Examples of com.webobjects.appserver.WOComponent


  }

  // Formatting/Parsing method "inspired by" WOTextField
  @Override
  public WOActionResults handleRequest(WORequest request, WOContext context) {
    WOComponent component = context.component();
    String strValue = request.stringFormValueForKey("value");
    Object objValue = strValue;
    if (strValue != null) {
      Format format = null;
      if (strValue.length() != 0) {
        format = WOFormatterRepository.formatterForComponent(component, _dateFormat, _numberFormat, _formatter);
      }
      if (format != null) {
        try {
          Object parsedValue = format.parseObject(strValue);
          String formattedValue = format.format(parsedValue);
          objValue = format.parseObject(formattedValue);
        }
        catch (ParseException parseexception) {
          String valueKeyPath = _valueAssociation.keyPath();
          ValidationException validationexception = new ValidationException(parseexception.getMessage(), strValue, valueKeyPath);
          component.validationFailedWithException(validationexception, strValue, valueKeyPath);
          return null;
        }
        if (objValue != null && _useDecimalNumber != null && _useDecimalNumber.booleanValueInComponent(component)) {
          objValue = new BigDecimal(objValue.toString());
        }
View Full Code Here


    return response;
  }

  protected void _appendValueAttributeToResponse(WOResponse response, WOContext context) {
    WOComponent component = context.component();
    Object objValue = _valueAssociation.valueInComponent(component);
    if (objValue != null) {
      String strValue = null;
      Format format = WOFormatterRepository.formatterForInstance(objValue, component, _dateFormat, _numberFormat, _formatter);
      if (format != null) {
View Full Code Here

  //  RR - Methods
  //********************************************************************

  @Override
  public void takeValuesFromRequest(WORequest worequest, WOContext wocontext) {
    WOComponent component = wocontext.component();
    if(!isDisabledInContext(wocontext) && wocontext.wasFormSubmitted() && !isReadonlyInContext(wocontext)) {
      String name = nameInContext(wocontext, component);
      if(name != null) {
        String stringValue;
        boolean blankIsNull = _blankIsNull == null || _blankIsNull.booleanValueInComponent(component);
View Full Code Here

    return _autofocus != null && _autofocus.booleanValueInComponent(context.component());
  }

  @Override
  protected void _appendValueAttributeToResponse(WOResponse woresponse, WOContext wocontext) {
    WOComponent component = wocontext.component();

    Object valueInComponent = _value.valueInComponent(component);
    if(valueInComponent != null) {
      String stringValue = valueInComponent.toString();
      woresponse._appendTagAttributeAndValue("value", stringValue, true);
View Full Code Here

  }

  @Override
  public WOActionResults invokeAction(WORequest request, WOContext context) {
    Object obj = null;
    WOComponent component = context.component();
    if (!disabledInComponent(component) && context.wasFormSubmitted()) {
      if (context.isMultipleSubmitForm()) {
        if (ERXStringUtilities.nullForEmptyString((String) request.formValueForKey(nameInContext(context, component))) != null) {
          context.setActionInvoked(true);
          if (_action != null) {
View Full Code Here

    return "email";
  }

  @Override
  protected void _appendValueAttributeToResponse(WOResponse woresponse, WOContext wocontext) {
    WOComponent component = wocontext.component();

    Object valueInComponent = _value.valueInComponent(component);
    if(valueInComponent != null) {
      String stringValue = valueInComponent.toString();
      woresponse._appendTagAttributeAndValue("value", stringValue, true);
View Full Code Here

  @Override
  public void appendToResponse(WOResponse response, WOContext context) {
    super.appendToResponse(response, context);

    WOComponent component = context.component();
    String name = nameInContext(context, component);
    String functionName = (String) _functionName.valueInComponent(component);
    String formName = (String) _formName.valueInComponent(component);

    response.appendContentString("<input type = \"hidden\" value = \"\" name = \"" + name + "\">\n");
View Full Code Here

    return "url";
  }

  @Override
  protected void _appendValueAttributeToResponse(WOResponse woresponse, WOContext wocontext) {
    WOComponent component = wocontext.component();

    Object valueInComponent = _value.valueInComponent(component);
    if(valueInComponent != null) {
      String stringValue = valueInComponent.toString();
      woresponse._appendTagAttributeAndValue("value", stringValue, true);
View Full Code Here

    return "tel";
  }

  @Override
  protected void _appendValueAttributeToResponse(WOResponse woresponse, WOContext wocontext) {
    WOComponent component = wocontext.component();

    Object valueInComponent = _value.valueInComponent(component);
    if(valueInComponent != null) {
      String stringValue = valueInComponent.toString();
      woresponse._appendTagAttributeAndValue("value", stringValue, true);
View Full Code Here


    @Override
    public void appendChildrenToResponse(WOResponse response, WOContext context)
    {
         WOComponent parent = context.component();
        
        Object selections = null;
        if (_selections != null)
        {
          selections = _selections.valueInComponent(parent);
View Full Code Here

TOP

Related Classes of com.webobjects.appserver.WOComponent

Copyright © 2018 www.massapicom. 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.