0

How to have my custom tag "ui:included" with a parameter?

I tried composite components before but due to their inability to inject stuff and the problematic request scope and the difficulty of having multiple instances of them on a single View, I decided it might be better to use custom facelet tags.

What I'm trying to do, is a p-editor bundled with buttons based on the purpose of that particular p-editor, like should it be able to save the content temporarily or send an e-mail and what type of a file it should save etc.

I need to be able to include a custom tag which is a collection of components but I'd like to give them one parameter to specify their content, like what buttons will be shown.

If I could give it just a one single String as a parameter, for example, I could then manage the button rendering, filetype Enum setting etc. in the backing ManagedBean of the view with booleans and methods.

Is it in any way possible? I only need to know a way to "give a parameter" for ui:included custom tag. No need for full code example (of course one wouldn't hurt either)

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Steve Waters
  • 3,348
  • 9
  • 54
  • 94

0 Answers0