This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSF and the fly likes Problem with view while using JSF with Tiles Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Problem with view while using JSF with Tiles" Watch "Problem with view while using JSF with Tiles" New topic
Author

Problem with view while using JSF with Tiles

Ananth Majumdar
Greenhorn

Joined: Aug 17, 2006
Posts: 20
I am using Jsf with tiles. In a superlayout I define the layout of the page
I am using tiles: insert to insert all the tiles header,body and footer. The page is not displayed correctly if I dont put all these inserts in a form. It is being displayed fully if I put it in a form. Otherwise the page is getting truncated i.e the body page is not displayed fully and footer is displayed on the body,.. How to overcome this? tell me if I should put the code also
Richard Green
Ranch Hand

Joined: Aug 25, 2005
Posts: 536
The page is not displayed correctly if I dont put all these inserts in a form.

It is being displayed fully if I put it in a form.

sorry, i couldn't understand your post. can you be more clearer?
[ September 26, 2006: Message edited by: Lynette Dawson ]

MCSD, SCJP, SCWCD, SCBCD, SCJD (in progress - URLybird 1.2.1)
Ananth Majumdar
Greenhorn

Joined: Aug 17, 2006
Posts: 20
My tiles definitions are like this

<tiles-definitions>
<!-- Main Layout -->
<definition name="super.template" path="/superTemplate.jsp">
<put name="header" value="/header.jsp"/>
<put name="progressBar" value="/progressBar.jsp"/>
<put name="bottomMargin" value="/bottomMargin.jsp"/>
<put name="footer" value="/footer.jsp"/>
</definition>
<definition name="company.pages" extends="super.template">
<put name="pageTitle" value="[Task Header]: Company Search"/>


<put name="pageSubTitle" value="Select a company and click Continue"/>
<put name="body" value="search.body"/>
</definition>

<definition name="search.body" path="/companySearch.jsp">
<put name="searchCriteria" value="/searchcompany/searchCriteria.jsp"/>
<put name="searchResults" value="/searchResults.jsp"/>
</definition>
<definition name="newcriteria.body" path="/manageCompany.jsp">
<put name="searchCriteria" value="/managecompany/modify.jsp"/>

</definition>

</tiles-definitions>

In the companySearch.jsp I am including the search criteria and search results tiles.

The searchCriteria.jsp is like this


The page is displayed only if the h:form is there otherwise the search criteria and search results pages are not visible Why..I am using MyFaces implenentation.
Ananth Majumdar
Greenhorn

Joined: Aug 17, 2006
Posts: 20
I have to put the form like that or else I should enclose both the tiles in a form in companySearch.jsf...... why should there be a form always?
Richard Green
Ranch Hand

Joined: Aug 25, 2005
Posts: 536
hmmm..no errors in the tomcat logs?
Ananth Majumdar
Greenhorn

Joined: Aug 17, 2006
Posts: 20
I checked the apache site... this clears my doubt

Tomahawk 1.1.3 has been released. There is one major change that users will need to be aware of. In order to be compatible with the Reference Implmentation (RI), all command links and components that use command links must now be enclosed within an <h:form> element. This means that components that make use of command links (like tree2) must now be inside an <h:form> in order to work properly. For those using the MyFaces Core JSF implementation, there is a tweak to faces-config.xml that will allow your existing pages to work without changing them.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with view while using JSF with Tiles
 
Similar Threads
Struts passing data across tiles
Page rendering is not happening in proper order
TILES and Logic
Passing Tiles into an IFRAME.
Nested Tiles