• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Help needed in facelets

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Saloon Keeper
Posts: 26290
186
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
saravana kumar
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Now I am super curious what sports would be like if we allowed drugs and tiny ads.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic