You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2016/04/22 22:18:36 UTC
svn commit: r1740601 [4/15] - /myfaces/site/publish/tobago/
Modified: myfaces/site/publish/tobago/cpd.html
URL: http://svn.apache.org/viewvc/myfaces/site/publish/tobago/cpd.html?rev=1740601&r1=1740600&r2=1740601&view=diff
==============================================================================
--- myfaces/site/publish/tobago/cpd.html (original)
+++ myfaces/site/publish/tobago/cpd.html Fri Apr 22 20:18:21 2016
@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title>Tobago - CPD Results</title>
+ <title>Tobago – CPD Results</title>
<link rel="stylesheet" type="text/css" media="all" href="./css/maven-base.css"/>
<link rel="stylesheet" type="text/css" media="all" href="./css/maven-theme.css"/>
<link rel="stylesheet" type="text/css" media="print" href="./css/print.css"/>
@@ -14,7 +14,7 @@
<div class="date">
- Last Published: 02 Feb 2016
+ Last Published: 22 Apr 2016
</div>
<ul>
<li>
@@ -193,7 +193,7 @@
</li>
<li class="none">
- <a href="dev-activity.html">Developer Activity</a>
+ <a href="changelog.html">Change Log</a>
</li>
<li class="none">
@@ -201,7 +201,7 @@
</li>
<li class="none">
- <a href="changelog.html">Change Log</a>
+ <a href="dev-activity.html">Developer Activity</a>
</li>
<li class="none">
@@ -255,17 +255,22 @@
<img alt="Built by Maven" src="./img/banners/maven-feather.png"></img>
</a>
</div> <!-- close powered_by -->
+ <div id="powered_by">
+ <a href="http://www.apache.org/events/current-event.html" title="ApacheCon">
+ <img alt="ApacheCon" src="http://www.apache.org/events/current-event-125x125.png"/>
+ </a>
+ </div>
<div class="clear"></div>
</div>
<div id="body_column">
<div>
<div class="section">
- <h2>CPD Results<a name="CPD_Results"></a></h2>
+ <h2><a name="CPD_Results"></a>CPD Results</h2>
<p>The following document contains the results of PMD's <a class="externalLink"
href="http://pmd.sourceforge.net/cpd.html">CPD</a>
5.2.3.</p></div>
<div class="section">
- <h2>Duplications<a name="Duplications"></a></h2>
+ <h2><a name="Duplications"></a>Duplications</h2>
<table border="0" class="bodyTable">
<tr class="a">
<th>File</th>
@@ -273,665 +278,332 @@
<th>Line</th>
</tr>
<tr class="b">
- <td>org/apache/myfaces/tobago/example/addressbook/web/Controller.java</td>
- <td>Tobago Example Addressbook (Java EE 6)</td>
- <td><a href="./xref/org/apache/myfaces/tobago/example/addressbook/web/Controller.html#L94">94</a></td>
+ <td>org/apache/myfaces/tobago/internal/util/HtmlWriterUtils.java</td>
+ <td>Tobago Core</td>
+ <td><a href="./xref/org/apache/myfaces/tobago/internal/util/HtmlWriterUtils.html#L57">57</a></td>
</tr>
<tr class="a">
- <td>org/apache/myfaces/tobago/example/addressbook/web/Controller.java</td>
- <td>Tobago Example Addressbook</td>
- <td><a href="./xref/org/apache/myfaces/tobago/example/addressbook/web/Controller.html#L92">92</a></td>
+ <td>org/apache/myfaces/tobago/internal/util/JavascriptWriterUtils.java</td>
+ <td>Tobago Core</td>
+ <td><a href="./xref/org/apache/myfaces/tobago/internal/util/JavascriptWriterUtils.html#L53">53</a></td>
</tr>
<tr class="b">
+ <td>org/apache/myfaces/tobago/internal/util/JsonWriterUtils.java</td>
+ <td>Tobago Core</td>
+ <td><a href="./xref/org/apache/myfaces/tobago/internal/util/JsonWriterUtils.html#L58">58</a></td>
+ </tr>
+ <tr class="a">
<td colspan='3'>
<div>
-<pre> 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;
+<pre> public HtmlWriterUtils(final Writer out, final String characterEncoding) {
+ super(out, characterEncoding);
}
- public String languageChangedList() {
- initLanguages();
- return OUTCOME_LIST;
- }
+ @Override
+ protected void writeEncodedValue(final char[] text, final int start,
+ final int length, final boolean isAttribute) throws IOException {
- public String themeChanged() {
- final FacesContext facesContext = FacesContext.getCurrentInstance();
- final ClientProperties client = ClientProperties.getInstance(facesContext);
- client.setTheme(theme);
- return null;
- }
+ int localIndex = -1;
- 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));
+ 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;
+ }
}
- }
-
- 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;
- }
+ final Writer out = getOut();
- public void setRenderPopup(final boolean renderPopup) {
- this.renderPopup = renderPopup;
- }
+ 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);
- public boolean isRenderPopup() {
- return renderPopup;
- }
+ final ResponseWriterBuffer buffer = getBuffer();
- public String selectColumns() {
- setRenderPopup(true);
- return OUTCOME_LIST;
- }
+ for (int i = localIndex; i < end; i++) {
+ final char ch = text[i];
- public String okFileUpload() {
- setRenderFileUploadPopup(false);
- final Picture picture = new Picture(uploadedFile.getContentType(), uploadedFile.get());
- currentAddress.setPicture(picture);
- return null;
- }
+ // 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();
- public String cancelFileUpload() {
- setRenderFileUploadPopup(false);
- return null;
- }
+ out.write('&');
+ final char[] chars = ISO8859_1_ENTITIES[ch - 0xA0];
+ out.write(chars, 0, chars.length);
+ out.write(';');
+ } else {
+ buffer.flushBuffer();
- public String cancelPopup() {
- setRenderPopup(false);
- return OUTCOME_LIST;
- }
+ // 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);
+ }
+ }
- public String logout() {
- final FacesContext facesContext = FacesContext.getCurrentInstance();
- final HttpSession session = (HttpSession) facesContext.getExternalContext().getSession(false);
- if (session != null) {
- session.invalidate();
+ buffer.flushBuffer();
}
- 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;
- }</pre>
+}</pre>
</div>
</td>
</tr>
</table>
<table border="0" class="bodyTable">
- <tr class="a">
+ <tr class="b">
<th>File</th>
<th>Project</th>
<th>Line</th>
</tr>
- <tr class="b">
- <td>org/apache/myfaces/tobago/example/addressbook/Address.java</td>
- <td>Tobago Example Addressbook (Java EE 6)</td>
- <td><a href="./xref/org/apache/myfaces/tobago/example/addressbook/Address.html#L42">42</a></td>
- </tr>
<tr class="a">
- <td>org/apache/myfaces/tobago/example/addressbook/Address.java</td>
- <td>Tobago Example Addressbook</td>
- <td><a href="./xref/org/apache/myfaces/tobago/example/addressbook/Address.html#L42">42</a></td>
+ <td>org/apache/myfaces/tobago/internal/taglib/extension/SelectManyListboxExtensionTag.java</td>
+ <td>Tobago Core</td>
+ <td><a
+ href="./xref/org/apache/myfaces/tobago/internal/taglib/extension/SelectManyListboxExtensionTag.html#L105">105</a>
+ </td>
</tr>
<tr class="b">
+ <td>org/apache/myfaces/tobago/internal/taglib/extension/SelectManyShuttleExtensionTag.java</td>
+ <td>Tobago Core</td>
+ <td><a
+ href="./xref/org/apache/myfaces/tobago/internal/taglib/extension/SelectManyShuttleExtensionTag.html#L109">109</a>
+ </td>
+ </tr>
+ <tr class="a">
<td colspan='3'>
<div>
-<pre>@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;
-
+<pre> void setLabel(final javax.el.ValueExpression label);
- 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();
- }
+ /**
+ * 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"})
+ void setValidator(final javax.el.MethodExpression validator);
- @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);
- }
- }
+ /**
+ * 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)
+ void setConverter(final javax.el.ValueExpression converter);
- public Integer getId() {
- return id;
- }
+ /**
+ * 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")
+ void setRendered(final javax.el.ValueExpression rendered);
- public void setId(final Integer id) {
- this.id = id;
- }
+ /**
+ * The value binding expression linking this
+ * component to a property in a backing bean.
+ */
+ @TagAttribute
+ @UIComponentTagAttribute(type = "javax.faces.component.UIComponent")
+ void setBinding(final javax.el.ValueExpression binding);
- public String getFirstName() {
- return firstName;
- }
+ /**
+ * Text value to display as tooltip.
+ */
+ @TagAttribute
+ @UIComponentTagAttribute()
+ void setTip(final javax.el.ValueExpression tip);
- public void setFirstName(final String firstName) {
- this.firstName = firstName;
- }
+ /**
+ * 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()
+ void setLabelWidth(final javax.el.ValueExpression labelWidth);
- public String getLastName() {
- return lastName;
- }
+ /**
+ * 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[]")
+ void setMarkup(final javax.el.ValueExpression markup);
- public void setLastName(final String lastName) {
- this.lastName = lastName;
- }
+ @TagAttribute
+ @UIComponentTagAttribute(type = "java.lang.Integer")
+ void setTabIndex(final javax.el.ValueExpression tabIndex);
- public String getStreet() {
- return street;
- }
+ /**
+ * Flag indicating this component should receive the focus.
+ */
+ @TagAttribute
+ @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
+ void setFocus(final javax.el.ValueExpression focus);
- public void setStreet(final String street) {
- this.street = street;
- }
+ /**
+ * An expression that specifies the validator message
+ */
+ @TagAttribute
+ @UIComponentTagAttribute()
+ void setValidatorMessage(final javax.el.ValueExpression validatorMessage);
- public String getHouseNumber() {
- return houseNumber;
- }
+ /**
+ * An expression that specifies the converter message
+ */
+ @TagAttribute
+ @UIComponentTagAttribute()
+ void setConverterMessage(final javax.el.ValueExpression converterMessage);
- 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;
- }
+ /**
+ * An expression that specifies the required message
+ */
+ @TagAttribute
+ @UIComponentTagAttribute()
+ void setRequiredMessage(final javax.el.ValueExpression requiredMessage);
- public void setPicture(final Picture picture) {
- this.picture = picture;
- }
+ /**
+ * 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
+ void setFieldId(final String fieldId);
- public String toString() {
- return id + ": " + firstName + " " + lastName;
- }
+ /**
+ * 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
+ void setId(final String id);
}</pre>
</div>
</td>
</tr>
</table>
<table border="0" class="bodyTable">
- <tr class="a">
+ <tr class="b">
<th>File</th>
<th>Project</th>
<th>Line</th>
</tr>
- <tr class="b">
- <td>org/apache/myfaces/tobago/internal/taglib/extension/SelectManyListboxExtensionTag.java</td>
+ <tr class="a">
+ <td>org/apache/myfaces/tobago/internal/taglib/extension/MenuCheckboxExtensionTag.java</td>
<td>Tobago Core</td>
- <td><a
- href="./xref/org/apache/myfaces/tobago/internal/taglib/extension/SelectManyListboxExtensionTag.html#L189">189</a>
+ <td><a href="./xref/org/apache/myfaces/tobago/internal/taglib/extension/MenuCheckboxExtensionTag.html#L48">48</a>
</td>
</tr>
- <tr class="a">
- <td>org/apache/myfaces/tobago/internal/taglib/extension/SelectOneListboxExtensionTag.java</td>
+ <tr class="b">
+ <td>org/apache/myfaces/tobago/internal/taglib/extension/MenuRadioExtensionTag.java</td>
<td>Tobago Core</td>
<td><a
- href="./xref/org/apache/myfaces/tobago/internal/taglib/extension/SelectOneListboxExtensionTag.html#L193">193</a>
+ href="./xref/org/apache/myfaces/tobago/internal/taglib/extension/MenuRadioExtensionTag.html#L52">52</a>
</td>
</tr>
- <tr class="b">
+ <tr class="a">
<td colspan='3'>
<div>
-<pre> requiredMessage = null;
- fieldId = null;
- }
+<pre>public interface MenuCheckboxExtensionTag {
/**
- * Flag indicating that a value is required.
- * If the value is an empty string a
- * ValidationError occurs and a Error Message is rendered.
+ * Action to invoke when clicked.
+ * This must be a MethodExpression or a String representing the application action to invoke when
+ * this component is activated by the user.
+ * The MethodExpression 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 = "boolean", defaultValue = "false")
- public void setRequired(final ValueExpression required) {
- this.required = required;
- }
+ @UIComponentTagAttribute(type = {}, expression = DynamicExpression.METHOD_EXPRESSION,
+ methodReturnType = "java.lang.Object")
+ void setAction(final javax.el.MethodExpression action);
/**
- * The current value of this component.
+ * MethodExpression 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 = "java.lang.Object")
- public void setValue(final ValueExpression value) {
- this.value = value;
- }
+ @UIComponentTagAttribute(type = {}, expression = DynamicExpression.METHOD_EXPRESSION_REQUIRED,
+ methodSignature = "javax.faces.event.ActionEvent")
+ void setActionListener(final javax.el.MethodExpression actionListener);
/**
- * 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
+ * Script to be invoked when clicked
*/
@TagAttribute
- @UIComponentTagAttribute(
- type = {},
- expression = DynamicExpression.METHOD_EXPRESSION_REQUIRED,
- methodSignature = "javax.faces.event.ValueChangeEvent")
- public void setValueChangeListener(final MethodExpression valueChangeListener) {
- this.valueChangeListener = valueChangeListener;
- }
+ @UIComponentTagAttribute()
+ void setOnclick(final javax.el.ValueExpression onclick);
/**
- * Flag indicating that this element is disabled.
+ * Link to an arbitrary URL
*/
- @TagAttribute()
- @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
- public void setDisabled(final ValueExpression disabled) {
- this.disabled = disabled;
- }
+ @TagAttribute
+ @UIComponentTagAttribute()
+ void setLink(final javax.el.ValueExpression link);
/**
- * Flag indicating that this component will prohibit changes by the user.
+ * The value binding expression linking this
+ * component to a property in a backing bean.
*/
@TagAttribute
+ @UIComponentTagAttribute(type = "javax.faces.component.UIComponent")
+ void setBinding(final javax.el.ValueExpression 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")
+ void setRendered(final javax.el.ValueExpression rendered);
+
+ /**
+ * Flag indicating that this element is disabled.
+ */
+ @TagAttribute()
@UIComponentTagAttribute(type = "boolean", defaultValue = "false")
- public void setReadonly(final ValueExpression readonly) {
- this.readonly = readonly;
- }
+ void setDisabled(final javax.el.ValueExpression disabled);
/**
- * Clientside script function to add to this component's onchange handler.
+ * The current value of this component.
*/
@TagAttribute
- @UIComponentTagAttribute()
- public void setOnchange(final ValueExpression onchange) {
- this.onchange = onchange;
- }
+ @UIComponentTagAttribute(type = "java.lang.Object")
+ void setValue(final javax.el.ValueExpression value);
/**
* Text value to display as label.
@@ -939,18 +611,71 @@ public class Address implements Serializ
*/
@TagAttribute
@UIComponentTagAttribute()
- public void setLabel(final ValueExpression label) {
- this.label = label;
- }
+ void setLabel(final javax.el.ValueExpression label);
/**
- * The accessKey of this component.
+ * 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 = "java.lang.Character")
- public void setAccessKey(final javax.el.ValueExpression accessKey) {
- this.accessKey = accessKey;
- }
+ @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
+ void setImmediate(final javax.el.ValueExpression 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")
+ void setTransition(final javax.el.ValueExpression transition);
+
+ /**
+ * Indicate the partially rendered Components in a case of a submit.
+ */
+ @TagAttribute
+ @UIComponentTagAttribute(type = "java.lang.String[]")</pre>
+ </div>
+ </td>
+ </tr>
+ </table>
+ <table border="0" class="bodyTable">
+ <tr class="b">
+ <th>File</th>
+ <th>Project</th>
+ <th>Line</th>
+ </tr>
+ <tr class="a">
+ <td>org/apache/myfaces/tobago/internal/taglib/extension/SelectManyCheckboxExtensionTag.java</td>
+ <td>Tobago Core</td>
+ <td><a
+ href="./xref/org/apache/myfaces/tobago/internal/taglib/extension/SelectManyCheckboxExtensionTag.html#L94">94</a>
+ </td>
+ </tr>
+ <tr class="b">
+ <td>org/apache/myfaces/tobago/internal/taglib/extension/SelectManyListboxExtensionTag.java</td>
+ <td>Tobago Core</td>
+ <td><a
+ href="./xref/org/apache/myfaces/tobago/internal/taglib/extension/SelectManyListboxExtensionTag.html#L97">97</a>
+ </td>
+ </tr>
+ <tr class="a">
+ <td colspan='3'>
+ <div>
+<pre> void setInline(final javax.el.ValueExpression inline);
+
+ /**
+ * Text value to display as label.
+ * If text contains an underscore the next character is used as accesskey.
+ */
+ @TagAttribute
+ @UIComponentTagAttribute()
+ void setLabel(final javax.el.ValueExpression label);
+
+ /*void setHeight(String height) ; */
/**
* A method binding EL expression,
@@ -961,10 +686,8 @@ public class Address implements Serializ
@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;
- }
+ methodSignature = {"javax.faces.context.FacesContext", "javax.faces.component.UIComponent", "java.lang.Object"})
+ void setValidator(final javax.el.MethodExpression validator);
/**
* An expression that specifies the Converter for this component.
@@ -978,9 +701,7 @@ public class Address implements Serializ
@TagAttribute
@UIComponentTagAttribute(type = "javax.faces.convert.Converter",
expression = DynamicExpression.VALUE_EXPRESSION)
- public void setConverter(final ValueExpression converter) {
- this.converter = converter;
- }
+ void setConverter(final javax.el.ValueExpression converter);
/**
* Flag indicating whether or not this component should be rendered
@@ -988,9 +709,7 @@ public class Address implements Serializ
*/
@TagAttribute
@UIComponentTagAttribute(type = "boolean", defaultValue = "true")
- public void setRendered(final ValueExpression rendered) {
- this.rendered = rendered;
- }
+ void setRendered(final javax.el.ValueExpression rendered);
/**
* The value binding expression linking this
@@ -998,18 +717,14 @@ public class Address implements Serializ
*/
@TagAttribute
@UIComponentTagAttribute(type = "javax.faces.component.UIComponent")
- public void setBinding(final ValueExpression binding) {
- this.binding = binding;
- }
+ void setBinding(final javax.el.ValueExpression binding);
/**
* Text value to display as tooltip.
*/
@TagAttribute
@UIComponentTagAttribute()
- public void setTip(final ValueExpression tip) {
- this.tip = tip;
- }
+ void setTip(final javax.el.ValueExpression tip);
/**
* The width for the label component. Default: 'auto'.
@@ -1018,4072 +733,105 @@ public class Address implements Serializ
*/
@TagAttribute
@UIComponentTagAttribute()
- public void setLabelWidth(final ValueExpression labelWidth) {
- this.labelWidth = labelWidth;
- }
+ void setLabelWidth(final javax.el.ValueExpression 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[]")</pre>
+ @UIComponentTagAttribute(defaultValue = "none", type = "java.lang.String[]")
+ void setMarkup(final javax.el.ValueExpression markup);
+
+ @TagAttribute
+ @UIComponentTagAttribute(type = "java.lang.Integer")
+ void setTabIndex(final javax.el.ValueExpression tabIndex);
+
+ /**
+ * Flag indicating this component should receive the focus.
+ */
+ @TagAttribute
+ @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
+ void setFocus(final javax.el.ValueExpression focus);
+
+ /**
+ * Range of items to render.
+ */
+ @TagAttribute
+ @UIComponentTagAttribute()
+ void setRenderRange(final javax.el.ValueExpression renderRange);</pre>
</div>
</td>
</tr>
</table>
<table border="0" class="bodyTable">
- <tr class="a">
+ <tr class="b">
<th>File</th>
<th>Project</th>
<th>Line</th>
</tr>
- <tr class="b">
- <td>org/apache/myfaces/tobago/internal/taglib/extension/MenuCheckboxExtensionTag.java</td>
- <td>Tobago Core</td>
- <td><a href="./xref/org/apache/myfaces/tobago/internal/taglib/extension/MenuCheckboxExtensionTag.html#L178">178</a>
- </td>
- </tr>
<tr class="a">
- <td>org/apache/myfaces/tobago/internal/taglib/extension/MenuRadioExtensionTag.java</td>
- <td>Tobago Core</td>
+ <td>org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigController.java</td>
+ <td>Tobago Example Demo</td>
<td><a
- href="./xref/org/apache/myfaces/tobago/internal/taglib/extension/MenuRadioExtensionTag.html#L188">188</a>
+ href="./xref/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigController.html#L88">88</a>
</td>
</tr>
<tr class="b">
- <td colspan='3'>
- <div>
-<pre> 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[]")</pre>
- </div>
- </td>
- </tr>
- </table>
- <table border="0" class="bodyTable">
- <tr class="a">
- <th>File</th>
- <th>Project</th>
- <th>Line</th>
- </tr>
- <tr class="b">
- <td>org/apache/myfaces/tobago/internal/util/HtmlWriterUtils.java</td>
- <td>Tobago Core</td>
- <td><a href="./xref/org/apache/myfaces/tobago/internal/util/HtmlWriterUtils.html#L57">57</a></td>
- </tr>
- <tr class="a">
- <td>org/apache/myfaces/tobago/internal/util/JavascriptWriterUtils.java</td>
- <td>Tobago Core</td>
- <td><a href="./xref/org/apache/myfaces/tobago/internal/util/JavascriptWriterUtils.html#L53">53</a></td>
- </tr>
- <tr class="b">
- <td>org/apache/myfaces/tobago/internal/util/JsonWriterUtils.java</td>
- <td>Tobago Core</td>
- <td><a href="./xref/org/apache/myfaces/tobago/internal/util/JsonWriterUtils.html#L58">58</a></td>
- </tr>
- <tr class="a">
- <td colspan='3'>
- <div>
-<pre> 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();
- }
- }
-}</pre>
- </div>
- </td>
- </tr>
- </table>
- <table border="0" class="bodyTable">
- <tr class="b">
- <th>File</th>
- <th>Project</th>
- <th>Line</th>
- </tr>
- <tr class="a">
- <td>org/apache/myfaces/tobago/example/addressbook/web/Controller.java</td>
- <td>Tobago Example Addressbook (Java EE 6)</td>
- <td><a href="./xref/org/apache/myfaces/tobago/example/addressbook/web/Controller.html#L336">336</a></td>
- </tr>
- <tr class="b">
- <td>org/apache/myfaces/tobago/example/addressbook/web/Controller.java</td>
- <td>Tobago Example Addressbook</td>
- <td><a href="./xref/org/apache/myfaces/tobago/example/addressbook/web/Controller.html#L339">339</a></td>
- </tr>
- <tr class="a">
- <td colspan='3'>
- <div>
-<pre> 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());
- }
-
-}</pre>
- </div>
- </td>
- </tr>
- </table>
- <table border="0" class="bodyTable">
- <tr class="b">
- <th>File</th>
- <th>Project</th>
- <th>Line</th>
- </tr>
- <tr class="a">
- <td>org/apache/myfaces/tobago/example/addressbook/web/StartupPhaseListener.java</td>
- <td>Tobago Example Addressbook (Java EE 6)</td>
- <td><a href="./xref/org/apache/myfaces/tobago/example/addressbook/web/StartupPhaseListener.html#L34">34</a>
- </td>
- </tr>
- <tr class="b">
- <td>org/apache/myfaces/tobago/example/addressbook/web/StartupPhaseListener.java</td>
- <td>Tobago Example Addressbook</td>
- <td><a href="./xref/org/apache/myfaces/tobago/example/addressbook/web/StartupPhaseListener.html#L34">34</a>
- </td>
- </tr>
- <tr class="a">
- <td colspan='3'>
- <div>
-<pre>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) {
- }
-}</pre>
- </div>
- </td>
- </tr>
- </table>
- <table border="0" class="bodyTable">
- <tr class="b">
- <th>File</th>
- <th>Project</th>
- <th>Line</th>
- </tr>
- <tr class="a">
- <td>org/apache/myfaces/tobago/internal/taglib/extension/SelectManyCheckboxExtensionTag.java</td>
- <td>Tobago Core</td>
- <td><a
- href="./xref/org/apache/myfaces/tobago/internal/taglib/extension/SelectManyCheckboxExtensionTag.html#L277">277</a>
- </td>
- </tr>
- <tr class="b">
- <td>org/apache/myfaces/tobago/internal/taglib/extension/SelectManyListboxExtensionTag.java</td>
- <td>Tobago Core</td>
- <td><a
- href="./xref/org/apache/myfaces/tobago/internal/taglib/extension/SelectManyListboxExtensionTag.html#L255">255</a>
- </td>
- </tr>
- <tr class="a">
- <td colspan='3'>
- <div>
-<pre> }
-
- /**
- * 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) {</pre>
- </div>
- </td>
- </tr>
- </table>
- <table border="0" class="bodyTable">
- <tr class="b">
- <th>File</th>
- <th>Project</th>
- <th>Line</th>
- </tr>
- <tr class="a">
- <td>org/apache/myfaces/tobago/example/addressbook/web/RandomAddressGenerator.java</td>
- <td>Tobago Example Addressbook (Java EE 6)</td>
- <td><a
- href="./xref/org/apache/myfaces/tobago/example/addressbook/web/RandomAddressGenerator.html#L35">35</a>
- </td>
- </tr>
- <tr class="b">
- <td>org/apache/myfaces/tobago/example/addressbook/web/RandomAddressGenerator.java</td>
- <td>Tobago Example Addressbook</td>
- <td><a
- href="./xref/org/apache/myfaces/tobago/example/addressbook/web/RandomAddressGenerator.html#L35">35</a>
- </td>
- </tr>
- <tr class="a">
- <td colspan='3'>
- <div>
-<pre>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)];
- }
-
-}</pre>
- </div>
- </td>
- </tr>
- </table>
- <table border="0" class="bodyTable">
- <tr class="b">
- <th>File</th>
- <th>Project</th>
- <th>Line</th>
- </tr>
- <tr class="a">
- <td>org/apache/myfaces/tobago/internal/taglib/extension/TextareaExtensionTag.java</td>
- <td>Tobago Core</td>
- <td><a
- href="./xref/org/apache/myfaces/tobago/internal/taglib/extension/TextareaExtensionTag.html#L206">206</a>
- </td>
- </tr>
- <tr class="b">
- <td>org/apache/myfaces/tobago/internal/taglib/extension/TimeExtensionTag.java</td>
- <td>Tobago Core</td>
- <td><a href="./xref/org/apache/myfaces/tobago/internal/taglib/extension/TimeExtensionTag.html#L214">214</a>
- </td>
- </tr>
- <tr class="a">
- <td colspan='3'>
- <div>
-<pre> }
-
- /**
- * 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[]")</pre>
- </div>
- </td>
- </tr>
- </table>
- <table border="0" class="bodyTable">
- <tr class="b">
- <th>File</th>
- <th>Project</th>
- <th>Line</th>
- </tr>
- <tr class="a">
- <td>org/apache/myfaces/tobago/example/addressbook/InMemoryAddressDao.java</td>
- <td>Tobago Example Addressbook (Java EE 6)</td>
- <td><a href="./xref/org/apache/myfaces/tobago/example/addressbook/InMemoryAddressDao.html#L35">35</a></td>
- </tr>
- <tr class="b">
- <td>org/apache/myfaces/tobago/example/addressbook/InMemoryAddressDao.java</td>
- <td>Tobago Example Addressbook</td>
- <td><a href="./xref/org/apache/myfaces/tobago/example/addressbook/InMemoryAddressDao.html#L30">30</a></td>
- </tr>
- <tr class="a">
- <td colspan='3'>
- <div>
-<pre>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;
- }
-}</pre>
- </div>
- </td>
- </tr>
- </table>
- <table border="0" class="bodyTable">
- <tr class="b">
- <th>File</th>
- <th>Project</th>
- <th>Line</th>
- </tr>
- <tr class="a">
- <td>org/apache/myfaces/tobago/internal/taglib/extension/InExtensionTag.java</td>
- <td>Tobago Core</td>
- <td><a href="./xref/org/apache/myfaces/tobago/internal/taglib/extension/InExtensionTag.html#L231">231</a>
- </td>
- </tr>
- <tr class="b">
- <td>org/apache/myfaces/tobago/internal/taglib/extension/TimeExtensionTag.java</td>
- <td>Tobago Core</td>
- <td><a href="./xref/org/apache/myfaces/tobago/internal/taglib/extension/TimeExtensionTag.html#L198">198</a>
- </td>
- </tr>
- <tr class="a">
- <td colspan='3'>
- <div>
-<pre> 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()</pre>
- </div>
- </td>
- </tr>
- </table>
- <table border="0" class="bodyTable">
- <tr class="b">
- <th>File</th>
- <th>Project</th>
- <th>Line</th>
- </tr>
- <tr class="a">
- <td>org/apache/myfaces/tobago/internal/taglib/extension/TextareaExtensionTag.java</td>
- <td>Tobago Core</td>
- <td><a
- href="./xref/org/apache/myfaces/tobago/internal/taglib/extension/TextareaExtensionTag.html#L329">329</a>
- </td>
- </tr>
- <tr class="b">
- <td>org/apache/myfaces/tobago/internal/taglib/extension/TimeExtensionTag.java</td>
- <td>Tobago Core</td>
- <td><a href="./xref/org/apache/myfaces/tobago/internal/taglib/extension/TimeExtensionTag.html#L327">327</a>
- </td>
- </tr>
- <tr class="a">
- <td colspan='3'>
- <div>
-<pre> }
-
- /**
- * 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);
- }
-}</pre>
- </div>
- </td>
- </tr>
- </table>
- <table border="0" class="bodyTable">
- <tr class="b">
- <th>File</th>
- <th>Project</th>
- <th>Line</th>
- </tr>
- <tr class="a">
- <td>org/apache/myfaces/tobago/internal/component/AbstractUIPage.java</td>
- <td>Tobago Core</td>
- <td><a href="./xref/org/apache/myfaces/tobago/internal/component/AbstractUIPage.html#L164">164</a></td>
- </tr>
- <tr class="b">
- <td>org/apache/myfaces/tobago/component/UIViewRoot.java</td>
- <td>Tobago Deprecation</td>
- <td><a href="./xref/org/apache/myfaces/tobago/component/UIViewRoot.html#L233">233</a></td>
- </tr>
- <tr class="a">
- <td colspan='3'>
- <div>
-<pre> 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);
- }</pre>
- </div>
- </td>
- </tr>
- </table>
- <table border="0" class="bodyTable">
- <tr class="b">
- <th>File</th>
- <th>Project</th>
- <th>Line</th>
- </tr>
- <tr class="a">
- <td>org/apache/myfaces/tobago/context/ResourceManagerUtils.java</td>
- <td>Tobago Core</td>
- <td><a href="./xref/org/apache/myfaces/tobago/context/ResourceManagerUtils.html#L144">144</a></td>
- </tr>
- <tr class="b">
- <td>org/apache/myfaces/tobago/context/ResourceManagerUtil.java</td>
- <td>Tobago Deprecation</td>
- <td><a href="./xref/org/apache/myfaces/tobago/context/ResourceManagerUtil.html#L102">102</a></td>
- </tr>
- <tr class="a">
- <td colspan='3'>
- <div>
-<pre> 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() + "]";
- }</pre>
- </div>
- </td>
- </tr>
- </table>
- <table border="0" class="bodyTable">
- <tr class="b">
- <th>File</th>
- <th>Project</th>
- <th>Line</th>
- </tr>
- <tr class="a">
- <td>org/apache/myfaces/tobago/internal/taglib/extension/SelectBooleanCheckboxExtensionTag.java</td>
- <td>Tobago Core</td>
- <td><a
- href="./xref/org/apache/myfaces/tobago/internal/taglib/extension/SelectBooleanCheckboxExtensionTag.html#L280">280</a>
- </td>
- </tr>
- <tr class="b">
- <td>org/apache/myfaces/tobago/internal/taglib/extension/SelectManyCheckboxExtensionTag.java</td>
- <td>Tobago Core</td>
- <td><a
- href="./xref/org/apache/myfaces/tobago/internal/taglib/extension/SelectManyCheckboxExtensionTag.html#L296">296</a>
- </td>
- </tr>
- <tr class="a">
- <td>org/apache/myfaces/tobago/internal/taglib/extension/SelectManyListboxExtensionTag.java</td>
- <td>Tobago Core</td>
- <td><a
- href="./xref/org/apache/myfaces/tobago/internal/taglib/extension/SelectManyListboxExtensionTag.html#L274">274</a>
- </td>
- </tr>
- <tr class="b">
- <td colspan='3'>
- <div>
-<pre> }
-
- /**
- * 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")</pre>
- </div>
- </td>
- </tr>
- </table>
- <table border="0" class="bodyTable">
- <tr class="a">
- <th>File</th>
- <th>Project</th>
- <th>Line</th>
- </tr>
- <tr class="b">
- <td>org/apache/myfaces/tobago/internal/taglib/extension/SelectOneChoiceExtensionTag.java</td>
- <td>Tobago Core</td>
- <td><a
[... 6205 lines stripped ...]