1. One code base for almost all mobile platforms: IOS, Android, Blackberry and Windows Phone. PhoneGap is the only one that (right now) supports Windows 7.
2. Both use the pay for building app model. Assuming that you are using the free account; With Phonegap you are limited to 1 app/1 collaborator while CodenameOne limits you to 100 build credits every month and 1 app at the time.
|IDE Support||Optimal on Eclipse; Can be used on Netbeans but stifled because of Netbean's weak support for Android.||Has an excellent plugin for both Eclipse and Netbeans|
|Supports||IOS, Android, BlackBerry, WebOS, Symbian, Windows Phone||IOS, Android, BlackBerry, J2ME, Windows Phone|
So which one to use? Truth be told, that depends on what you are comfortable with. If you're an old hand with Java and you want to make mobile applications then (I suggest that you) go with Codename One but if started out as a web developer then you might want to go with PhoneGap.
Although both fill the mobile development niche, but have different approach vectors. Different strokes for different folks.