Traversing the JSF component tree recursively.
递归式遍历JSF组件树。
Listing 14 shows how the printed component tree looks.
清单14显示了所打印的组件树。
Pages that represent MVC-style views; pages reference view roots via the JSF component tree.
呈现mvc样式视图的页面;页面通过JSF组件树引用视图根(view root)。
In this case, the JSF implementation cannot restore the component tree, which must be created in the Render Response phase.
在这种情况下,JSF实现不能恢复组件树,此树必须在RenderResponse阶段创建。
Facelets supports all of the JSF UI components and builds its own component tree, reflecting the view for a JSF application.
Facelets支持所有的JSFUI组件,并且构建了它自己的组件树,以反映JSF应用程序的视图。
The Reconstitute request tree phase creates a component tree for the requested page.
重建请求树阶段为被请求的页面创建组件树。
That means whenever a component is created, it must be immediately added to a component tree.
这意味着无论何时组件被创建,它都直接被添加到一棵组件树中。
Finally, the Render response phase creates a response component tree and forwards the response.
最后,响应合成阶段生成一个响应组件树并发送响应。
You can use a Facelets TagHandler to inject the logic to decide whether components in the body of a tag are added to the component tree.
可以使用FaceletsTagHandler注入逻辑以决定是否把标记体中的组件添加到组件树中。
Part 2 shows how to save the form data of the current view by traversing the JSF component tree and getting the values of the input components.
第2部分展示了如何通过遍历jsf组件树并获取输入组件的值来保存当前视图的表单数据。
In Part 2 of this series, you'll find more JSF techniques for working with the component tree and controlling the request processing life cycle.
在本系列的第2部分,您将获得更多有关处理组件树和控制请求处理生命周期的JSF技巧。
After some context initialization, the page is executed and the JSF framework creates a component tree that mirrors the JSF tags used in the Web page.
在进行了某些上下文初始化后,就会执行此页面,而且,JSF框架还会创建组件树以镜像该Web页面所用的JSF标记。
JSPs are compiled to create a servlet and are used to render dynamic content, but this content is not always in sync with the component tree JSF produces.
对JSP进行编译以创建servlet,且使用jsp来呈现动态内容,但此内容并不是始终与JSF所产生的组件树保持同步。
During the Reconstitute Request tree phase, the JSF implementation may register one or more validators for any of the components in the component tree.
在重建请求树阶段,JSF实现会为请求树上的组件注册一个或多个验证器。
Next, you'll see how to create a custom component that sets the styleClass attribute for all its nested components, traversing the JSF component tree recursively.
接下来,您会看到如何创建一个定制组件来为它的所有嵌套组件设置styleclass属性,递归遍历jsf组件树。
In this case, the component tree should have been constructed and saved during the processing of a previous Faces request (see the sidebar on state-saving methods).
在这种情况下,此组件树应该在处理之前的Faces请求期间构造和保存(参见侧栏状态保存方法)。
This article has taught you how to encode and submit form data with Ajax and how to implement a JSF listener that retrieves submitted data from the JSF component tree.
本文向您展示了如何用Ajax编码和提交表单数据以及如何实现一个能从JSF组件树检索已提交数据的JSF侦听程序。
Examining the words used in the specification reveals that while the component tree is restored on a postback, the backing bean data used by those components is not restored.
仔细研究规范中的用词可以发现,虽然在postback上恢复了组件树,但是那些组件使用的backingbean数据并没有被恢复。
This shows how Ruby's method_missing and Blocks are used to allow for some very compact code creating a component tree consisting of a menu_bar holding a menu with one menu_item.
这段示例代码则向我们展示了如何使用Ruby的method_missing和Block来使得我们可以使用非常精炼的代码,创建出一个菜单栏,上面包含了拥有一个菜单项的菜单。
The SetupComponent class, which was presented in Part 1, traverses the JSF component tree, allowing you to change the attributes of the nested components right before their rendering.
SetupComponent类(在 第 1 部分 中介绍过)遍历JSF组件树,允许在呈现嵌套组件之前更改其属性。
Before this last phase, the component tree does not exist, and after rendering the response, it is too late to update the component styles because the HTML output has already been generated.
在最后阶段之前,组件树并不存在,在呈现了响应之后再更新组件样式就太晚了,因为HTML输出已经生成。
No matter which JSF version you use, the JSF tag handlers create the component instances during the Render Response phase if the component tree hasn't been restored in the restore View phase.
不管使用的是哪个JSF版本,如果组件树没有在RestoreView阶段恢复,JSF标记处理程序将会在RenderResponse阶段创建组件实例。
Therefore, the Ajax-enabled components can execute action handlers on the server, update the JSF component tree, and re-render portions of the page, all without triggering a browser-navigation event.
因而,支持Ajax的组件可以在不触发浏览器导航事件的前提下执行动作处理程序、升级JSF组件树以及重新呈现该页的某些部分。
Therefore, the Ajax-enabled components can execute action handlers on the server, update the JSF component tree, and re-render portions of the page, all without triggering a browser-navigation event.
因而,支持Ajax的组件可以在不触发浏览器导航事件的前提下执行动作处理程序、升级JSF组件树以及重新呈现该页的某些部分。
应用推荐