hi, i have a general question about java (desktop) user interfaces
i have developed several desktop applications, some with pure swing, some using Spring-RCP. Recently i also started developing web applications (i started with wicket and tapestry and ended up using JSF2+Primefaces). The more time i spend web-developing the more i realize how complicated developing "regular" desktop applications really is in comparison.
there are 2 things which are really important to me
a) i need a simple way to build a "form" like this:
<Label1> <InputField1> <ValidationMessage1>
<Label1> <InputField1> <ValidationMessage2>
<save_button> (if i klick this the validation messages are displayed where the error occurs!)
well, i guess i could build this using borderlayout without any problems, so the real problem is probably a combination with b)
b) JSR303 support so i can use my JPA2 bean validation. Maybe i could call the validate() function of the Validator myself, but i am not satisfied with that solution. the problem is that i need some sort of connection between the validated bean property and the validationmessage-label.
Example: I have a Class "Hotel" with the fields "address" and "numberOfRooms". The user accidently enters a letter instread of a number in "numberOfRooms" and klicks on save. The Validation fails and what i need is a way to find out which validationMessage i have to set. Maybe i could use a HashMap<fieldName, validationLabel>, but isn't there a better way than doing this manually?
c) a way to "bind" fields of a POJO to a textfield, so i don't have to store the values of every textfield manually into the field. this works in nearly every webframework, how do i do this in Java Desktop without writing hundrets of code-lines?
I used Spring-RCP but the project seems to be as good as dead, and the load-time increasing makes me think there is a big overhead.
So my question is: what's the "way to go" for java desktop applications? JavaFx2? Swing? Spring-RCP? What would you recommend me? What's the best/simplest way to use JSR303 and "in-line-validation" like explained above? Did i miss a train here?