Archive

Posts Tagged ‘primefaces’

Solution to PrimeFaces p:schedule overlapping p:menubar drop down

June 14th, 2010 Karthikeyan C No comments

The problem under consideration is what is discussed in this forum post.

http://primefaces.prime.com.tr/forum/viewtopic.php?f=3&t=2696&start=0

The solution is to assign a z-index of value zero to p:schedule. A lower value will send it behind the page background. Making the z-index for p:menubar also did not do the trick. May be the drop down did not inherit the z-index of menubar properly and as a result the drop down had a lower z-index than the p:schedule.

So instead of increasing z-index of menubar and its content, the solution i found was to make the z-index of the p:schedule zero as in the below code.


<p:schedule style="position:relative;top:0px;left: 0px;z-index:0;width:100%"  value="#{myaction.eventModel}" editable="false" widgetVar="someschedule" view="agendaWeek"/>
  • Share/Bookmark
Categories: Development Tags:

How To ReRender PrimeFaces growl after Ajax request from RichFaces component

January 17th, 2010 Karthikeyan C 2 comments

The trick is to embed p:growl within a4j:outputPanel (else for some reason PrimeFaces growl is not rerendered even after assigning an id to it)


<a4j:outputPanel id="pgrowl">
 <p:growl  showDetail="true"  sticky="true"/>
 </a4j:outputPanel>

The usage is like


<a4j:commandButton reRender="pgrowl" ..........
  • Share/Bookmark
Categories: Development Tags:

PrimeFaces File Upload component hack

November 25th, 2009 Karthikeyan C 1 comment

If PrimeFaces file upload does not work, mostly the reason will be that the prependId attribute was not set to false in the h:form. After the user browses the file nothing happens and we are left wondering as there is no JavaScript error.

I have configured the PrimeFaces file upload as below in one of my UI page.


<h:form id="myform" enctype="multipart/form-data" prependId="false">
 <p:fileUpload fileUploadListener="#{userprofile.handleFileUpload}"
 allowTypes="*.jpg;*.png;*.gif;" description="User Profile Image"/>

 </h:form>
  • Share/Bookmark
Categories: Development Tags: