selectonemenu not appearing primefaces - jsf

I'm trying to make primefaces elements appear on my pages by taking code from the showcase, the menu worked well after some modifications but the selectonemenu refuses to appear.
it's not showing anything in the layout unit.
This is my xhtml code :
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:p="http://primefaces.org/ui" xmlns:f="http://java.sun.com/jsf/core">
<h:head>
<title>Consultation Travaux Soumis (Etudiant)</title>
<style type="text/css">
.ui-widget,.ui-widget .ui-widget {
font-size: 90% !important;
}
</style>
</h:head>
<body>
<p:layout fullPage="true">
<p:layoutUnit position="north" size="158" header="Intranet" resizable="false" closable="false" collapsible="false">
<h:graphicImage value="/img/Logo.jpg" width="110" height="110"/>
<h:outputText value=" Consultation de la liste de travaux" />
</p:layoutUnit>
<p:layoutUnit position="west" size="200" header="Menu" resizable="true" closable="true" collapsible="true">
<h:form id="pmenu">
<p:menu style="width:90%">
<p:submenu label="Navigation">
<p:menuitem value="Acceuil" action="#" immediate="true" icon="ui-icon ui-icon-home"/>
<p:menuitem value="Deconnexion" action="#{PagesController.logout}" immediate="true" icon="ui-icon ui-icon-locked"/>
</p:submenu>
<p:submenu label="Services">
<p:menuitem value="Emploi du Temps" actionListener="#" immediate="true" ajax="false" icon="ui-icon ui-icon-suitcase" disabled="true"/>
<p:menuitem value="Relevé de Notes" actionListener="#" immediate="true" ajax="false" icon="ui-icon ui-icon-folder-collapsed" disabled="true"/>
<p:menuitem value="Remise de Doc." url="/secure/remisetrEt.xhtml" immediate="true" ajax="false" icon="ui-icon ui-icon-folder-open" />
</p:submenu>
<p:submenu label="Infos">
<p:menuitem value="Réclamation" actionListener="#" immediate="true" ajax="false" icon="ui-icon ui-icon-alert" />
<p:menuitem value="A Propos" actionListener="#" immediate="true" ajax="false" icon="ui-icon ui-icon-info" />
</p:submenu>
</p:menu>
</h:form>
</p:layoutUnit>
<p:layoutUnit position="center">
<h:form>
<h:panelGrid columns="1" style="margin-bottom:10px" cellpadding="5">
<p:selectOneMenu>
<f:selectItem itemLabel="Select One" itemValue="" />
<f:selectItem itemLabel="Option 1" itemValue="1" />
<f:selectItem itemLabel="Option 2" itemValue="2" />
<f:selectItem itemLabel="Option 3" itemValue="3" />
</p:selectOneMenu>
</h:panelGrid>
</h:form>
</p:layoutUnit>
</p:layout>
</body>
</html>

Your code works. Which version of primefaces are you using? Which app server are you deploying to? Which browser have you tested in? Is there anything else on the page besides the selectonemenu?
Try the following. Work with Primefaces 4 on Glassfish 3.
<?xml version='1.0' encoding='UTF-8' ?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:p="http://primefaces.org/ui"
xmlns:fn="http://java.sun.com/jsp/jstl/functions">
<f:view contentType="text/html">
<h:head>
<f:facet name="first">
<meta content='text/html; charset=UTF-8' http-equiv="Content-Type" />
<title>Test</title>
<link type="text/css" rel="stylesheet"
href="#{request.contextPath}/css/default.css" />
<link type="text/css" rel="stylesheet"
href="#{request.contextPath}/css/custom.css" />
</f:facet>
</h:head>
<h:body>
<h:form>
<h:panelGrid columns="1" style="margin-bottom:10px" cellpadding="5">
<p:selectOneMenu>
<f:selectItem itemLabel="Select One" itemValue="" />
<f:selectItem itemLabel="Option 1" itemValue="1" />
<f:selectItem itemLabel="Option 2" itemValue="2" />
<f:selectItem itemLabel="Option 3" itemValue="3" />
</p:selectOneMenu>
</h:panelGrid>
</h:form>
</h:body>
</f:view>
</html>

The problem was that I have to bind my selectonemenu to a property of a managed bean I have.

Related

Preventing p:dialog refreshing whole page when using p:layoutunit

I have used p:layoutUnit to set up a menu on the left and a main page on the right. This works ok until I add a p:dialog. Now when I select the stocks menu item the whole page refreshes instead of just the main page. I realise p:dialog applies to the whole page since it is modal, so I wondered what is the correct way to implement this to avoid a whole page refresh?
Here is my layout:
Index2.xhtml:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:p="http://primefaces.org/ui"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
<h:head>
<title>Index2</title>
</h:head>
<h:body>
<p:layout style="min-width:400px;min-height:700px;">
<p:layoutUnit position="west" resizable="false" size="300" minSize="40" maxSize="200">
<h:form>
<p:menu>
<p:submenu label="Menu">
<p:menuitem value="Stocks" outcome="stocks" />
<p:menuitem value="Portfolio" outcome="portfolio"/>
</p:submenu>
</p:menu>
</h:form>
</p:layoutUnit>
<p:layoutUnit position="center">
<h3 style="margin-top:0">Plain Menu</h3>
<ui:insert name="source" />
</p:layoutUnit>
</p:layout>
</h:body>
</html>
Stocks.xhtml:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:p="http://primefaces.org/ui"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
template="index2.xhtml">
<ui:define name="source">
<script type="text/javascript">
function handleMessage(data)
{
if(data == 'price')
{
updateWidget();
console.log("stocks: data is price");
}
}
function onError(){
console.log("on error");
}
function onStart(){
console.log("on start");
}
function onComplete(){
console.log("on complete");
}
function onSuccess(){
console.log("on success");
}
</script>
<h:form id="form">
<p:dataGrid id="prices" var="orderBooks" value="#{stocksView.latestPricesResults}" columns="3" rows="12">
<f:facet name="header">
WST 100
</f:facet>
<p:column>
<p:panel header="#{orderBooks.bidOrderId.member.memberId}">
<h:panelGrid columns="1">
<h:outputText value="#{orderBooks.price}" />
<h:outputText value="#{orderBooks.bidOrderId.member.party}" />
<h:outputText value="#{orderBooks.lastUpdate}" />
<p:commandLink update=":form:buyDetail" oncomplete="PF('buyDialog').show()" title="View Detail">
<h:outputText value="Buy"/>
<f:setPropertyActionListener value="#{orderBooks}" target="#{stocksView.selectedStock}" />
</p:commandLink>
</h:panelGrid>
</p:panel>
</p:column>
</p:dataGrid>
<p:dialog header="Buy Shares" widgetVar="buyDialog" modal="true" showEffect="fade" hideEffect="fade" resizable="false" appendTo="#(body)">
<p:outputPanel id="buyDetail" style="text-align:center;">
<p:panelGrid columns="2" columnClasses="label,value">
<h:outputText value="Member" />
<h:outputText value="#{stocksView.selectedStock.bidOrderId.member.memberId}" />
</p:panelGrid>
</p:outputPanel>
</p:dialog>
<p:remoteCommand name="updateWidget"
actionListener="#{stocksView.findLatestPrices}"
autoRun="true"
update="prices"
onstart="onStart()"
oncomplete="onComplete()"
onsuccess="onSuccess()"
onerror="onError()">
</p:remoteCommand>
</h:form>
<p:socket onMessage="handleMessage" channel="/notify" />
</ui:define>
</ui:composition>

JSF-Primefaces Two Forms Interfering

I am aware that nesting is a problem with form tags. However, my page does not have nested forms. I have one form (id="menuForm") to enclose the p:menu. Next, I have a form (id="locationForm") lower in the page. I have checked the html source that is output, and there is no nesting happening.
I have one p:commandButton that I want to use to submit the form. It works occasionally, but not all of the time. Sometimes, the method fires and other times it doesn't. Can anyone poing out what I'm doing wrong?
Also--If I comment out the menu form completely it works as intended.
Thanks.
Action Method:
public String insertLocationAction(){
System.out.println("******* Method Fired.");
DatabaseManager.insertLocation(newLocation);
return "locations";
}
XHTML Page:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
<f:view>
<ui:debug rendered="#{facesContext.application.projectStage eq 'Development'}"/>
<h:head />
<p:messages />
<p:layout fullPage="true">
<p:layoutUnit position="west" size="260" header="Menu" resizable="false" closable="false">
<h:form id="menuForm">
<p:menu style="width: 240px;" >
<p:submenu label="Locations" style="width: 240px;">
<p:menuitem value="All Locations" outcome="/pages/locations.xhtml" style="width: 240px;" />
<p:menuitem value="Create New" action="#{locationBackingBean.addLocationAction}" style="width: 240px;" />
</p:submenu>
<p:submenu label="Queries" style="width: 240px;">
<p:menuitem value="Product Group Sales" outcome="/pages/productGroupSales.xhtml" style="width: 240px;" />
<p:menuitem value="Product Line Sales" outcome="/pages/productLineSales.xhtml" style="width: 240px;" />
</p:submenu>
</p:menu>
</h:form>
</p:layoutUnit>
<p:layoutUnit position="center">
<h:form id="locationform" enctype="multipart/form-data">
<p:growl id="growl" showDetail="true" />
<p:panelGrid columns="2">
<f:facet name="header">Enter New Location Details</f:facet>
<h:outputLabel for="locationName" value="Location Name:" /> <p:inputText id="locationName" value="#{locationBackingBean.newLocation.locationName}" size="100" />
<h:outputLabel for="street1" value="Street Address1:" /> <p:inputText id="street1" value="#{locationBackingBean.newLocation.street1}" size="100"/>
<h:outputLabel for="street2" value="Street Address2:" /><p:inputText id="street2" value="#{locationBackingBean.newLocation.street2}" size="100"/>
<h:outputLabel for="city" value="City:" /><p:inputText id="city" value="#{locationBackingBean.newLocation.city}" size="40" />
<h:outputLabel for="state" value="State:" /><p:inputText id="state" value="#{locationBackingBean.newLocation.state}" size="2" />
<h:outputLabel for="country" value="Country:" /><p:inputText id="country" value="#{locationBackingBean.newLocation.country}" size="20" />
<h:outputLabel for="phone" value="Phone:" /><p:inputText id="phone" value="#{locationBackingBean.newLocation.phone}" size="15" />
<h:outputLabel for="locationType" value="Type:" /><p:inputText id="locationType" value="#{locationBackingBean.newLocation.locationType}" />
</p:panelGrid>
<p:commandButton action="#{locationBackingBean.insertLocationAction}" ajax="false" value="Save" />
</h:form>
</p:layoutUnit>
</p:layout>
</f:view>
</html>
Refer to: http://www.primefaces.org/docs/vdl/4.0/primefaces-p/commandButton.html
By default the p:commandButton processes the whole 'view'.
Add process=":locationform" to the commandButton might just need "locationform" (depends on your selector working and nested jsf components etc..

p:selectBooleanButton primefaces-mobile doesn't change

My p:selectBooleanButton doesn't respond on any click and has this check box at the corner that does respond when I click on it but the label on the button doesn't change at all! maybe someone had this problem and can help me. I'm using primefaces 3.5 and primefaces-mobile 0.9.5 with glassfish 3.1.2.2 server.
<f:view xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
xmlns:pm="http://primefaces.org/mobile"
contentType="text/html"
renderKitId="PRIMEFACES_MOBILE">
<pm:page id="page" title="reservation">
<f:facet name="postinit">
<link rel="stylesheet"
href="#{request.contextPath}/javax.faces.resource/calendar/calendar.css.jsf?ln=primefaces-mobile" />
<link type="text/css" rel="stylesheet" href="#{request.contextPath}/resources/css/jquery.mobile-1.4.0.css" />
<h:outputScript library="js" name="jquery.mobile-1.4.0.js" target="head" />
<h:outputScript library="primefaces-mobile" name="calendar/calendar.js" />
</f:facet>
<pm:view id="menu" swatch="a" >
<pm:header title="reservation">
<f:facet name="left"><p:button value="Back" icon="back" onclick="PrimeFaces.back()"/>
</f:facet>
</pm:header>
<pm:content >
<h:form >
<p:growl id="messageOverlay" />
<h4>reservation date</h4>
<p:calendar value="#{reservationBean.reservDate}" mode="popup" pattern="dd/MM/yyyy HH:mm" stepMinute="30" mindate="01/01/2014"/>
<h4>party size</h4>
<pm:inputRange id="range" minValue="0" maxValue="20" value="#{reservationBean.reservPartySize}" />
<h:panelGrid columns="2" style="margin-bottom:10px" cellpadding="5">
<h:selectOneMenu value="#{reservationBean.reservZone}" >
<f:selectItem itemLabel="Outside" itemValue="outside" />
<f:selectItem itemLabel="Inside" itemValue="inside" />
<f:selectItem itemLabel="Vip" itemValue="vip" />
</h:selectOneMenu>
<p:selectBooleanButton onLabel="yes" offLabel="no" value="#{reservationBean.smokingFlag}" label="aa" />
</h:panelGrid>
<p:commandLink style="width:20%" actionListener="#{reservationBean.reservate}" update=":basicDialog" oncomplete="dlg.show();">
<p:graphicImage style="width: 20%;border: 0; " value="/resources/images/reservation.png" />
</p:commandLink>
</h:form>
<p:growl id="basicDialog" showDetail="true" life="5000" />
</pm:content>
</pm:view>
</pm:page>
`

after click menu, PrimeFaces layout needs manual refresh

In My project, I want to implement that when someone access ,need to popup a login Dialogue box first (Hide the main page menu and other element.. just let u see the login box ) .then if you put in right info, hide the loginbox and display layout to u .
Now question is : when hide the box , yeah, you can see the layout and looks nice , but when you click the link in the menu, the center all layout display to none. But when you refresh browser again , you can see it again
I'm sure whether i update wrong id or something else .
Following is the code refer and catch exception .Wait your answer. Very important to me .
Best Regards and Thank .
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<f:view contentType="text/html">
<h:head>
<f:facet name="first">
<meta http-equiv="X-UA-Compatible" content="EmulateIE8" />
<meta content='text/html; charset=UTF-8' http-equiv="Content-Type" />
<title>SingTel - eshop Operation Maintaince</title>
<link rel="shortcut icon"
href="#{request.contextPath}/images/system/favicon.ico" />
</f:facet>
<link type="text/css" rel="stylesheet"
href="#{request.contextPath}/css/default.css" />
<link type="text/css" rel="stylesheet"
href="#{request.contextPath}/css/syntaxhighlighter/syntaxhighlighter.css" />
<style type="text/css">
</style>
<script type="text/javascript">
function handleLoginRequest(xhr, status, args) {
if(args.validationFailed || !args.loggedIn) {
jQuery('#dialog').effect("shake", { times:5 }, 100);
} else {
dlg.hide();
jQuery('#loginLink').fadeOut();
}
}
</script>
</h:head>
<h:body>
<p:outputPanel id="mainPanel" autoUpdate="true">
<p:layout fullPage="true" id="layout" rendered="#{esUserSessionBean.showLogin == true ? false : true}">
<p:layoutUnit id="left" position="west" closable="false"
collapsible="true" style="border:0px" header="MENU">
<h:form id="menuForm">
<p:slideMenu
style="width:272px;height:600px;margin-left:-3px;margin-top:-6px;"
id="tree">
<p:submenu label="Test EJB " icon="ui-icon-play">
<p:menuitem value="Test EJB " action="#{navigationBean.doNav}"
update=":centerContentPanel" icon="ui-icon-arrow-4-diag">
<f:param name="urlParam" value="ui/testEJB/testEJB" />
</p:menuitem>
</p:submenu>
</p:slideMenu>
</h:form>
</p:layoutUnit>
<p:layoutUnit id="center" position="center" style="border:0px;">
<p:outputPanel id="centerContentPanel">
<ui:include src="../#{navigationBean.pageName}.xhtml" />
</p:outputPanel>
</p:layoutUnit>
</p:layout>
</p:outputPanel>
<p:outputPanel id="loginPanel" autoUpdate="true">
<p:dialog id="dialog" header="Login" widgetVar="dlg" closable="false"
visible="#{esUserSessionBean.showLogin}"
modal="true"
>
<h:form id="loginForm">
<h:panelGrid columns="2" cellpadding="5">
<h:outputLabel for="username" value="Username:" />
<p:inputText id="username" value="#{esUserSessionBean.userId}"
required="true" label="username" />
<h:outputLabel for="password" value="Password:" />
<p:password id="password" value="#{esUserSessionBean.password}"
required="true" label="password" feedback="false" />
<f:facet name="footer">
<p:commandButton id="loginButton" value="Login"
actionListener="#{esUserSessionBean.login}"
oncomplete="handleLoginRequest(xhr, status, args) " />
</f:facet>
</h:panelGrid>
</h:form>
</p:dialog>
</p:outputPanel>
</h:body>
</f:view>
</html>
You need to wrap your #loginLink inside an <h:panelGroup rendered=#{not bean.isLogged}"></h:panelGroup>. The bean.isLogged will be a setter of your choice that return true if the user is connected.
With that, when you refresh the page, the link won't be displayed. Altought, I don't find your #loginLink inside your code snippet.

CSS style flashes and vanishes soon on JSF page

I have primeface p:panel on jsf file. I apply background color with the following style on the template page (anasayfa.xhtml).
<h:head>
<style type="text/css">
.bos{background-color:red;}
</style>
</h:head>
My Jsf Page with viewscoped backing bean:
<ui:composition template="/anasayfa.xhtml">
<ui:define name="ortaAlan">
...
<p:panel styleClass="bos">
...
</p:panel>
</ui:define>
</ui:composition>
When I load page background color is seen for very shortly, then becomes transparent. CTRL+F5 has the same effect.
What is wrong here?
Thanks for helps in advance
jsf page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
<ui:composition template="/anasayfa.xhtml">
<ui:define name="ortaAlan">
<p:panel id="rezerveleriniz">
<h:outputText value="#{rezervasyonBean.bugun.time}">
<f:convertDateTime pattern="dd/MM/yyyy" />
</h:outputText> : Rezervasyon Saatleri <br/>
<ui:repeat var="r" value="#{rezervasyonBean.kullaniciRezervasyonSaatleri}">
#{r.saatAraligi}<br/>
</ui:repeat>
</p:panel>
<h:form id="aaa">
<p:panel>
<p:panel style="float:left;">
<h:panelGrid columns="1">
<ui:repeat var="rs" value="#{rezervasyonBean.rezervasyonSaatleriListesi}">
**// !!!!!!!!!!!! Problem is here !!!!!!!!**
<p:panel styleClass="#{rezervasyonBean.isRezervasyonOnThisDay(rs) ? 'dolu' : 'bos' }">
#{rs.saatAraligi}
<h:commandButton action="#{rezervasyonBean.sec(rs,'1')}" value="+" update=":rezerveleriniz" disabled="#{rezervasyonBean.isRezervasyonOnThisDay(rs)}" />
</p:panel>
</ui:repeat>
</h:panelGrid>
<h:commandButton action="#{rezervasyonBean.kaydet()}" value="Kaydet" />
</p:panel>
<div style="clear:both;"></div>
</p:panel>
</h:form>
</ui:define>
</ui:composition>
</html>
template:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
<title>Görev Takip Sistemi</title>
<style type="text/css">
.ui-widget,.ui-widget .ui-widget {
font-size: 12px !important;
font-family:Arial;
}
.bos{
background-color:red;
}
.dolu{
background-color:yellow;
}
#topPanel {z-index:2 !important; }
#topPanel div{overflow:visible;}
.colStyle_panelGridForGorev{
width:225px;
}
.colStyle_panelGridForProfil{
width:100px;
}
</style>
</h:head>
<body>
<p:growl for="growlForAnasayfa" showDetail="true" life="3000" autoUpdate="true"/>
<h:form>
<p:idleMonitor timeout="900000">
<p:ajax event="idle" listener="#{anasayfaBean.indirectLogout}"/>
</p:idleMonitor>
</h:form>
<p:ajaxStatus onstart="statusDialog.show();" onsuccess="statusDialog.hide();" />
<p:dialog modal="true" widgetVar="statusDialog" header="Status"
draggable="false" closable="false">
<p:graphicImage value="/images/statusBar.gif" />
</p:dialog>
<p:layout fullPage="true">
<p:layoutUnit position="north" size="50" id="topPanel" style="border:0px">
<h:form id="formAnaSayfaToolbar">
<p:toolbar>
<p:toolbarGroup align="left">
<p:commandButton type="submit" value="#{anasayfaBean.kullanici.kullaniciAdi} #{anasayfaBean.kullanici.kullaniciSoyadi}"
style="margin-left:200px;" action="/profil.xhtml?faces-redirect=true" ajax="false"/>
<p:commandButton type="submit" value="Gruplarım"
action="/kullanici/gruplarim.xhtml?faces-redirect=true" ajax="false" rendered="#{!anasayfaBean.daireBaskani}"/>
<p:commandButton type="submit" value="Görevlerim"
action="/gorevListele.xhtml?faces-redirect=true" ajax="false" rendered="#{!anasayfaBean.daireBaskani}"/>
<p:commandButton type="submit" value="Kullanıcı İşlemleri"
action="/daireBaskani/kullanici.xhtml?faces-redirect=true" ajax="false" rendered="#{anasayfaBean.daireBaskani}"/>
<p:commandButton type="submit" value="Grup İşlemleri"
action="/daireBaskani/grup.xhtml?faces-redirect=true" ajax="false" rendered="#{anasayfaBean.daireBaskani}"/>
<p:menuButton value="Görev İşlemleri" rendered="#{anasayfaBean.daireBaskani}">
<p:menuitem value="Yeni Görev Ekle" url="/daireBaskani/gorevEkle.btk" />
<p:menuitem value="Gorevleri Listele" url="/gorevListele.btk" />
</p:menuButton>
<p:menuButton value="Admin Paneli" rendered="#{anasayfaBean.admin}">
<p:menuitem value="Birim İşlemleri" url="/admin/birim.btk" />
<p:menuitem value="Ünvan İşlemleri" url="/admin/unvan.btk" />
</p:menuButton>
</p:toolbarGroup>
<p:toolbarGroup align="right">
<p:commandButton type="submit" value="Çıkış" icon="ui-icon-close"
action="#{anasayfaBean.logout}" ajax="false" style="margin-right:200px;"/>
</p:toolbarGroup>
</p:toolbar>
</h:form>
</p:layoutUnit>
<p:layoutUnit position="center">
<ui:insert name="ortaAlan">
<h:outputText value="Yukarıdaki menüden yapmak istediğiniz işlemi seçiniz." />
</ui:insert>
</p:layoutUnit>
<p:layoutUnit position="south" size="30" resizable="true" style="border-width:0px;">
<h:form style="text-align:center; font-size:13px;">
<h:outputText value="Bilişim Sistemleri Dairesi © 2012" />
</h:form>
</p:layoutUnit>
<p:layoutUnit position="east" size="200" id="eastPanel" style="border:0px">
</p:layoutUnit>
<p:layoutUnit position="west" size="200" id="westPanel" style="border:0px">
</p:layoutUnit>
</p:layout>
</body>
</html>

Resources