Re: Newbie Question: Are HTML attributes always stripped for tables?

"Diez B. Roggisch" <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
Hi,

>Ok, this was sort of what I had figured out from reading the documentation 
>etc. and looking at the source. Just wanted to make sure. I will give the 
>template approach a spin but personally do not like have directives in the 
>HTML page (I'm aware that I can keep a separate mapping file but in my opnion 
>this seems to result in a more brittle application and somewhat dilutes the 
>non-intrusive approach that makes XMLC so attractive.)
>  
>
Well, that might be a matter of taste - but actually you'll have to 
provide some sort of  coupling between html and the code. I agree that 
it would sometimes be nice to have some sort of compiletime validation 
here, that ensures that for example a template model and the xmlc-class 
used to bind match. But so far nobody came up with a solution to that, 
neither in barracuda nor in any other web-developement framework I know 
(e.g struts, zope).

>It would seem to me that BTable could have used default attributes (i.e. none) 
>for the columns not defined in the HTML and then simply retain any attributes 
>specified for the defined columns. This would have been more in line with how 
>I would have coded an XMLC-only approach; cloning the existing row and 
>substituting values into it.
>
>So, I could have 
>
><html>
>   ...
>   <table id="resultTable">
>      <tr>
>         <td id="columnA" align="center">Column A</td>
>         <td id="columnB" align="right">Column B</td>
>      </tr>
>   </table>
>
></body>
>
>TableModel could then have had a method
>
>   Object getValueAt(int row, String column)
>
>which would have worked, in my opinion, just as well (with the provision that 
>the table fill is not HTML driven rather than model driven.)
>
Your approach still  depends on non-xmlc-managed, html driven and loosely coupled data. I don't see the advantages here. There have been attempts to make the BTable layout controlled by the underlying html - but I never heard of that again. Even if you did it - it won't be less error-prone and complicated that the BTemplate. But maybe you surprise me :)

Regards,

Diez
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.