Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with view while using JSF with Tiles

 
Ananth Majumdar
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Ananth Majumdar
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmmm..no errors in the tomcat logs?
 
Ananth Majumdar
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic