boa ideia Rui,
Bom, eu tenho 2 páginas jspx, uma chamada menu e outra Main
Segue o código da Main, ela é bem simples, só importa a página include que eu crei.
<?xml version='1.0' encoding='windows-1252'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:af="http://xmlns.oracle.com/adf/faces"
xmlns:afh="http://xmlns.oracle.com/adf/faces/html"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:t="http://myfaces.apache.org/tomahawk">
<jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
doctype-system="http://www.w3.org/TR/html4/loose.dtd"
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
<jsp:directive.page contentType="text/html;charset=windows-1252"/>
<f:view>
<afh:html>
<afh:head title="Main">
<meta http-equiv="Content-Type"
content="text/html; charset=windows-1252"/>
</afh:head>
<afh:body>
[b]<jsp:include page="/include/menu.jspx" flush="true"/> [/b]
</afh:body>
</afh:html>
</f:view>
</jsp:root>
Eu tenho a página menu
<?xml version='1.0' encoding='windows-1252'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:af="http://xmlns.oracle.com/adf/faces"
xmlns:afh="http://xmlns.oracle.com/adf/faces/html"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:t="http://myfaces.apache.org/tomahawk">
<jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
doctype-system="http://www.w3.org/TR/html4/loose.dtd"
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
<jsp:directive.page contentType="text/html;charset=windows-1252"/>
<h:form binding="#{backing_include_menu.form1}" id="formMenu">
<af:objectImage source="/images/logoQuasar.JPG" borderWidth="0"
align="middle"/>
<t:inputHidden forceId="true" id="jscook_action"
binding="#{backing_include_menu.jscook_action}"/>
<t:jscookMenu layout="hbl" theme="ThemeOffice"
binding="#{backing_include_menu.jscookMenu1}" id="jscookMenu1">
<t:navigationMenuItems id="navitems"
value="#{backing_include_menu.menuItems}"
binding="#{backing_include_menu.navitems}"/>
</t:jscookMenu>
</h:form>
<!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_include_menu-->
</jsp:root>
notem que eu faço um bind na tag para pegar o menu de acordo com uma tabela do banco.
<t:navigationMenuItems id=“navitems”
[color=red]value="#{backing_include_menu.menuItems}"[/color]
binding="#{backing_include_menu.navitems}"/>
Segue o metodo que retorna o menu populado para a pagina.
public List<NavigationMenuItem> getMenuItems() {
List<NavigationMenuItem> menu = new ArrayList<NavigationMenuItem>();
CarregarMenu carregarMenu = new CarregarMenu();
menu = carregarMenu.carregarMenu();
return menu;
}
ele exibe os menus corretamento porem fica essa maldita String na tela…rsrsrs
Valew