0

I have a JSF Composite Component with complex behavior, and which has a Backing Bean to hold and process data. I can use this component normally if I place it only one time whitin then xhtml. But I have problem setting the component multiple times per page, since all the components will use the same reference of Backing Bean.

There's a way to have a single instance per component instantiation?

I can make it work if I create manually multiple instances of the Bean and pass all dependencies to them, and assign them to the components. I'm actually searching a solution where the components are able to hold their data on their own.

Dalton
  • 420
  • 4
  • 12
  • This question is strange. Why in earth needing a backing bean if you already have the custom component itself? Perhaps you're confusing "custom components" with "composite components" and you *actually* have a composite component? If so, lookup "backing component". – BalusC Jan 20 '16 at 08:26
  • Oh Lord. You're right, i've mixed the words. Looking for it right now, thanks. – Dalton Jan 20 '16 at 11:56

0 Answers0