You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@click.apache.org by Beto <gi...@gmail.com> on 2010/10/01 17:19:47 UTC

Re: HTML5: data-* atrributes

This one

<quote>
> <table id="invitationsList">
>   <tr id="listItem">
>        <td class="some-class" id="firstName></td>
>        <td id="lastName" class="another-class"></td>
>        <td>Name tag color: </td>
> </tr></table>
</quote>

or

$table


<quote>
>Not only so, but you will eliminate the building of any html on the serverside too
</quote>

How? In your own example you have to build the html.


Regards,


Gilberto

Re: HTML5: data-* atrributes

Posted by "florin.g" <fl...@bytenotes.com>.
It so appears but not quite.

The serverside will repeat the html fragment that is provided by the web
designer.

The easiest to illustrate this is with is a list: <ul id="xyz"
class="c1"><li class="c2"></li></ul>. 

The designer provides the html that is the true template for the data. All
that the serverside needs to do is repeat the <li> as formatted. The
following is the logical flow:

HtmlList hList = renderedPage.getElement("myListId");
List<String> items = db.getItems();
foreach (item: items) {
     hList.add(item);
}

So, the serverside does not really build the html but repeats the html
provided. In this case, no component will ever have it's own html embedded
as it is the case in most frameworks.

In the case that there is text needs to be repeated in each <li>, the
designer will provided inside the <li> as such: <li>Item span id="someId"
</li>

The ultimate goal is that the html code is never hidden in java code. 
    

-- 
View this message in context: http://click.1134972.n2.nabble.com/HTML5-data-atrributes-tp5583298p5593298.html
Sent from the click-development mailing list archive at Nabble.com.