Ask Questions, Answer Questions

UI Components for JSF
Post Reply
callahan
Posts: 768
Joined: 27 May 2010, 22:52

16 Jun 2010, 01:44

:?: :idea:

User avatar
vijayrajan1980
Posts: 19
Joined: 23 Apr 2010, 05:58

29 Jun 2010, 12:43

I am using Primefaces 1.1 RC1 snapshot with JSF 1.2

Everything seems to be working fine except the layout resize listeners. Can somebody help me figure that out???

The code is as follows

<!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:a4j="http://richfaces.org/a4j"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:rich="http://richfaces.ajax4jsf.org/rich"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.prime.com.tr/ui"
xmlns:ajax="https://ajax4jsf.dev.java.net/ajax">

<f:view contentType="text/html">
<head>

<title>
<ui:insert name="title">CMVS HomePage</ui:insert>
</title>
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

<link type="text/css" rel="stylesheet" href="#{request.contextPath}/css/themes/redmond/skin.css" />
<link type="text/css" rel="stylesheet" href="#{request.contextPath}/css/cmvs_jb.css" />

<style>
.ui-widget {
font-family: Verdana, Arial, sans-serif;
font-size:10px;
}


</style>


</head>

<body class="yui-skin-sam">

<p:growl id="msg" showDetail="true"/>
<f:loadBundle var="text" basename="#{customerEntry.bundleName}" />

<p:layout fullPage="true" resizeListener="#{layoutBean.handleResize}" onResizeUpdate="msg">


<p:layoutUnit id="top" position="top" resizable="false" height="55" >
<h:form>
<div id="container">
<div id="ORGheader">
<h1>Celtic</h1>
<div id="primarynav" style="vertical-align: center;">
</div>
<div id="utilitynav" style="vertical-align: center;">
<ul>
<li><h:outputLabel value="#{text['webapp.version']}" /></li>
<li><h:commandLink action="#{menuBean.logOff}" value="Logoff" /></li>
</ul>
</div>
</div>
</div>
</h:form>
</p:layoutUnit>


<p:layoutUnit id="center" position="center" header="Customer View" style="padding-top:5px" scrollable="true" width="#{layoutBean.center_width}" >
<ui:insert name="navigation">
<ui:include src="./menu.xhtml"/>
</ui:insert>
<ui:insert name="body">
</ui:insert>
</p:layoutUnit>

<p:layoutUnit id="left" position="left" resizable="true" closable="true" collapsible="true" header="User View" width="#{layoutBean.left_width}" >
<ui:include src="./sidebar.xhtml" />
</p:layoutUnit>



</p:layout>

</body>


</f:view>
</html>



public class LayoutBean extends BasePage {


int left_width =200;
int center_width;

public int getLeft_width() {
return left_width;
}

public void setLeft_width(int leftWidth) {
left_width = leftWidth;
}

public int getCenter_width() {
return center_width;
}

public void setCenter_width(int centerWidth) {
center_width = centerWidth;
}



public void handleResize(ResizeEvent event) {
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, event.getComponent().getId() + " resized", "Width:" + event.getWidth() + ", Height:" + event.getHeight());

addMessage("test");
}

}
Apache MyFaces JSF 1.2
Primefaces 1.1-RC1-Snapshot
Richfaces 3.3.2

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

29 Jun 2010, 13:22

Please use support forum for support questions. Users Voice is for new feature requests and general feedback.

User avatar
vijayrajan1980
Posts: 19
Joined: 23 Apr 2010, 05:58

29 Jun 2010, 14:00

Ooops , sorry!!
Apache MyFaces JSF 1.2
Primefaces 1.1-RC1-Snapshot
Richfaces 3.3.2

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 39 guests