Archive

Archive for the ‘Development’ Category

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:

Chrome error – NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7

June 6th, 2010 Karthikeyan C No comments

I came across the below error in Chrome while rendering a page ( the same page was working fine in Firefox, Opera).

NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7

I was using JSF 1.2 with Facelets. The solution is to mention the contentType attribute value as text/html in the f:view tag.


<f:view xmlns:f="http://java.sun.com/jsf/core" contentType="text/html">

Note: If the content is not mentioned as text/html, strict validation will occur where few DOM modifications like assigning to innerHTML is prohibited and hence the error.

  • Share/Bookmark
Categories: Development Tags:

MySQL – Select records matching date, ignoring the time portion

May 29th, 2010 Karthikeyan C No comments

Let us assume you have tasks scheduled for a given day in a planner. You wish to select all tasks in the given day. The following query will serve the purpose (the DATE function does the trick)


select * from task where DATE(startdatetime) = DATE('2010-05-29');
  • Share/Bookmark
Categories: Development Tags: