在日食中调试Mojarra和Atom的最好方法? [英] The best way to debug Mojarra and Primefaces in eclipse?

查看:138
本文介绍了在日食中调试Mojarra和Atom的最好方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

PF 3.5.10,Mojarra 2.1.21,JBoss 7.1.1,Omnifaces 1.5

PF 3.5.10, Mojarra 2.1.21, JBoss 7.1.1, Omnifaces 1.5

有时候我遇到了难以理解的JSF问题,解决。例如。我的问题模板中的原点对话框中重复的ID错误。所以我的问题是我需要调试Mojarra。

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.

现在我可以在Mojarra源中设置调试点。

Now I can set debug points in Mojarra sources.

a)Mojarra(或者是原理)方法是一个很好的起点开始调试?

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

b)像我的例子中,如果我想知道为什么JSF(或者原子)生成重复的id,哪些方法应该观察(调试)以了解原因。

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)您有任何调试提示吗?

c) Do you have any tips for debugging ?

推荐答案

如果您不需要在视图(例如,组件上的Ajax更新)。只需让JSF分配自己生成的id,这样避免重复。

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.

关于调试,请查看 javax.faces.webapp.FacesServlet 类,它是JSF工作的Servlet。在这里,您可以检查每个建筑和渲染过程。但是,不要吝啬调试JSF实现的内部类,它们应该被测试,你应该保留自己的代码。

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.

所以我的提示是:开始调试自己的方法!

这篇关于在日食中调试Mojarra和Atom的最好方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆