wood burning stoves 2.0*
The moose likes JSF and the fly likes [Problem]_layout of include page 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]_layout of include page " Watch "[Problem]_layout of include page " New topic

[Problem]_layout of include page

ilin Huang

Joined: Jun 05, 2006
Posts: 2
Dear all,
I using h:selectOneMenu and f:selectItems to present data in include page, but
the data always present at top of page, have anybody know how to solve that....

Thanks for any suggestion.

ilin Huang

the code is below:

some of code of main page
<f:subview id="requestPage">
<jsp:include flush="false" page="includePage.jsp"/>

some of code of include page
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<td width="230" class="group_label" align="right">
<h:inputText id="roleSelect2" value="#{role.selectrole}" />
<h:selectOneMenu id="roleSelect" value="#{role.selectrole}">
<f:selectItems value="#{role.rolelist}" />
<td class="context_text">
<a href="JavaScript:createAuth()"><img src="images/role_create_button.gif" alt="Create" width="59" height="22" border="0" /></a>
Henry Lowell
Ranch Hand

Joined: May 29, 2006
Posts: 63
More than likely it's because you are mixing pure html with JSF tags. JSF 1.1 and HTML don't play real nice together and when the component tree is built you can't guarantee that the JSF components will render in the appropriate place.

One common solution is to wrap non html code in f:verbatim tags though I don't much care for that. This is a nice taglib that you can use for all your non-jsf HTML components. I use this and it has worked quite well. Just a bit more typing. ;)

ilin Huang

Joined: Jun 05, 2006
Posts: 2
Dear Hank,
Thanks for your reply so quickly~~
I soloved the problem, and htmlib is very easy to use~~~
I agree. Here's the link: http://aspose.com/file-tools
subject: [Problem]_layout of include page
Similar Threads
JSTL paging problem
Value bean or backing bean?
On a button click need to load a select one menu with required="true" to some components
Can not Populate the form on combo box change
Exception during addition of data from UI