Package org.objectstyle.wolips.bindings.wod

Examples of org.objectstyle.wolips.bindings.wod.IWodBinding


      String value = null;
      IApiBinding binding = (IApiBinding) element;
      if (binding != null) {
        IWodElement wodElement = getWodElement();
        if (wodElement != null) {
          IWodBinding wodBinding = wodElement.getBindingNamed(binding.getName());
          if (wodBinding != null) {
            value = wodBinding.getValue();
          }
        }
      }
      if (value == null) {
        value = "";
View Full Code Here


    IApiBinding apiBinding = (IApiBinding) element;
    String text = null;
    if (columnIndex == 0) {
      text = apiBinding.getName();
    } else if (columnIndex == 1) {
      IWodBinding wodBinding = _wodElement.getBindingNamed(apiBinding.getName());
      if (wodBinding != null) {
        text = wodBinding.getValue();
      }
    }
    return text;
  }
View Full Code Here

          IApiBinding apiBinding = (IApiBinding) ((IStructuredSelection) event.getSelection()).getFirstElement();
          boolean keyPathSelected = false;
          if (apiBinding != null) {
            IWodElement element = _inspector.getWodElement();
            if (element != null) {
              IWodBinding wodBinding = element.getBindingNamed(apiBinding.getName());
              if (wodBinding != null) {
                if (wodBinding.isKeyPath()) {
                  String value = wodBinding.getValue();
                  _browser.setSelection(new StructuredSelection(value));
                  keyPathSelected = true;
                }
              }
            }
View Full Code Here

public class WOTextFieldTagDelegate extends TagDelegate {

  @Override
  public void renderNode(IWodElement wodElement, FuzzyXMLElement xmlElement, RenderContext renderContext, StringBuffer htmlBuffer, StringBuffer cssBuffer, Stack<WodParserCache> caches, Stack<FuzzyXMLNode> nodes) {
    IWodBinding valueBinding = wodElement.getBindingNamed("value");
    String value;
    if (valueBinding != null) {
      value = valueBinding.getValue();
    } else {
      value = "";
    }
    htmlBuffer.append("<input type = \"text\" value = \"" + value + "\"/>");
  }
View Full Code Here

public class WOTextTagDelegate extends TagDelegate {

  @Override
  public void renderNode(IWodElement wodElement, FuzzyXMLElement xmlElement, RenderContext renderContext, StringBuffer htmlBuffer, StringBuffer cssBuffer, Stack<WodParserCache> caches, Stack<FuzzyXMLNode> nodes) {
    IWodBinding valueBinding = wodElement.getBindingNamed("value");
    String value;
    if (valueBinding != null) {
      value = valueBinding.getValue();
    } else {
      value = "";
    }
    htmlBuffer.append("<textarea>" + value + "</textarea>");
  }
View Full Code Here

public class WOGenericContainerTagDelegate extends TagDelegate {

  @Override
  public void renderNode(IWodElement wodElement, FuzzyXMLElement xmlElement, RenderContext renderContext, StringBuffer htmlBuffer, StringBuffer cssBuffer, Stack<WodParserCache> caches, Stack<FuzzyXMLNode> nodes) {
    IWodBinding elementNameBinding = wodElement.getBindingNamed("elementName");
    String elementName;
    if (elementNameBinding != null && !elementNameBinding.isKeyPath()) {
      elementName = elementNameBinding.getValue().replaceAll("\"", "");
    } else {
      elementName = "div";
    }
    htmlBuffer.append("<" + elementName + ">");
    xmlElement.toXMLString(renderContext, htmlBuffer);
View Full Code Here

public class WOGenericElementTagDelegate extends TagDelegate {

  @Override
  public void renderNode(IWodElement wodElement, FuzzyXMLElement xmlElement, RenderContext renderContext, StringBuffer htmlBuffer, StringBuffer cssBuffer, Stack<WodParserCache> caches, Stack<FuzzyXMLNode> nodes) {
    IWodBinding elementNameBinding = wodElement.getBindingNamed("elementName");
    String elementName;
    if (elementNameBinding != null && !elementNameBinding.isKeyPath()) {
      elementName = elementNameBinding.getValue().replaceAll("\"", "");
    } else {
      elementName = "div";
    }
    htmlBuffer.append("<" + elementName + " />");
  }
View Full Code Here

public class WOPopUpButtonTagDelegate extends TagDelegate {

  @Override
  public void renderNode(IWodElement wodElement, FuzzyXMLElement xmlElement, RenderContext renderContext, StringBuffer htmlBuffer, StringBuffer cssBuffer, Stack<WodParserCache> caches, Stack<FuzzyXMLNode> nodes) {
    IWodBinding listBinding = wodElement.getBindingNamed("list");
    String list;
    if (listBinding != null) {
      list = listBinding.getValue();
    } else {
      list = "";
    }
    htmlBuffer.append("<select><option>" + list + "</option></select>");
  }
View Full Code Here

public class WOSubmitButtonTagDelegate extends TagDelegate {

  @Override
  public void renderNode(IWodElement wodElement, FuzzyXMLElement xmlElement, RenderContext renderContext, StringBuffer htmlBuffer, StringBuffer cssBuffer, Stack<WodParserCache> caches, Stack<FuzzyXMLNode> nodes) {
    IWodBinding valueBinding = wodElement.getBindingNamed("value");
    String value;
    if (valueBinding != null) {
      if (valueBinding.isKeyPath()) {
        value = valueBinding.getValue();
      } else {
        value = valueBinding.getValue().replaceAll("\"", "");
      }
    } else {
      value = "Submit";
    }
    htmlBuffer.append("<input type = \"submit\" value = \"" + value + "\"/>");
View Full Code Here

public class WOConditionalTagDelegate extends TagDelegate {
  private boolean _cssAdded;

  @Override
  public void renderNode(IWodElement wodElement, FuzzyXMLElement xmlElement, RenderContext renderContext, StringBuffer htmlBuffer, StringBuffer cssBuffer, Stack<WodParserCache> caches, Stack<FuzzyXMLNode> nodes) {
    IWodBinding conditionBinding = wodElement.getBindingNamed("condition");
    String conditionName;
    if (conditionBinding != null) {
      conditionName = conditionBinding.getValue();
    } else {
      conditionName = "WOConditional";
    }
    IWodBinding negateBinding = wodElement.getBindingNamed("negate");
    if (negateBinding != null && ("true".equalsIgnoreCase(negateBinding.getValue()) || "yes".equalsIgnoreCase(negateBinding.getValue()))) {
      conditionName = "!" + conditionName;
    }
    htmlBuffer.append("<span class = \"wodclipse_block wodclipse_WOConditional\"><span class = \"wodclipse_tag wodclipse_open_tag\">[if " + conditionName + "]</span>");
    xmlElement.toXMLString(renderContext, htmlBuffer);
    htmlBuffer.append("<span class = \"wodclipse_tag wodclipse_close_tag\">[/if " + conditionName + "]</span></span>");
View Full Code Here

TOP

Related Classes of org.objectstyle.wolips.bindings.wod.IWodBinding

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.