permaculture playing cards*
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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "[Problem]_layout of include page " Watch "[Problem]_layout of include page " New topic
Author

[Problem]_layout of include page

ilin Huang
Greenhorn

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"/>
</f:subview>
...

==================
some of code of include page
===================
...
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<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}" />
</h:selectOneMenu>
</td>
<td class="context_text">
<a href="JavaScript:createAuth()"><img src="images/role_create_button.gif" alt="Create" width="59" height="22" border="0" /></a>
</td>
</tr>
</table>
...
===================
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. ;)


Hank
ilin Huang
Greenhorn

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~~~
 
wood burning stoves
 
subject: [Problem]_layout of include page