This content has been marked as final.
Show 3 replies
-
1. Re: Facelets - Custom Component
asookazian Oct 23, 2009 11:15 PM (in response to ralf)Can't you add it directly in the template you created? What exactly will the spacer do in this case? (you don't specify height or width). Just insert a new line?
-
2. Re: Facelets - Custom Component
ralf Oct 23, 2009 11:18 PM (in response to ralf)yes, i could ... but i want to inject other components like h:commandbuttons...
-
3. Re: Facelets - Custom Component
kragoth Oct 26, 2009 12:18 AM (in response to ralf)Ok, for starters the answer to your question is very very easy. But, before just following what I show you, you really should take the time to read this web page as it will help you so very much with understanding how to do much more complicated things in the future.
http://www.ibm.com/developerworks/java/library/j-facelets/
Now, to fix your problem, where you have put
insert some content here
just replace that with<ui:insert />
Now, it will work exactly how you want.
It should look like:
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j" > <div class="view-quicksearch-button"> <span class="genericButton genericButtonBig"> <span class="t" /> <span class="cl"> <span class="cr"> <span class="c"> <ui:insert /> </span> </span> </span> <span class="b" /> <span class="tl" /> <span class="tr" /> <span class="br" /> <span class="bl" /> </span> </div> </ui:composition>