CPD Results

The following document contains the results of PMD's CPD 5.2.3.

Duplications

File Project Line
org/apache/myfaces/tobago/example/addressbook/web/Controller.java Tobago Example Addressbook (Java EE 6) 94
org/apache/myfaces/tobago/example/addressbook/web/Controller.java Tobago Example Addressbook 92
  private AddressDao addressDao;

  private FileItem uploadedFile;
  private boolean renderFileUploadPopup;

  static {
    FLAGS = new HashMap<Locale, String>(3);
    FLAGS.put(Locale.GERMAN, "image/addressbook/icon/flag-de.png");
    FLAGS.put(Locale.UK, "image/addressbook/icon/flag-gb.png");
    FLAGS.put(Locale.US, "image/addressbook/icon/flag-us.png");
  }

  @PostConstruct
  public void init() {
    final FacesContext facesContext = FacesContext.getCurrentInstance();
    final Application application = facesContext.getApplication();
    language = application.getDefaultLocale();
    countries.init(language);
    facesContext.getExternalContext().getSession(true);
    initLanguages();

    final TobagoConfig tobagoConfig = TobagoConfig.getInstance(facesContext);
    final List<Theme> themes = new ArrayList<Theme>(tobagoConfig.getSupportedThemes());
    themes.add(0, tobagoConfig.getDefaultTheme());
    themeItems = new ArrayList<SelectItem>();
    for (final Theme theme : themes) {
      themeItems.add(new SelectItem(theme, theme.getDisplayName()));
    }

    final ClientProperties client = ClientProperties.getInstance(facesContext);
    theme = client.getTheme();
    currentAddressList = addressDao.findAddresses(searchCriterion);
  }

  public void setAddressDao(final AddressDao addressDao) {
    this.addressDao = addressDao;
  }

  public void sheetSorter(final ActionEvent event) {
    if (event instanceof SortActionEvent) {
      final SortActionEvent sortEvent = (SortActionEvent) event;
      final UIColumn column = (UIColumn) sortEvent.getColumn();

      final SheetState sheetState = ((UISheet) sortEvent.getSheet()).getSheetState(FacesContext.getCurrentInstance());
      currentAddressList = addressDao.findAddresses(searchCriterion, column.getId(), sheetState.isAscending());
    }
  }

  public String search() {
    currentAddressList = addressDao.findAddresses(searchCriterion);
    return OUTCOME_LIST;
  }

  public String createAddress() {
    LOG.debug("action: createAddress");
    currentAddress = new Address();
    final FacesContext facesContext = FacesContext.getCurrentInstance();
    Locale locale = facesContext.getViewRoot().getLocale();
    // XXX use better datatype for countries than Locale
    if (Locale.GERMAN.equals(locale)) {
      locale = Locale.GERMANY;
    }
    currentAddress.setCountry(locale);
    return OUTCOME_EDITOR;
  }

  public String addDummyAddresses() throws IOException {
    for (int i=0; i<100; ++i) {
      currentAddress = RandomAddressGenerator.generateAddress();
      store();
    }
    return OUTCOME_LIST;
  }

  public String editAddress() {
    LOG.debug("action: editAddress");
    final List<Integer> selection = selectedAddresses.getSelectedRows();
    if (selection.size() != 1) {
      final FacesMessage error
          = new FacesMessage(FacesMessage.SEVERITY_ERROR, "Please select exactly one address!", null);
      FacesContext.getCurrentInstance().addMessage(null, error);
      return null;
    }
    currentAddress = currentAddressList.get(selection.get(0));
    return OUTCOME_EDITOR;
  }

  public String deleteAddresses() {
    final List<Integer> selection = selectedAddresses.getSelectedRows();
    if (selection.size() < 1) {
      final FacesMessage error = new FacesMessage("Please select at least one address.");
      FacesContext.getCurrentInstance().addMessage(null, error);
      return null;
    }
    Collections.sort(selection); // why?
    for (int i = selection.size() - 1; i >= 0; i--) {
      final Address address = currentAddressList.get(selection.get(i));
      addressDao.removeAddress(address);
    }
    selectedAddresses.resetSelected();
    currentAddressList = addressDao.findAddresses(searchCriterion);
    return OUTCOME_LIST;
  }

  public String store() {
    LOG.debug("action: storeAddress");
    currentAddress = addressDao.updateAddress(currentAddress);
    selectedAddresses.resetSelected();
    currentAddressList = addressDao.findAddresses(searchCriterion);
    return OUTCOME_LIST;
  }

  public String cancel() {
    currentAddressList = addressDao.findAddresses(searchCriterion);
    return OUTCOME_LIST;
  }

  public String languageChangedList() {
    initLanguages();
    return OUTCOME_LIST;
  }

  public String themeChanged() {
    final FacesContext facesContext = FacesContext.getCurrentInstance();
    final ClientProperties client = ClientProperties.getInstance(facesContext);
    client.setTheme(theme);
    return null;
  }

  public String getCurrentAddressPictureUrl() {
     return (currentAddress != null && currentAddress.getPicture() != null)
         ? FacesContext.getCurrentInstance().getExternalContext().getRequestContextPath() + "/faces/picture?id=XXXX"
         :"image/empty-portrait.png";

   }
  
  public void validatePhoneNumber(
      final FacesContext context, final UIComponent component, final Object value) {
    final String phoneNumber = (String) value;
    if (phoneNumber == null || phoneNumber.length() == 0) {
      return;
    }
    if (!phoneNumber.matches("\\+?[0-9 ]*(\\([0-9 ]*\\))?[0-9 ]*")) {
      throw new ValidatorException(MessageUtils.createErrorMessage(
          "validatorPhone", context));
    }
  }

  public List getCurrentAddressList() {
    return currentAddressList;
  }

  public Address getCurrentAddress() {
    return currentAddress;
  }

  public SheetState getSelectedAddresses() {
    return selectedAddresses;
  }

  public void setSelectedAddresses(final SheetState selectedAddresses) {
    this.selectedAddresses = selectedAddresses;
  }

  public boolean isRenderFileUploadPopup() {
    return renderFileUploadPopup;
  }

  public void setRenderFileUploadPopup(final boolean renderFileUploadPopup) {
    LOG.debug(">>> " + renderFileUploadPopup);
    this.renderFileUploadPopup = renderFileUploadPopup;
  }

  public String cancelFileUploadPopup() {
    setRenderFileUploadPopup(false);
    return null;
  }

  public void setRenderPopup(final boolean renderPopup) {
    this.renderPopup = renderPopup;
  }

  public boolean isRenderPopup() {
    return renderPopup;
  }

  public String selectColumns() {
    setRenderPopup(true);
    return OUTCOME_LIST;
  }

  public String okFileUpload() {
    setRenderFileUploadPopup(false);
    final Picture picture = new Picture(uploadedFile.getContentType(), uploadedFile.get());
    currentAddress.setPicture(picture);
    return null;
  }

  public String cancelFileUpload() {
    setRenderFileUploadPopup(false);
    return null;
  }

  public String cancelPopup() {
    setRenderPopup(false);
    return OUTCOME_LIST;
  }

  public String logout() {
    final FacesContext facesContext = FacesContext.getCurrentInstance();
    final HttpSession session = (HttpSession) facesContext.getExternalContext().getSession(false);
    if (session != null) {
      session.invalidate();
    }
    return "logout";
  }

  public String getVersion() {
    return getClass().getPackage().getImplementationVersion();
  }

  public Locale getLanguage() {
    return language;
  }

  public String getDisplayLanguage() {
    return language.getDisplayName(language);
  }

  public void setLanguage(final Locale language) {
    this.language = language;
  }

  public List<SelectItem> getLanguages() {
    return languages;
  }

  public void setLanguages(final List<SelectItem> languages) {
    this.languages = languages;
  }

  public Countries getCountries() {
    return countries;
  }
File Project Line
org/apache/myfaces/tobago/example/addressbook/Address.java Tobago Example Addressbook (Java EE 6) 42
org/apache/myfaces/tobago/example/addressbook/Address.java Tobago Example Addressbook 42
@Entity
public class Address implements Serializable {
  private static final long serialVersionUID = 1833416321633117657L;
  private static final Logger LOG = LoggerFactory.getLogger(Address.class);
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private Integer id;
  @Version
  private Integer revision;
  private String firstName;
  private String lastName;
  private String street;
  private String houseNumber;
  private String city;
  private String zipCode;
  @Transient
  private Locale country;
  private String languageCode;
  private String countryCode;
  private String phone;
  private String mobile;
  private String fax;
  @Transient
  private EmailAddress email;
  private String emailStr;
  private String icq;
  private String homePage;
  @Temporal(TemporalType.DATE)
  private Date dayOfBirth;
  private String note;
  private String company;
  private String jobTitle;
  private String jobPhone;
  @Transient
  private EmailAddress jobEmail;
  private String jobEmailStr;
  private String jobHomePage;
  @OneToOne(cascade = {CascadeType.ALL})
  private Picture picture;


  public Address() {
    LOG.debug("Creating new Address");
  }

  public void fill(final Address fromAddress) {
    id = fromAddress.getId();
    firstName = fromAddress.getFirstName();
    lastName = fromAddress.getLastName();
    street = fromAddress.getStreet();
    houseNumber = fromAddress.getHouseNumber();
    city = fromAddress.getCity();
    zipCode = fromAddress.getZipCode();
    country = fromAddress.getCountry();
    phone = fromAddress.getPhone();
    mobile = fromAddress.getMobile();
    fax = fromAddress.getFax();
    email = fromAddress.getEmail();
    dayOfBirth = fromAddress.getDayOfBirth();
    homePage = fromAddress.getHomePage();
    note = fromAddress.getNote();
    company = fromAddress.getCompany();
    jobTitle = fromAddress.getJobTitle();
    jobPhone = fromAddress.getJobPhone();
    jobEmail = fromAddress.getJobEmail();
    jobHomePage = fromAddress.getJobHomePage();
  }

  @PrePersist
  @PreUpdate
  private void store() {
    if (country != null) {
      countryCode = country.getCountry();
      languageCode = country.getLanguage();
    }
    if (email != null) {
      emailStr = email.getEmail();
    }
    if (jobEmail != null) {
      jobEmailStr = jobEmail.getEmail();
    }
  }
  
  @PostLoad
  private void load() {
    if (countryCode != null && languageCode != null) {
      country = new Locale(languageCode, countryCode);
    }
    if (emailStr != null) {
      email = new EmailAddress(emailStr);
    }
    if (jobEmailStr != null) {
      jobEmail = new EmailAddress(jobEmailStr);
    }
  }

  public Integer getId() {
    return id;
  }

  public void setId(final Integer id) {
    this.id = id;
  }

  public String getFirstName() {
    return firstName;
  }

  public void setFirstName(final String firstName) {
    this.firstName = firstName;
  }

  public String getLastName() {
    return lastName;
  }

  public void setLastName(final String lastName) {
    this.lastName = lastName;
  }

  public String getStreet() {
    return street;
  }

  public void setStreet(final String street) {
    this.street = street;
  }

  public String getHouseNumber() {
    return houseNumber;
  }

  public void setHouseNumber(final String houseNumber) {
    this.houseNumber = houseNumber;
  }

  public String getCity() {
    return city;
  }

  public void setCity(final String city) {
    this.city = city;
  }

  public String getZipCode() {
    return zipCode;
  }

  public void setZipCode(final String zipCode) {
    this.zipCode = zipCode;
  }

  public Locale getCountry() {
    return country;
  }

  public void setCountry(final Locale country) {
    this.country = country;
  }

  public String getPhone() {
    return phone;
  }

  public void setPhone(final String phone) {
    this.phone = phone;
  }

  public String getMobile() {
    return mobile;
  }

  public void setMobile(final String mobile) {
    this.mobile = mobile;
  }

  public String getFax() {
    return fax;
  }

  public void setFax(final String fax) {
    this.fax = fax;
  }

  public EmailAddress getEmail() {
    return email;
  }

  public void setEmail(final EmailAddress email) {
    if (email != null) {
      emailStr = email.getEmail();
    }
    this.email = email;
  }

  public String getIcq() {
    return icq;
  }

  public void setIcq(final String icq) {
    this.icq = icq;
  }

  public String getHomePage() {
    return homePage;
  }

  public void setHomePage(final String homePage) {
    this.homePage = homePage;
  }

  public Date getDayOfBirth() {
    return dayOfBirth;
  }

  public void setDayOfBirth(final Date dayOfBirth) {
    this.dayOfBirth = dayOfBirth;
  }

  public String getNote() {
    return note;
  }

  public void setNote(final String note) {
    this.note = note;
  }

  public String getCompany() {
    return company;
  }

  public void setCompany(final String company) {
    this.company = company;
  }

  public String getJobTitle() {
    return jobTitle;
  }

  public void setJobTitle(final String jobTitle) {
    this.jobTitle = jobTitle;
  }

  public String getJobPhone() {
    return jobPhone;
  }

  public void setJobPhone(final String jobPhone) {
    this.jobPhone = jobPhone;
  }

  public EmailAddress getJobEmail() {
    return jobEmail;
  }

  public void setJobEmail(final EmailAddress jobEmail) {
    if (jobEmail != null) {
      jobEmailStr = jobEmail.getEmail();
    }
    this.jobEmail = jobEmail;
  }

  public String getJobHomePage() {
    return jobHomePage;
  }

  public void setJobHomePage(final String jobHomePage) {
    this.jobHomePage = jobHomePage;
  }

  public boolean hasPicture() {
    return picture != null;
  }

  public Picture getPicture() {
    return picture;
  }

  public void setPicture(final Picture picture) {
    this.picture = picture;
  }

  public String toString() {
    return id + ": " + firstName + " " + lastName;
  }
}
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/SelectManyListboxExtensionTag.java Tobago Core 189
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneListboxExtensionTag.java Tobago Core 193
    requiredMessage = null;
    fieldId = null;
  }

  /**
   * Flag indicating that a value is required.
   * If the value is an empty string a
   * ValidationError occurs and a Error Message is rendered.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setRequired(final ValueExpression required) {
    this.required = required;
  }

  /**
   * The current value of this component.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Object")
  public void setValue(final ValueExpression value) {
    this.value = value;
  }

  /**
   * MethodBinding representing a value change listener method
   * that will be notified when a new value has been set for this input component.
   * The expression must evaluate to a public method that takes a ValueChangeEvent
   * parameter, with a return type of void.
   *
   * @param valueChangeListener
   */
  @TagAttribute
  @UIComponentTagAttribute(
          type = {},
          expression = DynamicExpression.METHOD_EXPRESSION_REQUIRED,
          methodSignature = "javax.faces.event.ValueChangeEvent")
  public void setValueChangeListener(final MethodExpression valueChangeListener) {
    this.valueChangeListener = valueChangeListener;
  }

  /**
   * Flag indicating that this element is disabled.
   */
  @TagAttribute()
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setDisabled(final ValueExpression disabled) {
    this.disabled = disabled;
  }

  /**
   * Flag indicating that this component will prohibit changes by the user.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setReadonly(final ValueExpression readonly) {
    this.readonly = readonly;
  }

  /**
   * Clientside script function to add to this component's onchange handler.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setOnchange(final ValueExpression onchange) {
    this.onchange = onchange;
  }

  /**
   * Text value to display as label.
   * If text contains an underscore the next character is used as accesskey.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setLabel(final ValueExpression label) {
    this.label = label;
  }

  /**
   * The accessKey of this component.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Character")
  public void setAccessKey(final javax.el.ValueExpression accessKey) {
    this.accessKey = accessKey;
  }

  /**
   * A method binding EL expression,
   * accepting FacesContext, UIComponent,
   * and Object parameters, and returning void, that validates
   * the component's local value.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = {},
      expression = DynamicExpression.METHOD_EXPRESSION,
      methodSignature = { "javax.faces.context.FacesContext", "javax.faces.component.UIComponent", "java.lang.Object" })
  public void setValidator(final MethodExpression validator) {
    this.validator = validator;
  }

  /**
   * An expression that specifies the Converter for this component.
   * If the value binding expression is a String,
   * the String is used as an ID to look up a Converter.
   * If the value binding expression is a Converter,
   * uses that instance as the converter.
   * The value can either be a static value (ID case only)
   * or an EL expression.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "javax.faces.convert.Converter",
      expression = DynamicExpression.VALUE_EXPRESSION)
  public void setConverter(final ValueExpression converter) {
    this.converter = converter;
  }

  /**
   * Flag indicating whether or not this component should be rendered
   * (during Render Response Phase), or processed on any subsequent form submit.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "true")
  public void setRendered(final ValueExpression rendered) {
    this.rendered = rendered;
  }

  /**
   * The value binding expression linking this
   * component to a property in a backing bean.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "javax.faces.component.UIComponent")
  public void setBinding(final ValueExpression binding) {
    this.binding = binding;
  }

  /**
   * Text value to display as tooltip.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setTip(final ValueExpression tip) {
    this.tip = tip;
  }

  /**
   * The width for the label component. Default: 'auto'.
   * This value is used in the gridLayouts columns attribute.
   * See gridLayout tag for valid values.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setLabelWidth(final ValueExpression labelWidth) {
    this.labelWidth = labelWidth;
  }

  /**
   * Indicate markup of this component.
   * Possible value is 'none'. But this can be overridden in the theme.
   */
  @TagAttribute
  @UIComponentTagAttribute(defaultValue = "none", type = "java.lang.String[]")
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/MenuCheckboxExtensionTag.java Tobago Core 178
org/apache/myfaces/tobago/internal/taglib/extension/MenuRadioExtensionTag.java Tobago Core 188
    transition = null;
    renderedPartially = null;
    fieldId = null;
    menuCommandTag = null;
    facetTag = null;
    inTag = null;
  }

  /**
   * Action to invoke when clicked.
   * This must be a MethodBinding or a String representing the application action to invoke when
   * this component is activated by the user.
   * The MethodBinding must evaluate to a public method that takes no parameters,
   * and returns a String (the logical outcome) which is passed to the
   * NavigationHandler for this application.
   * The String is directly passed to the Navigationhandler.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = {}, expression = DynamicExpression.METHOD_EXPRESSION,
      methodReturnType = "java.lang.Object")
  public void setAction(final javax.el.MethodExpression action) {
    this.action = action;
  }

  /**
   * MethodBinding representing an action listener method that will be
   * notified when this component is activated by the user.
   * The expression must evaluate to a public method that takes an ActionEvent
   * parameter, with a return type of void.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = {}, expression = DynamicExpression.METHOD_EXPRESSION_REQUIRED,
      methodSignature = "javax.faces.event.ActionEvent")
  public void setActionListener(final javax.el.MethodExpression actionListener) {
    this.actionListener = actionListener;
  }

  /**
   * Script to be invoked when clicked
   *
   * @param onclick
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setOnclick(final javax.el.ValueExpression onclick) {
    this.onclick = onclick;
  }

  /**
   * Link to an arbitrary URL
   *
   * @param link
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setLink(final javax.el.ValueExpression link) {
    this.link = link;
  }

  /**
   * The value binding expression linking this
   * component to a property in a backing bean.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "javax.faces.component.UIComponent")
  public void setBinding(final javax.el.ValueExpression binding) throws JspException {
    this.binding = binding;
  }

  /**
   * Flag indicating whether or not this component should be rendered
   * (during Render Response Phase), or processed on any subsequent form submit.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "true")
  public void setRendered(final javax.el.ValueExpression rendered) {
    this.rendered = rendered;
  }

  /**
   * Flag indicating that this element is disabled.
   */
  @TagAttribute()
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setDisabled(final javax.el.ValueExpression disabled) {
    this.disabled = disabled;
  }

  /**
   * The current value of this component.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Object")
  public void setValue(final javax.el.ValueExpression value) {
    this.value = value;
  }

  /**
   * Text value to display as label.
   * If text contains an underscore the next character is used as accesskey.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setLabel(final javax.el.ValueExpression label) {
    this.label = label;
  }

  /**
   * Flag indicating that, if this component is activated by the user,
   * notifications should be delivered to interested listeners and actions
   * immediately (that is, during Apply Request Values phase) rather than
   * waiting until Invoke Application phase.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setImmediate(final javax.el.ValueExpression immediate) {
    this.immediate = immediate;
  }

  /**
   * Specify, if the command calls an JSF-Action.
   * Useful to switch off the Double-Submit-Check and Waiting-Behavior.
   *
   * @param transition Indicates the transition.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "true")
  public void setTransition(final javax.el.ValueExpression transition) {
    this.transition = transition;
  }

  /**
   * Indicate the partially rendered Components in a case of a submit.
   */
   @TagAttribute
   @UIComponentTagAttribute(type = "java.lang.String[]")
File Project Line
org/apache/myfaces/tobago/internal/util/HtmlWriterUtils.java Tobago Core 57
org/apache/myfaces/tobago/internal/util/JavascriptWriterUtils.java Tobago Core 53
org/apache/myfaces/tobago/internal/util/JsonWriterUtils.java Tobago Core 58
  public HtmlWriterUtils(final Writer out, final String characterEncoding) {
    super(out, characterEncoding);
  }

  @Override
  protected void writeEncodedValue(final char[] text, final int start,
      final int length, final boolean isAttribute) throws IOException {

    int localIndex = -1;

    final int end = start + length;
    for (int i = start; i < end; i++) {
      final char ch = text[i];
      if (ch >= CHARS_TO_ESCAPE.length || CHARS_TO_ESCAPE[ch] != null) {
        localIndex = i;
        break;
      }
    }
    final Writer out = getOut();

    if (localIndex == -1) {
      // no need to escape
      out.write(text, start, length);
    } else {
      // write until localIndex and then encode the remainder
      out.write(text, start, localIndex);

      final ResponseWriterBuffer buffer = getBuffer();

      for (int i = localIndex; i < end; i++) {
        final char ch = text[i];

        // Tilde or less...
        if (ch < CHARS_TO_ESCAPE.length) {
          if (isAttribute && ch == '&' && (i + 1 < end) && text[i + 1] == '{') {
            // HTML 4.0, section B.7.1: ampersands followed by
            // an open brace don't get escaped
            buffer.addToBuffer('&');
          } else if (CHARS_TO_ESCAPE[ch] != null) {
            buffer.addToBuffer(CHARS_TO_ESCAPE[ch]);
          } else {
            buffer.addToBuffer(ch);
          }
        } else if (isUtf8()) {
          buffer.addToBuffer(ch);
        } else if (ch <= 0xff) {
          // ISO-8859-1 entities: encode as needed
          buffer.flushBuffer();

          out.write('&');
          final char[] chars = ISO8859_1_ENTITIES[ch - 0xA0];
          out.write(chars, 0, chars.length);
          out.write(';');
        } else {
          buffer.flushBuffer();

          // Double-byte characters to encode.
          // PENDING: when outputting to an encoding that
          // supports double-byte characters (UTF-8, for example),
          // we should not be encoding
          writeDecRef(ch);
        }
      }

      buffer.flushBuffer();
    }
  }
}
File Project Line
org/apache/myfaces/tobago/example/addressbook/web/Controller.java Tobago Example Addressbook (Java EE 6) 336
org/apache/myfaces/tobago/example/addressbook/web/Controller.java Tobago Example Addressbook 339
    return countries;
  }

  public List<SelectItem> getThemeItems() {
    return themeItems;
  }

  public Theme getTheme() {
    return theme;
  }

  public void setTheme(final Theme theme) {
    this.theme = theme;
  }

  public boolean isSimple() {
    return simple;
  }

  public void setSimple(final boolean simple) {
    this.simple = simple;
  }

  public boolean isRenderFirstName() {
    return renderFirstName;
  }

  public void setRenderFirstName(final boolean renderFirstName) {
    this.renderFirstName = renderFirstName;
  }

  public boolean isRenderLastName() {
    return renderLastName;
  }

  public void setRenderLastName(final boolean renderLastName) {
    this.renderLastName = renderLastName;
  }

  public boolean isRenderDayOfBirth() {
    return renderDayOfBirth;
  }

  public void setRenderDayOfBirth(final boolean renderDayOfBirth) {
    this.renderDayOfBirth = renderDayOfBirth;
  }

  public FileItem getUploadedFile() {
    return uploadedFile;
  }

  public void setUploadedFile(final FileItem uploadedFile) {
    this.uploadedFile = uploadedFile;
  }

  public String getSearchCriterion() {
    return searchCriterion;
  }

  public void setSearchCriterion(final String searchCriterion) {
    this.searchCriterion = searchCriterion;
  }

  public String popupFileUpload() {
    setRenderFileUploadPopup(true);
    return null;
  }

  public String languageChanged() {
    countries.init(language);
    initLanguages();
/*
    // reinit date converter
    FacesContext facesContext = FacesContext.getCurrentInstance();
    UIViewRoot viewRoot = facesContext.getViewRoot();
    EditableValueHolder component = (EditableValueHolder)
        viewRoot.findComponent(":page:dayOfBirth");
    if (component != null) {
      DateTimeConverter converter = (DateTimeConverter) component.getConverter();
      converter.setPattern(MessageUtils.getLocalizedString(facesContext, "editor_date_pattern"));
    }
*/
    return null;
  }

  private void initLanguages() {
    languages.clear();
    final FacesContext facesContext = FacesContext.getCurrentInstance();
    final Application application = facesContext.getApplication();
    final Iterator supportedLocales = application.getSupportedLocales();
    while (supportedLocales.hasNext()) {
      final Locale locale = (Locale) supportedLocales.next();
      final SelectItem item = new SelectItem(locale, locale.getDisplayName(language), null, FLAGS.get(locale));
      languages.add(item);
    }
    Collections.sort(languages, new SelectItemComparator());
  }

}
File Project Line
org/apache/myfaces/tobago/example/addressbook/web/StartupPhaseListener.java Tobago Example Addressbook (Java EE 6) 34
org/apache/myfaces/tobago/example/addressbook/web/StartupPhaseListener.java Tobago Example Addressbook 34
public class StartupPhaseListener implements PhaseListener {

  private static final Logger LOG = LoggerFactory.getLogger(StartupPhaseListener.class);
  public static final String LOGGED_IN = StartupPhaseListener.class.getName() + ".LOGGED_IN";
  public static final String PRINCIPAL = StartupPhaseListener.class.getName() + ".PRINCIPAL";

  public PhaseId getPhaseId() {
    return PhaseId.RESTORE_VIEW;
  }

  public void beforePhase(final PhaseEvent event) {

    final FacesContext facesContext = event.getFacesContext();
    final ExternalContext externalContext = facesContext.getExternalContext();
    final String pathInfo = externalContext.getRequestPathInfo();
    if (LOG.isDebugEnabled()) {
      LOG.debug("externalContext.getRequestPathInfo() = '" + pathInfo + "'");
    }

    if (pathInfo.equals("/error.xhtml") || // todo: not nice, find a declarative way.
        pathInfo.startsWith("/auth/")) {
      final Object session = externalContext.getSession(false);
      if (session != null) {
        externalContext.getSessionMap().put(LOGGED_IN, Boolean.FALSE);
      }
      return; // nothing to do.
    }

    final Boolean loggedIn = (Boolean) // todo: not nice to get this object directly from the session
        externalContext.getSessionMap().get(LOGGED_IN);

    if (!BooleanUtils.toBoolean(loggedIn)) {
      try {
        externalContext.getSessionMap().put(LOGGED_IN, Boolean.TRUE);
        final String forward = externalContext.getRequestContextPath() + "/faces/addressbook/start.xhtml";
        externalContext.redirect(externalContext.encodeResourceURL(forward));
      } catch (final Exception e) {
        LOG.error("", e);
        final String forward = externalContext.getRequestContextPath() + "/error.xhtml";
        try {
          externalContext.redirect(externalContext.encodeResourceURL(forward));
        } catch (final IOException e2) {
          LOG.error("", e2);
          throw new FacesException("Can't redirect to errorpage '" + forward + "'");
        }
      }
    }
  }

  public void afterPhase(final PhaseEvent event) {
  }
}
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/SelectManyCheckboxExtensionTag.java Tobago Core 277
org/apache/myfaces/tobago/internal/taglib/extension/SelectManyListboxExtensionTag.java Tobago Core 255
  }

  /**
   * Text value to display as label.
   * If text contains an underscore the next character is used as accesskey.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setLabel(final ValueExpression label) {
    this.label = label;
  }

  /**
   * The accessKey of this component.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Character")
  public void setAccessKey(final javax.el.ValueExpression accessKey) {
    this.accessKey = accessKey;
  }

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

  /**
   * A method binding EL expression,
   * accepting FacesContext, UIComponent,
   * and Object parameters, and returning void, that validates
   * the component's local value.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = {},
      expression = DynamicExpression.METHOD_EXPRESSION,
      methodSignature = { "javax.faces.context.FacesContext", "javax.faces.component.UIComponent", "java.lang.Object" })
  public void setValidator(final MethodExpression validator) {
    this.validator = validator;
  }

  /**
   * An expression that specifies the Converter for this component.
   * If the value binding expression is a String,
   * the String is used as an ID to look up a Converter.
   * If the value binding expression is a Converter,
   * uses that instance as the converter.
   * The value can either be a static value (ID case only)
   * or an EL expression.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "javax.faces.convert.Converter",
      expression = DynamicExpression.VALUE_EXPRESSION)
  public void setConverter(final ValueExpression converter) {
    this.converter = converter;
  }

  /**
   * Flag indicating whether or not this component should be rendered
   * (during Render Response Phase), or processed on any subsequent form submit.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "true")
  public void setRendered(final ValueExpression rendered) {
    this.rendered = rendered;
  }

  /**
   * The value binding expression linking this
   * component to a property in a backing bean.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "javax.faces.component.UIComponent")
  public void setBinding(final ValueExpression binding) {
    this.binding = binding;
  }

  /**
   * Text value to display as tooltip.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setTip(final ValueExpression tip) {
    this.tip = tip;
  }

  /**
   * The width for the label component. Default: 'auto'.
   * This value is used in the gridLayouts columns attribute.
   * See gridLayout tag for valid values.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setLabelWidth(final ValueExpression labelWidth) {
    this.labelWidth = labelWidth;
  }

  /**
   * Indicate markup of this component.
   * Possible value is 'none'. But this can be overridden in the theme.
   */
  @TagAttribute
  @UIComponentTagAttribute(defaultValue = "none", type = "java.lang.String[]")
  public void setMarkup(final ValueExpression markup) {
    this.markup = markup;
  }

  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Integer")
  public void setTabIndex(final ValueExpression tabIndex) {
    this.tabIndex = tabIndex;
  }

  /**
   * Flag indicating this component should receive the focus.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setFocus(final ValueExpression focus) {
    this.focus = focus;
  }

  /**
   * Range of items to render.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setRenderRange(final ValueExpression renderRange) {
File Project Line
org/apache/myfaces/tobago/example/addressbook/web/RandomAddressGenerator.java Tobago Example Addressbook (Java EE 6) 35
org/apache/myfaces/tobago/example/addressbook/web/RandomAddressGenerator.java Tobago Example Addressbook 35
public class RandomAddressGenerator {

  private static final String[] MALE_FIRST_NAMES = {
      "Alan", "Arvid", "Bernd", "Detlef", "Frank", "Hans",
      "John", "Max", "Michael", "Otto", "Tom", "Udo"};
  private static final String[] FEMALE_FIRST_NAMES = {
      "Anna", "Erika", "Jane", "Kate", "Kerstin", "Maria",
      "Polly", "Sabine", "Shirley", "Tanya", "Tracy", "Yvonne"};

  private static final String[] GERMAN_LAST_NAMES = {
      "Müller", "Meier", "Mustermann", "Schmidt", "Schulze"};
  private static final String[] ENGLISH_LAST_NAMES = {
      "Doe", "Jones", "Miller", "Public", "Raymond", "Smithee"
  };

  public static Address generateAddress() {
    return generateAddress(RandomUtils.nextBoolean(), RandomUtils.nextBoolean());
  }

  public static Address generateAddress(final boolean female, final boolean german) {
    final Address address = new Address();
    address.setFirstName(female ? randomString(FEMALE_FIRST_NAMES) : randomString(MALE_FIRST_NAMES));
    if (german) {
      address.setLastName(randomString(GERMAN_LAST_NAMES));
      address.setCountry(Locale.GERMANY);
    } else {
      address.setLastName(randomString(ENGLISH_LAST_NAMES));
      address.setCountry(RandomUtils.nextBoolean() ? Locale.US : Locale.UK);
    }
    final Calendar calendar = Calendar.getInstance();
    calendar.set(1920, 0, 1);
    calendar.add(Calendar.DAY_OF_YEAR, RandomUtils.nextInt(70 * 365));
    address.setDayOfBirth(calendar.getTime());
    return address;
  }

  static String randomString(final String[] array) {
    return array[RandomUtils.nextInt(array.length)];
  }

}
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/TextareaExtensionTag.java Tobago Core 206
org/apache/myfaces/tobago/internal/taglib/extension/TimeExtensionTag.java Tobago Core 214
  }

  /**
   * The current value of this component.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Object")
  public void setValue(final ValueExpression value) {
    this.value = value;
  }

  /**
   * MethodBinding representing a value change listener method
   * that will be notified when a new value has been set for this input component.
   * The expression must evaluate to a public method that takes a ValueChangeEvent
   * parameter, with a return type of void.
   *
   * @param valueChangeListener
   */
  @TagAttribute
  @UIComponentTagAttribute(
          type = {},
          expression = DynamicExpression.METHOD_EXPRESSION_REQUIRED,
          methodSignature = "javax.faces.event.ValueChangeEvent")
  public void setValueChangeListener(final MethodExpression valueChangeListener) {
    this.valueChangeListener = valueChangeListener;
  }

  /**
   * Text value to display as label.
   * If text contains an underscore the next character is used as accesskey.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setLabel(final ValueExpression label) {
    this.label = label;
  }

  /**
   * The accessKey of this component.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Character")
  public void setAccessKey(final javax.el.ValueExpression accessKey) {
    this.accessKey = accessKey;
  }

  /**
   * Flag indicating this component should receive the focus.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setFocus(final ValueExpression focus) {
    this.focus = focus;
  }

  /**
   * The value binding expression linking this
   * component to a property in a backing bean.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "javax.faces.component.UIComponent")
  public void setBinding(final ValueExpression binding) {
    this.binding = binding;
  }

  /**
   * Flag indicating whether or not this component should be rendered
   * (during Render Response Phase), or processed on any subsequent form submit.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "true")
  public void setRendered(final ValueExpression rendered) {
    this.rendered = rendered;
  }

  /**
   * An expression that specifies the Converter for this component.
   * If the value binding expression is a String,
   * the String is used as an ID to look up a Converter.
   * If the value binding expression is a Converter,
   * uses that instance as the converter.
   * The value can either be a static value (ID case only)
   * or an EL expression.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "javax.faces.convert.Converter",
      expression = DynamicExpression.VALUE_EXPRESSION)
  public void setConverter(final ValueExpression converter) {
    this.converter = converter;
  }

  /**
   * A method binding EL expression,
   * accepting FacesContext, UIComponent,
   * and Object parameters, and returning void, that validates
   * the component's local value.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = {},
      expression = DynamicExpression.METHOD_EXPRESSION,
      methodSignature = { "javax.faces.context.FacesContext", "javax.faces.component.UIComponent", "java.lang.Object" })
  public void setValidator(final MethodExpression validator) {
    this.validator = validator;
  }

  /**
   * Clientside script function to add to this component's onchange handler.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setOnchange(final ValueExpression onchange) {
    this.onchange = onchange;
  }

  /**
   * Indicate markup of this component.
   * Possible value is 'none'. But this can be overridden in the theme.
   */
  @TagAttribute
  @UIComponentTagAttribute(defaultValue = "none", type = "java.lang.String[]")
File Project Line
org/apache/myfaces/tobago/example/addressbook/InMemoryAddressDao.java Tobago Example Addressbook (Java EE 6) 35
org/apache/myfaces/tobago/example/addressbook/InMemoryAddressDao.java Tobago Example Addressbook 30
public class InMemoryAddressDao implements AddressDao, Serializable {

  private static final Logger LOG = LoggerFactory.getLogger(InMemoryAddressDao.class);

  private List<Address> addresses;

  public InMemoryAddressDao() {
    addresses = new ArrayList<Address>();
  }

  public synchronized Address updateAddress(final Address address) {
    LOG.debug("Trying address: "+address);
    final Address storedAddress = getAddress(address.getId());
    if (storedAddress == null) {
      address.setId(addresses.size()+1);
      LOG.debug("Creating address: "+address);
      addresses.add(address);
    } else {
      LOG.debug("Updating address : "+address);
      LOG.debug("Stored address is: "+storedAddress);
      storedAddress.fill(address);
    }
    return address;
  }

  public List<Address> findAddresses(final String filter, final String column, final boolean order) {
    return findAddresses(filter);
  }

  public synchronized List<Address> findAddresses(final String filter) {
    LOG.debug("Find addresses: "+addresses);
    return Collections.unmodifiableList(addresses);
  }

  public synchronized void removeAddress(final Address address) {
    final Iterator<Address> it = addresses.iterator();
    while (it.hasNext()) {
      if (it.next().getId().equals(address.getId())) {
        it.remove();
      }
    }
  }

  public Address getAddress(final Integer id) {
    for (final Address address : addresses) {
      if (address.getId().equals(id)) {
        return address;
      }
    }
    return null;
  }
}
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/InExtensionTag.java Tobago Core 231
org/apache/myfaces/tobago/internal/taglib/extension/TimeExtensionTag.java Tobago Core 198
    inTag = null;
    labelTag = null;
    validatorMessage = null;
    converterMessage = null;
    requiredMessage = null;
    fieldId = null;
  }

  /**
   * Indicate markup of this component.
   * Possible value is 'none'. But this can be overridden in the theme.
   */
  @TagAttribute
  @UIComponentTagAttribute(defaultValue = "none", type = "java.lang.String[]")
  public void setMarkup(final ValueExpression markup) {
    this.markup = markup;
  }

  /**
   * The current value of this component.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Object")
  public void setValue(final ValueExpression value) {
    this.value = value;
  }

  /**
   * MethodBinding representing a value change listener method
   * that will be notified when a new value has been set for this input component.
   * The expression must evaluate to a public method that takes a ValueChangeEvent
   * parameter, with a return type of void.
   *
   * @param valueChangeListener
   */
  @TagAttribute
  @UIComponentTagAttribute(
      type = {},
      expression = DynamicExpression.METHOD_EXPRESSION_REQUIRED,
      methodSignature = "javax.faces.event.ValueChangeEvent")
  public void setValueChangeListener(final MethodExpression valueChangeListener) {
    this.valueChangeListener = valueChangeListener;
  }

  /**
   * Text value to display as label.
   * If text contains an underscore the next character is used as accesskey.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setLabel(final ValueExpression label) {
    this.label = label;
  }

  /**
   * The accessKey of this component.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Character")
  public void setAccessKey(final javax.el.ValueExpression accessKey) {
    this.accessKey = accessKey;
  }

  /**
   * Flag indicating this component should receive the focus.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setFocus(final ValueExpression focus) {
    this.focus = focus;
  }

  /**
   * The value binding expression linking this
   * component to a property in a backing bean.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "javax.faces.component.UIComponent")
  public void setBinding(final ValueExpression binding) {
    this.binding = binding;
  }

  /**
   * Flag indicating whether or not this component should be rendered
   * (during Render Response Phase), or processed on any subsequent form submit.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "true")
  public void setRendered(final ValueExpression rendered) {
    this.rendered = rendered;
  }

  /**
   * An expression that specifies the Converter for this component.
   * If the value binding expression is a String,
   * the String is used as an ID to look up a Converter.
   * If the value binding expression is a Converter,
   * uses that instance as the converter.
   * The value can either be a static value (ID case only)
   * or an EL expression.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "javax.faces.convert.Converter",
      expression = DynamicExpression.VALUE_EXPRESSION)
  public void setConverter(final ValueExpression converter) {
    this.converter = converter;
  }

  /**
   * Clientside script function to add to this component's onchange handler.
   */
  @TagAttribute
  @UIComponentTagAttribute()
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/TextareaExtensionTag.java Tobago Core 329
org/apache/myfaces/tobago/internal/taglib/extension/TimeExtensionTag.java Tobago Core 327
  }

  /**
   * Flag indicating that this component will prohibit changes by the user.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setReadonly(final ValueExpression readonly) {
    this.readonly = readonly;
  }

  /**
   * Flag indicating that this element is disabled.
   */
  @TagAttribute()
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setDisabled(final ValueExpression disabled) {
    this.disabled = disabled;
  }

  /**
   * Flag indicating that a value is required.
   * If the value is an empty string a
   * ValidationError occurs and a Error Message is rendered.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setRequired(final ValueExpression required) {
    this.required = required;
  }

  /**
   * Text value to display as tooltip.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setTip(final ValueExpression tip) {
    this.tip = tip;
  }

   /**
   * The width for the label component. Default: 'auto'.
   * This value is used in the gridLayouts columns attribute.
   * See gridLayout tag for valid values.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setLabelWidth(final ValueExpression labelWidth) {
    this.labelWidth = labelWidth;
  }

  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Integer")
  public void setTabIndex(final ValueExpression tabIndex) {
    this.tabIndex = tabIndex;
  }

  /**
   * An expression that specifies the validator message
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setValidatorMessage(final ValueExpression validatorMessage) {
    this.validatorMessage = validatorMessage;
  }

  /**
   * An expression that specifies the converter message
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setConverterMessage(final ValueExpression converterMessage) {
    this.converterMessage = converterMessage;
  }

  /**
   * An expression that specifies the required message
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setRequiredMessage(final ValueExpression requiredMessage) {
    this.requiredMessage = requiredMessage;
  }

  /**
   * The component identifier for the input field component inside of the container.
   * This value must be unique within the closest parent component that is a naming container.
   */
  @TagAttribute(rtexprvalue = true)
  @UIComponentTagAttribute
  public void setFieldId(final String fieldId) {
    this.fieldId = fieldId;
  }

  /**
   * The component identifier for this component.
   * This value must be unique within the closest parent component that is a naming container.
   * For tx components the id will be set to the container (e. g. the panel).
   * To set the id of the input field, you have to use the attribute "fieldId".
   */
  @TagAttribute(rtexprvalue = true)
  @UIComponentTagAttribute
  public void setId(final String id) {
    super.setId(id);
  }
}
File Project Line
org/apache/myfaces/tobago/internal/component/AbstractUIPage.java Tobago Core 164
org/apache/myfaces/tobago/component/UIViewRoot.java Tobago Deprecation 233
      processDecodes0(context);
    }
  }

  private void decodeActionComponent(
      final FacesContext facesContext, final AbstractUIPage page, final Map<String,
      UIComponent> ajaxComponents) {
    final String actionId = page.getActionId();
    UIComponent actionComponent = null;
    if (actionId != null) {
      actionComponent = findComponent(actionId);
      if (actionComponent == null && FacesVersion.supports20() && FacesVersion.isMyfaces()) {
        final String bugActionId = actionId.replaceAll(":\\d+:", ":");
        try {
          actionComponent = findComponent(bugActionId);
          //LOG.info("command = \"" + actionComponent + "\"", new Exception());
        } catch (final Exception e) {
          // ignore
        }
      }
    }
    if (actionComponent == null) {
      return;
    }
    for (final UIComponent ajaxComponent : ajaxComponents.values()) {
      UIComponent component = actionComponent;
      while (component != null) {
        if (component == ajaxComponent) {
          return;
        }
        component = component.getParent();
      }
    }
    invokeOnComponent(facesContext, actionId, APPLY_REQUEST_VALUES_CALLBACK);
  }


  @Override
  public void processValidators(final FacesContext context) {
    if (context == null) {
      throw new NullPointerException("context");
    }

    final Map<String, UIComponent> ajaxComponents = AjaxInternalUtils.getAjaxComponents(context);
    if (ajaxComponents != null) {
      for (final Map.Entry<String, UIComponent> entry : ajaxComponents.entrySet()) {
        FacesContextUtils.setAjaxComponentId(context, entry.getKey());
        invokeOnComponent(context, entry.getKey(), PROCESS_VALIDATION_CALLBACK);
      }
    } else {
      super.processValidators(context);
    }
File Project Line
org/apache/myfaces/tobago/context/ResourceManagerUtils.java Tobago Core 144
org/apache/myfaces/tobago/context/ResourceManagerUtil.java Tobago Deprecation 102
  public static List<String> getScripts(final FacesContext facesContext, final String name) {
    final String contextPath = facesContext.getExternalContext().getRequestContextPath();
    final String[] scripts = ResourceManagerFactory.getResourceManager(facesContext).getScripts(facesContext, name);
    return addContextPath(scripts, contextPath);
  }

  /**
   * @deprecated Since Tobago 2.0.0. Because of CSP.
   */
  @Deprecated
  public static String getScriptsAsJSArray(final FacesContext facesContext, final String[] names) {
    final List<String> fileNames = new ArrayList<String>();
    for (final String name : names) {
      fileNames.addAll(getScripts(facesContext, name));
    }
    return toJSArray(fileNames);
  }

  /**
   * @deprecated Since Tobago 2.0.0. Because of CSP.
   */
  @Deprecated
  public static String getStylesAsJSArray(final FacesContext facesContext, final String[] names) {
    final List<String> fileNames = new ArrayList<String>();
    for (final String name : names) {
      fileNames.addAll(getStyles(facesContext, name));
    }
    return toJSArray(fileNames);
  }

  /**
   * @deprecated Since Tobago 2.0.0. Because of CSP.
   */
  @Deprecated
  public static String toJSArray(final List<String> list) {
    final StringBuilder sb = new StringBuilder();
    for (final String name : list) {
      if (sb.length() > 0) {
        sb.append(", ");
      }
      sb.append('\'');
      sb.append(name);
      sb.append('\'');
    }
    return "[" + sb.toString() + "]";
  }
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/SelectBooleanCheckboxExtensionTag.java Tobago Core 280
org/apache/myfaces/tobago/internal/taglib/extension/SelectManyCheckboxExtensionTag.java Tobago Core 296
org/apache/myfaces/tobago/internal/taglib/extension/SelectManyListboxExtensionTag.java Tobago Core 274
  }

  /**
   * A method binding EL expression,
   * accepting FacesContext, UIComponent,
   * and Object parameters, and returning void, that validates
   * the component's local value.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = {},
      expression = DynamicExpression.METHOD_EXPRESSION,
      methodSignature = { "javax.faces.context.FacesContext", "javax.faces.component.UIComponent", "java.lang.Object" })
  public void setValidator(final MethodExpression validator) {
    this.validator = validator;
  }

  /**
   * An expression that specifies the Converter for this component.
   * If the value binding expression is a String,
   * the String is used as an ID to look up a Converter.
   * If the value binding expression is a Converter,
   * uses that instance as the converter.
   * The value can either be a static value (ID case only)
   * or an EL expression.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "javax.faces.convert.Converter",
      expression = DynamicExpression.VALUE_EXPRESSION)
  public void setConverter(final ValueExpression converter) {
    this.converter = converter;
  }

  /**
   * Flag indicating whether or not this component should be rendered
   * (during Render Response Phase), or processed on any subsequent form submit.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "true")
  public void setRendered(final ValueExpression rendered) {
    this.rendered = rendered;
  }

  /**
   * The value binding expression linking this
   * component to a property in a backing bean.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "javax.faces.component.UIComponent")
  public void setBinding(final ValueExpression binding) {
    this.binding = binding;
  }

  /**
   * Text value to display as tooltip.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setTip(final ValueExpression tip) {
    this.tip = tip;
  }

  /**
   * The width for the label component. Default: 'auto'.
   * This value is used in the gridLayouts columns attribute.
   * See gridLayout tag for valid values.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setLabelWidth(final ValueExpression labelWidth) {
    this.labelWidth = labelWidth;
  }

  /**
   * Indicate markup of this component.
   * Possible value is 'none'. But this can be overridden in the theme.
   */
  @TagAttribute
  @UIComponentTagAttribute(defaultValue = "none", type = "java.lang.String[]")
  public void setMarkup(final ValueExpression markup) {
    this.markup = markup;
  }

  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Integer")
  public void setTabIndex(final ValueExpression tabIndex) {
    this.tabIndex = tabIndex;
  }

  /**
   * Flag indicating this component should receive the focus.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setFocus(final ValueExpression focus) {
    this.focus = focus;
  }

  /**
   * Flag indicating that a value is required.
   * If the value is an empty string a
   * ValidationError occurs and a Error Message is rendered.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneChoiceExtensionTag.java Tobago Core 189
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneRadioExtensionTag.java Tobago Core 201
    requiredMessage = null;
    fieldId = null;
  }

  /**
   * Flag indicating that a value is required.
   * If the value is an empty string a
   * ValidationError occurs and a Error Message is rendered.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setRequired(final ValueExpression required) {
    this.required = required;
  }

  /**
   * The current value of this component.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Object")
  public void setValue(final ValueExpression value) {
    this.value = value;
  }

  /**
   * MethodBinding representing a value change listener method
   * that will be notified when a new value has been set for this input component.
   * The expression must evaluate to a public method that takes a ValueChangeEvent
   * parameter, with a return type of void.
   *
   * @param valueChangeListener
   */
  @TagAttribute
  @UIComponentTagAttribute(
          type = {},
          expression = DynamicExpression.METHOD_EXPRESSION_REQUIRED,
          methodSignature = "javax.faces.event.ValueChangeEvent")
  public void setValueChangeListener(final MethodExpression valueChangeListener) {
    this.valueChangeListener = valueChangeListener;
  }

  /**
   * A method binding EL expression,
   * accepting FacesContext, UIComponent,
   * and Object parameters, and returning void, that validates
   * the component's local value.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = {},
      expression = DynamicExpression.METHOD_EXPRESSION,
      methodSignature = { "javax.faces.context.FacesContext", "javax.faces.component.UIComponent", "java.lang.Object" })
  public void setValidator(final MethodExpression validator) {
    this.validator = validator;
  }

  /**
   * Flag indicating that this element is disabled.
   */
  @TagAttribute()
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setDisabled(final ValueExpression disabled) {
    this.disabled = disabled;
  }

  /**
   * Flag indicating that this component will prohibit changes by the user.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setReadonly(final ValueExpression readonly) {
    this.readonly = readonly;
  }

  /**
   * Clientside script function to add to this component's onchange handler.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setOnchange(final ValueExpression onchange) {
    this.onchange = onchange;
  }

  /**
   * An expression that specifies the Converter for this component.
   * If the value binding expression is a String,
   * the String is used as an ID to look up a Converter.
   * If the value binding expression is a Converter,
   * uses that instance as the converter.
   * The value can either be a static value (ID case only)
   * or an EL expression.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "javax.faces.convert.Converter",
      expression = DynamicExpression.VALUE_EXPRESSION)
  public void setConverter(final ValueExpression converter) {
    this.converter = converter;
  }

  /**
   * Text value to display as label.
   * If text contains an underscore the next character is used as accesskey.
   */
  @TagAttribute
  @UIComponentTagAttribute()
File Project Line
org/apache/myfaces/tobago/example/addressbook/web/Layout.java Tobago Example Addressbook (Java EE 6) 28
org/apache/myfaces/tobago/example/addressbook/web/Layout.java Tobago Example Addressbook 28
@Deprecated
public class Layout extends PageStateImpl {

  private int width;
  private int height;
  private int minimumWidth;
  private int minimumHeight;
  private int maximumWidth;
  private int maximumHeight;

  public int getWidth() {
    final int clientWidth = getClientWidth();
    if (clientWidth != 0) {
      if (clientWidth < minimumWidth) {
        return minimumWidth;
      } else if (clientWidth > maximumWidth) {
        return maximumWidth;
      }
      return clientWidth;
    }
    return width;
  }

  public void setWidth(final int width) {
    this.width = width;
  }

  public int getHeight() {
    final int clientHeight = getClientHeight();
    if (clientHeight != 0) {
      if (clientHeight < minimumHeight) {
        return minimumHeight;
      } else if (clientHeight > maximumHeight) {
        return maximumHeight;
      }
      return clientHeight;
    }
    return height;
  }

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

  public int getMinimumWidth() {
    return minimumWidth;
  }

  public void setMinimumWidth(final int minimumWidth) {
    this.minimumWidth = minimumWidth;
  }

  public int getMinimumHeight() {
    return minimumHeight;
  }

  public void setMinimumHeight(final int minimumHeight) {
    this.minimumHeight = minimumHeight;
  }

  public int getMaximumWidth() {
    return maximumWidth;
  }

  public void setMaximumWidth(final int maximumWidth) {
    this.maximumWidth = maximumWidth;
  }

  public int getMaximumHeight() {
    return maximumHeight;
  }

  public void setMaximumHeight(final int maximumHeight) {
    this.maximumHeight = maximumHeight;
  }
}
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/MenuCheckboxExtensionTag.java Tobago Core 74
org/apache/myfaces/tobago/internal/taglib/extension/MenuRadioExtensionTag.java Tobago Core 80
  private javax.el.ValueExpression renderedPartially;
  private String fieldId;

  @Override
  public int doStartTag() throws JspException {

    menuCommandTag = new MenuCommandTag();
    menuCommandTag.setPageContext(pageContext);
    menuCommandTag.setParent(getParent());
    if (id != null) {
      menuCommandTag.setId(id);
    }
    if (rendered != null) {
      menuCommandTag.setRendered(rendered);
    }
    if (action != null) {
      menuCommandTag.setAction(action);
    }
    if (actionListener != null) {
      menuCommandTag.setActionListener(actionListener);
    }
    if (onclick != null) {
      menuCommandTag.setOnclick(onclick);
    }
    if (link != null) {
      menuCommandTag.setLink(link);
    }
    if (disabled != null) {
      menuCommandTag.setDisabled(disabled);
    }
    if (binding != null) {
      menuCommandTag.setBinding(binding);
    }
    if (label != null) {
      menuCommandTag.setLabel(label);
    }
    if (immediate != null) {
      menuCommandTag.setImmediate(immediate);
    }
    if (transition != null) {
      menuCommandTag.setTransition(transition);
    }
    if (renderedPartially != null) {
      menuCommandTag.setRenderedPartially(renderedPartially);
    }
    menuCommandTag.setJspId(nextJspId());
    menuCommandTag.doStartTag();

    facetTag = new FacetTag();
    facetTag.setPageContext(pageContext);
    facetTag.setParent(menuCommandTag);
    facetTag.setName(Facets.CHECKBOX);
File Project Line
org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigController.java Tobago Example Demo 88
org/apache/myfaces/tobago/example/test/ClientConfigController.java Tobago Example Test 70
  }

// ///////////////////////////////////////////// logic

  public void storeInClientProperties() {
    final ClientProperties client = ClientProperties.getInstance(FacesContext.getCurrentInstance());
    client.setTheme(theme);
  }

  public void loadFromClientProperties() {
    final ClientProperties client = ClientProperties.getInstance(FacesContext.getCurrentInstance());
    theme = client.getTheme();
  }

  public List<SelectItem> getLocaleItems() {
    final FacesContext facesContext = FacesContext.getCurrentInstance();
    final Application application = facesContext.getApplication();
    final Locale defaultLocale = application.getDefaultLocale();
    final Iterator supportedLocales = application.getSupportedLocales();

    boolean defaultInList = false;
    final List<SelectItem> localeItems = new ArrayList<SelectItem>();
    while (supportedLocales.hasNext()) {
      final Locale locale = (Locale) supportedLocales.next();
      localeItems.add(createLocaleItem(locale));
      if (locale.equals(defaultLocale)) {
        defaultInList = true;
      }
    }
    // If the default is already in the list, don't add it.
    // Background: Must the default be in the supported list? Yes or No?
    // This question is not specified explicit and different implemented in the RI and MyFaces
    if (!defaultInList && defaultLocale != null) {
      localeItems.add(0, createLocaleItem(defaultLocale));
    }
    return localeItems;
  }

  private SelectItem createLocaleItem(final Locale localeItem) {
    if (locale != null) {
      return new SelectItem(localeItem, localeItem.getDisplayName(locale));
    } else {
      return new SelectItem(localeItem, localeItem.getDisplayName(localeItem));
    }
  }

  public static ClientConfigController getCurrentInstance(
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/InExtensionTag.java Tobago Core 247
org/apache/myfaces/tobago/internal/taglib/extension/TextareaExtensionTag.java Tobago Core 206
  }

  /**
   * The current value of this component.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Object")
  public void setValue(final ValueExpression value) {
    this.value = value;
  }

  /**
   * MethodBinding representing a value change listener method
   * that will be notified when a new value has been set for this input component.
   * The expression must evaluate to a public method that takes a ValueChangeEvent
   * parameter, with a return type of void.
   *
   * @param valueChangeListener
   */
  @TagAttribute
  @UIComponentTagAttribute(
      type = {},
      expression = DynamicExpression.METHOD_EXPRESSION_REQUIRED,
      methodSignature = "javax.faces.event.ValueChangeEvent")
  public void setValueChangeListener(final MethodExpression valueChangeListener) {
    this.valueChangeListener = valueChangeListener;
  }

  /**
   * Text value to display as label.
   * If text contains an underscore the next character is used as accesskey.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setLabel(final ValueExpression label) {
    this.label = label;
  }

  /**
   * The accessKey of this component.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Character")
  public void setAccessKey(final javax.el.ValueExpression accessKey) {
    this.accessKey = accessKey;
  }

  /**
   * Flag indicating this component should receive the focus.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setFocus(final ValueExpression focus) {
    this.focus = focus;
  }

  /**
   * The value binding expression linking this
   * component to a property in a backing bean.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "javax.faces.component.UIComponent")
  public void setBinding(final ValueExpression binding) {
    this.binding = binding;
  }

  /**
   * Flag indicating whether or not this component should be rendered
   * (during Render Response Phase), or processed on any subsequent form submit.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "true")
  public void setRendered(final ValueExpression rendered) {
    this.rendered = rendered;
  }

  /**
   * An expression that specifies the Converter for this component.
   * If the value binding expression is a String,
   * the String is used as an ID to look up a Converter.
   * If the value binding expression is a Converter,
   * uses that instance as the converter.
   * The value can either be a static value (ID case only)
   * or an EL expression.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "javax.faces.convert.Converter",
      expression = DynamicExpression.VALUE_EXPRESSION)
  public void setConverter(final ValueExpression converter) {
    this.converter = converter;
  }

  /**
   * Clientside script function to add to this component's onchange handler.
   */
  @TagAttribute
  @UIComponentTagAttribute()
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/MenuCheckboxExtensionTag.java Tobago Core 131
org/apache/myfaces/tobago/internal/taglib/extension/MenuRadioExtensionTag.java Tobago Core 140
    if (value != null) {
      inTag.setValue(value);
    }
    if (fieldId != null) {
      inTag.setId(fieldId);
    }
    inTag.setJspId(nextJspId());
    inTag.doStartTag();

    return super.doStartTag();
  }

  @Override
  public int doEndTag() throws JspException {

    if (renderedPartially == null) {
      // Move attribute renderedPartially from selectOne to menuCommand component
      final UIComponent inComponent = inTag.getComponentInstance();
      final AbstractUICommand command = (AbstractUICommand) menuCommandTag.getComponentInstance();
      final javax.el.ValueExpression expression = inComponent.getValueExpression(Attributes.RENDERED_PARTIALLY);
      if (expression != null) {
        command.setValueExpression(Attributes.RENDERED_PARTIALLY, expression);
      } else {
        final Object renderedPartially = inComponent.getAttributes().get(Attributes.RENDERED_PARTIALLY);
        command.setRenderedPartially(StringUtils.split((String) renderedPartially, ", "));
      }
    }

    inTag.doEndTag();
    facetTag.doEndTag();
    menuCommandTag.doEndTag();

    return super.doEndTag();
  }

  public void release() {
    super.release();
    rendered = null;
    value = null;
    action = null;
    actionListener = null;
    onclick = null;
    link = null;
    disabled = null;
    binding = null;
    label = null;
    immediate = null;
    transition = null;
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/SelectManyCheckboxExtensionTag.java Tobago Core 277
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneListboxExtensionTag.java Tobago Core 259
  }

  /**
   * Text value to display as label.
   * If text contains an underscore the next character is used as accesskey.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setLabel(final ValueExpression label) {
    this.label = label;
  }

  /**
   * The accessKey of this component.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Character")
  public void setAccessKey(final javax.el.ValueExpression accessKey) {
    this.accessKey = accessKey;
  }

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

  /**
   * A method binding EL expression,
   * accepting FacesContext, UIComponent,
   * and Object parameters, and returning void, that validates
   * the component's local value.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = {},
      expression = DynamicExpression.METHOD_EXPRESSION,
      methodSignature = { "javax.faces.context.FacesContext", "javax.faces.component.UIComponent", "java.lang.Object" })
  public void setValidator(final MethodExpression validator) {
    this.validator = validator;
  }

  /**
   * An expression that specifies the Converter for this component.
   * If the value binding expression is a String,
   * the String is used as an ID to look up a Converter.
   * If the value binding expression is a Converter,
   * uses that instance as the converter.
   * The value can either be a static value (ID case only)
   * or an EL expression.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "javax.faces.convert.Converter",
      expression = DynamicExpression.VALUE_EXPRESSION)
  public void setConverter(final ValueExpression converter) {
    this.converter = converter;
  }

  /**
   * Flag indicating whether or not this component should be rendered
   * (during Render Response Phase), or processed on any subsequent form submit.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "true")
  public void setRendered(final ValueExpression rendered) {
    this.rendered = rendered;
  }

  /**
   * The value binding expression linking this
   * component to a property in a backing bean.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "javax.faces.component.UIComponent")
  public void setBinding(final ValueExpression binding) {
    this.binding = binding;
  }

  /**
   * Text value to display as tooltip.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setTip(final ValueExpression tip) {
    this.tip = tip;
  }

  /**
   * The width for the label component. Default: 'auto'.
   * This value is used in the gridLayouts columns attribute.
   * See gridLayout tag for valid values.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setLabelWidth(final ValueExpression labelWidth) {
    this.labelWidth = labelWidth;
  }

  /**
   * Indicate markup of this component.
   * Possible value is 'none'. But this can be overridden in the theme.
   */
  @TagAttribute
  @UIComponentTagAttribute(defaultValue = "none", type = "java.lang.String[]")
File Project Line
org/apache/myfaces/tobago/example/addressbook/EmailAddress.java Tobago Example Addressbook (Java EE 6) 23
org/apache/myfaces/tobago/example/addressbook/EmailAddress.java Tobago Example Addressbook 23
public class EmailAddress {

  private String email;

  public EmailAddress(final String email) {
    this.email = email;
  }

  public String getEmail() {
    return email;
  }

  public void setEmail(final String email) {
    this.email = email;
  }

  public String getLocalPart() {
    final String[] parts = email.split("@");
    return parts[0];
  }

  public String getDomain() {
    final String[] parts = email.split("@");
    return parts[1];
  }

  public boolean equals(final Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }

    final EmailAddress that = (EmailAddress) o;

    if (email != null ? !email.equals(that.email) : that.email != null) {
      return false;
    }

    return true;
  }

  public int hashCode() {
    return (email != null ? email.hashCode() : 0);
  }

  @Override
  public String toString() {
     return email;
  }

}
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneChoiceExtensionTag.java Tobago Core 285
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneRadioExtensionTag.java Tobago Core 305
  }

  /**
   * Text value to display as label.
   * If text contains an underscore the next character is used as accesskey.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setLabel(final ValueExpression label) {
    this.label = label;
  }

  /**
   * The accessKey of this component.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Character")
  public void setAccessKey(final javax.el.ValueExpression accessKey) {
    this.accessKey = accessKey;
  }

  /**
   * Flag indicating whether or not this component should be rendered
   * (during Render Response Phase), or processed on any subsequent form submit.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "true")
  public void setRendered(final ValueExpression rendered) {
    this.rendered = rendered;
  }

  /**
   * The value binding expression linking this
   * component to a property in a backing bean.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "javax.faces.component.UIComponent")
  public void setBinding(final ValueExpression binding) {
    this.binding = binding;
  }

  /**
   * Text value to display as tooltip.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setTip(final ValueExpression tip) {
    this.tip = tip;
  }

  /**
   * The width for the label component. Default: 'auto'.
   * This value is used in the gridLayouts columns attribute.
   * See gridLayout tag for valid values.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setLabelWidth(final ValueExpression labelWidth) {
    this.labelWidth = labelWidth;
  }

  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Integer")
  public void setTabIndex(final ValueExpression tabIndex) {
    this.tabIndex = tabIndex;
  }

  /**
   * Flag indicating this component should receive the focus.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setFocus(final ValueExpression focus) {
    this.focus = focus;
  }

  /**
   * Indicate markup of this component.
   * Possible value is 'none'. But this can be overridden in the theme.
   */
  @TagAttribute
  @UIComponentTagAttribute(defaultValue = "none", type = "java.lang.String[]")
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/SelectManyCheckboxExtensionTag.java Tobago Core 201
org/apache/myfaces/tobago/internal/taglib/extension/SelectManyListboxExtensionTag.java Tobago Core 186
    renderRange = null;
    validatorMessage = null;
    converterMessage = null;
    requiredMessage = null;
    fieldId = null;
  }

  /**
   * Flag indicating that a value is required.
   * If the value is an empty string a
   * ValidationError occurs and a Error Message is rendered.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setRequired(final ValueExpression required) {
    this.required = required;
  }

  /**
   * The current value of this component.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Object")
  public void setValue(final ValueExpression value) {
    this.value = value;
  }

  /**
   * MethodBinding representing a value change listener method
   * that will be notified when a new value has been set for this input component.
   * The expression must evaluate to a public method that takes a ValueChangeEvent
   * parameter, with a return type of void.
   */
  @TagAttribute
  @UIComponentTagAttribute(
          type = {},
          expression = DynamicExpression.METHOD_EXPRESSION_REQUIRED,
          methodSignature = "javax.faces.event.ValueChangeEvent")
  public void setValueChangeListener(final MethodExpression valueChangeListener) {
    this.valueChangeListener = valueChangeListener;
  }

  /**
   * Flag indicating that this element is disabled.
   */
  @TagAttribute()
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setDisabled(final ValueExpression disabled) {
    this.disabled = disabled;
  }

  /**
   * Flag indicating that this component will prohibit changes by the user.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setReadonly(final ValueExpression readonly) {
    this.readonly = readonly;
  }

  /**
   * Clientside script function to add to this component's onchange handler.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setOnchange(final ValueExpression onchange) {
    this.onchange = onchange;
  }

  /**
   * Flag indicating this component should rendered as an inline element.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/SelectBooleanCheckboxExtensionTag.java Tobago Core 204
org/apache/myfaces/tobago/internal/taglib/extension/SelectManyListboxExtensionTag.java Tobago Core 208
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneListboxExtensionTag.java Tobago Core 212
  @UIComponentTagAttribute(type = "java.lang.Boolean")
  public void setValue(final ValueExpression value) {
    this.value = value;
  }

  /**
   * MethodBinding representing a value change listener method
   * that will be notified when a new value has been set for this input component.
   * The expression must evaluate to a public method that takes a ValueChangeEvent
   * parameter, with a return type of void.
   *
   * @param valueChangeListener
   */
  @TagAttribute
  @UIComponentTagAttribute(
          type = {},
          expression = DynamicExpression.METHOD_EXPRESSION_REQUIRED,
          methodSignature = "javax.faces.event.ValueChangeEvent")
  public void setValueChangeListener(final MethodExpression valueChangeListener) {
    this.valueChangeListener = valueChangeListener;
  }

  /**
   * Flag indicating that this element is disabled.
   */
  @TagAttribute()
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setDisabled(final ValueExpression disabled) {
    this.disabled = disabled;
  }

  /**
   * Flag indicating that this component will prohibit changes by the user.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setReadonly(final ValueExpression readonly) {
    this.readonly = readonly;
  }

  /**
   * Clientside script function to add to this component's onchange handler.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setOnchange(final ValueExpression onchange) {
    this.onchange = onchange;
  }

  /**
   * Text value to display as label.
   * If text contains an underscore the next character is used as accesskey.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setLabel(final ValueExpression label) {
    this.label = label;
  }

  /**
   * The accessKey of this component.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Character")
  public void setAccessKey(final javax.el.ValueExpression accessKey) {
    this.accessKey = accessKey;
  }

  /**
   * Label to be displayed to the user for this option. This label will displayed beneath the component like 
   * the label of other check box components.
   */
  @TagAttribute
  @UIComponentTagAttribute()
File Project Line
org/apache/myfaces/tobago/example/addressbook/JpaAddressDao.java Tobago Example Addressbook (Java EE 6) 66
org/apache/myfaces/tobago/example/addressbook/JpaAddressDao.java Tobago Example Addressbook 62
  @SuppressWarnings("unchecked")
  public List<Address> findAddresses(String filter, final String column, final boolean order) {
    final StringBuilder builder = new StringBuilder();
    builder.append("select a from Address a");
    if (filter != null) {
      if (filter.indexOf('_') == -1 && filter.indexOf('%') == -1) {
        filter = "%" + filter + "%";
      }
      builder.append(" where a.firstName like '");
      builder.append(filter);
      builder.append("' or a.lastName like '");
      builder.append(filter);
      builder.append("'");
    }
    if (column != null) {
      builder.append(" order by a.");
      builder.append(column);
      builder.append(order ? " desc" : " asc");
    }
    final Query query = entityManager.createQuery(builder.toString());
    return query.getResultList();
  }

  public void removeAddress(Address address) {
    address = getAddress(address.getId());
    entityManager.remove(address);
  }
File Project Line
org/apache/myfaces/tobago/example/addressbook/web/MessageUtils.java Tobago Example Addressbook (Java EE 6) 27
org/apache/myfaces/tobago/example/addressbook/web/MessageUtils.java Tobago Example Addressbook 27
public class MessageUtils {

  private MessageUtils() {
  }

  public static String getLocalizedString(final FacesContext facesContext, final String key) {
    final ResourceBundle bundle = ResourceBundle.getBundle(
        facesContext.getApplication().getMessageBundle(),
        facesContext.getViewRoot().getLocale());
    return bundle.getString(key);
  }

  public static String getLocalizedString(final FacesContext facesContext,
      final String key, final String value) {
    return MessageFormat.format(
        getLocalizedString(facesContext, key), value);
  }

  public static String getLocalizedString(final FacesContext facesContext,
      final String key, final int value) {
    return MessageFormat.format(
        getLocalizedString(facesContext, key), value);
  }

  public static FacesMessage createErrorMessage(
      final String key, final FacesContext facesContext) {
    final FacesMessage message = new FacesMessage();
    // TODO _detail
    message.setDetail(getLocalizedString(facesContext, key));
    message.setSummary(getLocalizedString(facesContext, key));
    message.setSeverity(FacesMessage.SEVERITY_ERROR);
    return message;
  }

}
File Project Line
org/apache/myfaces/tobago/example/addressbook/web/PictureServlet.java Tobago Example Addressbook (Java EE 6) 37
org/apache/myfaces/tobago/example/addressbook/web/PictureServlet.java Tobago Example Addressbook 36
public class PictureServlet extends NonFacesRequestServlet {
  private static final Logger LOG = LoggerFactory.getLogger(PictureServlet.class);

  public String invokeApplication(final FacesContext facesContext) {
    final Controller controller = (Controller) VariableResolverUtils.resolveVariable(facesContext, "controller");
    final Address address = controller.getCurrentAddress();
    if (address.hasPicture()) {
      final Picture picture = address.getPicture();
      final byte[] content = picture.getContent();
      final HttpServletResponse response = (HttpServletResponse) facesContext.getExternalContext().getResponse();
      if (content != null && content.length > 0) {
        response.setContentType(picture.getContentType());
        final ByteArrayInputStream inputStream = new ByteArrayInputStream(content);
        try {
          IOUtils.copy(inputStream, response.getOutputStream());
        } catch (final IOException e) {
          LOG.error("", e);
        } finally{
          IOUtils.closeQuietly(inputStream);
        }
      }
      facesContext.responseComplete();
    }
    return null;  
  }
}
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/SelectManyCheckboxExtensionTag.java Tobago Core 204
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneListboxExtensionTag.java Tobago Core 193
    requiredMessage = null;
    fieldId = null;
  }

  /**
   * Flag indicating that a value is required.
   * If the value is an empty string a
   * ValidationError occurs and a Error Message is rendered.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setRequired(final ValueExpression required) {
    this.required = required;
  }

  /**
   * The current value of this component.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Object")
  public void setValue(final ValueExpression value) {
    this.value = value;
  }

  /**
   * MethodBinding representing a value change listener method
   * that will be notified when a new value has been set for this input component.
   * The expression must evaluate to a public method that takes a ValueChangeEvent
   * parameter, with a return type of void.
   */
  @TagAttribute
  @UIComponentTagAttribute(
          type = {},
          expression = DynamicExpression.METHOD_EXPRESSION_REQUIRED,
          methodSignature = "javax.faces.event.ValueChangeEvent")
  public void setValueChangeListener(final MethodExpression valueChangeListener) {
    this.valueChangeListener = valueChangeListener;
  }

  /**
   * Flag indicating that this element is disabled.
   */
  @TagAttribute()
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setDisabled(final ValueExpression disabled) {
    this.disabled = disabled;
  }

  /**
   * Flag indicating that this component will prohibit changes by the user.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setReadonly(final ValueExpression readonly) {
    this.readonly = readonly;
  }

  /**
   * Clientside script function to add to this component's onchange handler.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setOnchange(final ValueExpression onchange) {
    this.onchange = onchange;
  }

  /**
   * Flag indicating this component should rendered as an inline element.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
File Project Line
org/apache/myfaces/tobago/example/addressbook/web/LocaleConverter.java Tobago Example Addressbook (Java EE 6) 30
org/apache/myfaces/tobago/example/addressbook/web/LocaleConverter.java Tobago Example Addressbook 28
public class LocaleConverter implements Converter {

  public Object getAsObject(
      final FacesContext facesContext, final UIComponent component, final String value) {
    final Locale locale = createLocale(value);
    if (locale == null) {
      throw new ConverterException(MessageUtils.getLocalizedString(
          facesContext, "converterLocaleParserError", value));
    }
    return locale;
  }

  public String getAsString(
      final FacesContext facesContext, final UIComponent component, final Object value) {
    return value == null ? null : value.toString();
  }

  public static Locale createLocale(final String value) {
    final String[] strings = value.split("_");
    switch (strings.length) {
      case 1:
        return new Locale(strings[0]);
      case 2:
        return new Locale(strings[0], strings[1]);
      case 3:
        return new Locale(strings[0], strings[1], strings[2]);
      default:
        return null;
    }
  }

}
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/SelectBooleanCheckboxExtensionTag.java Tobago Core 280
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneListboxExtensionTag.java Tobago Core 278
  }

  /**
   * A method binding EL expression,
   * accepting FacesContext, UIComponent,
   * and Object parameters, and returning void, that validates
   * the component's local value.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = {},
      expression = DynamicExpression.METHOD_EXPRESSION,
      methodSignature = { "javax.faces.context.FacesContext", "javax.faces.component.UIComponent", "java.lang.Object" })
  public void setValidator(final MethodExpression validator) {
    this.validator = validator;
  }

  /**
   * An expression that specifies the Converter for this component.
   * If the value binding expression is a String,
   * the String is used as an ID to look up a Converter.
   * If the value binding expression is a Converter,
   * uses that instance as the converter.
   * The value can either be a static value (ID case only)
   * or an EL expression.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "javax.faces.convert.Converter",
      expression = DynamicExpression.VALUE_EXPRESSION)
  public void setConverter(final ValueExpression converter) {
    this.converter = converter;
  }

  /**
   * Flag indicating whether or not this component should be rendered
   * (during Render Response Phase), or processed on any subsequent form submit.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "true")
  public void setRendered(final ValueExpression rendered) {
    this.rendered = rendered;
  }

  /**
   * The value binding expression linking this
   * component to a property in a backing bean.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "javax.faces.component.UIComponent")
  public void setBinding(final ValueExpression binding) {
    this.binding = binding;
  }

  /**
   * Text value to display as tooltip.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setTip(final ValueExpression tip) {
    this.tip = tip;
  }

  /**
   * The width for the label component. Default: 'auto'.
   * This value is used in the gridLayouts columns attribute.
   * See gridLayout tag for valid values.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setLabelWidth(final ValueExpression labelWidth) {
    this.labelWidth = labelWidth;
  }

  /**
   * Indicate markup of this component.
   * Possible value is 'none'. But this can be overridden in the theme.
   */
  @TagAttribute
  @UIComponentTagAttribute(defaultValue = "none", type = "java.lang.String[]")
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/FileExtensionTag.java Tobago Core 314
org/apache/myfaces/tobago/internal/taglib/extension/SelectManyListboxExtensionTag.java Tobago Core 354
  }

  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Integer")
  public void setTabIndex(final ValueExpression tabIndex) {
    this.tabIndex = tabIndex;
  }

  /**
   * Flag indicating this component should receive the focus.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setFocus(final ValueExpression focus) {
    this.focus = focus;
  }

  /**
   * An expression that specifies the validator message
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setValidatorMessage(final ValueExpression validatorMessage) {
    this.validatorMessage = validatorMessage;
  }

  /**
   * An expression that specifies the converter message
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setConverterMessage(final ValueExpression converterMessage) {
    this.converterMessage = converterMessage;
  }

  /**
   * An expression that specifies the required message
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setRequiredMessage(final ValueExpression requiredMessage) {
    this.requiredMessage = requiredMessage;
  }

  /**
   * The component identifier for the input field component inside of the container.
   * This value must be unique within the closest parent component that is a naming container.
   */
  @TagAttribute(rtexprvalue = true)
  @UIComponentTagAttribute
  public void setFieldId(final String fieldId) {
    this.fieldId = fieldId;
  }

  /**
   * The component identifier for this component.
   * This value must be unique within the closest parent component that is a naming container.
   * For tx components the id will be set to the container (e. g. the panel).
   * To set the id of the input field, you have to use the attribute "fieldId".
   */
  @TagAttribute(rtexprvalue = true)
  @UIComponentTagAttribute
  public void setId(final String id) {
    super.setId(id);
  }
}
File Project Line
org/apache/myfaces/tobago/renderkit/html/HtmlElements.java Tobago Core 22
org/apache/myfaces/tobago/renderkit/html/HtmlConstants.java Tobago Deprecation 26
public final class HtmlElements {

  public static final String A = "a";
  public static final String AREA = "area";
  public static final String B = "b";
  public static final String BASE = "base";
  public static final String BODY = "body";
  public static final String BR = "br";
  public static final String BUTTON = "button";
  public static final String COL = "col";
  public static final String COLGROUP = "colgroup";
  public static final String DIV = "div";
  public static final String FIELDSET = "fieldset";
  public static final String FORM = "form";
  public static final String HEAD = "head";
  public static final String HR = "hr";
  public static final String HTML = "html";
  public static final String IFRAME = "iframe";
  public static final String IMG = "img";
  public static final String INPUT = "input";
  public static final String LABEL = "label";
  public static final String LEGEND = "legend";
  public static final String LI = "li";
  public static final String LINK = "link";
  public static final String META = "meta";
  public static final String NOSCRIPT = "noscript";
File Project Line
org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigController.java Tobago Example Demo 138
org/apache/myfaces/tobago/example/test/ClientConfigController.java Tobago Example Test 114
  }

  public Theme getTheme() {
    return theme;
  }

  public String getLocalizedTheme() {
    for (int i = 0; i < themeItems.length; i++) {
      final SelectItem themeItem = themeItems[i];
      if (ObjectUtils.equals(themeItem.getValue(), theme)) {
        return themeItem.getLabel();
      }
    }
    return "???";
  }

  public void setTheme(final Theme theme) {
    this.theme = theme;
  }

  public SelectItem[] getThemeItems() {
    return themeItems;
  }

  public void setThemeItems(final SelectItem[] themeItems) {
    this.themeItems = themeItems;
  }

  public Locale getLocale() {
    return locale;
  }

  public String getLocalizedLocale() {
    if (locale != null) {
      return locale.getDisplayName(locale);
    } else{
      return null;
    }
  }

  public void setLocale(final Locale locale) {
    this.locale = locale;
  }

}
File Project Line
org/apache/myfaces/tobago/component/ComponentUtil.java Tobago Deprecation 450
org/apache/myfaces/tobago/internal/taglib/TagUtils.java Tobago Deprecation 75
        component.getAttributes().put(name, new Integer(value));
      }
    }
  }

  /**
   * @deprecated Since Tobago 1.5 please use {@link ComponentUtils}
   */
  @Deprecated
  public static void setBooleanProperty(final UIComponent component, final String name, final String value) {
    if (value != null) {
      if (UIComponentTag.isValueReference(value)) {
        component.setValueBinding(name, createValueBinding(value));
      } else {
        component.getAttributes().put(name, Boolean.valueOf(value));
      }
    }
  }

  /**
   * @deprecated Since Tobago 1.5 please use {@link ComponentUtils}
   */
  @Deprecated
  public static void setStringProperty(final UIComponent component, final String name, final String value) {
    if (value != null) {
      if (UIComponentTag.isValueReference(value)) {
        component.setValueBinding(name, createValueBinding(value));
      } else {
        component.getAttributes().put(name, value);
      }
    }
  }

  /**
   * @deprecated Since Tobago 1.5 please use {@link ComponentUtils}
   */
  @Deprecated
  public static void setValueForValueBinding(final String name, final Object value) {
File Project Line
org/apache/myfaces/tobago/internal/component/AbstractUISheetLayout.java Tobago Core 64
org/apache/myfaces/tobago/internal/component/AbstractUITabGroupLayout.java Tobago Core 41
    for (final LayoutComponent component : getLayoutContainer().getComponents()) {
      if (component instanceof LayoutContainer && component.isRendered()) {
        ((LayoutContainer) component).getLayoutManager().init();
      }
    }
  }

  public void fixRelativeInsideAuto(final Orientation orientation, final boolean auto) {

    if (orientation == Orientation.HORIZONTAL) {
      horizontalAuto = auto;
    } else {
      verticalAuto = auto;
    }

    for (final LayoutComponent component : getLayoutContainer().getComponents()) {
      if (component instanceof LayoutContainer && component.isRendered()) {
        ((LayoutContainer) component).getLayoutManager().fixRelativeInsideAuto(orientation, auto);
      }
    }
  }

  public void preProcessing(final Orientation orientation) {

    // process auto tokens
    final IntervalList intervals = new IntervalList();
    for (final LayoutComponent component : getLayoutContainer().getComponents()) {

      if (component != null) {
File Project Line
org/apache/myfaces/tobago/internal/context/ResourceManagerImpl.java Tobago Core 466
org/apache/myfaces/tobago/internal/context/ResourceManagerImpl.java Tobago Core 515
      if (reverseOrder) {
        matches.add(0, result);
      } else {
        matches.add(result);
      }
      if (LOG.isTraceEnabled()) {
        LOG.trace("testing path: {} *", path); // match
      }

      return true;
    } else if (!returnStrings) {
      try {
        path = path.substring(1).replace('/', '.');
        final Class clazz = Class.forName(path);
        if (LOG.isTraceEnabled()) {
          LOG.trace("testing path: " + path + " *"); // match
        }
        matches.add(clazz);
        return true;
      } catch (final ClassNotFoundException e) {
        // not found
        if (LOG.isTraceEnabled()) {
          LOG.trace("testing path: " + path); // no match
        }
      }
    } else {
      if (LOG.isTraceEnabled()) {
        LOG.trace("testing path: " + path); // no match
      }
    }
    return false;
  }

  private boolean checkPath(
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/InExtensionTag.java Tobago Core 462
org/apache/myfaces/tobago/internal/taglib/extension/TextareaExtensionTag.java Tobago Core 367
org/apache/myfaces/tobago/internal/taglib/extension/TimeExtensionTag.java Tobago Core 365
  }

  /**
   * The width for the label component. Default: 'auto'.
   * This value is used in the gridLayouts columns attribute.
   * See gridLayout tag for valid values.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setLabelWidth(final ValueExpression labelWidth) {
    this.labelWidth = labelWidth;
  }

  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Integer")
  public void setTabIndex(final ValueExpression tabIndex) {
    this.tabIndex = tabIndex;
  }

  /**
   * An expression that specifies the validator message
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setValidatorMessage(final ValueExpression validatorMessage) {
    this.validatorMessage = validatorMessage;
  }

  /**
   * An expression that specifies the converter message
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setConverterMessage(final ValueExpression converterMessage) {
    this.converterMessage = converterMessage;
  }

  /**
   * An expression that specifies the required message
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setRequiredMessage(final ValueExpression requiredMessage) {
    this.requiredMessage = requiredMessage;
  }

  /**
   * The component identifier for the input field component inside of the container.
   * This value must be unique within the closest parent component that is a naming container.
   */
  @TagAttribute(rtexprvalue = true)
  @UIComponentTagAttribute
  public void setFieldId(final String fieldId) {
    this.fieldId = fieldId;
  }

  /**
   * The component identifier for this component.
   * This value must be unique within the closest parent component that is a naming container.
   * For tx components the id will be set to the container (e. g. the panel).
   * To set the id of the input field, you have to use the attribute "fieldId".
   */
  @TagAttribute(rtexprvalue = true)
  @UIComponentTagAttribute
  public void setId(final String id) {
    super.setId(id);
  }
}
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/DateExtensionTag.java Tobago Core 299
org/apache/myfaces/tobago/internal/taglib/extension/TextareaExtensionTag.java Tobago Core 251
org/apache/myfaces/tobago/internal/taglib/extension/TimeExtensionTag.java Tobago Core 259
  }

  /**
   * Flag indicating this component should receive the focus.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setFocus(final ValueExpression focus) {
    this.focus = focus;
  }

  /**
   * The value binding expression linking this
   * component to a property in a backing bean.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "javax.faces.component.UIComponent")
  public void setBinding(final ValueExpression binding) {
    this.binding = binding;
  }

  /**
   * Flag indicating whether or not this component should be rendered
   * (during Render Response Phase), or processed on any subsequent form submit.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "true")
  public void setRendered(final ValueExpression rendered) {
    this.rendered = rendered;
  }

  /**
   * An expression that specifies the Converter for this component.
   * If the value binding expression is a String,
   * the String is used as an ID to look up a Converter.
   * If the value binding expression is a Converter,
   * uses that instance as the converter.
   * The value can either be a static value (ID case only)
   * or an EL expression.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "javax.faces.convert.Converter",
      expression = DynamicExpression.VALUE_EXPRESSION)
  public void setConverter(final ValueExpression converter) {
    this.converter = converter;
  }

  /**
   * A method binding EL expression,
   * accepting FacesContext, UIComponent,
   * and Object parameters, and returning void, that validates
   * the component's local value.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = {},
      expression = DynamicExpression.METHOD_EXPRESSION,
      methodSignature = { "javax.faces.context.FacesContext", "javax.faces.component.UIComponent", "java.lang.Object" })
  public void setValidator(final MethodExpression validator) {
    this.validator = validator;
  }

  /**
   * Flag indicating that this component will prohibit changes by the user.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/DateExtensionTag.java Tobago Core 358
org/apache/myfaces/tobago/internal/taglib/extension/InExtensionTag.java Tobago Core 414
  }

  /**
   * Flag indicating that this component will prohibit changes by the user.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setReadonly(final ValueExpression readonly) {
    this.readonly = readonly;
  }

  /**
   * Flag indicating that this element is disabled.
   */
  @TagAttribute()
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setDisabled(final ValueExpression disabled) {
    this.disabled = disabled;
  }

  /**
   * Flag indicating that a value is required.
   * If the value is an empty string a
   * ValidationError occurs and a Error Message is rendered.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setRequired(final ValueExpression required) {
    this.required = required;
  }

  /**
   * Text value to display as tooltip.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setTip(final ValueExpression tip) {
    this.tip = tip;
  }

  /**
   * Displays a short text in the input field, that describes the meaning of this field.
   * This is part of HTML 5, the theme should emulate the behaviour, when the browser doesn't support it.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setPlaceholder(final ValueExpression placeholder) {
    this.placeholder = placeholder;
  }

   /**
   * The width for the label component. Default: 'auto'.
   * This value is used in the gridLayouts columns attribute.
   * See gridLayout tag for valid values.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setLabelWidth(final ValueExpression labelWidth) {
    this.labelWidth = labelWidth;
  }

  /**
   * Indicate markup of this component.
   * Possible value is 'none'. But this can be overridden in the theme.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.String[]", defaultValue = "none")
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/SelectManyCheckboxExtensionTag.java Tobago Core 70
org/apache/myfaces/tobago/internal/taglib/extension/SelectManyListboxExtensionTag.java Tobago Core 67
org/apache/myfaces/tobago/internal/taglib/extension/SelectManyShuttleExtensionTag.java Tobago Core 68
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneListboxExtensionTag.java Tobago Core 67
org/apache/myfaces/tobago/internal/taglib/extension/TextareaExtensionTag.java Tobago Core 82
  @Override
  public int doStartTag() throws JspException {

    labelTag = new LabelExtensionTag();
    labelTag.setPageContext(pageContext);
    labelTag.setRows("*");
    if (id != null) {
      labelTag.setId(id);
    }
    if (label != null) {
      labelTag.setValue(label);
    }
    if (accessKey != null) {
      labelTag.setAccessKey(accessKey);
    }
    if (tip != null) {
      labelTag.setTip(tip);
    }
    if (rendered != null) {
      labelTag.setRendered(rendered);
    }
    if (labelWidth != null) {
      labelTag.setColumns(createStringValueExpression(labelWidth.getExpressionString() + ";*"));
    }
    if (markup != null) {
      labelTag.setMarkup(markup);
    }
    labelTag.setParent(getParent());
    labelTag.setJspId(nextJspId());
    labelTag.doStartTag();
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneListboxExtensionTag.java Tobago Core 308
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneRadioExtensionTag.java Tobago Core 324
  }

  /**
   * Flag indicating whether or not this component should be rendered
   * (during Render Response Phase), or processed on any subsequent form submit.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "true")
  public void setRendered(final ValueExpression rendered) {
    this.rendered = rendered;
  }

  /**
   * The value binding expression linking this
   * component to a property in a backing bean.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "javax.faces.component.UIComponent")
  public void setBinding(final ValueExpression binding) {
    this.binding = binding;
  }

  /**
   * Text value to display as tooltip.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setTip(final ValueExpression tip) {
    this.tip = tip;
  }

  /**
   * The width for the label component. Default: 'auto'.
   * This value is used in the gridLayouts columns attribute.
   * See gridLayout tag for valid values.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setLabelWidth(final ValueExpression labelWidth) {
    this.labelWidth = labelWidth;
  }

  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Integer")
  public void setTabIndex(final ValueExpression tabIndex) {
    this.tabIndex = tabIndex;
  }

  /**
   * Flag indicating this component should receive the focus.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setFocus(final ValueExpression focus) {
    this.focus = focus;
  }

  /**
   * An expression that specifies the validator message
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setValidatorMessage(final ValueExpression validatorMessage) {
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneChoiceExtensionTag.java Tobago Core 304
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneListboxExtensionTag.java Tobago Core 308
  }

  /**
   * Flag indicating whether or not this component should be rendered
   * (during Render Response Phase), or processed on any subsequent form submit.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "true")
  public void setRendered(final ValueExpression rendered) {
    this.rendered = rendered;
  }

  /**
   * The value binding expression linking this
   * component to a property in a backing bean.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "javax.faces.component.UIComponent")
  public void setBinding(final ValueExpression binding) {
    this.binding = binding;
  }

  /**
   * Text value to display as tooltip.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setTip(final ValueExpression tip) {
    this.tip = tip;
  }

  /**
   * The width for the label component. Default: 'auto'.
   * This value is used in the gridLayouts columns attribute.
   * See gridLayout tag for valid values.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setLabelWidth(final ValueExpression labelWidth) {
    this.labelWidth = labelWidth;
  }

  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Integer")
  public void setTabIndex(final ValueExpression tabIndex) {
    this.tabIndex = tabIndex;
  }

  /**
   * Flag indicating this component should receive the focus.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setFocus(final ValueExpression focus) {
    this.focus = focus;
  }

  /**
   * Indicate markup of this component.
   * Possible value is 'none'. But this can be overridden in the theme.
   */
  @TagAttribute
  @UIComponentTagAttribute(defaultValue = "none", type = "java.lang.String[]")
File Project Line
org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyCheckboxRenderer.java Tobago Theme Standard 89
org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneRadioRenderer.java Tobago Theme Standard 92
        checked = RenderUtils.contains(submittedValues, formattedValue);
      }
      writer.writeAttribute(HtmlAttributes.CHECKED, checked);
      writer.writeNameAttribute(id);
      writer.writeIdAttribute(itemId);
      writer.writeAttribute(HtmlAttributes.VALUE, formattedValue, true);
      writer.writeAttribute(HtmlAttributes.DISABLED, item.isDisabled() || disabled);
      writer.writeAttribute(HtmlAttributes.READONLY, readonly);
      writer.writeAttribute(HtmlAttributes.REQUIRED, required);
      if (first) {
        HtmlRendererUtils.renderFocus(id, select.isFocus(), ComponentUtils.isError(select), facesContext, writer);
        first = false;
      }
      final Integer tabIndex = select.getTabIndex();
      if (tabIndex != null) {
        writer.writeAttribute(HtmlAttributes.TABINDEX, tabIndex);
      }
      HtmlRendererUtils.renderCommandFacet(select, itemId, facesContext, writer);
      writer.endElement(HtmlElements.INPUT);
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/InExtensionTag.java Tobago Core 92
org/apache/myfaces/tobago/internal/taglib/extension/SelectBooleanCheckboxExtensionTag.java Tobago Core 69
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneChoiceExtensionTag.java Tobago Core 68
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneRadioExtensionTag.java Tobago Core 71
org/apache/myfaces/tobago/internal/taglib/extension/TimeExtensionTag.java Tobago Core 81
  @Override
  public int doStartTag() throws JspException {

    labelTag = new LabelExtensionTag();
    labelTag.setPageContext(pageContext);
    if (id != null) {
      labelTag.setId(id);
    }
    if (label != null) {
      labelTag.setValue(label);
    }
    if (accessKey != null) {
      labelTag.setAccessKey(accessKey);
    }
    if (tip != null) {
      labelTag.setTip(tip);
    }
    if (rendered != null) {
      labelTag.setRendered(rendered);
    }
    if (labelWidth != null) {
      labelTag.setColumns(createStringValueExpression(labelWidth.getExpressionString() + ";*"));
    }
    if (markup != null) {
      labelTag.setMarkup(markup);
    }
    labelTag.setParent(getParent());
    labelTag.setJspId(nextJspId());
    labelTag.doStartTag();
File Project Line
org/apache/myfaces/tobago/apt/processor/CheckstyleConfigGenerator.java Tobago Tool Apt 232
org/apache/myfaces/tobago/apt/processor/TaglibGenerator.java Tobago Tool Apt 375
        throw new IllegalArgumentException("Only setter allowed found: " + simpleName);
      }
    }
  }

  private List<? extends javax.lang.model.element.Element> getAllMembers(final TypeElement type) {
    final List<? extends javax.lang.model.element.Element> members
        = new ArrayList<javax.lang.model.element.Element>(processingEnv.getElementUtils().getAllMembers(type));
    Collections.sort(members, new Comparator<javax.lang.model.element.Element>() {
      public int compare(final javax.lang.model.element.Element d1, final javax.lang.model.element.Element d2) {
        return d1.getSimpleName().toString().compareTo(d2.getSimpleName().toString());
      }
    });
    return members;
  }

  private void addLib(final Taglib taglibAnnotation, final Element parent, final Document document) {
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneListboxExtensionTag.java Tobago Core 363
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneRadioExtensionTag.java Tobago Core 388
  }

  /**
   * An expression that specifies the validator message
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setValidatorMessage(final ValueExpression validatorMessage) {
    this.validatorMessage = validatorMessage;
  }

  /**
   * An expression that specifies the converter message
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setConverterMessage(final ValueExpression converterMessage) {
    this.converterMessage = converterMessage;
  }

  /**
   * An expression that specifies the required message
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setRequiredMessage(final ValueExpression requiredMessage) {
    this.requiredMessage = requiredMessage;
  }

  /**
   * Indicate markup of this component.
   * Possible value is 'none'. But this can be overridden in the theme.
   */
  @TagAttribute
  @UIComponentTagAttribute(defaultValue = "none", type = "java.lang.String[]")
  public void setMarkup(final ValueExpression markup) {
    this.markup = markup;
  }

  /**
   * The component identifier for the input field component inside of the container.
   * This value must be unique within the closest parent component that is a naming container.
   */
  @TagAttribute(rtexprvalue = true)
  @UIComponentTagAttribute
  public void setFieldId(final String fieldId) {
    this.fieldId = fieldId;
  }

  /**
   * The component identifier for this component.
   * This value must be unique within the closest parent component that is a naming container.
   * For tx components the id will be set to the container (e. g. the panel).
   * To set the id of the input field, you have to use the attribute "fieldId".
   */
  @TagAttribute(rtexprvalue = true)
  @UIComponentTagAttribute
  public void setId(final String id) {
    super.setId(id);
  }
}
File Project Line
org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigController.java Tobago Example Demo 41
org/apache/myfaces/tobago/example/test/ClientConfigController.java Tobago Example Test 38
  private Theme theme;
  private SelectItem[] themeItems;

  private Locale locale;

  public ClientConfigController() {

    // theme

    final FacesContext facesContext = FacesContext.getCurrentInstance();
    final TobagoConfig tobagoConfig = TobagoConfig.getInstance(facesContext);

    final List<Theme> themes = new ArrayList<Theme>(tobagoConfig.getSupportedThemes());
    themes.add(0, tobagoConfig.getDefaultTheme());
    themeItems = new SelectItem[themes.size()];
    for (int i = 0; i < themeItems.length; i++) {
      final Theme themeItem = themes.get(i);
      themeItems[i] = new SelectItem(themeItem, themeItem.getDisplayName());
    }

    // locale

    locale = facesContext.getViewRoot().getLocale();

    // load

    loadFromClientProperties();
  }

  public String submit() {
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/SelectManyCheckboxExtensionTag.java Tobago Core 380
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneRadioExtensionTag.java Tobago Core 364
  }

  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Integer")
  public void setTabIndex(final ValueExpression tabIndex) {
    this.tabIndex = tabIndex;
  }

  /**
   * Flag indicating this component should receive the focus.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setFocus(final ValueExpression focus) {
    this.focus = focus;
  }

  /**
   * Range of items to render.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setRenderRange(final ValueExpression renderRange) {
    this.renderRange = renderRange;
  }

  /**
   * An expression that specifies the validator message
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setValidatorMessage(final ValueExpression validatorMessage) {
    this.validatorMessage = validatorMessage;
  }

  /**
   * An expression that specifies the converter message
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setConverterMessage(final ValueExpression converterMessage) {
    this.converterMessage = converterMessage;
  }

  /**
   * An expression that specifies the required message
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setRequiredMessage(final ValueExpression requiredMessage) {
    this.requiredMessage = requiredMessage;
  }
  
  /**
   * The component identifier for the input field component inside of the container.
   * This value must be unique within the closest parent component that is a naming container.
   */
  @TagAttribute(rtexprvalue = true)
File Project Line
org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java Tobago Deprecation 570
org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtils.java Tobago Theme Standard 606
      strBuilder.append(HtmlRendererUtil.getComponentId(facesContext, command, list[i]));
      strBuilder.append("\"");
    }
    strBuilder.append("]");
    return strBuilder.toString();
  }

  /**
   * @deprecated Please use HtmlRendererUtils
   */
  @Deprecated
  public static String getJavascriptArray(final String[] list) {
    final StringBuilder strBuilder = new StringBuilder();
    strBuilder.append("[");
    for (int i = 0; i < list.length; i++) {
      if (i != 0) {
        strBuilder.append(",");
      }
      strBuilder.append("\"");
      strBuilder.append(list[i]);
      strBuilder.append("\"");
    }
    strBuilder.append("]");
    return strBuilder.toString();
  }

  /**
   * @deprecated Please use HtmlRendererUtils
   */
  @Deprecated
  public static void renderDojoDndSource(final FacesContext context, final UIComponent component)
      throws IOException {
File Project Line
org/apache/myfaces/tobago/event/ValueExpressionResetInputActionListener.java Tobago Core 52
org/apache/myfaces/tobago/event/ValueBindingResetInputActionListener.java Tobago Deprecation 56
    final Object obj = clientIdsExpression.getValue(FacesContext.getCurrentInstance().getELContext());
    final String [] clientIds;
    if (obj instanceof String[]) {
      clientIds = (String[]) obj;
    } else if (obj instanceof String) {
      clientIds= StringUtils.split((String) obj, ", ");
    } else {
      LOG.error("Ignore unknown value of " + obj + " for reset.");
      return;
    }
    for (final String clientId : clientIds) {
      final UIComponent component = ComponentUtils.findComponent(event.getComponent(), clientId);
      if (component != null) {
        resetChildren(component);
      }
    }
  }

  public boolean isTransient() {
    return false;
  }

  public void restoreState(final FacesContext context, final Object state) {
    final Object[] values = (Object[]) state;
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/SelectBooleanCheckboxExtensionTag.java Tobago Core 204
org/apache/myfaces/tobago/internal/taglib/extension/SelectManyCheckboxExtensionTag.java Tobago Core 223
  @UIComponentTagAttribute(type = "java.lang.Boolean")
  public void setValue(final ValueExpression value) {
    this.value = value;
  }

  /**
   * MethodBinding representing a value change listener method
   * that will be notified when a new value has been set for this input component.
   * The expression must evaluate to a public method that takes a ValueChangeEvent
   * parameter, with a return type of void.
   *
   * @param valueChangeListener
   */
  @TagAttribute
  @UIComponentTagAttribute(
          type = {},
          expression = DynamicExpression.METHOD_EXPRESSION_REQUIRED,
          methodSignature = "javax.faces.event.ValueChangeEvent")
  public void setValueChangeListener(final MethodExpression valueChangeListener) {
    this.valueChangeListener = valueChangeListener;
  }

  /**
   * Flag indicating that this element is disabled.
   */
  @TagAttribute()
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setDisabled(final ValueExpression disabled) {
    this.disabled = disabled;
  }

  /**
   * Flag indicating that this component will prohibit changes by the user.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setReadonly(final ValueExpression readonly) {
    this.readonly = readonly;
  }

  /**
   * Clientside script function to add to this component's onchange handler.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setOnchange(final ValueExpression onchange) {
    this.onchange = onchange;
  }

  /**
   * Text value to display as label.
   * If text contains an underscore the next character is used as accesskey.
   */
  @TagAttribute
  @UIComponentTagAttribute()
File Project Line
org/apache/myfaces/tobago/internal/component/AbstractUIPage.java Tobago Core 139
org/apache/myfaces/tobago/component/UIViewRoot.java Tobago Deprecation 203
  }

  @Override
  public void processDecodes(final FacesContext context) {
    if (context == null) {
      throw new NullPointerException("context");
    }
    final Map<String, UIComponent> ajaxComponents = AjaxInternalUtils.parseAndStoreComponents(context);
    if (ajaxComponents != null) {
      // first decode the page
      final AbstractUIPage page = ComponentUtils.findPage(context);
      page.decode(context);
      page.markSubmittedForm(context);
      FacesContextUtils.setAjax(context, true);

      // decode the action if actionComponent not inside one of the ajaxComponents
      // otherwise it is decoded there
      decodeActionComponent(context, page, ajaxComponents);

      // and all ajax components
      for (final Map.Entry<String, UIComponent> entry : ajaxComponents.entrySet()) {
        FacesContextUtils.setAjaxComponentId(context, entry.getKey());
        invokeOnComponent(context, entry.getKey(), APPLY_REQUEST_VALUES_CALLBACK);
      }
    } else {
File Project Line
org/apache/myfaces/tobago/compat/FacesUtilsEL.java Tobago Core 58
org/apache/myfaces/tobago/compat/FacesInvokeOnComponent12.java Tobago Deprecation 42
  public static boolean invokeOnComponent(
      final FacesContext context, final UIComponent component, final String clientId, final ContextCallback callback) {
    final String thisClientId = component.getClientId(context);

    if (clientId.equals(thisClientId)) {
      callback.invokeContextCallback(context, component);
      return true;
    } else if (component instanceof NamingContainer) {
      // This component is a naming container. If the client id shows it's inside this naming container,
      // then process further.
      // Otherwise we know the client id we're looking for is not in this naming container,
      // so for improved performance short circuit and return false.
      if (clientId.startsWith(thisClientId)
          && (clientId.charAt(thisClientId.length()) == UINamingContainer.getSeparatorChar(context))) {
        if (invokeOnComponentFacetsAndChildren(context, component, clientId, callback)) {
          return true;
        }
      }
    } else {
      if (invokeOnComponentFacetsAndChildren(context, component, clientId, callback)) {
        return true;
      }
    }

    return false;
  }
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/InExtensionTag.java Tobago Core 96
org/apache/myfaces/tobago/internal/taglib/extension/SelectBooleanCheckboxExtensionTag.java Tobago Core 73
org/apache/myfaces/tobago/internal/taglib/extension/SelectManyCheckboxExtensionTag.java Tobago Core 75
org/apache/myfaces/tobago/internal/taglib/extension/SelectManyListboxExtensionTag.java Tobago Core 72
org/apache/myfaces/tobago/internal/taglib/extension/SelectManyShuttleExtensionTag.java Tobago Core 73
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneChoiceExtensionTag.java Tobago Core 72
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneListboxExtensionTag.java Tobago Core 72
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneRadioExtensionTag.java Tobago Core 75
org/apache/myfaces/tobago/internal/taglib/extension/TextareaExtensionTag.java Tobago Core 87
org/apache/myfaces/tobago/internal/taglib/extension/TimeExtensionTag.java Tobago Core 85
    labelTag.setPageContext(pageContext);
    if (id != null) {
      labelTag.setId(id);
    }
    if (label != null) {
      labelTag.setValue(label);
    }
    if (accessKey != null) {
      labelTag.setAccessKey(accessKey);
    }
    if (tip != null) {
      labelTag.setTip(tip);
    }
    if (rendered != null) {
      labelTag.setRendered(rendered);
    }
    if (labelWidth != null) {
      labelTag.setColumns(createStringValueExpression(labelWidth.getExpressionString() + ";*"));
    }
    if (markup != null) {
      labelTag.setMarkup(markup);
    }
    labelTag.setParent(getParent());
    labelTag.setJspId(nextJspId());
    labelTag.doStartTag();
File Project Line
org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java Tobago Deprecation 499
org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtils.java Tobago Theme Standard 513
  }

  /**
   * @deprecated Please use HtmlRendererUtils
   */
  @Deprecated
  public static String toStyleString(final String key, final Integer value) {
    final StringBuilder buf = new StringBuilder();
    buf.append(key);
    buf.append(":");
    buf.append(value);
    buf.append("px; ");
    return buf.toString();
  }

  /**
   * @deprecated Please use HtmlRendererUtils
   */
  @Deprecated
  public static String toStyleString(final String key, final String value) {
    final StringBuilder buf = new StringBuilder();
    buf.append(key);
    buf.append(":");
    buf.append(value);
    buf.append("; ");
    return buf.toString();
  }

  /**
   * @deprecated Please use HtmlRendererUtils
   */
  @Deprecated
  public static void renderTip(final UIComponent component, final TobagoResponseWriter writer) throws IOException {
File Project Line
org/apache/myfaces/tobago/example/addressbook/web/EmailAddressConverter.java Tobago Example Addressbook (Java EE 6) 33
org/apache/myfaces/tobago/example/addressbook/web/EmailAddressConverter.java Tobago Example Addressbook 31
public class EmailAddressConverter implements Converter {

  private static final Logger LOG = LoggerFactory.getLogger(EmailAddressConverter.class);

  public Object getAsObject(
      final FacesContext facesContext, final UIComponent component, final String reference) {
    if (reference == null || reference.length() == 0) {
      return null;
    }
    final String[] parts = reference.split("@");
    if (parts == null || parts.length != 2) {
      throw new ConverterException(MessageUtils.createErrorMessage("converterEmailParts", facesContext));
    }
    return new EmailAddress(reference);
  }

  public String getAsString(final FacesContext facesContext, final UIComponent component, final Object object) {
    return object.toString();
  }

}
File Project Line
org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyCheckboxRenderer.java Tobago Theme Standard 58
org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneRadioRenderer.java Tobago Theme Standard 61
    final String id = select.getClientId(facesContext);
    final String title = HtmlRendererUtils.getTitleFromTipAndMessages(facesContext, select);
    final boolean disabled = select.isDisabled();
    final boolean readonly = select.isReadonly();
    final Style style = new Style(facesContext, select);
    final boolean required = select.isRequired();
    // fixme: use CSS, not the Style Attribute for "display"
    style.setDisplay(null);

    writer.startElement(HtmlElements.OL, select);
    writer.writeIdAttribute(id);
    writer.writeStyleAttribute(style);
    writer.writeClassAttribute(Classes.create(select));
    HtmlRendererUtils.writeDataAttributes(facesContext, writer, select);
    if (title != null) {
      writer.writeAttribute(HtmlAttributes.TITLE, title, true);
    }
    boolean first = true;
    final Object[] values = select.getSelectedValues();
File Project Line
org/apache/myfaces/tobago/apt/processor/CheckstyleConfigGenerator.java Tobago Tool Apt 147
org/apache/myfaces/tobago/apt/processor/TaglibGenerator.java Tobago Tool Apt 171
      checkDuplicates(annotationTag.name());
      // TODO configure replacement
      final String className;
      if (typeElement.getAnnotation(SimpleTag.class) != null || typeElement.getAnnotation(ValidatorTag.class) != null) {
        className = AnnotationUtils.generatedTagName(typeElement);
      } else if (typeElement.getAnnotation(ExtensionTag.class) != null) {
        className = typeElement.getQualifiedName().toString();
      } else if (typeElement.getAnnotation(UIComponentTag.class) != null) {
        className = "org.apache.myfaces.tobago.internal.taglib." + StringUtils.capitalize(annotationTag.name())
            + "Tag";
      } else {
        throw new RuntimeException("Not supported: " + typeElement.getQualifiedName());
      }
      info("Replacing: " + typeElement.getQualifiedName() + " -> " + className);
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/DateExtensionTag.java Tobago Core 427
org/apache/myfaces/tobago/internal/taglib/extension/InExtensionTag.java Tobago Core 473
org/apache/myfaces/tobago/internal/taglib/extension/TextareaExtensionTag.java Tobago Core 378
org/apache/myfaces/tobago/internal/taglib/extension/TimeExtensionTag.java Tobago Core 376
  }

  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Integer")
  public void setTabIndex(final ValueExpression tabIndex) {
    this.tabIndex = tabIndex;
  }

  /**
   * An expression that specifies the validator message
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setValidatorMessage(final ValueExpression validatorMessage) {
    this.validatorMessage = validatorMessage;
  }

  /**
   * An expression that specifies the converter message
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setConverterMessage(final ValueExpression converterMessage) {
    this.converterMessage = converterMessage;
  }

  /**
   * An expression that specifies the required message
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setRequiredMessage(final ValueExpression requiredMessage) {
    this.requiredMessage = requiredMessage;
  }

  /**
   * The component identifier for the input field component inside of the container.
   * This value must be unique within the closest parent component that is a naming container.
   */
  @TagAttribute(rtexprvalue = true)
  @UIComponentTagAttribute
  public void setFieldId(final String fieldId) {
    this.fieldId = fieldId;
  }

  /**
   * The component identifier for the automatically created picker component inside of the container.
   * This value must be unique within the closest parent component that is a naming container.
   */
  @TagAttribute(rtexprvalue = true)
  @UIComponentTagAttribute
  public void setPickerId(final String pickerId) {
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/FileExtensionTag.java Tobago Core 314
org/apache/myfaces/tobago/internal/taglib/extension/SelectManyListboxExtensionTag.java Tobago Core 354
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneListboxExtensionTag.java Tobago Core 348
  }

  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Integer")
  public void setTabIndex(final ValueExpression tabIndex) {
    this.tabIndex = tabIndex;
  }

  /**
   * Flag indicating this component should receive the focus.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setFocus(final ValueExpression focus) {
    this.focus = focus;
  }

  /**
   * An expression that specifies the validator message
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setValidatorMessage(final ValueExpression validatorMessage) {
    this.validatorMessage = validatorMessage;
  }

  /**
   * An expression that specifies the converter message
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setConverterMessage(final ValueExpression converterMessage) {
    this.converterMessage = converterMessage;
  }

  /**
   * An expression that specifies the required message
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setRequiredMessage(final ValueExpression requiredMessage) {
    this.requiredMessage = requiredMessage;
  }

  /**
   * The component identifier for the input field component inside of the container.
   * This value must be unique within the closest parent component that is a naming container.
   */
  @TagAttribute(rtexprvalue = true)
File Project Line
org/apache/myfaces/tobago/renderkit/LayoutComponentRendererBase.java Tobago Core 64
org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/GridLayoutRenderer.java Tobago Theme Standard 51
    return getResourceManager().getThemeMeasure(facesContext, component, Attributes.MAXIMUM_HEIGHT);
  }

  public Measure getMarginLeft(final FacesContext facesContext, final Configurable component) {
    return getResourceManager().getThemeMeasure(facesContext, component, Attributes.MARGIN_LEFT);
  }

  public Measure getMarginRight(final FacesContext facesContext, final Configurable component) {
    return getResourceManager().getThemeMeasure(facesContext, component, Attributes.MARGIN_RIGHT);
  }

  public Measure getMarginTop(final FacesContext facesContext, final Configurable component) {
    return getResourceManager().getThemeMeasure(facesContext, component, Attributes.MARGIN_TOP);
  }

  public Measure getMarginBottom(final FacesContext facesContext, final Configurable component) {
    return getResourceManager().getThemeMeasure(facesContext, component, Attributes.MARGIN_BOTTOM);
  }
File Project Line
org/apache/myfaces/tobago/event/ValueExpressionSheetStateChangeListener.java Tobago Core 50
org/apache/myfaces/tobago/event/ValueExpressionTabChangeListener.java Tobago Core 50
      LOG.error("Ignoring SheetStateChangeEvent. No SheetStateChangeListener found.");
    }
  }

  public Object saveState(final FacesContext context) {
    final Object[] state = new Object[2];
    state[0] = UIComponentBase.saveAttachedState(context, valueExpression);
    state[1] = type;
    return state;
  }

  public void restoreState(final FacesContext context, final Object state) {
    final Object[] values = (Object[]) state;
    valueExpression = (ValueExpression) UIComponentBase.restoreAttachedState(context, values[0]);
    type = (String) values[1];

  }

  public boolean isTransient() {
    return false;
  }

  public void setTransient(final boolean newTransientValue) {
    // ignore
  }

  private SheetStateChangeListener getSheetStateChangeListener() {
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/DateExtensionTag.java Tobago Core 246
org/apache/myfaces/tobago/internal/taglib/extension/TextareaExtensionTag.java Tobago Core 205
    formId = null;
  }

  /**
   * The current value of this component.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Object")
  public void setValue(final ValueExpression value) {
    this.value = value;
  }

  /**
   * MethodBinding representing a value change listener method
   * that will be notified when a new value has been set for this input component.
   * The expression must evaluate to a public method that takes a ValueChangeEvent
   * parameter, with a return type of void.
   */
  @TagAttribute
  @UIComponentTagAttribute(
          type = {},
          expression = DynamicExpression.METHOD_EXPRESSION_REQUIRED,
          methodSignature = "javax.faces.event.ValueChangeEvent")
  public void setValueChangeListener(final MethodExpression valueChangeListener) {
    this.valueChangeListener = valueChangeListener;
  }

  /**
   * Text value to display as label.
   * If text contains an underscore the next character is used as accesskey.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setLabel(final ValueExpression label) {
    this.label = label;
  }

  /**
   * The accessKey of this component.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Character")
  public void setAccessKey(final javax.el.ValueExpression accessKey) {
    this.accessKey = accessKey;
  }

  /**
   * Client side script function to add to this component's onchange handler.
   */
  @TagAttribute
  @UIComponentTagAttribute()
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/DateExtensionTag.java Tobago Core 299
org/apache/myfaces/tobago/internal/taglib/extension/InExtensionTag.java Tobago Core 292
  }

  /**
   * Flag indicating this component should receive the focus.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setFocus(final ValueExpression focus) {
    this.focus = focus;
  }

  /**
   * The value binding expression linking this
   * component to a property in a backing bean.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "javax.faces.component.UIComponent")
  public void setBinding(final ValueExpression binding) {
    this.binding = binding;
  }

  /**
   * Flag indicating whether or not this component should be rendered
   * (during Render Response Phase), or processed on any subsequent form submit.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "true")
  public void setRendered(final ValueExpression rendered) {
    this.rendered = rendered;
  }

  /**
   * An expression that specifies the Converter for this component.
   * If the value binding expression is a String,
   * the String is used as an ID to look up a Converter.
   * If the value binding expression is a Converter,
   * uses that instance as the converter.
   * The value can either be a static value (ID case only)
   * or an EL expression.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "javax.faces.convert.Converter",
      expression = DynamicExpression.VALUE_EXPRESSION)
  public void setConverter(final ValueExpression converter) {
    this.converter = converter;
  }

  /**
   * A method binding EL expression,
   * accepting FacesContext, UIComponent,
   * and Object parameters, and returning void, that validates
   * the component's local value.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = {},
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/DateExtensionTag.java Tobago Core 358
org/apache/myfaces/tobago/internal/taglib/extension/InExtensionTag.java Tobago Core 414
org/apache/myfaces/tobago/internal/taglib/extension/TextareaExtensionTag.java Tobago Core 329
org/apache/myfaces/tobago/internal/taglib/extension/TimeExtensionTag.java Tobago Core 327
  }

  /**
   * Flag indicating that this component will prohibit changes by the user.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setReadonly(final ValueExpression readonly) {
    this.readonly = readonly;
  }

  /**
   * Flag indicating that this element is disabled.
   */
  @TagAttribute()
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setDisabled(final ValueExpression disabled) {
    this.disabled = disabled;
  }

  /**
   * Flag indicating that a value is required.
   * If the value is an empty string a
   * ValidationError occurs and a Error Message is rendered.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setRequired(final ValueExpression required) {
    this.required = required;
  }

  /**
   * Text value to display as tooltip.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setTip(final ValueExpression tip) {
    this.tip = tip;
  }

  /**
   * Displays a short text in the input field, that describes the meaning of this field.
   * This is part of HTML 5, the theme should emulate the behaviour, when the browser doesn't support it.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setPlaceholder(final ValueExpression placeholder) {
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/DateExtensionTag.java Tobago Core 247
org/apache/myfaces/tobago/internal/taglib/extension/InExtensionTag.java Tobago Core 247
org/apache/myfaces/tobago/internal/taglib/extension/TimeExtensionTag.java Tobago Core 214
  }

  /**
   * The current value of this component.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Object")
  public void setValue(final ValueExpression value) {
    this.value = value;
  }

  /**
   * MethodBinding representing a value change listener method
   * that will be notified when a new value has been set for this input component.
   * The expression must evaluate to a public method that takes a ValueChangeEvent
   * parameter, with a return type of void.
   */
  @TagAttribute
  @UIComponentTagAttribute(
          type = {},
          expression = DynamicExpression.METHOD_EXPRESSION_REQUIRED,
          methodSignature = "javax.faces.event.ValueChangeEvent")
  public void setValueChangeListener(final MethodExpression valueChangeListener) {
    this.valueChangeListener = valueChangeListener;
  }

  /**
   * Text value to display as label.
   * If text contains an underscore the next character is used as accesskey.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setLabel(final ValueExpression label) {
    this.label = label;
  }

  /**
   * The accessKey of this component.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Character")
  public void setAccessKey(final javax.el.ValueExpression accessKey) {
    this.accessKey = accessKey;
  }

  /**
   * Client side script function to add to this component's onchange handler.
   */
  @TagAttribute
  @UIComponentTagAttribute()
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/FileExtensionTag.java Tobago Core 329
org/apache/myfaces/tobago/internal/taglib/extension/InExtensionTag.java Tobago Core 479
org/apache/myfaces/tobago/internal/taglib/extension/SelectBooleanCheckboxExtensionTag.java Tobago Core 386
org/apache/myfaces/tobago/internal/taglib/extension/SelectManyCheckboxExtensionTag.java Tobago Core 404
org/apache/myfaces/tobago/internal/taglib/extension/SelectManyListboxExtensionTag.java Tobago Core 369
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneChoiceExtensionTag.java Tobago Core 369
org/apache/myfaces/tobago/internal/taglib/extension/TextareaExtensionTag.java Tobago Core 384
org/apache/myfaces/tobago/internal/taglib/extension/TimeExtensionTag.java Tobago Core 382
  }

  /**
   * An expression that specifies the validator message
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setValidatorMessage(final ValueExpression validatorMessage) {
    this.validatorMessage = validatorMessage;
  }

  /**
   * An expression that specifies the converter message
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setConverterMessage(final ValueExpression converterMessage) {
    this.converterMessage = converterMessage;
  }

  /**
   * An expression that specifies the required message
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setRequiredMessage(final ValueExpression requiredMessage) {
    this.requiredMessage = requiredMessage;
  }

  /**
   * The component identifier for the input field component inside of the container.
   * This value must be unique within the closest parent component that is a naming container.
   */
  @TagAttribute(rtexprvalue = true)
  @UIComponentTagAttribute
  public void setFieldId(final String fieldId) {
    this.fieldId = fieldId;
  }

  /**
   * The component identifier for this component.
   * This value must be unique within the closest parent component that is a naming container.
   * For tx components the id will be set to the container (e. g. the panel).
   * To set the id of the input field, you have to use the attribute "fieldId".
   */
  @TagAttribute(rtexprvalue = true)
  @UIComponentTagAttribute
  public void setId(final String id) {
    super.setId(id);
  }
}
File Project Line
org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java Tobago Deprecation 162
org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtils.java Tobago Theme Standard 193
  }

  /**
   * @deprecated Please use HtmlRendererUtils
   */
  @Deprecated
  public static void addAcceleratorKey(
      final FacesContext facesContext, final String func, final char key, final String modifier)
      throws IOException {
    final String str = createAcceleratorKeyJsStatement(func, key, modifier);
    writeScriptLoader(facesContext, null, new String[]{str});
  }

  /**
   * @deprecated Please use HtmlRendererUtils
   */
  @Deprecated
  public static String createOnclickAcceleratorKeyJsStatement(
      final String clientId, final char key, final String modifier) {
    final String func = "Tobago.clickOnElement('" + clientId + "');";
    return createAcceleratorKeyJsStatement(func, key, modifier);
  }

  /**
   * @deprecated Please use HtmlRendererUtils
   */
  @Deprecated
  public static String createAcceleratorKeyJsStatement(
      final String func, final char key, final String modifier) {
File Project Line
org/apache/myfaces/tobago/example/addressbook/web/AdminController.java Tobago Example Addressbook (Java EE 6) 48
org/apache/myfaces/tobago/example/addressbook/web/AdminController.java Tobago Example Addressbook 46
  public void update() {
    final MemoryMXBean memoryBean = ManagementFactory.getMemoryMXBean();
    final MemoryUsage memory = memoryBean.getHeapMemoryUsage();
    memoryUsage = new DefaultBoundedRangeModel(Long.valueOf(memory.getUsed() / 1024).intValue(),
        0, 0, Long.valueOf(memory.getMax() / 1024).intValue());
    final int percentValue = memoryUsage.getValue() / (memoryUsage.getMaximum() * 100);
    if (percentValue <= 80) {
      state = "ok";
    } else if (percentValue > 95) {
      state = "error";
    } else {
      state = "warn";
    }
File Project Line
org/apache/myfaces/tobago/internal/webapp/DebugResponseWriterWrapper.java Tobago Core 141
org/apache/myfaces/tobago/internal/webapp/TobagoResponseWriterWrapper.java Tobago Core 107
    responseWriter.startJavascript();
  }

  public void writeURIAttribute(final String name, final Object value, final String property) throws IOException {
    responseWriter.writeURIAttribute(name, value, property);
  }

  public void writeText(final char[] text, final int off, final int len) throws IOException {
    responseWriter.writeText(text, off, len);
  }

  public void write(final char[] chars, final int i, final int i1) throws IOException {
    responseWriter.write(chars, i, i1);
  }

  public void close() throws IOException {
    responseWriter.close();
  }
File Project Line
org/apache/myfaces/tobago/example/addressbook/Picture.java Tobago Example Addressbook (Java EE 6) 31
org/apache/myfaces/tobago/example/addressbook/Picture.java Tobago Example Addressbook 31
@Entity
public class Picture implements Serializable {
  private static final long serialVersionUID = -7637551581782102682L;
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private Integer id;
  private String contentType;
  @Lob
  @Basic(fetch = FetchType.EAGER)
  private byte [] content;


  public Picture() {
  }

  public Picture(final String contentType, final byte[] content) {
    this.contentType = contentType;
    this.content = content;
  }

  public Integer getId() {
    return id;
  }

  public String getContentType() {
    return contentType;
  }

  public byte[] getContent() {
    return content;
  }

}
File Project Line
org/apache/myfaces/tobago/facelets/FlowLayoutRule.java Tobago Core 41
org/apache/myfaces/tobago/facelets/GridLayoutRule.java Tobago Core 46
          return new TextAlignMapper(attribute);
        }
        if (Attributes.MARGIN_LEFT.equals(name)) {
          return new MarginLeftMapper(attribute);
        }
        if (Attributes.MARGIN_TOP.equals(name)) {
          return new MarginTopMapper(attribute);
        }
        if (Attributes.MARGIN_RIGHT.equals(name)) {
          return new MarginRightMapper(attribute);
        }
        if (Attributes.MARGIN_BOTTOM.equals(name)) {
          return new MarginBottomMapper(attribute);
        }
        if (Attributes.MARGIN.equals(name)) {
          return new MarginMapper(attribute);
        }
      }
    }
    return null;
  }

  static final class TextAlignMapper extends Metadata {
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneListboxExtensionTag.java Tobago Core 189
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneRadioExtensionTag.java Tobago Core 197
    focus = null;
    validatorMessage = null;
    converterMessage = null;
    requiredMessage = null;
    markup = null;
    fieldId = null;
  }

  /**
   * Flag indicating that a value is required.
   * If the value is an empty string a
   * ValidationError occurs and a Error Message is rendered.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setRequired(final ValueExpression required) {
    this.required = required;
  }

  /**
   * The current value of this component.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Object")
  public void setValue(final ValueExpression value) {
    this.value = value;
  }

  /**
   * MethodBinding representing a value change listener method
   * that will be notified when a new value has been set for this input component.
   * The expression must evaluate to a public method that takes a ValueChangeEvent
   * parameter, with a return type of void.
   *
   * @param valueChangeListener
   */
  @TagAttribute
  @UIComponentTagAttribute(
          type = {},
          expression = DynamicExpression.METHOD_EXPRESSION_REQUIRED,
          methodSignature = "javax.faces.event.ValueChangeEvent")
  public void setValueChangeListener(final MethodExpression valueChangeListener) {
    this.valueChangeListener = valueChangeListener;
  }

  /**
   * Flag indicating that this element is disabled.
   */
  @TagAttribute()
File Project Line
org/apache/myfaces/tobago/renderkit/SelectManyRendererBase.java Tobago Core 464
org/apache/myfaces/tobago/renderkit/SelectManyRendererBase.java Tobago Core 749
  private static void getPathToComponent(UIComponent component, StringBuffer buf) {
    if (component == null) {
      return;
    }

    StringBuffer intBuf = new StringBuffer();

    intBuf.append("[Class: ");
    intBuf.append(component.getClass().getName());
    if (component instanceof UIViewRoot) {
      intBuf.append(",ViewId: ");
      intBuf.append(((UIViewRoot) component).getViewId());
    } else {
      intBuf.append(",Id: ");
      intBuf.append(component.getId());
    }
    intBuf.append("]");

    buf.insert(0, intBuf.toString());
File Project Line
org/apache/myfaces/tobago/example/demo/sudoku/Sudoku.java Tobago Example Demo 50
org/apache/myfaces/tobago/example/demo/sudoku/Sudoku.java Tobago Example Demo 56
        0, 1, 2, 3, 4, 5, 6, 7, 8,
        -1, -1, -1, -1, -1, -1, -1, -1, -1,
        -1, -1, -1, -1, -1, -1, -1, -1, -1,

        -1, -1, -1, -1, -1, -1, -1, -1, -1,
        -1, -1, -1, -1, -1, -1, -1, -1, -1,
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/SelectManyCheckboxExtensionTag.java Tobago Core 201
org/apache/myfaces/tobago/internal/taglib/extension/SelectManyListboxExtensionTag.java Tobago Core 186
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneChoiceExtensionTag.java Tobago Core 186
    renderRange = null;
    validatorMessage = null;
    converterMessage = null;
    requiredMessage = null;
    fieldId = null;
  }

  /**
   * Flag indicating that a value is required.
   * If the value is an empty string a
   * ValidationError occurs and a Error Message is rendered.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
  public void setRequired(final ValueExpression required) {
    this.required = required;
  }

  /**
   * The current value of this component.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "java.lang.Object")
  public void setValue(final ValueExpression value) {
    this.value = value;
  }

  /**
   * MethodBinding representing a value change listener method
   * that will be notified when a new value has been set for this input component.
   * The expression must evaluate to a public method that takes a ValueChangeEvent
   * parameter, with a return type of void.
   */
  @TagAttribute
  @UIComponentTagAttribute(
          type = {},
          expression = DynamicExpression.METHOD_EXPRESSION_REQUIRED,
          methodSignature = "javax.faces.event.ValueChangeEvent")
  public void setValueChangeListener(final MethodExpression valueChangeListener) {
    this.valueChangeListener = valueChangeListener;
  }

  /**
   * Flag indicating that this element is disabled.
   */
  @TagAttribute()
File Project Line
org/apache/myfaces/tobago/example/demo/sudoku/Sudoku.java Tobago Example Demo 50
org/apache/myfaces/tobago/example/demo/sudoku/Sudoku.java Tobago Example Demo 56
        0, 1, 2, 3, 4, 5, 6, 7, 8,
        -1, -1, -1, -1, -1, -1, -1, -1, -1,
        -1, -1, -1, -1, -1, -1, -1, -1, -1,

        -1, -1, -1, -1, -1, -1, -1, -1, -1,
        -1, -1, -1, -1, -1, -1, -1, -1, -1,
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/FileExtensionTag.java Tobago Core 79
org/apache/myfaces/tobago/internal/taglib/extension/InExtensionTag.java Tobago Core 92
org/apache/myfaces/tobago/internal/taglib/extension/SelectBooleanCheckboxExtensionTag.java Tobago Core 69
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneChoiceExtensionTag.java Tobago Core 68
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneRadioExtensionTag.java Tobago Core 71
org/apache/myfaces/tobago/internal/taglib/extension/TimeExtensionTag.java Tobago Core 81
  @Override
  public int doStartTag() throws JspException {

    labelTag = new LabelExtensionTag();
    labelTag.setPageContext(pageContext);
    if (id != null) {
      labelTag.setId(id);
    }
    if (label != null) {
      labelTag.setValue(label);
    }
    if (accessKey != null) {
      labelTag.setAccessKey(accessKey);
    }
    if (tip != null) {
      labelTag.setTip(tip);
    }
    if (rendered != null) {
      labelTag.setRendered(rendered);
    }
    if (labelWidth != null) {
      labelTag.setLabelWidth(createStringValueExpression(labelWidth.getExpressionString() + ";*"));
File Project Line
org/apache/myfaces/tobago/internal/webapp/DebugResponseWriterWrapper.java Tobago Core 65
org/apache/myfaces/tobago/internal/webapp/TobagoResponseWriterWrapper.java Tobago Core 58
    return new DebugResponseWriterWrapper((TobagoResponseWriter) responseWriter.cloneWithWriter(writer));
  }

  @Deprecated
  public void writeAttribute(final String name, final Object value, final String property) throws IOException {
    responseWriter.writeAttribute(name, value, property);
  }

  @Deprecated
  public void writeText(final Object text, final String property) throws IOException {
    responseWriter.writeText(text, property);
  }

  public void flush() throws IOException {
    responseWriter.flush();
  }

  public void writeAttribute(final String name, final String value, final boolean escape) throws IOException {
    responseWriter.writeAttribute(name, value, escape);
File Project Line
org/apache/myfaces/tobago/internal/taglib/component/PopupReferenceTag.java Tobago Core 50
org/apache/myfaces/tobago/internal/taglib/component/ResetInputActionListenerTag.java Tobago Core 54
  public int doStartTag() throws JspException {

    // Locate our parent UIComponentTag
    final UIComponentClassicTagBase tag =
        UIComponentELTag.getParentUIComponentClassicTagBase(pageContext);
    if (tag == null) {
      // TODO Message resource i18n
      throw new JspException("Not nested in faces tag");
    }

    if (!tag.getCreated()) {
      return (SKIP_BODY);
    }

    final UIComponent component = tag.getComponentInstance();
    if (component == null) {
      // TODO Message resource i18n
      throw new JspException("Component Instance is null");
    }
    if (!(component instanceof ActionSource)) {
      // TODO Message resource i18n
      throw new JspException("Component " + component.getClass().getName() + " is not instanceof ActionSource");
    }
    final ActionSource actionSource = (ActionSource) component;
File Project Line
org/apache/myfaces/tobago/internal/taglib/extension/SelectBooleanCheckboxExtensionTag.java Tobago Core 310
org/apache/myfaces/tobago/internal/taglib/extension/SelectManyCheckboxExtensionTag.java Tobago Core 330
org/apache/myfaces/tobago/internal/taglib/extension/SelectManyListboxExtensionTag.java Tobago Core 304
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneChoiceExtensionTag.java Tobago Core 304
org/apache/myfaces/tobago/internal/taglib/extension/SelectOneRadioExtensionTag.java Tobago Core 324
  }

  /**
   * Flag indicating whether or not this component should be rendered
   * (during Render Response Phase), or processed on any subsequent form submit.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "boolean", defaultValue = "true")
  public void setRendered(final ValueExpression rendered) {
    this.rendered = rendered;
  }

  /**
   * The value binding expression linking this
   * component to a property in a backing bean.
   */
  @TagAttribute
  @UIComponentTagAttribute(type = "javax.faces.component.UIComponent")
  public void setBinding(final ValueExpression binding) {
    this.binding = binding;
  }

  /**
   * Text value to display as tooltip.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setTip(final ValueExpression tip) {
    this.tip = tip;
  }

  /**
   * The width for the label component. Default: 'auto'.
   * This value is used in the gridLayouts columns attribute.
   * See gridLayout tag for valid values.
   */
  @TagAttribute
  @UIComponentTagAttribute()
  public void setLabelWidth(final ValueExpression labelWidth) {
    this.labelWidth = labelWidth;
  }

  /**
   * Indicate markup of this component.
   * Possible value is 'none'. But this can be overridden in the theme.
   */
  @TagAttribute
  @UIComponentTagAttribute(defaultValue = "none", type = "java.lang.String[]")
File Project Line
org/apache/myfaces/tobago/example/demo/sudoku/Sudoku.java Tobago Example Demo 50
org/apache/myfaces/tobago/example/demo/sudoku/Sudoku.java Tobago Example Demo 56
        0, 1, 2, 3, 4, 5, 6, 7, 8,
        -1, -1, -1, -1, -1, -1, -1, -1, -1,
        -1, -1, -1, -1, -1, -1, -1, -1, -1,

        -1, -1, -1, -1, -1, -1, -1, -1, -1,
        -1, -1, -1, -1, -1, -1, -1, -1, -1,