Jeremy Sager wrote:
Thanks in advance for any help on this one, I think it’s a bit tricky.
So, I have a HtmlPanelTabPane that I need to render the children of
dynamically, and I’ve gotten the binding down pat thanks in large part
to help from Martin M. So now I’m working inside of a java object
instead of a jsp…
I’ve created the HtmlPanelTab children just fine, and now I am hoping
that I can import a jsp so I don’t have to keep rendering child
components with java code instead of using the taglib like I want to.
Now, since I know any import has to be done within an <f:subview>, I
went and figured out that a subview is a UINamingContainer, so I made
one of them…
Now what? It doesn’t seem like importing a page is built into any part
of faces for reasons I can’t really figure out, so I’m stuck as to what
I need to do next. Do I have to get the external servlet context, find
the jsp writer, and figure out how to use import tag objects?
Or, as I’m hoping, I’m not the first person to run into this challenge
and someone can tell me that it’s easily solvable, or, even better,
someone can call me a dummy and show me that importing a page
programmatically in faces and I just missed the boat.
You're trying to do all this inside a "backing bean"? If so, I think
you'll find it all very hard work.
It sounds to me like you are really writing a custom UIComponent. In
this case, by writing a proper component in the normal way the JSF
framework will help you - the hooks are all there for what you're trying
to do.
Regards,
Simon