John Mikhail

+ Follow
since Jun 03, 2005
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by John Mikhail

Pardon the ignorant question I'm about to ask...I dont know how mail/packages are handled in India, but aren't you able to order this book online and have it delivered?
[ June 26, 2007: Message edited by: John Mikhail ]
15 years ago
If the graphic designer knows CSS, then you're set, since most of the layout and L&F can be tweaked through CSS (assuming the developer set all the css tags when building the application)
15 years ago
Very true...I saw the previous GWT posts by Jothi and just assumed. My apologies.
Even if Eric's implementation, or the example you're looking at, is in VB.Net, you should be able to get the general gist of the solution and apply it to whatever language you're working with.

There are countless solutions out there regarding handling XML and Java, so you can easily find an open source package to help you out.
As stated, you're limited by the language. GWT client side code only currently supports jdk 1.4 and even that is very limited in the JRE emulation. Check out this link that shows you the javadocs for the classes that are supported ( Very limited indeed.

But with that said, I haven't had any problems writing a fairly decent size GWT application for our project. Pretty much if I can't do anything on the client side because of the limited emulation, I wrap the call in an RPC invocation and do it on the server side, which is full jdk 1.5 (or even 1.6) supported.
15 years ago
GWT supports the notion of RPC calls, which are asynchronous calls to the server. In your GWT code, you invoke the RPC call, passing in a callback class that would get invoked upon completion of the call.

So in your particular case, you would listen for a select event, at which point you invoke the RPC call. Then in the callback handler (where you would have passed back any results from say a db query, etc), you populate your second listbox. All asynchronously, no need to do any post backs or anything. GWT handles all that for you very nicely.

You can find a starting point here:

Hope this helps.

I'm curious...there is no enum support in hibernate. Did you write your own custom UserType that you're mapping to? If so, if you can include that code it might shed some more light on the subject.

Not to sound cynical, but does this seem like someone asking to have their homework done for them??
17 years ago
Stopping short of writing the code for you, check out the HQL functionality within hibernate. You can easily use the Criteria interface to build the kind of query you're looking for.
I never used iBatis, so can't comment on that. Regarding JDO, I think JDO is hanging on, but it's never going to gain any traction to make it an EJB/Hibernate competitor.

At my previous job, I helped build a code generation tool from UML, and the code we generated was based on the JDO specs (not entirely 100% JDO). This was back in 2000. Since then, I haven't seen any real big push from the JDO camp. But even if it was a bit more popular, I'm a little hesitant about having my class files mangled by a post processor. I'm sure it works fine, but it's just a preference. If you decide to go the XML config route for JDO, then how's that much different from Hibernate?

Just curious though...what problems are you having with Hibernate? I agree getting comfortable with it takes a while. I'm still constantly referring back to the reference manual for little things.
Can you post your config files? And are you doing anything special with the session?

Originally posted by Jolie Lee:
everything is stored in the database. when i update i update the db. i know the date is there because after i do update i go check the db and the date is there. but when i update another record, and i check the db, my previous updated record, the date becomes NULL.

Jolie...we're not saying that the data isn't being stored in the database...I'm sure it is. The problem seems to be that when you go to save another object, you're overwriting your changes with an older copy of the object you had just saved. So your initial save is working fine, but you're just inadvertently saving the object again which is probably not what you want to do.

I think what you need to do is reload the list of objects after every save. It might not be the most optimized solution, but do this just to see if that's the real cause of your problem. This way when you reload the list, you'll get the latest and greatest from the database.

This is the kind of problem that optimistic locking is supposed to solve. Hibernate supports this by means of managed versioning...check that out as well. If you implement this, you should get an error when you try to save a stale copy of your object. So it'll force you to reload your objects once they've been committed to the database.
This list that you're updating...where is that stored? Is this a web application and you store that list in the session to repopulate your page (not a hibernate session, but a web session). Please provide some more information on that front. I think you might be using a stale copy from a list that is not getting updated after you perform an update.

So for example, your client has the list with 4 objects...all have null dates. But when you go to update one of those objects on the server and return to the client, the client still has the same list of 4 objects (it wont be the same object instance). So when you go do another update, guess what, any changes you might have made are overwritten because of your stale object.

But if you are reloading the list after every update, forget everything I have just said.
You're lucky I know you Mark, or else I'd start flaming you for that non-helpful answer

Does anyone know of a mechanism within hibernate that would allow some type of callback to occur once all the mapping files have been read in? I need to know whe a certain type of object has been read in so I can map that class type. I don't want to write my own custom class loading that would do this.

I have seen in the Configuration class that I can get all the class mappings, but I need access to this during initialzation.

Any help would be greatly appreciated.