- 20:19 RT: @lahiru: RT @bhagyas: RT @gihangamos: You've got to admit our President has done more than win a war kota.lk/h897 #slelections #
- 20:28 'So I hear you like literature' (PIC): digg.com/d31FElr?t ROFL! Hahahah! #
- 20:35 RT @OddeeBlog 10 of the Dumbest Gadgets Ever Made - Oddee.com tinyurl.com/ycmnt6p #
- 21:00 RT @OddeeBlog 10 Coolest New Gadgets - Oddee.com bit.ly/15ZDpv #
- 21:01 RT: @OMGFacts: The G in 'g-string' stands for groin. #omgfacts #
- 21:09 Funny Advertisements www.loodzwaar.com/2009/12/08/funny-advertisements-media/ #
Welcome to a kyur 4 th *tch
Leave a comment & Thanx 4 comin.
A CURE FOR THE ITCH
That what it says on your heading. It's a name of a song on [LINKIN PARK]'s Reanimation album, this is how they've retitled the hit song on Hybrid Theory
Expalins why I'm doing this. Basically, Kahanawata =)
Saturday, January 16, 2010
Gunith on Twitter
Friday, January 15, 2010
Gunith on Twitter
- 09:11 ROFL: The quick brown fox jumps over the lazy dog: digg.com/d31FPWt?t #
- 21:49 @pavithri Ur craazy! But in a good way :P :D #
- 22:19 Oooh... Ranil on Rathu Ira happening now! Entertaining? Might be! #
Wednesday, January 13, 2010
Gunith on Twitter
- 21:55 RT: @OMGFacts: In some states, it's legal to be a stripper at sixteen, but they have to be home by 11:00 P.M. #omgfacts #
- 22:02 Why I believe printers are the spawn of Hell - The Oatmeal: digg.com/d31FKIn?t #
- 22:22 RT @tweetmeme Funny protesters pics bit.ly/SrKWQ | ROFL! #
- 22:23 @laktek Hahah! #
- 22:27 RT @OddeeBlog 15 Unfortunately Placed Ads - Oddee.com tinyurl.com/2kx5s3 #
- 22:39 RT @OddeeBlog 10 Un believable Stories that happened in Facebook - Oddee.com bit.ly/6BerVE #
Monday, January 11, 2010
Gunith on Twitter
- 10:20 @chanux Hahah! Good one! Hilarous article #
- 19:52 RT: @asela_sandman: 7 types of annoying female behavior explained bit.ly/50vRp8 #
- 20:25 RT: @asela_sandman: 7 things you should never say through social media bit.ly/4LFQHg #
- 23:10 RT @tweetmeme Who the enemy is might just depend on your perspective. | Uphaa.com bit.ly/6gvGNH #
- 23:46 RT The Most Awesome Movie Idea. Ever. | Caveman Circus tinyurl.com/yk7upct #
Sunday, January 10, 2010
Gunith on Twitter
- 08:08 wonders why people find me hard to understand. I sound so simple inside my head! #
- 09:28 @chanux Welcome man! :) #
- 23:24 feels a bit lonely :( #
Saturday, January 09, 2010
Gunith on Twitter
- 21:09 @chanux Get well soon man! #
- 21:11 @laktek LOL.. Whaaat? #
- 21:14 RT: @sumedha_ruba: A user has discovered a feature we did not know that exists !!!! #
- 21:30 RT @DZone "5 favorite software quotes" dzone.com/mZXE #
- 21:36 @e4c5 Dang man! Good luck! #
- 22:26 David after Dentist - Is this real life? 2tu.us/1dak #
Friday, January 08, 2010
Gunith on Twitter
- 07:53 is now an Uncle again with his first neice! #
- 08:15 @pavithri Thanks Pavi... She was born on today at 6.30am lu.. My first cousin's #
- 09:50 Currently Browsing: mashable.com/2010/01/05/nexus-one-vs-droid-vs-iphone/ #
- 23:04 now has a licence! Well not quite, but now am qualified! Waiting 4 the plastic! #
Thursday, January 07, 2010
Gunith on Twitter
- 19:52 @morbidAngel_86 LOL.. Ur crazy :P #
- 19:54 RT: @gnusnotunix: Oh! i forgot to reply presidents new year wish! #
- 20:19 12 Trends We Want to See Die in 2010: digg.com/d31EP3X?t classic! Must read! #
Wednesday, January 06, 2010
Gunith on Twitter
- 21:50 @Yoshitha ROFL! #
- 21:52 @roshm Wow... Still haven't watched and got the dire need! #
- 21:53 @e4c5 Sucks man! #
- 22:45 RT: @laktek: Forgot to post this early: Saw a hand written movie poster in Dematagoda "දෑන් පෙන්නවා! අවතාර (දෙලොවක් අතර ) @ ලිබර්ටි" #
- 22:48 The Truth About Foreign Tattoos [PIC]: digg.com/d31DoRB?t #
- 22:49 Proof that Avatar is actually Pocahontas in 3D: digg.com/d31Ebsg?t #Avatar #
Tuesday, January 05, 2010
Gunith on Twitter
- 20:03 is back home after first day of work 2010.. Must get used to this.. again #
- 20:32 RT: @mahesharandara: RT: @chathuraw: HAHAHAHA... LMAO! is.gd/5LVbg #
- 21:55 RT: @laktek: Wow! Dilshan has scored the first hundred in the decade... #cricket #
- 22:18 @sanjayar Damn! yeah! Many (including me) tend to forget... But then again, how sure are we that there wasn't a year 0??! #
Monday, January 04, 2010
Gunith on Twitter
- 08:01 @SeeJay What is this dailybooth about.. (aka Why should I join another social network?) #
- 08:02 How the hell do u RT using #echofon for #firefox?? #
- 08:26 @laktek Oooh Neat! Thanks man! #
- 09:07 @senaka Neat! Thanks man! #
- 20:45 @laktek Seriously man! #
- 20:48 @danishkanavin Hope speedy recovery... How u now? #
- 20:50 @e4c5 Sucks man! #
- 20:53 went to see #Avatar but got full house. So went to #2012 instead.. It was k.. Maybe the most Jaw dropping CGI I've ever seen! #
- 21:05 @laktek trailer looks impressive! But still those explosions and crushing of buildings! Man the #2012 Director must b so screwed in the head #
- 21:22 Just launched www.gunith.com/ :) .. Nothing there yet! Still in its v0.1.. Nevertheless, started! #
Sunday, January 03, 2010
Gunith on Twitter
- 09:30 is sick again. Splitting headache. What a way to start a day! #morningblues #
- 20:28 @SeeJay Have a great new semester/year man! #
- 20:30 @roshm Am hoping to go too! Still huge queues i hear? #
- 21:06 @laktek Didn't know about eapmovies. thanks man! #
- 21:13 @roshm And am going cos my friends are going :D #
Saturday, January 02, 2010
Tuesday, March 11, 2008
JSF : Conditional Redirect
How do you redirect based on a condition? In this case, a session variable. Example, whenever a property in the user bean is null, redirect to the login page
Solution
Solution
<jsp:scriptlet>So, put this code in a file and call this by including in whatever page you want! Simple ;)
final javax.faces.context.FacesContext facesContext=javax.faces.context.FacesContext.getCurrentInstance();
final com.example.MyBean myBean=(com.example.MyBean)facesContext.getApplication().getVariableResolver().resolveVariable(facesContext, "myBean");
if(myBean.getProperty()==null)
{
facesContext.getExternalContext().redirect(facesContext.getExternalContext().getRequestContextPath()+"/mainmenu.faces");
}
</jsp:scriptlet>
Encode HTML code to display as HTML in your webpage
If you want do this go to the linked page. Good tool
JSTL Error : According to TLD or attribute directive in tag file, attribute value does not accept any expressions
Tried using JSTL with the JSF in my app. (My pages are HTML not XML) Tried accessing Session variables
<c:out value="${sessionScope.user.name}"></c:out>
BUT it threw me the above error. Did some searching and came up with this amendment to the taglib tag.
Instead of the standard,
<%@ taglib uri='http://java.sun.com/jstl/core'
prefix='c'%>
use the taglib,
<%@ taglib uri='http://java.sun.com/jsp/jstl/core'
prefix='c'%>
(notice the 'jsp' web folder in the URL)
This solves the problem, probably cos my pages are HTML in contrast to XML.
Go to the linked page for more details
<c:out value="${sessionScope.user.name}"></c:out>
BUT it threw me the above error. Did some searching and came up with this amendment to the taglib tag.
Instead of the standard,
<%@ taglib uri='http://java.sun.com/jstl/core'
prefix='c'%>
use the taglib,
<%@ taglib uri='http://java.sun.com/jsp/jstl/core'
prefix='c'%>
(notice the 'jsp' web folder in the URL)
This solves the problem, probably cos my pages are HTML in contrast to XML.
Go to the linked page for more details
Sunday, March 09, 2008
JPA Error : org.hibernate.HibernateException: cannot simultaneously fetch multiple bags
Apparently JPA has a problem with @OneToMany(fetch=FetchType.EAGER) relationships. Above error seems to occur whenever there is a multiple of such relationships in a class. BUT I had a problem where even a single relationship gave this error. The funny bit is that I had NO problems till I needed to add a new persistant class, thats when this guy popped up. Before that I DID HAVE MULTIPLE @OneToMany(fetch=FetchType.EAGER) relationships and it worked perfectly!
Frustrations!
Morale of the story : Don'y be lazy! Cut down @OneToMany(fetch=FetchType.EAGER) relationships. Anyways, I don't think its THAT efficient anyways
Frustrations!
Morale of the story : Don'y be lazy! Cut down @OneToMany(fetch=FetchType.EAGER) relationships. Anyways, I don't think its THAT efficient anyways
JPA Error (on delete) : java.lang.IllegalArgumentException: Removing a detached instance
This is a problem I got while deleting a record.
What I've figured is that you cannot delete a persistent object that you got very earlier (ex: as a result of a relationship of another object)
What's needed to be done is to refetch that object again by using find and delete it.
Solution:
Solves the problem!
What I've figured is that you cannot delete a persistent object that you got very earlier (ex: as a result of a relationship of another object)
What's needed to be done is to refetch that object again by using find and delete it.
Solution:
EntityManager em=CWUtil.getEntityManager();
em.getTransaction().begin();
m=em.find(Membership.class, m.getId()); //<-Fetched again here
em.remove(m); //<-Deleted here
em.getTransaction().commit();
em.close(); Solves the problem!
Monday, November 06, 2006
I'm Back
After seemingly decades this blog is coming back to activity (hopefully)
Next few days will be construction... Bear the inconveniences
By the way, this blog will be gunith.blogspot.com, even though you should be able to come with miekyur.blogspot.com as well.
Next few days will be construction... Bear the inconveniences
By the way, this blog will be gunith.blogspot.com, even though you should be able to come with miekyur.blogspot.com as well.
Subscribe to:
Posts (Atom)