Re: [core] Can UIComponent.rendererType be ValueExpression ? (MYFACES-3136)

2011-05-16 Thread Leonardo Uribe
Hi I agree with Jakob. Client ids should be stable, because without that PSS will break (it relies on clientId to save delta state). I don't see any case where a renderkit provide a custom clientId generation. regards, Leonardo 2011/5/14 Jakob Korherr jakob.korh...@gmail.com: Good question,

Re: [core] Can UIComponent.rendererType be ValueExpression ? (MYFACES-3136)

2011-05-14 Thread Jakob Korherr
Good question, but I guess it is ok. At least the spec does not tell us otherwise, right? Regards, Jakob 2011/5/13 Martin Koci martin.kocicak.k...@gmail.com: One more question: UIComponent.getClientId() uses Renderer.convertClientId 1) INVOKE_APPLICATION - action listener calls

[core] Can UIComponent.rendererType be ValueExpression ? (MYFACES-3136)

2011-05-13 Thread Martin Koci
Hi, two questions : 1) can UIComponent.rendererType be ValueExpression? If yes, in which situation is useful to use it? 2) should be rendereType saved during state saving? Each component has setRendererType(com.foo.renderer) in constructor and/or VDL calls setRendererType() after calling

Re: [core] Can UIComponent.rendererType be ValueExpression ? (MYFACES-3136)

2011-05-13 Thread Jakob Korherr
Hi Martin, Have you checked the JSF 2.1 and 2.0 specs yet? Regards, Jakob 2011/5/13 Martin Koci martin.kocicak.k...@gmail.com: Hi, two questions : 1) can UIComponent.rendererType be ValueExpression? If yes, in which situation is useful to use it? 2) should be rendereType saved during

Re: [core] Can UIComponent.rendererType be ValueExpression ? (MYFACES-3136)

2011-05-13 Thread Martin Koci
Hi, from spec: .. Because the components themselves store only a rendererType property (a logical identifier of a particular Renderer) .. rendererType = Identifier of the Renderer instance (from the set of Renderer rendererType String instances supported by the RenderKit associated with the

Re: [core] Can UIComponent.rendererType be ValueExpression ? (MYFACES-3136)

2011-05-13 Thread Jakob Korherr
Hmm, ok. I also can't think of a scenario where you would use something like this right now. But I'll think of it and do some research.. Martin, could you take a look at some of the prominent JSF component libs (like Primefaces, Trinidad, Tomahawk, Tobago, RichFaces, IceFaces) and search in

Re: [core] Can UIComponent.rendererType be ValueExpression ? (MYFACES-3136)

2011-05-13 Thread Martin Koci
Hi, trinidad caches Renderer instance in UIXComponentBase so they at least suppose that rendererType cannot change during one render/response and no need for evaluate it in every getRendererType() call - see MYFACES-3144. Other libs I'll check. Regards, Kočičák Jakob Korherr píše v Pá 13. 05.

Re: [core] Can UIComponent.rendererType be ValueExpression ? (MYFACES-3136)

2011-05-13 Thread Leonardo Uribe
Hi +1 to both changes. I agree with you about rendererType is always an String, there is not any mention on the spec saying rendererType could receive EL expressions. If someone wants to change a renderer, it uses a RenderKit wrapper or just define another RenderKitId to be used for the current

Re: [core] Can UIComponent.rendererType be ValueExpression ? (MYFACES-3136)

2011-05-13 Thread Martin Koci
Leonardo Uribe píše v Pá 13. 05. 2011 v 14:59 -0500: Hi +1 to both changes. That means: replace StateHelper with attribute as MYFACES-3136 suggests, right? I agree with you about rendererType is always an String, there is not any mention on the spec saying rendererType could receive EL

Re: [core] Can UIComponent.rendererType be ValueExpression ? (MYFACES-3136)

2011-05-13 Thread Jakob Korherr
OK great, thanks Leo! but caching is valid for all encode* method then. Any ideas how to detect this component will be rendered in this lifecycle and cache renderer even for getClientId? stateManagement calls getClientId (checkIds) before component.encodeBegin. Can we use visitTree method for

Re: [core] Can UIComponent.rendererType be ValueExpression ? (MYFACES-3136)

2011-05-13 Thread Jan-Kees van Andel
True, but it should only be invoked when the renderer(kit) changes, right? That shouldn't happen in most cases. And in the case when it does, we pay a penalty and the page is a bit slower. Doesn't sound like a big deal to me...? Regards, Jan-Kees 2011/5/13 Jakob Korherr jakob.korh...@gmail.com

Re: [core] Can UIComponent.rendererType be ValueExpression ? (MYFACES-3136)

2011-05-13 Thread Leonardo Uribe
Hi 2011/5/13 Martin Koci martin.kocicak.k...@gmail.com: Leonardo Uribe píše v Pá 13. 05. 2011 v 14:59 -0500: Hi +1 to both changes. That means: replace StateHelper with attribute as MYFACES-3136 suggests, right? That means change StateHelper.eval to StateHelper.get in

Re: [core] Can UIComponent.rendererType be ValueExpression ? (MYFACES-3136)

2011-05-13 Thread Martin Koci
One more question: UIComponent.getClientId() uses Renderer.convertClientId 1) INVOKE_APPLICATION - action listener calls component.getClient() - component generates client id with renderer1 + as next step actionListener changes renderKitId 2) RENDER_RESPOSE: renderer2 from new renderkit renders