This content has been marked as final.
Show 4 replies
-
1. Re: composite ui component
pmuir Feb 5, 2007 3:59 PM (in response to sonstone)Can you give an example of what you are hoping to do (I'm not quite following you) - I think you may be confused between Seam components and JSF components?
-
2. Re: composite ui component
sonstone Feb 5, 2007 5:21 PM (in response to sonstone)No, I think you might be right about it being more of a jsf question. I was just hoping someone could help me here.
I'd like to do something like this in my page:<h:form> <z:mycomponent config="#{customer.config}"/> <h:commandButton value="Ok" action="doAuthenticate"/> </h:form>
I'd then like based off of the configuration given to the component to contain the following two groups of child components:<!-- Snippet Group 1: --> <h:outputText value="Account Number:"/> <h:inputText value="#{payment.accountNumber}" id="accountNumber" required="true"> <s:validate/> </h:inputText> <h:message for="accountNumber" /> <br/> <!-- Snippet Group 2: --> <h:outputText value="PIN:"/> <h:inputText value="#{payment.pinNumber}" id="pinNumber" required="true"> <s:validate/> </h:inputText> <h:message for="pinNumber" /> <br/>
I know I could render the html for the child snippets, but I'd like to re-use the jsf components so that I can take advantage of the databinding. Ideally I'd like to store the snippets in individual jspx files and dynamically link them into my component at runtime.
I'm kind of new to jsf/seam so I apologize if this is the wrong place or I'm missing something really obvious here.
Thanks,
Daniel -
3. Re: composite ui component
pmuir Feb 5, 2007 5:25 PM (in response to sonstone)You should look at facelets (source) components - ah but you seem to be using jsp - my advice is don't, use facelets.
If you used facelets source components, and used it as described in your first code snippet, you would have be able to access a #{config} object in your source components. -
4. Re: composite ui component
sonstone Feb 6, 2007 9:58 PM (in response to sonstone)Thanks a lot. Facelets is exactly what I needed.