Package org.xulfaces.tag

Source Code of org.xulfaces.tag.XULComponentTag

/*
*   xulfaces : bring XUL power to Java
*  
*  Copyright (C) 2005  Olivier SCHMITT
*  This library is free software; you can redistribute it and/or
*  modify it under the terms of the GNU Lesser General Public
*  License as published by the Free Software Foundation; either
*  version 2.1 of the License, or (at your option) any later version.
*
*  This library is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
*  Lesser General Public License for more details.
*
*  You should have received a copy of the GNU Lesser General Public
*  License along with this library; if not, write to the Free Software
*  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

package org.xulfaces.tag;

import javax.faces.component.ActionSource;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.el.MethodBinding;
import javax.faces.el.ValueBinding;
import javax.faces.event.ActionEvent;

import org.xulfaces.MultiActionSource;
import org.xulfaces.annotation.taglib.ATTRIBUTE;
import org.xulfaces.annotation.taglib.TAG;
import org.xulfaces.el.SimpleMethodBinding;

/**
* <p>
* Base class for XUL component tag.
* </p>
* <p>
* Provides basic behaviour and attributes for all tags.
* </p>
*
* @author kito31
* @version $Id: XULComponentTag.java,v 1.20 2007/05/20 07:26:04 kito31 Exp $
*/
@TAG(name = "xultag", process = false)
public abstract class XULComponentTag extends AbstractComponentTag {

  @ATTRIBUTE(description = "The align attribute specifies how child elements of the box are aligned, when the size of the box is larger than the total size of the children.(start,center,end,baseline,stretch)")
  private String align;

  @ATTRIBUTE(mappedType = "java.lang.Boolean", description = " If true, events are passed to children of the element. Otherwise, events are passed to the element only.")
  private String allowevents;

  @ATTRIBUTE(mappedType = "java.lang.Boolean", description = " Valid on any element that has a datasources attribute. When multiple datasources are used, one may override an assertion from another. This attribute, if true, which is the default, allows a datasource to negate an earlier assertion.")
  private String allownegativeassertions;

  @ATTRIBUTE(description = " Valid on any element that has a datasources attribute. Because RDF holds a graph of resources, it is possible for there to be several pointers to the same node. If this attribute is true, which is the default, duplicate references are skipped. If false, duplicate references will appear.")
  private String coalesceduplicatearcs;

  @ATTRIBUTE(mappedType = "java.lang.Boolean", description = "If true, then the element is collapsed and does not appear. It is equivalent to setting the CSS visibility property to 'collapse'.")
  private String collapsed;

  @ATTRIBUTE(mappedType = "java.lang.Boolean", description = " Set to true if the element is to act as a container which can have child elements. This would be used for folders. This will be set by the template builder as needed.")
  private String container;

  @ATTRIBUTE(description = " This attribute specifies RDF properties that indicate that a resource is a container. ")
  private String containment;

  @ATTRIBUTE(description = "The id of the popup element that should appear when the user context-clicks on the element")
  private String context;

  @ATTRIBUTE(description = "Alternate name for the context attribute, but also has a corresponding script property 'contextmenu'.")
  private String contextmenu;

  @ATTRIBUTE(description = "A space-separated list of datasources that an element's template will use for content generation.")
  private String datasources;

  @ATTRIBUTE(description = "The direction in which the child elements of the element are placed.")
  private String dir;

  @ATTRIBUTE(mappedType = "java.lang.Boolean", description = "true, false or an EL expression returning a boolean value")
  private String disabled;

  @ATTRIBUTE(mappedType = "java.lang.Boolean", description = "Set to true if the element is a container that contains no children. This will be set by the template builder as needed.")
  private String empty;

  @ATTRIBUTE(description = "This attribute can be used to make the children of the element equal in size.")
  private String equalsize;

  @ATTRIBUTE(description = "A set of flags used for miscellaneous purposes. Two flags are defined, which may be the value of this attribute.")
  private String flags;

  @ATTRIBUTE(mappedType = "java.lang.Integer", description = "Control flexibility.")
  private String flex;

  @ATTRIBUTE(mappedType = "java.lang.Integer", description = "The height of the element in pixels. It is recommended that the CSS height property be used instead.")
  private String height;

  @ATTRIBUTE(mappedType = "java.lang.Boolean", description = "If set to true, the element is not displayed. This is similar to setting the CSS display property to 'none'.")
  private String hidden;

  @ATTRIBUTE(description = "When an element is in an overlay, the insertafter attribute specifies the id of the element in the base window that the element should appear after.")
  private String insertafter;

  @ATTRIBUTE(description = "When an element is in an overlay, the insertbefore attribute specifies the id of the element in the base window that the element should appear before.")
  private String insertbefore;

  @ATTRIBUTE(mappedType = "java.lang.Integer", description = "For elements placed within a stack, specifies the position of the left edge of the element.")
  private String left;

  @ATTRIBUTE(mappedType = "java.lang.Integer", description = "The maximum height of the element. This corresponds to the max-height CSS property.")
  private String maxheight;

  @ATTRIBUTE(mappedType = "java.lang.Integer", description = "The maximum width of the element. This corresponds to the max-width CSS property.")
  private String maxwidth;

  @ATTRIBUTE(description = "Alternate name for the popup attribute, but also has a corresponding script property 'menu'.")
  private String menu;

  @ATTRIBUTE(mappedType = "java.lang.Integer", description = "The minimum height of the element. This corresponds to the min-height CSS property.")
  private String minheight;

  @ATTRIBUTE(mappedType = "java.lang.Integer", description = "The minimum width of the element. This corresponds to the min-width CSS property.")
  private String minwidth;

  @ATTRIBUTE(description = "Determines whether mouse events are passed through each element of the element until one responds to it.")
  private String mousethrough;

  @ATTRIBUTE(description = "Set to an id of a broadcaster element that is being observed by the element. If an attribute changes in the broadcaster it is also changed in the observer.")
  private String observes;

  @ATTRIBUTE(supportsMethodBinding = true, description = "The opposite of the focus event, the blur event is passed just as an element loses the focus.")
  private String onblur;

  @ATTRIBUTE(supportsMethodBinding = true, description = "This event is sent when a mouse button is pressed and released. You can determine which mouse button was clicked by retrieving the button property of the event object. This event is also sent when the user double-clicks with the mouse. The detail property specifies how many clicks occured. You can also check for triple-clicks in a similar manner. For buttons and menus, you should use oncommand instead.")
  private String onclick;

  @ATTRIBUTE(supportsMethodBinding = true, description = "This event handler is called when an element is activated. How it is activated varies for each element and in many cases, there are several ways to activate an element. For example, a button can be activated by clicking on it with the mouse or by pressing ENTER while it has the focus. Menus can be activated by selecting them with the mouse or by pressing a shortcut key. You should always use the oncommand event instead of onclick because it will be called in all of the needed cases.")
  private String oncommand;

  @ATTRIBUTE(supportsMethodBinding = true, description = "This event occurs when a command update occurs. You would use this to update the disabled status of items.")
  private String oncommandupdate;

  @ATTRIBUTE(description = "This event is sent to an element when the user requests to open the context menu for the element. The action to do this varies by platform, but it will typically be a right click. This handler is usually used to dynamically set the commands on a menu when the user requests to display it, or you can use onpopupshowing event. Returning false from this event handler prevents the popup from appearing.")
  private String oncontextmenu;

  @ATTRIBUTE(supportsMethodBinding = true, description = "This event is like the click event except it is only sent when the user double clicks with the mouse. This is an alternative to checking the detail property in the click event.")
  private String ondblclick;

  @ATTRIBUTE(description = "This event is sent when the user releases the mouse button to drop an object being dragged. The element, if it accepts the drop, should respond in some manner such inserting the dragged object into itself.")
  private String ondragdrop;

  @ATTRIBUTE(description = "The dragenter event is sent when the mouse pointer first moves over an element during a drag. It is similar to the mouseover event but occurs while dragging.")
  private String ondragenter;

  @ATTRIBUTE(description = "This event is sent when the mouse pointer moves away from an element during a drag. It is also called after a drop on an element. It is similar to the mouseout event but occurs during a drag.")
  private String ondragexit;

  @ATTRIBUTE(description = "This event is sent when the user starts dragging the element, usually by holding down the mouse button and moving the mouse.")
  private String ondraggesture;

  @ATTRIBUTE(description = "Related to the mousemove event, this event is sent while something is being dragged over an element. The handler should indicate whether the object being dragged can be dropped.")
  private String ondragover;

  @ATTRIBUTE(supportsMethodBinding = true, description = "The focus event is sent to an element when it receives the focus. Once an element has the focus, keyboard events are sent to it. The focus can be changed by clicking on an element or by pressing TAB to switch to the next element is sequence.")
  private String onfocus;

  @ATTRIBUTE(supportsMethodBinding = true, description = "The keydown event is sent to an element that has the focus and a key is pressed but not released.")
  private String onkeydown;

  @ATTRIBUTE(supportsMethodBinding = true, description = "The keypress event is sent to an element that has the focus and a key is pressed and released. When the user presses a key, the keydown event is first sent, followed by the keypress event and then the keyup event. In a textbox, a user normally can hold down a key to repeat a character In this case, multiple sets of key events are sent as if the user rapidly pressed the same key repeatedly.")
  private String onkeypress;

  @ATTRIBUTE(supportsMethodBinding = true, description = "The keyup event is sent to an element that has the focus and a key is released.")
  private String onkeyup;

  @ATTRIBUTE(supportsMethodBinding = true, description = "This event is sent when the mouse is pressed on an element but not released.")
  private String onmousedown;

  @ATTRIBUTE(description = "This event is sent repeatedly as the mouse is moved over an element.")
  private String onmousemove;

  @ATTRIBUTE(description = "This mouseout event is sent to an element when the user moves the mouse outside the element. This event is the reverse of onmouseover.")
  private String onmouseout;

  @ATTRIBUTE(description = "This event is sent to an element when the mouse first moves over an element. You can use this event to provide feedback to the user.")
  private String onmouseover;

  @ATTRIBUTE(description = "This event is sent when the mouse is released on an element.")
  private String onmouseup;

  @ATTRIBUTE(supportsMethodBinding = true, description = "This event is sent to an element when there becomes enough space to display it at full size. This applies to boxes and other layout elements.")
  private String onunderflow;

  @ATTRIBUTE(description = "An integer which specifies the position of the element within its parent. ")
  private String ordinal;

  @ATTRIBUTE(description = "Used to specify whether the children of the element are oriented horizontally or vertically.(horizontal,vertical)")
  private String orient;

  @ATTRIBUTE(description = "The pack attribute specifies how child elements of the box are aligned, when the size of the box is larger than the total size of the children.(start,center,end)")
  private String pack;

  @ATTRIBUTE(description = "A space separated list of attributes that are maintained when the window is closed.")
  private String persist;

  @ATTRIBUTE(description = "Should be set to the value of the id of the popup element that should appear when the user clicks on the element.")
  private String popup;

  @ATTRIBUTE(description = "When an element is in an overlay, the position is an index where the child is inserted.")
  private String position;

  @ATTRIBUTE(mappedType = "java.lang.Boolean", name = "preferenceeditable", description = "If true, the element may be used as one that modifies a preference in a prefwindow.")
  private String preferenceeditable;

  @ATTRIBUTE(description = "For template generated elements, this attribute is used to specify the root RDF node where content generation begins. ")
  private String ref;

  @ATTRIBUTE(description = "When placed on an element in an overlay, it indicates that the element in the base file should be removed from the window.")
  private String removeelement;

  @ATTRIBUTE(description = "Set this attribute to set the direction the column is sorted. The user may change the sort direction by clicking the column headers (ascending,descending, natural).")
  private String sortDirection;

  @ATTRIBUTE(description = " For template-generated content, this specifies the sort key, if you would like the content to be sorted.")
  private String sortResource;

  @ATTRIBUTE(description = "A secondary key for sorted content.")
  private String sortResource2;

  @ATTRIBUTE(description = "Used to set the text that appears on the status bar when the user moves the mouse over the element. ")
  private String statustext;

  @ATTRIBUTE(description = "The style.")
  private String style;

  @ATTRIBUTE(description = "The style class.")
  private String styleClass;

  @ATTRIBUTE(description = "For template generated elements, this attribute may optionally be placed on the root node (the element with the datasources attribute) to refer to a template that exists elsewhere in the XUL code.")
  private String template;

  @ATTRIBUTE(description = "Should be set to the value of the id of the popup element that should be used as a tooltip window when the mouse hovers over the element for a moment.")
  private String tooltip;

  @ATTRIBUTE(description = "Used to set the text which appears in the tooltip when the user moves the mouse over the element.")
  private String tooltiptext;

  @ATTRIBUTE(mappedType = "java.lang.Integer", description = "For elements placed within a stack, specifies the position of the top edge of the element.")
  private String top;

  @ATTRIBUTE(mappedType = "java.lang.Boolean", description = "updateSmoothly to true adds a UpdateZoneCommand to the bridge for the associated component. other values are false or an EL expression returning a boolean value")
  private String updateSmoothly;

  @ATTRIBUTE(description = "For template-generated content, the attribute should be placed on the element where content generation should begin.")
  private String uri;

  @ATTRIBUTE(name = "waitcursor", description = "Set this attribute to true to have the cursor switch to a waiting cursor while the mouse is hovering over it.")
  private String waitcursor;

  @ATTRIBUTE(mappedType = "java.lang.Integer", description = "The width of the element in pixels. It is recommended that the CSS width property be used instead.")
  private String width;

  public String getAlign() {
    return align;
  }

  public String getAllowevents() {
    return allowevents;
  }

  public String getAllownegativeassertions() {
    return allownegativeassertions;
  }

  public String getCoalesceduplicatearcs() {
    return coalesceduplicatearcs;
  }

  public String getCollapsed() {
    return collapsed;
  }

  public String getComponentType() {
    return null;
  }

  public String getContainer() {
    return container;
  }

  public String getContainment() {
    return containment;
  }

  public String getContext() {
    return context;
  }

  public String getContextmenu() {
    return contextmenu;
  }

  public String getDatasources() {
    return datasources;
  }

  public String getDir() {
    return dir;
  }

  public String getDisabled() {
    return disabled;
  }

  public String getEmpty() {
    return empty;
  }

  public String getEqualsize() {
    return equalsize;
  }

  public String getFlags() {
    return flags;
  }

  public String getFlex() {
    return flex;
  }

  public String getHeight() {
    return height;
  }

  public String getHidden() {
    return hidden;
  }

  public String getInsertafter() {
    return insertafter;
  }

  public String getInsertbefore() {
    return insertbefore;
  }

  public String getLeft() {
    return left;
  }

  public String getMaxheight() {
    return maxheight;
  }

  public String getMaxwidth() {
    return maxwidth;
  }

  public String getMenu() {
    return menu;
  }

  public String getMinheight() {
    return minheight;
  }

  public String getMinwidth() {
    return minwidth;
  }

  public String getMousethrough() {
    return mousethrough;
  }

  public String getObserves() {
    return observes;
  }

  public String getOnblur() {
    return onblur;
  }

  public String getOnclick() {
    return onclick;
  }

  public String getOncommand() {
    return oncommand;
  }

  public String getOncommandupdate() {
    return oncommandupdate;
  }

  public String getOncontextmenu() {
    return oncontextmenu;
  }

  public String getOndblclick() {
    return ondblclick;
  }

  public String getOndragdrop() {
    return ondragdrop;
  }

  public String getOndragenter() {
    return ondragenter;
  }

  public String getOndragexit() {
    return ondragexit;
  }

  public String getOndraggesture() {
    return ondraggesture;
  }

  public String getOndragover() {
    return ondragover;
  }

  public String getOnfocus() {
    return onfocus;
  }

  public String getOnkeydown() {
    return onkeydown;
  }

  public String getOnkeypress() {
    return onkeypress;
  }

  public String getOnkeyup() {
    return onkeyup;
  }

  public String getOnmousedown() {
    return onmousedown;
  }

  public String getOnmousemove() {
    return onmousemove;
  }

  public String getOnmouseout() {
    return onmouseout;
  }

  public String getOnmouseover() {
    return onmouseover;
  }

  public String getOnmouseup() {
    return onmouseup;
  }

  public String getOnunderflow() {
    return onunderflow;
  }

  public String getOrdinal() {
    return ordinal;
  }

  public String getOrient() {
    return orient;
  }

  public String getPack() {
    return pack;
  }

  public String getPersist() {
    return persist;
  }

  public String getPopup() {
    return popup;
  }

  public String getPosition() {
    return position;
  }

  public String getPreferenceeditable() {
    return preferenceeditable;
  }

  public String getRef() {
    return ref;
  }

  public String getRemoveelement() {
    return removeelement;
  }

  public String getRendererType() {
    return null;
  }

  public String getSortDirection() {
    return sortDirection;
  }

  public String getSortResource() {
    return sortResource;
  }

  public String getSortResource2() {
    return sortResource2;
  }

  public String getStatustext() {
    return statustext;
  }

  public String getStyle() {
    return style;
  }

  public String getStyleClass() {
    return styleClass;
  }

  public String getTemplate() {
    return template;
  }

  public String getTooltip() {
    return tooltip;
  }

  public String getTooltiptext() {
    return tooltiptext;
  }

  public String getTop() {
    return top;
  }

  public String getUpdateSmoothly() {
    return updateSmoothly;
  }

  public String getUri() {
    return uri;
  }

  public String getWaitcursor() {
    return waitcursor;
  }

  public String getWidth() {
    return width;
  }

  protected void setActionProperty(FacesContext context,
      UIComponent component, String action) {
    if (!(component instanceof ActionSource)) {
      throw new IllegalArgumentException("Component "
          + component.getClientId(context) + " is no ActionSource");
    }
    MethodBinding mb;
    if (action != null) {
      if (isValueReference(action)) {
        mb = context.getApplication().createMethodBinding(action, null);
      } else {
        mb = new SimpleMethodBinding(action);
      }
    } else {
      mb = new SimpleMethodBinding(action);
    }
    ((ActionSource) component).setAction(mb);
  }

  protected void setActionListenerProperty(FacesContext context,
      UIComponent component, String actionListener) {
    if (!(component instanceof ActionSource)) {
      throw new IllegalArgumentException("Component "
          + component.getClientId(context) + " is no ActionSource");
    }
    MethodBinding mb;
    final Class[] ACTION_LISTENER_ARGS = { ActionEvent.class };
    if (actionListener != null) {
      if (isValueReference(actionListener)) {
        mb = context.getApplication().createMethodBinding(
            actionListener, ACTION_LISTENER_ARGS);
        ((ActionSource) component).setActionListener(mb);
      } else {
        throw new IllegalArgumentException("Your action listener "
            + component.getClientId(context) + " is no a value reference !");
      }
    }
  }

  protected void setMethodBinding(FacesContext context,
      UIComponent component, String name, String action) {
    if (!(component instanceof ActionSource)) {
      // throw new IllegalArgumentException("Component " +
      // component.getClientId(context) + " is no ActionSource");
      setStringAttribute(context, component, name, action);
    } else {
      MethodBinding methodBinding = null;
      if (action != null) {
        if (isValueReference(action)) {
          methodBinding = context.getApplication()
              .createMethodBinding(action, null);
          if (component instanceof MultiActionSource) {
            ((MultiActionSource) component).setMethodBinding(name,
                methodBinding);
          }
        } else {
          setStringAttribute(context, component, name, action);
        }
      }
    }
  }

  public void setAlign(String align) {
    this.align = align;
  }

  public void setAllowevents(String allowevents) {
    this.allowevents = allowevents;
  }

  public void setAllownegativeassertions(String allownegativeassertions) {
    this.allownegativeassertions = allownegativeassertions;
  }

  public void setCoalesceduplicatearcs(String coalesceduplicatearcs) {
    this.coalesceduplicatearcs = coalesceduplicatearcs;
  }

  public void setCollapsed(String collapsed) {
    this.collapsed = collapsed;
  }

  public void setContainer(String container) {
    this.container = container;
  }

  public void setContainment(String containment) {
    this.containment = containment;
  }

  public void setContext(String context) {
    this.context = context;
  }

  public void setContextmenu(String contextmenu) {
    this.contextmenu = contextmenu;
  }

  public void setDatasources(String datasources) {
    this.datasources = datasources;
  }

  public void setDir(String dir) {
    this.dir = dir;
  }

  public void setDisabled(String disabled) {
    this.disabled = disabled;
  }

  public void setEmpty(String empty) {
    this.empty = empty;
  }

  public void setEqualsize(String equalsize) {
    this.equalsize = equalsize;
  }

  public void setFlags(String flags) {
    this.flags = flags;
  }

  public void setFlex(String flex) {
    this.flex = flex;
  }

  public void setHeight(String height) {
    this.height = height;
  }

  public void setHidden(String hidden) {
    this.hidden = hidden;
  }

  public void setInsertafter(String insertafter) {
    this.insertafter = insertafter;
  }

  public void setInsertbefore(String insertbefore) {
    this.insertbefore = insertbefore;
  }

  public void setLeft(String left) {
    this.left = left;
  }

  public void setMaxheight(String maxheight) {
    this.maxheight = maxheight;
  }

  public void setMaxwidth(String maxwidth) {
    this.maxwidth = maxwidth;
  }

  public void setMenu(String menu) {
    this.menu = menu;
  }

  public void setMinheight(String minheight) {
    this.minheight = minheight;
  }

  public void setMinwidth(String minwidth) {
    this.minwidth = minwidth;
  }

  public void setMousethrough(String mousethrough) {
    this.mousethrough = mousethrough;
  }

  public void setObserves(String observes) {
    this.observes = observes;
  }

  public void setOnblur(String onblur) {
    this.onblur = onblur;
  }

  public void setOnclick(String onclick) {
    this.onclick = onclick;
  }

  public void setOncommand(String oncommand) {
    this.oncommand = oncommand;
  }

  public void setOncommandupdate(String oncommandupdate) {
    this.oncommandupdate = oncommandupdate;
  }

  public void setOncontextmenu(String oncontextmenu) {
    this.oncontextmenu = oncontextmenu;
  }

  public void setOndblclick(String ondblclick) {
    this.ondblclick = ondblclick;
  }

  public void setOndragdrop(String ondragdrop) {
    this.ondragdrop = ondragdrop;
  }

  public void setOndragenter(String ondragenter) {
    this.ondragenter = ondragenter;
  }

  public void setOndragexit(String ondragexit) {
    this.ondragexit = ondragexit;
  }

  public void setOndraggesture(String ondraggesture) {
    this.ondraggesture = ondraggesture;
  }

  public void setOndragover(String ondragover) {
    this.ondragover = ondragover;
  }

  public void setOnfocus(String onfocus) {
    this.onfocus = onfocus;
  }

  public void setOnkeydown(String onkeydown) {
    this.onkeydown = onkeydown;
  }

  public void setOnkeypress(String onkeypress) {
    this.onkeypress = onkeypress;
  }

  public void setOnkeyup(String onkeyup) {
    this.onkeyup = onkeyup;
  }

  public void setOnmousedown(String onmousedown) {
    this.onmousedown = onmousedown;
  }

  public void setOnmousemove(String onmousemove) {
    this.onmousemove = onmousemove;
  }

  public void setOnmouseout(String onmouseout) {
    this.onmouseout = onmouseout;
  }

  public void setOnmouseover(String onmouseover) {
    this.onmouseover = onmouseover;
  }

  public void setOnmouseup(String onmouseup) {
    this.onmouseup = onmouseup;
  }

  public void setOnunderflow(String onunderflow) {
    this.onunderflow = onunderflow;
  }

  public void setOrdinal(String ordinal) {
    this.ordinal = ordinal;
  }

  public void setOrient(String orient) {
    this.orient = orient;
  }

  public void setPack(String pack) {
    this.pack = pack;
  }

  public void setPersist(String persist) {
    this.persist = persist;
  }

  public void setPopup(String popup) {
    this.popup = popup;
  }

  public void setPosition(String position) {
    this.position = position;
  }

  public void setPreferenceeditable(String preferenceeditable) {
    this.preferenceeditable = preferenceeditable;
  }

  // @StartGeneration

  protected void setProperties(UIComponent component) {
    super.setProperties(component);
    FacesContext facesContext = getFacesContext();

    setStringAttribute(facesContext, component, "align", align);
    setBooleanAttribute(facesContext, component, "allowevents", allowevents);
    setBooleanAttribute(facesContext, component, "allownegativeassertions",
        allownegativeassertions);
    setStringAttribute(facesContext, component, "coalesceduplicatearcs",
        coalesceduplicatearcs);
    setBooleanAttribute(facesContext, component, "collapsed", collapsed);
    setBooleanAttribute(facesContext, component, "container", container);
    setStringAttribute(facesContext, component, "containment", containment);
    setStringAttribute(facesContext, component, "context", context);
    setStringAttribute(facesContext, component, "contextmenu", contextmenu);
    setStringAttribute(facesContext, component, "datasources", datasources);
    setStringAttribute(facesContext, component, "dir", dir);
    setBooleanAttribute(facesContext, component, "disabled", disabled);
    setBooleanAttribute(facesContext, component, "empty", empty);
    setStringAttribute(facesContext, component, "equalsize", equalsize);
    setStringAttribute(facesContext, component, "flags", flags);
    setIntegerAttribute(facesContext, component, "flex", flex);
    setIntegerAttribute(facesContext, component, "height", height);
    setBooleanAttribute(facesContext, component, "hidden", hidden);
    setStringAttribute(facesContext, component, "insertafter", insertafter);
    setStringAttribute(facesContext, component, "insertbefore",
        insertbefore);
    setIntegerAttribute(facesContext, component, "left", left);
    setIntegerAttribute(facesContext, component, "maxheight", maxheight);
    setIntegerAttribute(facesContext, component, "maxwidth", maxwidth);
    setStringAttribute(facesContext, component, "menu", menu);
    setIntegerAttribute(facesContext, component, "minheight", minheight);
    setIntegerAttribute(facesContext, component, "minwidth", minwidth);
    setStringAttribute(facesContext, component, "mousethrough",
        mousethrough);
    setStringAttribute(facesContext, component, "observes", observes);
    setMethodBinding(facesContext, component, "onblur", onblur);
    setMethodBinding(facesContext, component, "onclick", onclick);
    setMethodBinding(facesContext, component, "oncommand", oncommand);
    setMethodBinding(facesContext, component, "oncommandupdate",
        oncommandupdate);
    setStringAttribute(facesContext, component, "oncontextmenu",
        oncontextmenu);
    setMethodBinding(facesContext, component, "ondblclick", ondblclick);
    setStringAttribute(facesContext, component, "ondragdrop", ondragdrop);
    setStringAttribute(facesContext, component, "ondragenter", ondragenter);
    setStringAttribute(facesContext, component, "ondragexit", ondragexit);
    setStringAttribute(facesContext, component, "ondraggesture",
        ondraggesture);
    setStringAttribute(facesContext, component, "ondragover", ondragover);
    setMethodBinding(facesContext, component, "onfocus", onfocus);
    setMethodBinding(facesContext, component, "onkeydown", onkeydown);
    setMethodBinding(facesContext, component, "onkeypress", onkeypress);
    setMethodBinding(facesContext, component, "onkeyup", onkeyup);
    setMethodBinding(facesContext, component, "onmousedown", onmousedown);
    setStringAttribute(facesContext, component, "onmousemove", onmousemove);
    setStringAttribute(facesContext, component, "onmouseout", onmouseout);
    setStringAttribute(facesContext, component, "onmouseover", onmouseover);
    setStringAttribute(facesContext, component, "onmouseup", onmouseup);
    setMethodBinding(facesContext, component, "onunderflow", onunderflow);
    setStringAttribute(facesContext, component, "ordinal", ordinal);
    setStringAttribute(facesContext, component, "orient", orient);
    setStringAttribute(facesContext, component, "pack", pack);
    setStringAttribute(facesContext, component, "persist", persist);
    setStringAttribute(facesContext, component, "popup", popup);
    setStringAttribute(facesContext, component, "position", position);
    setBooleanAttribute(facesContext, component, "preferenceeditable",
        preferenceeditable);
    setStringAttribute(facesContext, component, "ref", ref);
    setStringAttribute(facesContext, component, "removeelement",
        removeelement);
    setStringAttribute(facesContext, component, "sortDirection",
        sortDirection);
    setStringAttribute(facesContext, component, "sortResource",
        sortResource);
    setStringAttribute(facesContext, component, "sortResource2",
        sortResource2);
    setStringAttribute(facesContext, component, "statustext", statustext);
    setStringAttribute(facesContext, component, "style", style);
    setStringAttribute(facesContext, component, "styleClass", styleClass);
    setStringAttribute(facesContext, component, "template", template);
    setStringAttribute(facesContext, component, "tooltip", tooltip);
    setStringAttribute(facesContext, component, "tooltiptext", tooltiptext);
    setIntegerAttribute(facesContext, component, "top", top);
    setBooleanAttribute(facesContext, component, "updateSmoothly",
        updateSmoothly);
    setStringAttribute(facesContext, component, "uri", uri);
    setStringAttribute(facesContext, component, "waitcursor", waitcursor);
    setIntegerAttribute(facesContext, component, "width", width);

  }

  // @EndGeneration

  protected void setProperty(FacesContext context, UIComponent component,
      String name, String value) {
    if (value != null) {
      if (isValueReference(value)) {
        ValueBinding vb = context.getApplication().createValueBinding(
            value);
        component.setValueBinding(name, vb);
      } else {
        component.getAttributes().put(name, value);
      }
    }
  }

  public void setRef(String ref) {
    this.ref = ref;
  }

  public void setRemoveelement(String removeelement) {
    this.removeelement = removeelement;
  }

  public void setSortDirection(String sortDirection) {
    this.sortDirection = sortDirection;
  }

  public void setSortResource(String sortResource) {
    this.sortResource = sortResource;
  }

  public void setSortResource2(String sortResource2) {
    this.sortResource2 = sortResource2;
  }

  public void setStatustext(String statustext) {
    this.statustext = statustext;
  }

  public void setStyle(String style) {
    this.style = style;
  }

  public void setStyleClass(String styleClass) {
    this.styleClass = styleClass;
  }

  public void setTemplate(String template) {
    this.template = template;
  }

  public void setTooltip(String tooltip) {
    this.tooltip = tooltip;
  }

  public void setTooltiptext(String tooltiptext) {
    this.tooltiptext = tooltiptext;
  }

  public void setTop(String top) {
    this.top = top;
  }

  public void setUpdateSmoothly(String updateSmoothly) {
    this.updateSmoothly = updateSmoothly;
  }

  public void setUri(String uri) {
    this.uri = uri;
  }

  public void setWaitcursor(String waitcursor) {
    this.waitcursor = waitcursor;
  }

  public void setWidth(String width) {
    this.width = width;
  }
}
TOP

Related Classes of org.xulfaces.tag.XULComponentTag

TOP
Copyright © 2018 www.massapi.com. 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.