You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Glauco P. Gomes" <gl...@yahoo.com.br> on 2009/04/14 03:07:25 UTC

[Trinidad-Sandbox] trs:tableFormLayout renderer problem

When I put a trs:tableFormLayout in my page, its content is rendered 
with only one column with the labels above the inputs, and the log shows:

2009-04-13 21:43:06,351 WARN 
[org.apache.myfaces.renderkit.html.HtmlRenderKitImpl] - Unsupported 
component-family/renderer-type: 
org.apache.myfaces.trinidad.Panel/org.apache.myfaces.trinidad.TableLayout
2009-04-13 21:43:06,351 WARN 
[org.apache.myfaces.renderkit.html.HtmlRenderKitImpl] - Unsupported 
component-family/renderer-type: 
org.apache.myfaces.trinidad.Panel/org.apache.myfaces.trinidad.TableLayout
13/04/2009 21:43:06 
org.apache.myfaces.trinidadinternal.renderkit.RenderKitBase getRenderer
WARNING: Não encontrado o renderer 
'org.apache.myfaces.trinidad.TableLayout' para a família de componentes 
'org.apache.myfaces.trinidad.Panel'
13/04/2009 21:43:06 
org.apache.myfaces.trinidad.component.UIXComponentBase _getRendererImpl
WARNING: Não encontrado renderer para 
CoreTableFormLayout[UIXFacesBeanImpl, id=j_id21] rendererType = 
org.apache.myfaces.trinidad.TableLayout

What could be happening? Did I forgot something?

My environment is:
 - Trinidad 1.2.10;
 - Myfaces 1.2.6;
 - Facelets 1.1.14;
 - Trinidad-sandbox 1.2.10-SNAPSHOT;
 - Tomcat 5.5;
 - and others not relevant.

Glauco P. Gomes

Re: [Trinidad-Sandbox] trs:tableFormLayout renderer problem

Posted by "Glauco P. Gomes" <gl...@yahoo.com.br>.
Thanks for the response, even late, I will just have time to work on 
this next week.

I will create a Jira issue and provide a patch when I finish.

Glauco P. Gomes

Leonardo Uribe escreveu:
> Hi Glauco
>
> Sorry for the late response, but right now I'm busy contributing to 
> myfaces core 2.0. I'll try to be as concrete and simple as possible to 
> explain this issue.
>
> To understand how this component works you have first to check a 
> working example of it. Trinidad 1.2.8 is the nearest version that 
> works with this component. You can checkout the source code from here:
>
> http://svn.apache.org/repos/asf/myfaces/trinidad/tags/trinidad-1.2.8/
>
> Then change all trinidad-sandbox pom.xml versions from 1.2.8-SNAPSHOT 
> to 1.2.8 (sandbox-api, sandbox-build, sandbox-impl, sandbox-demo and 
> trinidad-sandbox pom.xml), to make it compile.
>
> Type on trinidad-sandbox directory:
>
> mvn install
>
> then:
>
> cd sandbox-demo
> mvn clean -PjettyConfig jetty:run
>
> Then open your browser and type this address:
>
> http://localhost:8080/sandbox-demo/faces/components/tableFormLayout.jspx
>
> If everything is right (I tried all instructions) you should see the 
> component working. The important part here is have a reference of html 
> markup.
>
> Now the problem. LabelAndMessageRenderer is the base renderer of all 
> "labeled" trinidad components. It works with tr:panelFormLayout to 
> render correctly components inside a html table rendered by this 
> component. In few words, when a labeled trinidad component is rendered 
> alone it does something like this (it is more complex than the example 
> but the example shows the idea):
>
> <table><tr><td>"label"</td><td>"component"</td></tr></table>
>
>  inside a tr:panelFormLayout or tr:tableFormLayout, 
> LabelAndMessageRenderer do something like this:
>
> .....some table stuff by the 
> container......"label"</td><td>"component".......some table stuff by 
> the container........
>
> From this point of view the problem is simple, LabelAndMessageRenderer 
> should recognize the container in the same way as recognize 
> tr:panelFormLayout and render "almost" the same code as 
> tr:panelFormLayout.
>
> I hope this description helps to solve the problem
>
> regards
>
> Leonardo Uribe
>
> On Wed, Apr 15, 2009 at 9:44 PM, Glauco P. Gomes 
> <glaucopgomes@yahoo.com.br <ma...@yahoo.com.br>> wrote:
>
>     I'm interested in provide a patch to correct this, but I don't
>     know where to start, can you guide me in the first steps?
>
>
>     Glauco P. Gomes
>
>     Leonardo Uribe escreveu:
>
>         Hi
>
>         Yes, the demo fails. It seems that something changes on
>         org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.LabelAndMessageRenderer
>         class, and "table" tags are added to surrounding labeled
>         components (this should not happen) , so the final result is
>         that invalid html is generated.
>
>         regards
>
>         Leonardo Uribe
>
>


Re: [Trinidad-Sandbox] trs:tableFormLayout renderer problem

Posted by Leonardo Uribe <lu...@gmail.com>.
Hi Glauco

Sorry for the late response, but right now I'm busy contributing to myfaces
core 2.0. I'll try to be as concrete and simple as possible to explain this
issue.

To understand how this component works you have first to check a working
example of it. Trinidad 1.2.8 is the nearest version that works with this
component. You can checkout the source code from here:

http://svn.apache.org/repos/asf/myfaces/trinidad/tags/trinidad-1.2.8/

Then change all trinidad-sandbox pom.xml versions from 1.2.8-SNAPSHOT to
1.2.8 (sandbox-api, sandbox-build, sandbox-impl, sandbox-demo and
trinidad-sandbox pom.xml), to make it compile.

Type on trinidad-sandbox directory:

mvn install

then:

cd sandbox-demo
mvn clean -PjettyConfig jetty:run

Then open your browser and type this address:

http://localhost:8080/sandbox-demo/faces/components/tableFormLayout.jspx

If everything is right (I tried all instructions) you should see the
component working. The important part here is have a reference of html
markup.

Now the problem. LabelAndMessageRenderer is the base renderer of all
"labeled" trinidad components. It works with tr:panelFormLayout to render
correctly components inside a html table rendered by this component. In few
words, when a labeled trinidad component is rendered alone it does something
like this (it is more complex than the example but the example shows the
idea):

<table><tr><td>"label"</td><td>"component"</td></tr></table>

 inside a tr:panelFormLayout or tr:tableFormLayout, LabelAndMessageRenderer
do something like this:

.....some table stuff by the
container......"label"</td><td>"component".......some table stuff by the
container........

>From this point of view the problem is simple, LabelAndMessageRenderer
should recognize the container in the same way as recognize
tr:panelFormLayout and render "almost" the same code as tr:panelFormLayout.

I hope this description helps to solve the problem

regards

Leonardo Uribe

On Wed, Apr 15, 2009 at 9:44 PM, Glauco P. Gomes
<gl...@yahoo.com.br>wrote:

> I'm interested in provide a patch to correct this, but I don't know where
> to start, can you guide me in the first steps?
>
> Glauco P. Gomes
>
> Leonardo Uribe escreveu:
>
>> Hi
>>
>> Yes, the demo fails. It seems that something changes on
>> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.LabelAndMessageRenderer
>> class, and "table" tags are added to surrounding labeled components (this
>> should not happen) , so the final result is that invalid html is generated.
>>
>> regards
>>
>> Leonardo Uribe
>>
>

Re: [Trinidad-Sandbox] trs:tableFormLayout renderer problem

Posted by "Glauco P. Gomes" <gl...@yahoo.com.br>.
I'm interested in provide a patch to correct this, but I don't know 
where to start, can you guide me in the first steps?

Glauco P. Gomes

Leonardo Uribe escreveu:
> Hi
>
> Yes, the demo fails. It seems that something changes on 
> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.LabelAndMessageRenderer 
> class, and "table" tags are added to surrounding labeled components 
> (this should not happen) , so the final result is that invalid html is 
> generated.
>
> regards
>
> Leonardo Uribe

Re: [Trinidad-Sandbox] trs:tableFormLayout renderer problem

Posted by Leonardo Uribe <lu...@gmail.com>.
Hi

Yes, the demo fails. It seems that something changes on
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.LabelAndMessageRenderer
class, and "table" tags are added to surrounding labeled components (this
should not happen) , so the final result is that invalid html is generated.

regards

Leonardo Uribe

On Wed, Apr 15, 2009 at 7:17 PM, Glauco P. Gomes
<gl...@yahoo.com.br>wrote:

>  Hi Leonardo,
>
> I replaced the render-kit in the faces-config as you suggested, but the
> problem remains, so, I downloaded the trinidad-sandbox-demo (1.2.10-snapshot
> and 1.2.11-snapshot) and installed in Tomcat 6.0.14 and the tableFormLayout
> really not functioning as expected, could you test the demo and confirm?
>
> I attached a screenshot of the demo page.
>
> Glauco P. Gomes
>
> Leonardo Uribe escreveu:
>
> Hi
>
> Trinidad sandbox has its own renderkit, because there is no way to add
> custom renderers for components not registered before to trinidad base
> renderkits, so you need to point it properly on your faces-config.xml:
>
>   <application>
>     <!-- Use the Trinidad RenderKit -->
>
> <default-render-kit-id>org.apache.myfaces.trinidadinternal.sandbox.core</default-render-kit-id>
>   </application>
>
> regards
>
> Leonardo Uribe
>
> On Mon, Apr 13, 2009 at 8:07 PM, Glauco P. Gomes <
> glaucopgomes@yahoo.com.br> wrote:
>
>> When I put a trs:tableFormLayout in my page, its content is rendered with
>> only one column with the labels above the inputs, and the log shows:
>>
>> 2009-04-13 21:43:06,351 WARN
>> [org.apache.myfaces.renderkit.html.HtmlRenderKitImpl] - Unsupported
>> component-family/renderer-type:
>> org.apache.myfaces.trinidad.Panel/org.apache.myfaces.trinidad.TableLayout
>> 2009-04-13 21:43:06,351 WARN
>> [org.apache.myfaces.renderkit.html.HtmlRenderKitImpl] - Unsupported
>> component-family/renderer-type:
>> org.apache.myfaces.trinidad.Panel/org.apache.myfaces.trinidad.TableLayout
>> 13/04/2009 21:43:06
>> org.apache.myfaces.trinidadinternal.renderkit.RenderKitBase getRenderer
>> WARNING: Não encontrado o renderer
>> 'org.apache.myfaces.trinidad.TableLayout' para a família de componentes
>> 'org.apache.myfaces.trinidad.Panel'
>> 13/04/2009 21:43:06 org.apache.myfaces.trinidad.component.UIXComponentBase
>> _getRendererImpl
>> WARNING: Não encontrado renderer para
>> CoreTableFormLayout[UIXFacesBeanImpl, id=j_id21] rendererType =
>> org.apache.myfaces.trinidad.TableLayout
>>
>> What could be happening? Did I forgot something?
>>
>> My environment is:
>> - Trinidad 1.2.10;
>> - Myfaces 1.2.6;
>> - Facelets 1.1.14;
>> - Trinidad-sandbox 1.2.10-SNAPSHOT;
>> - Tomcat 5.5;
>> - and others not relevant.
>>
>> Glauco P. Gomes
>>
>
>
>

Re: [Trinidad-Sandbox] trs:tableFormLayout renderer problem

Posted by "Glauco P. Gomes" <gl...@yahoo.com.br>.
Hi Leonardo,

I replaced the render-kit in the faces-config as you suggested, but the 
problem remains, so, I downloaded the trinidad-sandbox-demo 
(1.2.10-snapshot and 1.2.11-snapshot) and installed in Tomcat 6.0.14 and 
the tableFormLayout really not functioning as expected, could you test 
the demo and confirm?

I attached a screenshot of the demo page.

Glauco P. Gomes

Leonardo Uribe escreveu:
> Hi
>
> Trinidad sandbox has its own renderkit, because there is no way to add 
> custom renderers for components not registered before to trinidad base 
> renderkits, so you need to point it properly on your faces-config.xml:
>
>   <application>
>     <!-- Use the Trinidad RenderKit -->
>     
> <default-render-kit-id>org.apache.myfaces.trinidadinternal.sandbox.core</default-render-kit-id>
>   </application>
>
> regards
>
> Leonardo Uribe
>
> On Mon, Apr 13, 2009 at 8:07 PM, Glauco P. Gomes 
> <glaucopgomes@yahoo.com.br <ma...@yahoo.com.br>> wrote:
>
>     When I put a trs:tableFormLayout in my page, its content is
>     rendered with only one column with the labels above the inputs,
>     and the log shows:
>
>     2009-04-13 21:43:06,351 WARN
>     [org.apache.myfaces.renderkit.html.HtmlRenderKitImpl] -
>     Unsupported component-family/renderer-type:
>     org.apache.myfaces.trinidad.Panel/org.apache.myfaces.trinidad.TableLayout
>     2009-04-13 21:43:06,351 WARN
>     [org.apache.myfaces.renderkit.html.HtmlRenderKitImpl] -
>     Unsupported component-family/renderer-type:
>     org.apache.myfaces.trinidad.Panel/org.apache.myfaces.trinidad.TableLayout
>     13/04/2009 21:43:06
>     org.apache.myfaces.trinidadinternal.renderkit.RenderKitBase
>     getRenderer
>     WARNING: Não encontrado o renderer
>     'org.apache.myfaces.trinidad.TableLayout' para a família de
>     componentes 'org.apache.myfaces.trinidad.Panel'
>     13/04/2009 21:43:06
>     org.apache.myfaces.trinidad.component.UIXComponentBase
>     _getRendererImpl
>     WARNING: Não encontrado renderer para
>     CoreTableFormLayout[UIXFacesBeanImpl, id=j_id21] rendererType =
>     org.apache.myfaces.trinidad.TableLayout
>
>     What could be happening? Did I forgot something?
>
>     My environment is:
>     - Trinidad 1.2.10;
>     - Myfaces 1.2.6;
>     - Facelets 1.1.14;
>     - Trinidad-sandbox 1.2.10-SNAPSHOT;
>     - Tomcat 5.5;
>     - and others not relevant.
>
>     Glauco P. Gomes
>
>


Re: [Trinidad-Sandbox] trs:tableFormLayout renderer problem

Posted by Leonardo Uribe <lu...@gmail.com>.
Hi

Trinidad sandbox has its own renderkit, because there is no way to add
custom renderers for components not registered before to trinidad base
renderkits, so you need to point it properly on your faces-config.xml:

  <application>
    <!-- Use the Trinidad RenderKit -->

<default-render-kit-id>org.apache.myfaces.trinidadinternal.sandbox.core</default-render-kit-id>
  </application>

regards

Leonardo Uribe

On Mon, Apr 13, 2009 at 8:07 PM, Glauco P. Gomes
<gl...@yahoo.com.br>wrote:

> When I put a trs:tableFormLayout in my page, its content is rendered with
> only one column with the labels above the inputs, and the log shows:
>
> 2009-04-13 21:43:06,351 WARN
> [org.apache.myfaces.renderkit.html.HtmlRenderKitImpl] - Unsupported
> component-family/renderer-type:
> org.apache.myfaces.trinidad.Panel/org.apache.myfaces.trinidad.TableLayout
> 2009-04-13 21:43:06,351 WARN
> [org.apache.myfaces.renderkit.html.HtmlRenderKitImpl] - Unsupported
> component-family/renderer-type:
> org.apache.myfaces.trinidad.Panel/org.apache.myfaces.trinidad.TableLayout
> 13/04/2009 21:43:06
> org.apache.myfaces.trinidadinternal.renderkit.RenderKitBase getRenderer
> WARNING: Não encontrado o renderer
> 'org.apache.myfaces.trinidad.TableLayout' para a família de componentes
> 'org.apache.myfaces.trinidad.Panel'
> 13/04/2009 21:43:06 org.apache.myfaces.trinidad.component.UIXComponentBase
> _getRendererImpl
> WARNING: Não encontrado renderer para CoreTableFormLayout[UIXFacesBeanImpl,
> id=j_id21] rendererType = org.apache.myfaces.trinidad.TableLayout
>
> What could be happening? Did I forgot something?
>
> My environment is:
> - Trinidad 1.2.10;
> - Myfaces 1.2.6;
> - Facelets 1.1.14;
> - Trinidad-sandbox 1.2.10-SNAPSHOT;
> - Tomcat 5.5;
> - and others not relevant.
>
> Glauco P. Gomes
>