You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Thomas Timbul (JIRA)" <my...@incubator.apache.org> on 2005/10/03 11:23:48 UTC
[jira] Created: (MYFACES-658) UISelect*** only renders in encodeEnd(FacesContext, UIComponent)
UISelect*** only renders in encodeEnd(FacesContext, UIComponent)
----------------------------------------------------------------
Key: MYFACES-658
URL: http://issues.apache.org/jira/browse/MYFACES-658
Project: MyFaces
Type: Improvement
Components: Implementation
Versions: 1.1.0
Reporter: Thomas Timbul
I have written a ForEach component that is aimed to mirror jstl forEach capabilities. It works for pretty much all nested components, but specifically not for any SelectOne, SelectMany, ...
There are (as far as I can tell) 2 major reasons for this:
1. The renderer (HtmlMenuRendererBase) renders the menu only in its encodeEnd, and it means that any attempt to encode children (forEach) is foiled as the call is never delegated. Really, the menu should be encoded in the encodeChildren method (if only for consistency).
2. and this one is linked to the above: The menu is rendered outside of the normal cycle. By this I mean that the menu renders itself and any children. Ideally, the menu would render only the <select></select> frame (encodeBegin and encodeEnd) and leave the selectItem creation to a separate renderer. This would allow me (in this case) to let my forEach renderer take care of child creation.
Existing code can be easily reused as HtmlRendererUtils.internalRenderSelect renders SelectItemS perfectly without the need for the containing menu to be visible (except maybe for ID creation)
Unfortunately I do not know what impact this kind of change may have on the rest of the lifecycle, but my guess is 'none', since only the encoding will differ and the ForEach component (or similar flow control) would not render visibly and does not have an ID.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
Re: [jira] Commented: (MYFACES-658) UISelect*** only renders in encodeEnd(FacesContext, UIComponent)
Posted by Adam Winer <aw...@gmail.com>.
Thomas,
Does your forEach really work for all nested components? E.g., does it
really work for <h:panelGrid>? For <h:dataTable>? I'd be rather surprised if
it did, as forEach is not at all a simple thing to implement - you need to
hook into the EL engine to do it properly.
-- Adam
On 10/3/05, Thomas Timbul (JIRA) <my...@incubator.apache.org> wrote:
>
> [
> http://issues.apache.org/jira/browse/MYFACES-658?page=comments#action_12331146]
>
> Thomas Timbul commented on MYFACES-658:
> ---------------------------------------
>
> see http://issues.apache.org/jira/browse/MYFACES-659
>
> > UISelect*** only renders in encodeEnd(FacesContext, UIComponent)
> > ----------------------------------------------------------------
> >
> > Key: MYFACES-658
> > URL: http://issues.apache.org/jira/browse/MYFACES-658
> > Project: MyFaces
> > Type: Improvement
> > Components: Implementation
> > Versions: 1.1.0
> > Reporter: Thomas Timbul
>
> >
> > I have written a ForEach component that is aimed to mirror jstl forEach
> capabilities. It works for pretty much all nested components, but
> specifically not for any SelectOne, SelectMany, ...
> > There are (as far as I can tell) 2 major reasons for this:
> > 1. The renderer (HtmlMenuRendererBase) renders the menu only in its
> encodeEnd, and it means that any attempt to encode children (forEach) is
> foiled as the call is never delegated. Really, the menu should be encoded in
> the encodeChildren method (if only for consistency).
> > 2. and this one is linked to the above: The menu is rendered outside of
> the normal cycle. By this I mean that the menu renders itself and any
> children. Ideally, the menu would render only the <select></select> frame
> (encodeBegin and encodeEnd) and leave the selectItem creation to a separate
> renderer. This would allow me (in this case) to let my forEach renderer take
> care of child creation.
> > Existing code can be easily reused as
> HtmlRendererUtils.internalRenderSelect renders SelectItemS perfectly
> without the need for the containing menu to be visible (except maybe for ID
> creation)
> > Unfortunately I do not know what impact this kind of change may have on
> the rest of the lifecycle, but my guess is 'none', since only the encoding
> will differ and the ForEach component (or similar flow control) would not
> render visibly and does not have an ID.
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
> http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
> http://www.atlassian.com/software/jira
>
>
[jira] Commented: (MYFACES-658) UISelect*** only renders in encodeEnd(FacesContext, UIComponent)
Posted by "Thomas Timbul (JIRA)" <my...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-658?page=comments#action_12331146 ]
Thomas Timbul commented on MYFACES-658:
---------------------------------------
see http://issues.apache.org/jira/browse/MYFACES-659
> UISelect*** only renders in encodeEnd(FacesContext, UIComponent)
> ----------------------------------------------------------------
>
> Key: MYFACES-658
> URL: http://issues.apache.org/jira/browse/MYFACES-658
> Project: MyFaces
> Type: Improvement
> Components: Implementation
> Versions: 1.1.0
> Reporter: Thomas Timbul
>
> I have written a ForEach component that is aimed to mirror jstl forEach capabilities. It works for pretty much all nested components, but specifically not for any SelectOne, SelectMany, ...
> There are (as far as I can tell) 2 major reasons for this:
> 1. The renderer (HtmlMenuRendererBase) renders the menu only in its encodeEnd, and it means that any attempt to encode children (forEach) is foiled as the call is never delegated. Really, the menu should be encoded in the encodeChildren method (if only for consistency).
> 2. and this one is linked to the above: The menu is rendered outside of the normal cycle. By this I mean that the menu renders itself and any children. Ideally, the menu would render only the <select></select> frame (encodeBegin and encodeEnd) and leave the selectItem creation to a separate renderer. This would allow me (in this case) to let my forEach renderer take care of child creation.
> Existing code can be easily reused as HtmlRendererUtils.internalRenderSelect renders SelectItemS perfectly without the need for the containing menu to be visible (except maybe for ID creation)
> Unfortunately I do not know what impact this kind of change may have on the rest of the lifecycle, but my guess is 'none', since only the encoding will differ and the ForEach component (or similar flow control) would not render visibly and does not have an ID.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Closed: (MYFACES-658) UISelect*** only renders in encodeEnd(FacesContext, UIComponent)
Posted by "Martin Marinschek (JIRA)" <my...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-658?page=all ]
Martin Marinschek closed MYFACES-658:
-------------------------------------
Fix Version: Nightly
Resolution: Won't Fix
Assign To: Martin Marinschek
> UISelect*** only renders in encodeEnd(FacesContext, UIComponent)
> ----------------------------------------------------------------
>
> Key: MYFACES-658
> URL: http://issues.apache.org/jira/browse/MYFACES-658
> Project: MyFaces
> Type: Improvement
> Components: Implementation
> Versions: 1.1.0
> Reporter: Thomas Timbul
> Assignee: Martin Marinschek
> Fix For: Nightly
>
> I have written a ForEach component that is aimed to mirror jstl forEach capabilities. It works for pretty much all nested components, but specifically not for any SelectOne, SelectMany, ...
> There are (as far as I can tell) 2 major reasons for this:
> 1. The renderer (HtmlMenuRendererBase) renders the menu only in its encodeEnd, and it means that any attempt to encode children (forEach) is foiled as the call is never delegated. Really, the menu should be encoded in the encodeChildren method (if only for consistency).
> 2. and this one is linked to the above: The menu is rendered outside of the normal cycle. By this I mean that the menu renders itself and any children. Ideally, the menu would render only the <select></select> frame (encodeBegin and encodeEnd) and leave the selectItem creation to a separate renderer. This would allow me (in this case) to let my forEach renderer take care of child creation.
> Existing code can be easily reused as HtmlRendererUtils.internalRenderSelect renders SelectItemS perfectly without the need for the containing menu to be visible (except maybe for ID creation)
> Unfortunately I do not know what impact this kind of change may have on the rest of the lifecycle, but my guess is 'none', since only the encoding will differ and the ForEach component (or similar flow control) would not render visibly and does not have an ID.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira