1

I have two JSF page namely Home.xhtml and ContentPage.xhtml. First page contains link of another page by clicking that link the second page content gets included in first page. I have defined a style in second page but that is not applying. Please help me.

Home.xhtml

 <h:head> <title>Home</title> </h:head> <h:body> Home page <ui:insert name="content">Editable area</ui:insert> <h:form><h:commandLink action="ContentPage" value="click"/></h:form> </h:body> 

ContentPage.xhtml

<h:head> <title>Content page</title> <style> .styleFormat{ color: green; font-size: 20pt; } </style> </h:head> <h:body> <ui:composition template="Home.xhtml"> <ui:define name="content"> <h:outputLabel styleClass="styleFormat">This is some text which is of Green color and having font size 20</h:outputLabel> </ui:define> </ui:composition> </h:body> 
2
  • 1
    Why are these all tags there in the template client : <h:head>, <title>, <h:body>? Contents sitting outside <ui:composition> will all be ignored. Commented Dec 24, 2015 at 10:31
  • I got my mistake. That style is not applying because i wrote that outside <ui:composition> that's why it was ignored. Thanks Tiny. Commented Dec 24, 2015 at 11:53

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.