r14 - in refComp/client: . src/main/java/fr/inra/refcomp src/main/java/fr/inra/refcomp/client src/main/java/fr/inra/refcomp/client/constants src/main/java/fr/inra/refcomp/client/services src/main/java/fr/inra/refcomp/server src/main/resources/fr/inra/refcomp src/main/resources/fr/inra/refcomp/client src/main/resources/fr/inra/refcomp/public src/main/webapp src/main/webapp/WEB-INF
Author: jcouteau Date: 2010-11-05 11:27:59 +0100 (Fri, 05 Nov 2010) New Revision: 14 Url: http://chorem.org/repositories/revision/incubator/14 Log: Improve css management Added: refComp/client/src/main/java/fr/inra/refcomp/client/services/ refComp/client/src/main/java/fr/inra/refcomp/client/services/Level.java refComp/client/src/main/java/fr/inra/refcomp/client/services/LoginService.java refComp/client/src/main/java/fr/inra/refcomp/client/services/LoginServiceAsync.java refComp/client/src/main/java/fr/inra/refcomp/client/services/SearchService.java refComp/client/src/main/java/fr/inra/refcomp/client/services/SearchServiceAsync.java refComp/client/src/main/java/fr/inra/refcomp/client/services/Skill.java refComp/client/src/main/java/fr/inra/refcomp/server/ refComp/client/src/main/java/fr/inra/refcomp/server/LoginServiceImpl.java refComp/client/src/main/java/fr/inra/refcomp/server/SearchServiceImpl.java refComp/client/src/main/resources/fr/inra/refcomp/client/ refComp/client/src/main/resources/fr/inra/refcomp/client/refcomp.css Removed: refComp/client/src/main/java/fr/inra/refcomp/client/resources/ refComp/client/src/main/java/fr/inra/refcomp/client/service/ refComp/client/src/main/resources/fr/inra/refcomp/public/Application.css refComp/client/src/main/resources/fr/inra/refcomp/public/Search.html refComp/client/src/main/resources/fr/inra/refcomp/public/SearchResults.html refComp/client/src/main/resources/fr/inra/refcomp/resources/ Modified: refComp/client/pom.xml refComp/client/src/main/java/fr/inra/refcomp/RefComp.gwt.xml refComp/client/src/main/java/fr/inra/refcomp/client/Login.java refComp/client/src/main/java/fr/inra/refcomp/client/Login.ui.xml refComp/client/src/main/java/fr/inra/refcomp/client/MySkills.java refComp/client/src/main/java/fr/inra/refcomp/client/MySkills.ui.xml refComp/client/src/main/java/fr/inra/refcomp/client/Search.java refComp/client/src/main/java/fr/inra/refcomp/client/Search.ui.xml refComp/client/src/main/java/fr/inra/refcomp/client/SearchResults.java refComp/client/src/main/java/fr/inra/refcomp/client/SearchResults.ui.xml refComp/client/src/main/java/fr/inra/refcomp/client/SkillEditionRow.java refComp/client/src/main/java/fr/inra/refcomp/client/SkillEditionRow.ui.xml refComp/client/src/main/java/fr/inra/refcomp/client/constants/Footer.java refComp/client/src/main/java/fr/inra/refcomp/client/constants/Footer.ui.xml refComp/client/src/main/java/fr/inra/refcomp/client/constants/Header.java refComp/client/src/main/java/fr/inra/refcomp/client/constants/Header.ui.xml refComp/client/src/main/webapp/WEB-INF/web.xml refComp/client/src/main/webapp/index.html Modified: refComp/client/pom.xml =================================================================== --- refComp/client/pom.xml 2010-11-05 09:05:49 UTC (rev 13) +++ refComp/client/pom.xml 2010-11-05 10:27:59 UTC (rev 14) @@ -31,12 +31,6 @@ <artifactId>gwt-servlet</artifactId> </dependency> - <dependency> - <groupId>fr.inra.refcomp</groupId> - <artifactId>services</artifactId> - <version>0.1-SNAPSHOT</version> - </dependency> - </dependencies> <!-- ************************************************************* --> @@ -56,6 +50,15 @@ <outputDirectory>src/main/webapp/WEB-INF/classes</outputDirectory> + <!--resources> + <resource> + <directory>src/main/resources</directory> + <includes> + <include>**/*.css</include> + </includes> + </resource> + </resources--> + <plugins> <plugin> Modified: refComp/client/src/main/java/fr/inra/refcomp/RefComp.gwt.xml =================================================================== --- refComp/client/src/main/java/fr/inra/refcomp/RefComp.gwt.xml 2010-11-05 09:05:49 UTC (rev 13) +++ refComp/client/src/main/java/fr/inra/refcomp/RefComp.gwt.xml 2010-11-05 10:27:59 UTC (rev 14) @@ -12,10 +12,10 @@ <!-- Specify the app entry point class. --> <entry-point class='fr.inra.refcomp.client.RefComp'/> - <!-- Specify the application specific style sheet. --> - <stylesheet src='Application.css'/> - <source path="client"/> <source path="service"/> + <public path="public"/> + <public path="client"/> + </module> \ No newline at end of file Modified: refComp/client/src/main/java/fr/inra/refcomp/client/Login.java =================================================================== --- refComp/client/src/main/java/fr/inra/refcomp/client/Login.java 2010-11-05 09:05:49 UTC (rev 13) +++ refComp/client/src/main/java/fr/inra/refcomp/client/Login.java 2010-11-05 10:27:59 UTC (rev 14) @@ -1,7 +1,6 @@ package fr.inra.refcomp.client; import com.google.gwt.core.client.GWT; -import com.google.gwt.dom.client.StyleInjector; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.logical.shared.ValueChangeEvent; import com.google.gwt.uibinder.client.UiBinder; @@ -17,9 +16,8 @@ import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.TextBox; import fr.inra.refcomp.client.constants.Header; -import fr.inra.refcomp.client.resources.Style; -import fr.inra.refcomp.client.service.LoginService; -import fr.inra.refcomp.client.service.LoginServiceAsync; +import fr.inra.refcomp.client.services.LoginService; +import fr.inra.refcomp.client.services.LoginServiceAsync; /** * User: couteau @@ -36,20 +34,7 @@ private static final MyUiBinder binder = GWT.create(MyUiBinder.class); - @UiField(provided = true) - final Style res; - - private static boolean stylesInjected = false; - public Login() { - this.res = GWT.create(Style.class); - - // Inject only once. - if (!stylesInjected) { - StyleInjector.injectStylesheet(res.style().getText()); - stylesInjected = true; - } - initWidget(binder.createAndBindUi(this)); } Modified: refComp/client/src/main/java/fr/inra/refcomp/client/Login.ui.xml =================================================================== --- refComp/client/src/main/java/fr/inra/refcomp/client/Login.ui.xml 2010-11-05 09:05:49 UTC (rev 13) +++ refComp/client/src/main/java/fr/inra/refcomp/client/Login.ui.xml 2010-11-05 10:27:59 UTC (rev 14) @@ -1,27 +1,27 @@ <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:gwt='urn:import:com.google.gwt.user.client.ui'> - <ui:with field='res' type='fr.inra.refcomp.client.resources.Style'/> + <ui:style src="refcomp.css"/> <gwt:HTMLPanel> <div align="center"> - <gwt:VerticalPanel styleName="{res.style.background}"> - <gwt:Label text="Login" styleName="{res.style.greyText}"/> + <gwt:VerticalPanel styleName="{style.background}"> + <gwt:Label text="Login" styleName="{style.greyText}"/> <gwt:TextBox ui:field="loginBox" - styleName="{res.style.box}"/> - <gwt:Label text="Password" styleName="{res.style.greyText}"/> - <gwt:PasswordTextBox ui:field="passwordBox" styleName="{res.style.box}"/> + styleName="{style.box}"/> + <gwt:Label text="Password" styleName="{style.greyText}"/> + <gwt:PasswordTextBox ui:field="passwordBox" styleName="{style.box}"/> <gwt:HorizontalPanel verticalAlignment="ALIGN_MIDDLE"> <gwt:Button ui:field="buttonSubmit" text="Submit" - styleName="{res.style.loginButton}"/> + styleName="{style.loginButton}"/> <gwt:CheckBox ui:field="myCheckBox"/> <gwt:Label ui:field="myLabel" text="Remember me" - styleName="{res.style.greyText}"/> + styleName="{style.greyText}"/> </gwt:HorizontalPanel> <gwt:Label ui:field="completionLabel1" - styleName="{res.style.greyText}"/> + styleName="{style.greyText}"/> <gwt:Label ui:field="completionLabel2" - styleName="{res.style.greyText}"/> + styleName="{style.greyText}"/> </gwt:VerticalPanel> </div> </gwt:HTMLPanel> Modified: refComp/client/src/main/java/fr/inra/refcomp/client/MySkills.java =================================================================== --- refComp/client/src/main/java/fr/inra/refcomp/client/MySkills.java 2010-11-05 09:05:49 UTC (rev 13) +++ refComp/client/src/main/java/fr/inra/refcomp/client/MySkills.java 2010-11-05 10:27:59 UTC (rev 14) @@ -1,7 +1,6 @@ package fr.inra.refcomp.client; import com.google.gwt.core.client.GWT; -import com.google.gwt.dom.client.StyleInjector; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.uibinder.client.UiBinder; @@ -14,10 +13,9 @@ import com.google.gwt.user.client.ui.HorizontalPanel; import com.google.gwt.user.client.ui.Panel; import com.google.gwt.user.client.ui.VerticalPanel; -import fr.inra.refcomp.client.resources.Style; -import fr.inra.refcomp.client.service.SearchServiceAsync; -import fr.inra.refcomp.client.service.Skill; -import fr.inra.refcomp.client.service.SearchService; +import fr.inra.refcomp.client.services.Skill; +import fr.inra.refcomp.client.services.SearchServiceAsync; +import fr.inra.refcomp.client.services.SearchService; import java.util.List; /** @@ -35,27 +33,15 @@ private static final MyUiBinder binder = GWT.create(MyUiBinder.class); - @UiField(provided = true) - final Style res; - - private static boolean stylesInjected = false; - @UiField VerticalPanel skillsList; public MySkills() { - this.res = GWT.create(Style.class); - // Inject only once. - if (!stylesInjected) { - StyleInjector.injectStylesheet(res.style().getText()); - stylesInjected = true; - } - initWidget(binder.createAndBindUi(this)); //Use here the searchService that return a skill. Replace this with - //a real service. + //a real server. searchService.search("toto", new AsyncCallback<List<Skill>>() { @Override Modified: refComp/client/src/main/java/fr/inra/refcomp/client/MySkills.ui.xml =================================================================== --- refComp/client/src/main/java/fr/inra/refcomp/client/MySkills.ui.xml 2010-11-05 09:05:49 UTC (rev 13) +++ refComp/client/src/main/java/fr/inra/refcomp/client/MySkills.ui.xml 2010-11-05 10:27:59 UTC (rev 14) @@ -1,17 +1,17 @@ <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:gwt='urn:import:com.google.gwt.user.client.ui'> - <ui:with field='res' type='fr.inra.refcomp.client.resources.Style'/> + <ui:style src="refcomp.css"/> <gwt:HTMLPanel> <div align="center"> - <gwt:VerticalPanel styleName="{res.style.background}"> + <gwt:VerticalPanel styleName="{style.background}"> <gwt:HorizontalPanel verticalAlignment="ALIGN_MIDDLE"> <gwt:Label text="My Skills : " - styleName="{res.style.greyText}"/> + styleName="{style.greyText}"/> <gwt:Label ui:field="searchedLabel" text="Hervé Richard" - styleName="{res.style.greyText}"/> + styleName="{style.greyText}"/> </gwt:HorizontalPanel> <gwt:VerticalPanel ui:field="skillsList"/> Modified: refComp/client/src/main/java/fr/inra/refcomp/client/Search.java =================================================================== --- refComp/client/src/main/java/fr/inra/refcomp/client/Search.java 2010-11-05 09:05:49 UTC (rev 13) +++ refComp/client/src/main/java/fr/inra/refcomp/client/Search.java 2010-11-05 10:27:59 UTC (rev 14) @@ -1,7 +1,6 @@ package fr.inra.refcomp.client; import com.google.gwt.core.client.GWT; -import com.google.gwt.dom.client.StyleInjector; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; @@ -13,10 +12,9 @@ import com.google.gwt.user.client.ui.Panel; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.TextBox; -import fr.inra.refcomp.client.resources.Style; -import fr.inra.refcomp.client.service.SearchService; -import fr.inra.refcomp.client.service.SearchServiceAsync; -import fr.inra.refcomp.client.service.Skill; +import fr.inra.refcomp.client.services.SearchService; +import fr.inra.refcomp.client.services.SearchServiceAsync; +import fr.inra.refcomp.client.services.Skill; import java.util.List; /** @@ -34,23 +32,10 @@ private static final MyUiBinder binder = GWT.create(MyUiBinder.class); - @UiField(provided = true) - final Style res; - - private static boolean stylesInjected = false; - @UiField TextBox searchBox; public Search() { - this.res = GWT.create(Style.class); - - // Inject only once. - if (!stylesInjected) { - StyleInjector.injectStylesheet(res.style().getText()); - stylesInjected = true; - } - initWidget(binder.createAndBindUi(this)); } Modified: refComp/client/src/main/java/fr/inra/refcomp/client/Search.ui.xml =================================================================== --- refComp/client/src/main/java/fr/inra/refcomp/client/Search.ui.xml 2010-11-05 09:05:49 UTC (rev 13) +++ refComp/client/src/main/java/fr/inra/refcomp/client/Search.ui.xml 2010-11-05 10:27:59 UTC (rev 14) @@ -1,17 +1,17 @@ <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:gwt='urn:import:com.google.gwt.user.client.ui'> - <ui:with field='res' type='fr.inra.refcomp.client.resources.Style'/> + <ui:style src="refcomp.css"/> <gwt:HTMLPanel> <div align="center"> - <gwt:VerticalPanel styleName="{res.style.background}"> - <gwt:Label text="RefComp Search" styleName="{res.style.greyText}"/> + <gwt:VerticalPanel styleName="{style.background}"> + <gwt:Label text="RefComp Search" styleName="{style.greyText}"/> <gwt:HorizontalPanel verticalAlignment="ALIGN_MIDDLE"> <gwt:TextBox ui:field="searchBox" - styleName="{res.style.box}"/> + styleName="{style.box}"/> <gwt:Button ui:field="buttonSearch" text="Search" - styleName="{res.style.loginButton}"/> + styleName="{style.loginButton}"/> </gwt:HorizontalPanel> </gwt:VerticalPanel> </div> Modified: refComp/client/src/main/java/fr/inra/refcomp/client/SearchResults.java =================================================================== --- refComp/client/src/main/java/fr/inra/refcomp/client/SearchResults.java 2010-11-05 09:05:49 UTC (rev 13) +++ refComp/client/src/main/java/fr/inra/refcomp/client/SearchResults.java 2010-11-05 10:27:59 UTC (rev 14) @@ -1,15 +1,13 @@ package fr.inra.refcomp.client; import com.google.gwt.core.client.GWT; -import com.google.gwt.dom.client.StyleInjector; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.uibinder.client.UiTemplate; import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.Grid; import com.google.gwt.user.client.ui.Panel; -import fr.inra.refcomp.client.resources.Style; -import fr.inra.refcomp.client.service.Skill; +import fr.inra.refcomp.client.services.Skill; import java.util.List; /** @@ -24,23 +22,10 @@ private static final MyUiBinder binder = GWT.create(MyUiBinder.class); - @UiField(provided = true) - final Style res; - - private static boolean stylesInjected = false; - @UiField Grid resultsGrid; public SearchResults() { - this.res = GWT.create(Style.class); - - // Inject only once. - if (!stylesInjected) { - StyleInjector.injectStylesheet(res.style().getText()); - stylesInjected = true; - } - initWidget(binder.createAndBindUi(this)); } Modified: refComp/client/src/main/java/fr/inra/refcomp/client/SearchResults.ui.xml =================================================================== --- refComp/client/src/main/java/fr/inra/refcomp/client/SearchResults.ui.xml 2010-11-05 09:05:49 UTC (rev 13) +++ refComp/client/src/main/java/fr/inra/refcomp/client/SearchResults.ui.xml 2010-11-05 10:27:59 UTC (rev 14) @@ -1,22 +1,22 @@ <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:gwt='urn:import:com.google.gwt.user.client.ui'> - <ui:with field='res' type='fr.inra.refcomp.client.resources.Style'/> + <ui:style src="refcomp.css"/> <gwt:HTMLPanel> <div id="facets"> - <gwt:VerticalPanel styleName="{res.style.background}"> + <gwt:VerticalPanel styleName="{style.background}"> </gwt:VerticalPanel> </div> <div align="center"> - <gwt:VerticalPanel styleName="{res.style.background}"> + <gwt:VerticalPanel styleName="{style.background}"> <gwt:HorizontalPanel verticalAlignment="ALIGN_MIDDLE"> <gwt:Label text="Search : " - styleName="{res.style.greyText}"/> + styleName="{style.greyText}"/> <gwt:Label ui:field="searchedLabel" text="Toto" - styleName="{res.style.greyText}"/> + styleName="{style.greyText}"/> </gwt:HorizontalPanel> <gwt:Grid ui:field="resultsGrid"/> Modified: refComp/client/src/main/java/fr/inra/refcomp/client/SkillEditionRow.java =================================================================== --- refComp/client/src/main/java/fr/inra/refcomp/client/SkillEditionRow.java 2010-11-05 09:05:49 UTC (rev 13) +++ refComp/client/src/main/java/fr/inra/refcomp/client/SkillEditionRow.java 2010-11-05 10:27:59 UTC (rev 14) @@ -1,7 +1,6 @@ package fr.inra.refcomp.client; import com.google.gwt.core.client.GWT; -import com.google.gwt.dom.client.StyleInjector; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.uibinder.client.UiTemplate; @@ -10,9 +9,8 @@ import com.google.gwt.user.client.ui.ListBox; import com.google.gwt.user.client.ui.Panel; import com.google.gwt.user.client.ui.TextBox; -import fr.inra.refcomp.client.resources.Style; -import fr.inra.refcomp.client.service.Level; -import fr.inra.refcomp.client.service.Skill; +import fr.inra.refcomp.client.services.Level; +import fr.inra.refcomp.client.services.Skill; import java.util.ArrayList; import java.util.List; @@ -30,11 +28,6 @@ private static final MyUiBinder binder = GWT.create(MyUiBinder.class); - @UiField(provided = true) - final Style res; - - private static boolean stylesInjected = false; - private Skill editedSkill; @UiField @@ -53,29 +46,16 @@ Label rightLabel; public SkillEditionRow() { - this.res = GWT.create(Style.class); - init(); } public SkillEditionRow(Skill skill) { - this.res = GWT.create(Style.class); - init(); - setSkill(skill); } protected void init(){ - - // Inject only once. - if (!stylesInjected) { - StyleInjector.injectStylesheet(res.style().getText()); - stylesInjected = true; - } - initWidget(binder.createAndBindUi(this)); - populateLevelList(); } Modified: refComp/client/src/main/java/fr/inra/refcomp/client/SkillEditionRow.ui.xml =================================================================== --- refComp/client/src/main/java/fr/inra/refcomp/client/SkillEditionRow.ui.xml 2010-11-05 09:05:49 UTC (rev 13) +++ refComp/client/src/main/java/fr/inra/refcomp/client/SkillEditionRow.ui.xml 2010-11-05 10:27:59 UTC (rev 14) @@ -1,12 +1,12 @@ <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:gwt='urn:import:com.google.gwt.user.client.ui'> - <ui:with field='res' type='fr.inra.refcomp.client.resources.Style'/> + <ui:style src="refcomp.css"/> <gwt:HorizontalPanel verticalAlignment="ALIGN_MIDDLE"> - <gwt:Label ui:field="skill" styleName="{res.style.greyText}"/> - <gwt:Label text="Linked skill : " styleName="{res.style.greyText}"/> - <gwt:Label ui:field="linkedSkill" styleName="{res.style.greyText}"/> + <gwt:Label ui:field="skill" styleName="{style.greyText}"/> + <gwt:Label text="Linked skill : " styleName="{style.greyText}"/> + <gwt:Label ui:field="linkedSkill" styleName="{style.greyText}"/> <gwt:Button ui:field="editLinkedSkill" text="Edit"/> <gwt:Label text="Level : "/> <gwt:ListBox ui:field="levelListBox" visibleItemCount="1"/> Modified: refComp/client/src/main/java/fr/inra/refcomp/client/constants/Footer.java =================================================================== --- refComp/client/src/main/java/fr/inra/refcomp/client/constants/Footer.java 2010-11-05 09:05:49 UTC (rev 13) +++ refComp/client/src/main/java/fr/inra/refcomp/client/constants/Footer.java 2010-11-05 10:27:59 UTC (rev 14) @@ -7,7 +7,6 @@ import com.google.gwt.uibinder.client.UiTemplate; import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.Panel; -import fr.inra.refcomp.client.resources.Style; /** * User: couteau @@ -20,20 +19,7 @@ private static final MyUiBinder binder = GWT.create(MyUiBinder.class); - @UiField(provided = true) - final Style res; - - private static boolean stylesInjected = false; - public Footer() { - this.res = GWT.create(Style.class); - - // Inject only once. - if (!stylesInjected) { - StyleInjector.injectStylesheet(res.style().getText()); - stylesInjected = true; - } - initWidget(binder.createAndBindUi(this)); } } Modified: refComp/client/src/main/java/fr/inra/refcomp/client/constants/Footer.ui.xml =================================================================== --- refComp/client/src/main/java/fr/inra/refcomp/client/constants/Footer.ui.xml 2010-11-05 09:05:49 UTC (rev 13) +++ refComp/client/src/main/java/fr/inra/refcomp/client/constants/Footer.ui.xml 2010-11-05 10:27:59 UTC (rev 14) @@ -1,11 +1,11 @@ <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:gwt='urn:import:com.google.gwt.user.client.ui'> - <ui:with field='res' type='fr.inra.refcomp.client.resources.Style'/> + <ui:style src="../refcomp.css"/> + + <gwt:HTMLPanel> - <gwt:HorizontalPanel verticalAlignment="ALIGN_MIDDLE"> - <gwt:Label text="Footer" styleName="{res.style.greyText}"/> - </gwt:HorizontalPanel> + <span class="{style.greyText}">Footer</span> </gwt:HTMLPanel> </ui:UiBinder> \ No newline at end of file Modified: refComp/client/src/main/java/fr/inra/refcomp/client/constants/Header.java =================================================================== --- refComp/client/src/main/java/fr/inra/refcomp/client/constants/Header.java 2010-11-05 09:05:49 UTC (rev 13) +++ refComp/client/src/main/java/fr/inra/refcomp/client/constants/Header.java 2010-11-05 10:27:59 UTC (rev 14) @@ -13,7 +13,6 @@ import com.google.gwt.user.client.ui.RootPanel; import fr.inra.refcomp.client.Login; import fr.inra.refcomp.client.MySkills; -import fr.inra.refcomp.client.resources.Style; /** * User: couteau @@ -26,20 +25,9 @@ private static final MyUiBinder binder = GWT.create(MyUiBinder.class); - @UiField(provided = true) - final Style res; - private static boolean stylesInjected = false; public Header() { - this.res = GWT.create(Style.class); - - // Inject only once. - if (!stylesInjected) { - StyleInjector.injectStylesheet(res.style().getText()); - stylesInjected = true; - } - initWidget(binder.createAndBindUi(this)); } Modified: refComp/client/src/main/java/fr/inra/refcomp/client/constants/Header.ui.xml =================================================================== --- refComp/client/src/main/java/fr/inra/refcomp/client/constants/Header.ui.xml 2010-11-05 09:05:49 UTC (rev 13) +++ refComp/client/src/main/java/fr/inra/refcomp/client/constants/Header.ui.xml 2010-11-05 10:27:59 UTC (rev 14) @@ -1,22 +1,22 @@ <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:gwt='urn:import:com.google.gwt.user.client.ui'> - <ui:with field='res' type='fr.inra.refcomp.client.resources.Style'/> + <ui:style src="../refcomp.css"/> <gwt:HTMLPanel> <gwt:HorizontalPanel verticalAlignment="ALIGN_MIDDLE"> <gwt:Button ui:field="buttonLogout" text="Logout" - styleName="{res.style.loginButton}"/> + styleName="{style.loginButton}"/> <gwt:Button ui:field="buttonMySkills" text="My Skills" - styleName="{res.style.loginButton}"/> + styleName="{style.loginButton}"/> <gwt:Button ui:field="buttonAdminSkills" text="Admin. Skills" - styleName="{res.style.loginButton}"/> + styleName="{style.loginButton}"/> <gwt:Button ui:field="buttonAdminCati" text="Admin. Cati" - styleName="{res.style.loginButton}"/> + styleName="{style.loginButton}"/> <gwt:Button ui:field="buttonAdminServices" text="Admin. Services" - styleName="{res.style.loginButton}"/> + styleName="{style.loginButton}"/> <gwt:Button ui:field="buttonAdminUsers" text="Admin. Users" - styleName="{res.style.loginButton}"/> + styleName="{style.loginButton}"/> </gwt:HorizontalPanel> </gwt:HTMLPanel> </ui:UiBinder> \ No newline at end of file Added: refComp/client/src/main/java/fr/inra/refcomp/client/services/Level.java =================================================================== --- refComp/client/src/main/java/fr/inra/refcomp/client/services/Level.java (rev 0) +++ refComp/client/src/main/java/fr/inra/refcomp/client/services/Level.java 2010-11-05 10:27:59 UTC (rev 14) @@ -0,0 +1,22 @@ +package fr.inra.refcomp.client.services; + +/** + * User: couteau + * Date: 4 nov. 2010 + */ +public enum Level { + HELP("I need help"), + ALONE("I can be alone"), + CANHELP("I can help"), + CANFORM("I can teach others"); + + private final String label; + + Level(String label){ + this.label=label; + } + + public String getLabel(){ + return label; + } +} Added: refComp/client/src/main/java/fr/inra/refcomp/client/services/LoginService.java =================================================================== --- refComp/client/src/main/java/fr/inra/refcomp/client/services/LoginService.java (rev 0) +++ refComp/client/src/main/java/fr/inra/refcomp/client/services/LoginService.java 2010-11-05 10:27:59 UTC (rev 14) @@ -0,0 +1,15 @@ +package fr.inra.refcomp.client.services; + +import com.google.gwt.user.client.rpc.RemoteService; +import com.google.gwt.user.client.rpc.RemoteServiceRelativePath; + +/** + * User: couteau + * Date: 4 nov. 2010 + */ +@RemoteServiceRelativePath("login") +public interface LoginService extends RemoteService { + + Boolean login(String login, String password); +} + Added: refComp/client/src/main/java/fr/inra/refcomp/client/services/LoginServiceAsync.java =================================================================== --- refComp/client/src/main/java/fr/inra/refcomp/client/services/LoginServiceAsync.java (rev 0) +++ refComp/client/src/main/java/fr/inra/refcomp/client/services/LoginServiceAsync.java 2010-11-05 10:27:59 UTC (rev 14) @@ -0,0 +1,12 @@ +package fr.inra.refcomp.client.services; + +import com.google.gwt.user.client.rpc.AsyncCallback; + +/** + * User: couteau + * Date: 4 nov. 2010 + */ +public interface LoginServiceAsync { + void login(String login, String password, AsyncCallback<Boolean> callback); +} + Added: refComp/client/src/main/java/fr/inra/refcomp/client/services/SearchService.java =================================================================== --- refComp/client/src/main/java/fr/inra/refcomp/client/services/SearchService.java (rev 0) +++ refComp/client/src/main/java/fr/inra/refcomp/client/services/SearchService.java 2010-11-05 10:27:59 UTC (rev 14) @@ -0,0 +1,15 @@ +package fr.inra.refcomp.client.services; + +import com.google.gwt.user.client.rpc.RemoteService; +import com.google.gwt.user.client.rpc.RemoteServiceRelativePath; +import java.util.List; + +/** + * User: couteau + * Date: 4 nov. 2010 + */ +@RemoteServiceRelativePath("search") +public interface SearchService extends RemoteService { + + List<Skill> search(String searchSentence); +} Added: refComp/client/src/main/java/fr/inra/refcomp/client/services/SearchServiceAsync.java =================================================================== --- refComp/client/src/main/java/fr/inra/refcomp/client/services/SearchServiceAsync.java (rev 0) +++ refComp/client/src/main/java/fr/inra/refcomp/client/services/SearchServiceAsync.java 2010-11-05 10:27:59 UTC (rev 14) @@ -0,0 +1,12 @@ +package fr.inra.refcomp.client.services; + +import com.google.gwt.user.client.rpc.AsyncCallback; +import java.util.List; + +/** + * User: couteau + * Date: 4 nov. 2010 + */ +public interface SearchServiceAsync { + void search(String searchSentence, AsyncCallback<List<Skill>> callback); +} Added: refComp/client/src/main/java/fr/inra/refcomp/client/services/Skill.java =================================================================== --- refComp/client/src/main/java/fr/inra/refcomp/client/services/Skill.java (rev 0) +++ refComp/client/src/main/java/fr/inra/refcomp/client/services/Skill.java 2010-11-05 10:27:59 UTC (rev 14) @@ -0,0 +1,77 @@ +package fr.inra.refcomp.client.services; + +import java.io.Serializable; + +/** + * User: couteau + * Date: 3 nov. 2010 + */ +public class Skill implements Serializable { + + public Skill(){} + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getLevel() { + return level; + } + + public void setLevel(String level) { + this.level = level; + } + + public String getComment() { + return comment; + } + + public void setComment(String comment) { + this.comment = comment; + } + + public String getLinkedSkill() { + return linkedSkill; + } + + public void setLinkedSkill(String linkedSkill) { + this.linkedSkill = linkedSkill; + } + + public String getRight() { + return right; + } + + public void setRight(String right) { + this.right = right; + } + + protected String name; + + public String getSkill() { + return skill; + } + + public void setSkill(String skill) { + this.skill = skill; + } + + protected String skill; + protected String level; + protected String comment; + protected String linkedSkill; + protected String right; + + public Skill(String name, String skill, String level, String comment, String linkedSkill, String right){ + this.skill=skill; + this.name=name; + this.level=level; + this.comment=comment; + this.linkedSkill=linkedSkill; + this.right=right; + } +} Added: refComp/client/src/main/java/fr/inra/refcomp/server/LoginServiceImpl.java =================================================================== --- refComp/client/src/main/java/fr/inra/refcomp/server/LoginServiceImpl.java (rev 0) +++ refComp/client/src/main/java/fr/inra/refcomp/server/LoginServiceImpl.java 2010-11-05 10:27:59 UTC (rev 14) @@ -0,0 +1,20 @@ +package fr.inra.refcomp.server; + +import com.google.gwt.user.server.rpc.RemoteServiceServlet; +import fr.inra.refcomp.client.services.LoginService; + +/** + * User: couteau + * Date: 4 nov. 2010 + */ +public class LoginServiceImpl extends RemoteServiceServlet implements + LoginService { + + public Boolean login(String login, String password) { + if (login.equals("admin") && password.equals("admin")) + return true; + else + return false; + } +} + Added: refComp/client/src/main/java/fr/inra/refcomp/server/SearchServiceImpl.java =================================================================== --- refComp/client/src/main/java/fr/inra/refcomp/server/SearchServiceImpl.java (rev 0) +++ refComp/client/src/main/java/fr/inra/refcomp/server/SearchServiceImpl.java 2010-11-05 10:27:59 UTC (rev 14) @@ -0,0 +1,29 @@ +package fr.inra.refcomp.server; + +import com.google.gwt.user.server.rpc.RemoteServiceServlet; +import fr.inra.refcomp.client.services.Level; +import fr.inra.refcomp.client.services.SearchService; +import fr.inra.refcomp.client.services.Skill; +import java.util.ArrayList; +import java.util.List; + +/** + * User: couteau + * Date: 4 nov. 2010 + */ +public class SearchServiceImpl extends RemoteServiceServlet implements + SearchService { + + List<Skill> searchResults; + + public List<Skill> search(String searchSentence) { + + searchResults = new ArrayList<Skill>(); + + searchResults.add(new Skill("Hervé Richard", "Java", Level.CANFORM.getLabel(), "Enfin pas trop quand même", "R", "CIAM")); + + return searchResults; + } + + +} \ No newline at end of file Added: refComp/client/src/main/resources/fr/inra/refcomp/client/refcomp.css =================================================================== --- refComp/client/src/main/resources/fr/inra/refcomp/client/refcomp.css (rev 0) +++ refComp/client/src/main/resources/fr/inra/refcomp/client/refcomp.css 2010-11-05 10:27:59 UTC (rev 14) @@ -0,0 +1,36 @@ +.greyText { + font-family: "Lucida Grande", Arial, Sans-serif; + color: #778899; + font-size: 11px; + text-align: left; +} + +.loginButton { + border: 1px solid #3399DD; + color: #FFFFFF; + background: #3322DD; + font-size: 11px; + font-weight: bold; + margin: 0 5px 0 0; + padding: 4px 10px 5px; + text-shadow: 0 -1px 0 #3399DD; +} + +.box { + border: 1px solid #AACCEE; + display: block; + font-size: 12px; + margin: 0 0 5px; + padding: 3px; + width: 203px; +} + +.background { + background-color: #DDEEF6; + border: 1px none transparent; + color: #778899; + font-size: 11px; + margin-left: -8px; + margin-top: 5px; + padding: 6px; +} Deleted: refComp/client/src/main/resources/fr/inra/refcomp/public/Application.css =================================================================== --- refComp/client/src/main/resources/fr/inra/refcomp/public/Application.css 2010-11-05 09:05:49 UTC (rev 13) +++ refComp/client/src/main/resources/fr/inra/refcomp/public/Application.css 2010-11-05 10:27:59 UTC (rev 14) @@ -1,14 +0,0 @@ -/** Add css rules here for your application. */ - -button { - display: block; - font-size: 16pt -} - -.widePanel { - width: 100% -} - -img { - margin-top: 20px; -} \ No newline at end of file Deleted: refComp/client/src/main/resources/fr/inra/refcomp/public/Search.html =================================================================== --- refComp/client/src/main/resources/fr/inra/refcomp/public/Search.html 2010-11-05 09:05:49 UTC (rev 13) +++ refComp/client/src/main/resources/fr/inra/refcomp/public/Search.html 2010-11-05 10:27:59 UTC (rev 14) @@ -1,41 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" - "http://www.w3.org/TR/html4/loose.dtd"> -<html> -<head> - <meta http-equiv="content-type" content="text/html; charset=UTF-8"> - - <title>RefComp - Search</title> - - <meta name='gwt:module' content='fr.inra.refcomp.client.Search'> - - <!-- --> - <!-- This script loads your compiled module. --> - <!-- If you add any GWT meta tags, they must --> - <!-- be added before this line. --> - <!-- --> - <script type="text/javascript" language="javascript" src="fr.inra.refcomp.Search.nocache.js"></script> -</head> -<body> -<div id="header"> - <span id="Logout"></span> - <span id="mySkills"></span> - <span id="adminSkills"></span> - <span id="adminCati"></span> - <span id="adminServices"></span> - <span id="adminUsers"></span> - -</div> - -<div id="content"> - <span id="searchLabel"></span> - <span id="searchBox"></span> - <span id="searchButton"></span> -</div> - -<div id="footer"></div> - - - <!-- OPTIONAL: include this if you want history support --> - <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe> -</body> -</html> \ No newline at end of file Deleted: refComp/client/src/main/resources/fr/inra/refcomp/public/SearchResults.html =================================================================== --- refComp/client/src/main/resources/fr/inra/refcomp/public/SearchResults.html 2010-11-05 09:05:49 UTC (rev 13) +++ refComp/client/src/main/resources/fr/inra/refcomp/public/SearchResults.html 2010-11-05 10:27:59 UTC (rev 14) @@ -1,43 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" - "http://www.w3.org/TR/html4/loose.dtd"> -<html> -<head> - <meta http-equiv="content-type" content="text/html; charset=UTF-8"> - - <title>RefComp - Search</title> - - <meta name='gwt:module' content='fr.inra.refcomp.client.SearchResults'> - - <!-- --> - <!-- This script loads your compiled module. --> - <!-- If you add any GWT meta tags, they must --> - <!-- be added before this line. --> - <!-- --> - <script type="text/javascript" language="javascript" src="fr.inra.refcomp.SearchResults.nocache.js"></script> -</head> -<body> -<div id="header"> - <span id="Logout"></span> - <span id="mySkills"></span> - <span id="adminSkills"></span> - <span id="adminCati"></span> - <span id="adminServices"></span> - <span id="adminUsers"></span> - -</div> - -<div id="facets"></div> - -<div id="content"> - <span id="searchLabel"></span> - <span id="searchedText"></span> - <div id="searchResults"></div> -</div> - -<div id="footer"></div> - - - <!-- OPTIONAL: include this if you want history support --> - <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe> -</body> -</html> \ No newline at end of file Modified: refComp/client/src/main/webapp/WEB-INF/web.xml =================================================================== --- refComp/client/src/main/webapp/WEB-INF/web.xml 2010-11-05 09:05:49 UTC (rev 13) +++ refComp/client/src/main/webapp/WEB-INF/web.xml 2010-11-05 10:27:59 UTC (rev 14) @@ -11,7 +11,7 @@ <servlet> <servlet-name>LoginService</servlet-name> - <servlet-class>fr.inra.refcomp.client.service.LoginServiceImpl + <servlet-class>fr.inra.refcomp.server.LoginServiceImpl </servlet-class> </servlet> <servlet-mapping> @@ -21,7 +21,7 @@ <servlet> <servlet-name>SearchService</servlet-name> - <servlet-class>fr.inra.refcomp.client.service.SearchServiceImpl + <servlet-class>fr.inra.refcomp.server.SearchServiceImpl </servlet-class> </servlet> <servlet-mapping> Modified: refComp/client/src/main/webapp/index.html =================================================================== --- refComp/client/src/main/webapp/index.html 2010-11-05 09:05:49 UTC (rev 13) +++ refComp/client/src/main/webapp/index.html 2010-11-05 10:27:59 UTC (rev 14) @@ -3,6 +3,6 @@ <head> <!-- forward to the GWT Example Application --> <meta http-equiv="REFRESH" - content="0;url=fr.inra.refcomp.Login/Login.html"> + content="0;url=fr.inra.refcomp.RefComp/RefComp.html"> </HEAD> </HTML> \ No newline at end of file
participants (1)
-
jcouteau@users.chorem.org