attribute « Component « JSF Q&A

1. Custom JSF component attribute list

I'm writting a custom JSF component that will render image transitions for a set of specified images. The list of images to be used by the component will be specified by ...

2. JSF2: limiting cc:attribute to a given object type within a List

If I had a managed bean as follows:

public class Example {

    private List<String> stringList;
    private List<Long> longList;

    // getters, setters, etc. down ...

3. How to get parent component attributes

I've seen in some examples (e.g. [this][1][1]: that subcomponent can see attributes of parent component using 'cc.parent.attrs'. However, it is not work for me. What can be ...

4. JSF 2.0: Passing composite component attribute to inner composite component

I have the following case:

    <cc:attribute name="someValue" />

So inside my composite component ...

5. Setting Attributes of composition

I have real problems with my composition. Now I have declared a custom UIInput-Component which I passed as the componentType of my composition. Now when I want to declare an Attribute ...

6. Passing optional to JSF components within composite components

I am looking to pass in attribute values to inner components of a composite component. The long and short of it is that we are trying to wrap an h:outputLink ...

7. attributes delegation when extending component using Facelets

When implementing a custom facelets component which extends some existing component, it is pretty common that your custom component accepts the same attributes as the component being extended. For example extended h:inputText ...

8. How to ignore empty attributes within a composite component?

How can i ignore empty attributes of a composite component? Example:

<cc:attribute name="styleClass" />
<cc:attribute name="value" />

<h:inputText styleClass="#{cc.attrs.styleClass}"
    <cc:insertChildren />
When i use the component by this:
<my:inputText />
It ...

9. Decorating standard components in composite components, how to inherit attributes?

I am wondering if there is a nice way to decorate components with composite components? Example:

    <div style="someFancyClass">
        <h:inputText value="#{cc.attrs.value}" />

10. Passing markup via composite components attributes

Is there a way to pass markup (in opposite to plain text) via composite component's attributes? Simply <composite:insertChildren> won't suffice, since the component rely on distinct text parameters. Passing tags via attributes ...

13. How to change attribute of a component?

15. Passing attributes to custom component