Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Debug Facelets

 
Mauro Trevigno
Ranch Hand
Posts: 99
Java Linux Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I was trying to debug the following:


I found int he following thread https://forums.oracle.com/message/9656629 that we are not able to debug facelets only #{} EL expression, but im trying to add a break point on #{survey.loadSurvey(24)} and im not able to do it.

Any better approach to use facelets with JSF 2.0?

Thanks & Regards,
-M
 
Greg Charles
Sheriff
Posts: 2985
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In recent versions of JSF, you can pass parameters with the EL for action methods, but I don't think it's legal for basic text output like that. Actually, loadSurvey sounds like it should be an action, but the way it appears in the page makes it look like the value of a bean property. What are you expecting to happen there?

In any case, if you have legal syntax, then the EL is backed by Java. With a development tool like Eclipse, you can set a breakpoint on the Java code, where ever you want to stop, and then attach the debugger to your application server. You don't set the breakpoint directly in the XHTML file, but when you go to that page in your browser, you will hit the breakpoint and can switch over to Eclipse to see what's what.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18169
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One of the reasons why I perpetually discourage the use of EL for View-defined logic - especially complex EL - is that it can be a right royal to debug. Wherever possible, put the logic in a backing bean not in the View.

Beyond that, I agree with Greg. What you are trying to do looks really weird and I don't think it's done with an understanding of how the JSF (or HTTP) lifecyles work.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic