1
votes

PF 3.5.10, Mojarra 2.1.21, JBoss 7.1.1, Omnifaces 1.5

Sometimes I have problems with JSF which are complicated to understand, and difficult to solve. E.g. my question Duplicate id error with primefaces dialog in template . So my question(s) is what do I need to debug Mojarra.

Now I can set debug points in Mojarra sources.

a) What Mojarra (or primefaces) Methods are a good start point to begin the debugging ?

b) As in my example if I want to find out why JSF (or primefaces) generate duplicate id, which methods should I observe (and debug) to find out the reason.

c) Do you have any tips for debugging ?

1

1 Answers

2
votes

Your best to avoid problems with ids is not using the id attribute if you don't need to specifically refer to it in the view (for example, an Ajax update over the component). Just let JSF assign its own-generated id, that way you avoid duplicates.

About the debugging, check the javax.faces.webapp.FacesServlet class, which is the Servlet where JSF does its work. Here you'll be able to check each building and rendering process. However, don't obsess debugging your JSF implementation's internal classes, they are supposed to be tested, you should keep your own code in mind.

So my tip is: start debugging your own methods!