[JBoss Seam] - JSF IDE support
by suresk
I've been using JSF and JPA/Hibernate for several years now, and really like these technologies, despite a few pain points involved in using them. Seam has solved most of them, except for one big one: IDE Support.
I'm not necessarily interested in GUI layout or drag-and-drop support for JSF, but I'm really interested in two things:
1) Auto-complete
This may seem silly and lazy, but I lose a fair amount of time switching back and forth between my Java objects and my xhtml pages, trying to figure out what everything is named. I also make stupid typos, which is really embarrassing when trying to show off JSF and JPA in front of other people :)
I guess it is more of an annoyance than anything, but it would save a fair amount of time.
2) Refactoring
This is the big one, in my book. In my opinion, refactoring is an important part of software development, yet the way we use JSF and JPA together, it is very difficult to refactor with confidence. And, since JSF pages aren't compiled, you don't find out you've messed something up until you try to use that page - and even then, it may take the proper combination of variables to see the problem. A 100% comprehensive set of web tests would fix this, but on a decent-sized project, those could take quite a while to run.
I realize that IDE tools are probably outside the scope of Seam, but this is right down the alley of using JSF and JPA together, so I thought I'd pose the question here. So, I'm wondering a few things:
1) What things have other people done to alleviate this problems?
2) Are there any ongoing IDE projects anyone is aware of?
3) Is this (#2) exactly why we shouldn't be using entity objects in the view layer? I like a lot of the benefits you get from not creating DTOs everywhere, but other developers I work with have expressed concerns about the idea. The larger our project gets, the more I start to see their side of it.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024947#4024947
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024947
19Â years, 1Â month
[JBoss Seam] - Re: IDE for Seam
by tony.herstellï¼ gmail.com
I am using MyEclispe.
The project is set up correctly in MyEclipse so the IDE helps me LOADS.
Exploded deployment... no Code-Build-Deploy-Test... its just Code-Test and no Ant scripts to maintain (yet) and these days I never have to re-start the server that often so get conversion id's in the 100's during Code-Test iterations!
Now this is pretty adventurous but.... Wish List...
MyEclipse supporting the following:
Set up Seam project (Wizard to ask EJB3 or Hibernate, Icefaces Y/N, Facelets/JSP, Secuiryt (Drools Jars required) etc. SeamGen on steroids?)
Creates the Ear, Jar and War
Auto-populates the application.xml
Supports the various existing gui's (jBPM etc.) (( JSF navigation rules already are GUI supported :) ))
Has an "icefaces viewer" that allows drag/drop of icefaces components from a SHOWCASE into a Seam page (populates draft xhtml and populates the backing bean with the automagical code that you needs as well - the magical "binding" stuff).
Wizards to create a new "page + action" like the struts one and you name the new page, action file (or you an existing one to add the action's code into), and Entity name and it creates the Entity for you (even Entity (hibernate) validation!).
Some sort of help with setting up pages.xml... this is getting quite "interesting" these days as so much is possible from Security through exceptions to factories!... maybe just VERBOSE context sensitive help! e.g. Whats a factory anyhow and why do I need it??
Somehow I cant see them doing it; they might just jump to support the JSR though.
Will cross post to Icefaces and MyEclipse... you never know...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024945#4024945
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024945
19Â years, 1Â month
[JBoss Seam] - Newbie GenericGenerator from stored procedureProblem
by slavosk
Hi,
i have problems to get id from a stored procedure. I'm getting allways the "NOK" value from my Generator. (Problem with persistence context ?)
Is it possible, or what am I doing wrong?
|
| @GenericGenerator(name="next_id", strategy="com.myapp.DBSequenceGenerator")
| @Id @GeneratedValue(generator="next_id")
| @Column(name = "product_id", unique = true, nullable = false, length = 20)
| @NotNull
| @Length(max = 20)
| public String getProductId() {
| return this.productId;
| }
|
|
|
| @Stateless
| public class DBSequenceGenerator implements IdentifierGenerator {
|
| @PersistenceContext
| EntityManager em;
|
| public DBSequenceGenerator() {
| // empty constructor
| }
|
| public Serializable generate(SessionImplementor arg0, Object arg1) throws HibernateException {
| try {
| Query q = em.createNativeQuery("select get_next_id from get_next_id('nativequery')");
| //........
| } catch (Exception e) {
| return "NOK";
| }
| return "OK";
| }
| }
|
|
Thank you!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024944#4024944
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024944
19Â years, 1Â month