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

[Problem]_layout of include page

 
ilin Huang
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Hank,
Thanks for your reply so quickly~~
I soloved the problem, and htmlib is very easy to use~~~
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic