Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The spec is really messy in this case, stating that: "These methods are called during the Render Response phase of the request processing lifecycle. encodeAll() will cause this component and all its children and facets that return true from isRendered() to be rendered, regardless of the value of the getRendersChildren() return value. encodeBegin(), encodeChildren(), and encodeEnd()have the responsibility of creating the response data for the beginning of this component, this component’s children (only called if the rendersChildren property of this component is true), and the ending of this component, respectively."</p> <p>However, this seems to be a mixture of new and old features, where the new functionality (encodeAll) seems to be incomplete in some ways:</p> <p>I tried the following:</p> <p>A) Calling the component directly in the page (no wrapper)</p> <ol> <li><p>extend UIComponentBase (or other UIComponent class such as UIInput, UIOutput.. etc), declare it as a tag, and use it in the UI. In this case the encodeAll method is called IF it is present (overridden), if not the encodeBegin and encodeEnd methods will be called!!</p></li> <li><p>Another thing to note is that you can create a custom Renderer for the component, so you can separate rendering logic from behaviour. (by creating another class that extends Renderer, and annotating it with @FacesRenderer) This is where it gets interesting; Renderer defines only encodeBegin, encodeChildren and encodeEnd (with no mention of encodeAll). Now the logic seems to go roughly like this: if (encodeAll is present) encodeAll is called (and the renderer is ignored!) else if(any of encodeBegin,Children,or end exist in the class that extends UIComponent) call the method that was found in that component else if(encodeBegin, children or end exist in the class that extends Renderer) call the corresponding method that was found.</p></li> </ol> <p>So this means that implementing encodeAll (or encodeBegin.. etc ) in the class extending UIComponent causes the renderer to be ignored!</p> <p>B) Wrapping the component (cc:implementation.. etc)</p> <p>In this case the same thing happened as above, except that encodeAll was not called in any case, no matter what I did.</p> <p>Conclusion: It seems that encodeAll is some kind of new functionality (or shortcut) to implement the rendering code, and it seems that cc:implementation has a bug in this case (it doesn't look for encodeAll).</p> <p>I hope this is at least of some value to you, unfortunately I cannot provide a more thorough answer. :( It also seems that nobody else knows about this. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload