1

I'm making a composite component with an attribute that I wish to have a number of enumerated possible values. For example, in the case of h:panelGroup...

<h:panelGroup layout="block" />

The layout attribute allows and suggests 'block, as a value (ctrl-space in eclipse). I checked what source I could see at a glance, and the layout attribute on panelGroup is of type String - so I presume this is not being implemented with an Enum.

Is this possible within custom composite components, or is this just a special case?

Thanks in advance.

Matthew Trout
  • 709
  • 5
  • 20
  • I don't understand what's your question. Is what possible? To define more values for the `layout` attribute? – Konstantin Yovkov Nov 21 '14 at 11:13
  • No that was just an example, given a new custom composite component, how would I go about implementing the same functionality that I have described here – Matthew Trout Nov 21 '14 at 11:17
  • 3
    Using enum for default values is currently not possible. You'll have to use conditional rendering. See http://stackoverflow.com/q/7902547/1055089 – Vrushank Nov 21 '14 at 11:44
  • How does eclipse do this then? It must know that the layout attribute on panelGroup is expecting the string "block" in order to suggest it, where does it get these hints from? – Matt Fellows Aug 01 '16 at 09:20

0 Answers0