0

I would like to make a custom component 'foo' with an attribute called 'bar'.

In JSF 2.2 I can make the Component class in Java without any taglib file:

@FacesComponent(tagName = "foo", createTag = true)
public class Foo {

    @WhatShouldIUseHere(required = true, description = "example attribute")
    public Object getBar() { ... }

}

But I have problem with the bar attribute. Are there any annotation exists, which I can set required, description and other properties like in the taglib xml?

Plutoz
  • 694
  • 9
  • 13

1 Answers1

0

There isn't any annotation to do what you'd like.

If you don't know yet how to add attributes to your custom JSF components, you can look here : Adding custom attribute (HTML5) support to JSF 2.0 UIInput component

Community
  • 1
  • 1
Thrax
  • 1,926
  • 1
  • 17
  • 32