Bonjour,
J'ai un problème lors de la compilation avec l'erreur suivante :
Voici le code :The following unobfuscated classes were present in a strict CssResource:
textb
button
headerPan
[ERROR] [gwtmobileexample] - Generator 'com.google.gwt.resources.rebind.context.InlineClientBundleGenerator' threw an exception while rebinding 'example.resources.Resources'
AuthenticationPage.ui.xmlAuthenticationPage.java :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"> <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:mgwt="urn:import:com.googlecode.mgwt.ui.client.widget"> <ui:with field='res' type='example.resources.Resources'/> <mgwt:LayoutPanel> <mgwt:HeaderPanel ui:field="headerPanel"> <mgwt:center> <g:HTML ui:field="center">Connection</g:HTML> </mgwt:center> </mgwt:HeaderPanel> <mgwt:WidgetList> <g:Label ui:field="labUsername" addStyleNames="{res.style.labels}">Username</g:Label> <mgwt:MTextBox ui:field="username"></mgwt:MTextBox> <g:Label ui:field="labPassword">Password</g:Label> <mgwt:MPasswordTextBox ui:field="password">dsdds</mgwt:MPasswordTextBox> <mgwt:Button ui:field="validBtn">Valider</mgwt:Button> </mgwt:WidgetList> </mgwt:LayoutPanel> </ui:UiBinder>
Resources.java
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67 package example.client; import org.apache.log4j.Logger; import com.google.gwt.core.client.GWT; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.HasText; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.Widget; import com.googlecode.mgwt.ui.client.widget.Button; import com.googlecode.mgwt.ui.client.widget.HeaderPanel; import com.googlecode.mgwt.ui.client.widget.MTextBox; import example.resources.Resources; public class AuthenticationPage extends Composite implements HasText { @UiField HeaderPanel headerPanel; @UiField Label labUsername; @UiField Label labPassword; @UiField MTextBox username; @UiField MTextBox password; @UiField Button validBtn; private static AuthenticationPageUiBinder uiBinder = GWT .create(AuthenticationPageUiBinder.class); interface AuthenticationPageUiBinder extends UiBinder<Widget, AuthenticationPage> { } public AuthenticationPage() { initWidget(uiBinder.createAndBindUi(this)); labPassword.setText("fdf"); headerPanel.getElement().getStyle().clearBackgroundColor(); headerPanel.getElement().getStyle().clearBackgroundImage(); headerPanel.addStyleName("headerPan"); labPassword.addStyleName("labels"); username.addStyleName("textb"); validBtn.addStyleName("button"); } @Override public String getText() { // TODO Auto-generated method stub return null; } @Override public void setText(String text) { // TODO Auto-generated method stub } }mycss.css
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package example.resources; import com.google.gwt.core.shared.GWT; import com.google.gwt.resources.client.ClientBundle; import com.google.gwt.resources.client.CssResource; public interface Resources extends ClientBundle { public static Resources R = GWT.create(Resources.class); @Source("mycss.css") public Style style(); public interface Style extends CssResource { @ClassName("labels") String labels(); } }Quelqu'un saurait-il m'indiquer d'où peut venir le problème ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 .headerPan { background-image:none; background-color:blue !important; height:40px; border-bottom:1px solid black; position : relative; font-size:10.0 em; } .labels { color:blue; } .textb { color : yellow; } .button { background-color:blue; }
Merci d'avance pour votre aide.
Partager