| Author |
Help needed in facelets
|
saravana kumar
Greenhorn
Joined: May 14, 2007
Posts: 12
|
|
Hi, I have one sample facelet appln, but i am trying to implement using frames. In the listing jsp i am calling two jsp thru frames but when i access the listing jsp, content of the two jsp's are not getting displayed in the UI, I mean if give anthing outside the frameset, it is getting displayed. Please look at code below and can anybody tell me how to solve this problem.... Please look at the sample code below.. listing.xhtml <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Frameset.dtd"> <html 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:a="http://www.arc-mind.com/jsf"> <ui:composition template="/WEB-INF/layout/layout.xhtml"> <ui:define name="title">Backend Listing screen</ui:define> <ui:define name="content"> <h:form> <frameset rows="33%,*" border="0" frameborder="0"> <frame name="f1" src="/body.xhtml" scrolling="no" noresize="noresize" /> <frame name="f1" src="/footer.xhtml" scrolling="no" noresize="noresize" /> </frameset> <h:commandLink action="#{CDManagerBean.addNew}"> <f:verbatim>Add CD</f:verbatim> </h:commandLink> </h:form> </ui:define> </ui:composition> </html> body.xhtml page is below <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Frameset.dtd"> <html 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:a="http://www.arc-mind.com/jsf"> <h:dataTable id="items" value="#{CDManagerBean.cds}" var="cd" rowClasses="oddRow, evenRow" headerClass="tableHeader"> <a:column entity="${cd}" fieldName="title" backingBean="${CDManagerBean}"/> <a:column entity="${cd}" fieldName="artist" backingBean="${CDManagerBean}"/> <a:column entity="${cd}" fieldName="price" backingBean="${CDManagerBean}" sort="${false}"/> <a:columnCommand label="Edit" action="editCD" backingBean="${CDManagerBean}"/> </h:dataTable> <br /> <h:commandLink action="#{CDManagerBean.addNew}"> <f:verbatim>Add CD</f:verbatim> </h:commandLink> </html> Regards, Saravanan
|
 |
a
Greenhorn
Joined: Jun 11, 2007
Posts: 7
|
|
Hi, I could not really help you with your issue. But ( ;) ) why do you are using frames? Include your body and footer.xhtml and format it with CSS. Cu Alex
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 12513
|
|
I can think of only one good reason to use frames if you have Facelets to do tiling - Frames can be independently scrolled. However, I think the problem here is that ".xhtml" is a facelets tile internal file and frames are HTML constructs that take URLs. So you'd want to define the two frame components as distinct facelets pages. Which could each be independently tiled (or not) as desired.
|
One of the most odious afflictions that Business has inflicted on the modern English language is "pro-active". Most of the time it's simply redundantly used in place of the simple old word "active". And a good deal of the rest of the time it means "You're not overworked enough yet, so go out and find more!"
|
 |
saravana kumar
Greenhorn
Joined: May 14, 2007
Posts: 12
|
|
Hi, one thing i will tell you, you can achieve resizing the component only using the frames. So only body part i am implementing using frames, rest are all will be displayed from the layout.xhtml itself.. Is it possible to use frames inside the facelets application? Regards, Saravanan.
|
 |
 |
|
|
subject: Help needed in facelets
|
|
|