Problème affichage contenu div
Bonjour à tous,
J'ai une portion de code défini dans un fichier xml ( avec uibinder )
qui m'affiche un petit calendrier ( date stamp )
Voici cette portion de code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
.....
<ui:style>
.dateicon {
float: left;
margin-right: 10px;
margin-left: 10px;
width: 42px;
height: 42px;
background: url(dateicon_sprite.gif);
}
.dateicon-day {
font-weight: bold;
font-size: 1.3em;
color: #000;
width: 42px;
text-align: center;
padding-top: 12px;
}
.dateicon-icon-7 {
background-position: 0px 0px;
}
</ui:style>
......
<g:HorizontalPanel styleName="{style.enteteArticle}">
<g:HTMLPanel ui:field='panelDate'>
<div class="{style.dateicon} {style.dateicon-icon-7}">
<div class="{style.dateicon-day}">1</div>
</div>
</g:HTMLPanel>
<g:Label styleName="{style.titreArticle}" ui:field='titreArticle'>Voici
le titre</g:Label>
</g:HorizontalPanel>
..... |
Lorsque j'affiche mon site, tout s'affiche correctement
Ce que j'ai voulu faire c'est déplacer le code qui affiche ce calendrier dans la classe qui gère l'IHM.
j'ai binder une variable sur le panel g:HTMLPanel (panelDate) qui va contenir le code html du petit caldendrier.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
....
@UiField
HTMLPanel panelDate;
public Accueil() {
initWidget(uiBinder.createAndBindUi(this));
HTML test2 = new HTML("1");
test2.addStyleName("{style.dateicon-day}");
HTML test = new HTML(test2.getHTML());
test.addStyleName("{style.dateicon}");
test.addStyleName("{style.dateicon-icon-7}");
panelDate.add(test);
} |
Il m'affiche juste le 1 dans la page
J'ai l'impression qu'il ne prend pas en compte les styles ...
une idée ?
merci