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
<[email protected] <mailto:[email protected]>> 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