0

I was looking around the web, trying to find some drag/drop visual builder for my JSF pages in eclipse Helios. Unfortunately i did not find it.

Meanwhile i discovered that if i open my JSF pages with the built in JSP editor, i get the auto suggest feature. I was happy for that, but then i noticed some estrange warning that looks like this:

enter image description here

My Hello World app works perfectly, but i have a few doubts that if i could clear i would work more comfortable:

-Why that warning?(I thought JSF 2.0 need no navigation mamping and putting the name of the page we want to go to in the action attribute is enough)

-Is the reason for this warning that i am opening the page with the JSP editor?

-Do you know any drag/drop visual builder for JSF i can use with eclipse?

-What editor do you often use for your JSF pages? And what do you recommend?

Community
  • 1
  • 1
javing
  • 12,307
  • 35
  • 138
  • 211

4 Answers4

1

-Why that warning?(I thought JSF 2.0 need no navigation mamping and putting the name of the page we want to go to in the action attribute is enough)

No idea. It's legitimately valid. Also in JSF 1.2 by the way (which in turn indeed requires a navigation case in faces-config.xml).


-Is the reason for this warning that i am opening the page with the JSP editor?

No idea. Perhaps it's because Eclipse still thinks you're developing JSF 1.2. That the JSP editor is being used for Facelets is not a good sign in any way.


-Do you know any drag/drop visual builder for JSF i can use with eclipse?

No idea. I don't drag'n'drop code. I just write code.


-What editor do you often use for your JSF pages?

Eclipse for Java EE with Glassfish plugin for Facelets support and JBoss Tools plugin for EL support.


And what do you recommend?

I won't post subjective answers. Fact is that I used Eclipse since 2003 and I tried Netbeans at least twice, once around 2004 and once around 2008, but each time I uninstalled it after trying for 5 minutes.

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • Would you please explain a little bit that why you uninstalled it after 5 minutes?Because it is also considered a good IDE. – Adnan Jul 04 '11 at 02:04
  • @Adnan, I don't there is a need to explain whether Netbeans is good or not. It is subjective to a developer's needs. But if you want a hint pertaining to the originally posted question, take a look at [Netbeans Bug 169820](https://netbeans.org/bugzilla/show_bug.cgi?id=169820). In my opinion, revoking VWP and Woodstock after pushing it in the first place is not a sign of a good IDE. – Vineet Reynolds Jul 04 '11 at 03:35
  • @BalusC I checked the config file, and also tried to create the dynamic web project ussing the wizzard, all indicates that i am ussing JSF 2.0 I think the reason is that i open with JSP editor, when i open with HTML editor i don't see that warning(But also i don't have the auto suggest feature). I thought about disabling that warning in the prefferences, but i don't know if is that a good idea, since maybe in the future it can advice me when i really need it. What do you think, is it ok to turn off that warning? – javing Jul 04 '11 at 09:25
0

-What editor do you often use for your JSF pages? And what do you recommend?

I'm using IntelliJ IDEA for all JEE 6 stuff. But for all features you need the full paid version.

sasynkamil
  • 859
  • 2
  • 12
  • 23
0

JDeveloper isn't the most fantastic Java IDE, but it has a visual editor for JSF 2.0.

Steve
  • 8,066
  • 11
  • 70
  • 112
-2

The warning is because you are supposed to define the action like this:

#{bean.Action}

For this you need a method in your bean to process the command sent from the user interface. Typically these methods need to be a public String, and if you want to return the user to the same page as they were on you can just return a null object. If you want to send the user to a different page based on successful login or not you can return a string which represents the navigation string which you need to define in your faces-config.xml.

I use NetBeans for editing and deploying JSF applications. I have my NetBeans set up with auto-deploy to my test server which makes my testing really fast and easy.

Chris Dale
  • 2,222
  • 2
  • 26
  • 39
  • I tried this: `` and in my managed bean i have this: `public String getRedirect() { return "Welcome";}` (This is a demo app not a real login, i don't want to add nothing to the faces-config.xml) But i get an exception that says: `javax.el.MethodNotFoundException: /index.xhtml @27,65 action="#{usermb.redirect()}": Method redirect not found` I don't understand where is the mistake. – javing Jul 03 '11 at 14:57
  • I did what you said, but i can't redirect. Why is that? – javing Jul 03 '11 at 15:09
  • Do not use javabean's method names on the action methods. So in other words scratch the "getRedirect" and rename it to just redirect. – Chris Dale Jul 03 '11 at 18:34
  • Ops yes, silly mistake. By The way, NetBeans is a good tool i used it in the past, but i must work with eclipse, thats why i asked for the editor for eclipse. Anyway thanks for your answer. – javing Jul 03 '11 at 21:24
  • 2
    It's legitimately valid to define the outcome value straight in the `action` attribute instead of having it returned by a method. – BalusC Jul 03 '11 at 21:42