Index: /tapas/common/implementation/com/ether/MethodDescription.java
===================================================================
--- /tapas/common/implementation/com/ether/MethodDescription.java	(revision 439)
+++ /tapas/common/implementation/com/ether/MethodDescription.java	(revision 440)
@@ -19,4 +19,5 @@
         _isLoginMandatory = annotation.loginMandatory();
         _isRequestMandatory = annotation.requestMandatory();
+        _isUserMandatory = annotation.userMandatory();
         _isBackofficeMethod = annotation.backofficeMethod();
         _params = new ArrayList<ParamDescription>();
@@ -99,7 +100,18 @@
     }
 
+
     public void setRequestMandatory( final Boolean requestMandatory )
     {
         _isRequestMandatory = requestMandatory;
+    }
+
+    public Boolean isUserMandatory()
+    {
+        return _isUserMandatory;
+    }
+
+    public void setUserMandatory( final Boolean userMandatory )
+    {
+        _isUserMandatory = userMandatory;
     }
 
@@ -136,4 +148,5 @@
     private Boolean _isLoginMandatory;
     private Boolean _isRequestMandatory;
+    private Boolean _isUserMandatory;
     private Boolean _isBackofficeMethod;
     @Nullable
Index: /tapas/common/implementation/com/ether/annotation/ControllerMethod.java
===================================================================
--- /tapas/common/implementation/com/ether/annotation/ControllerMethod.java	(revision 439)
+++ /tapas/common/implementation/com/ether/annotation/ControllerMethod.java	(revision 440)
@@ -21,4 +21,6 @@
     boolean requestMandatory() default false;
 
+    boolean userMandatory() default false;
+
     boolean backofficeMethod() default false;
 
Index: /tapas/common/implementation/com/ether/annotation/UserMandatory.java
===================================================================
--- /tapas/common/implementation/com/ether/annotation/UserMandatory.java	(revision 440)
+++ /tapas/common/implementation/com/ether/annotation/UserMandatory.java	(revision 440)
@@ -0,0 +1,12 @@
+package com.ether.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.PARAMETER)
+public @interface UserMandatory
+{
+}
Index: /tapas/domain/interface/com/ether/SpectralUnit.java
===================================================================
--- /tapas/domain/interface/com/ether/SpectralUnit.java	(revision 440)
+++ /tapas/domain/interface/com/ether/SpectralUnit.java	(revision 440)
@@ -0,0 +1,18 @@
+package com.ether;
+
+import java.lang.reflect.Field;
+
+/**
+ * User: rboipsl
+ * Date: 19 march 2012
+ */
+public enum SpectralUnit
+{
+    NM,
+    CM
+
+    /*"Vacuum Wavelength (nm)",
+    'Standard Wavelength (nm)',
+    'Wavenumber (cm-1)'*/
+
+}
Index: /tapas/domain/interface/com/ether/YesNo.java
===================================================================
--- /tapas/domain/interface/com/ether/YesNo.java	(revision 439)
+++ /tapas/domain/interface/com/ether/YesNo.java	(revision 440)
Index: /tapas/service/implementation/com/ether/TapasServiceImpl.java
===================================================================
--- /tapas/service/implementation/com/ether/TapasServiceImpl.java	(revision 439)
+++ /tapas/service/implementation/com/ether/TapasServiceImpl.java	(revision 440)
@@ -36,7 +36,5 @@
         final Element tapas = new Element( "tapas" );
         final Element request = new Element( "request" );
-        final Element preferences = new Element( "preferences" );
-        final Element format = new Element( "format" );
-        final Element rayleighExtinction = new Element( "rayleigh_extinction" );
+
 
         //On crÃ©e un nouveau Document JDOM basÃ© sur la racine que l'on vient de crÃ©er
@@ -51,18 +49,35 @@
         for( final Request iRequest : requests )
         {
+            // Id de la request
             final Attribute idR = new Attribute( "Id", iRequest.getId().toString() );
             request.setAttribute( idR );
 
-            tapas.addContent( request );
-            request.addContent( preferences );
+            // PREFERENCES
+            final Element preferences = new Element( "preferences" );
 
+            // Element format
+            final Element format = new Element( "format" );
             final Attribute validF = new Attribute( "valid", iRequest.getPreference().getFormat().getFirstValue() );
             format.setAttribute( validF );
             format.setText( iRequest.getPreference().getFormat().getSecondValue() );
+            preferences.addContent( format );
 
+            // Element rayleighExtinction
+            final Element rayleighExtinction = new Element( "rayleigh_extinction" );
             final Attribute validR = new Attribute( "valid", iRequest.getPreference().getRayleighExtinction().getFirstValue() );
             rayleighExtinction.setAttribute( validR );
             rayleighExtinction.setText( iRequest.getPreference().getRayleighExtinction().getSecondValue() );
+            preferences.addContent( rayleighExtinction );
 
+            //
+
+            request.addContent( preferences );
+
+            // OBSERVATORIES
+
+
+
+
+            tapas.addContent( request );
         }
 
Index: /tapas/web/WEB-INF/servlet-context.xml
===================================================================
--- /tapas/web/WEB-INF/servlet-context.xml	(revision 439)
+++ /tapas/web/WEB-INF/servlet-context.xml	(revision 440)
@@ -5,4 +5,5 @@
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
+
 
     <!-- i18n -->
Index: /tapas/web/project/formTapas.jsp
===================================================================
--- /tapas/web/project/formTapas.jsp	(revision 439)
+++ /tapas/web/project/formTapas.jsp	(revision 440)
@@ -29,5 +29,7 @@
     <tiles:put name="body" type="string">
 
-        <div id="formulaire"></div>
+        <div id="formulaire">
+
+        </div>
 
         <div id="errors"></div>
@@ -38,5 +40,6 @@
             tapasTexts["<%=WebException.WebCode.ERROR_JSON_TAPAS_IS_NULL%>"] = "<spring:message code="error.ERROR_JSON_TAPAS_IS_NULL"/>";
 
-            var interfaceTapas = new InterfaceTapas( ${jSonFileFormats}, ${jSonYesNos} );
+            //var interfaceTapas = new InterfaceTapas(${jSonFileFormats},${jSonYesNos},${jSonObservatories},${jSonSelectUnits});
+            var interfaceTapas = new InterfaceTapas(${jSonFileFormats},${jSonYesNos},${jSonObservatories});
         </script>
 
Index: /tapas/web/project/formTapas_script.jsp
===================================================================
--- /tapas/web/project/formTapas_script.jsp	(revision 439)
+++ /tapas/web/project/formTapas_script.jsp	(revision 440)
@@ -2,5 +2,5 @@
 var InterfaceTapas = Class.create( {
 
-    initialize: function( jsonFileFormats, jsonYesNos )
+    initialize: function( jsonFileFormats, jsonYesNos, jsonObservatories )
     {
         /** *********** CONTAINERS *********** **/
@@ -10,9 +10,11 @@
         this.jsonFileFormats = jsonFileFormats || null;
         this.jsonYesNos = jsonYesNos || null;
+        this.jSonObservatories = jsonObservatories || null;
+        //this.jSonSelectUnits = jsonSelectUnits || null;
 
         this.containerErrors.hide();
 
         this.createForm();
-        this.createCalendar( this.containerForm );
+
     },
 
@@ -23,5 +25,5 @@
     {
         // Create input for date text
-        var inputDateId = "observationDate";
+        var inputDateId = "iobservation_date";
         var inputDate = $( document.createElement( "input" ) );
         inputDate.attr( {id:inputDateId, size:"17"} );
@@ -65,10 +67,11 @@
         var input = $( document.createElement( "input" ) );
 
-
         input.attr( {id: inputId} );
         td1.html( texte );
         tr.append( td1 );
         if( type == 'format' ) this.displayFileFormats( td2 );
-        else if( type == 'yesno' ) this.displayYesNo( td2 );
+        else if( type == 'yesno' ) this.displayYesNo( td2, inputId );
+        else if( type == 'observatories' ) this.displayObservatories( td2 );
+        else if( type == 'spectralUnit' ) this.displaySpectralUnits( td2 );
 
         tr.append( td2 );
@@ -80,18 +83,39 @@
     {
 
-        //Creation div
+        //Creation div / tab
         var divPreference = $( document.createElement( "div" ) );
         var tabPreference = $( document.createElement( "table" ) );
 
-        this.createTrList( "File format", "p1", tabPreference, 'format' );
-        this.createTr( "Rayleigh extinction", "p2", tabPreference );
-        this.createTrList( "H20 extinction", "p3", tabPreference, 'yesno' );
-        this.createTrList( "O3 extinction", "p4", tabPreference, 'yesno' );
-        this.createTrList( "O2 extinction", "p5", tabPreference, 'yesno' );
-        this.createTrList( "CO2 extinction", "p6", tabPreference, 'yesno' );
+        var divObservation = $( document.createElement( "div" ) );
+        var tabObservation = $( document.createElement( "table" ) );
+
+        this.createTrList( "File format", "iformat", tabPreference, 'format' );
+        this.createTr( "Rayleigh extinction", "irextinction", tabPreference );
+        this.createTrList( "H20 extinction", "ih2oe", tabPreference, 'yesno' );
+        this.createTrList( "O3 extinction", "io3e", tabPreference, 'yesno' );
+        this.createTrList( "O2 extinction", "io2e", tabPreference, 'yesno' );
+        this.createTrList( "CO2 extinction", "ico2e", tabPreference, 'yesno' );
+
+        this.createTrList( "Observatory", "iobservatory", tabObservation, 'observatories' );
+
+
+
+        this.createCalendar( tabObservation );
+
+
+
+        this.createTr( "Right LOS ascension", "ira", tabObservation );
+        this.createTr( "LOS declension", "ide", tabObservation );
+        this.createTr( "Zenith angle", "iza", tabObservation );
+        // this.createTrList("Spectral unit", "ispectral_choice", tabObservation, 'spectralUnit');
+        this.createTr( "Spectral range", "ispectral_ranger", tabObservation );
+
 
         divPreference.append( tabPreference );
         this.containerForm.append( divPreference );
 
+        divObservation.append( tabObservation );
+        this.containerForm.append( divObservation );
+
         //jQuery.proxy permet d'envoyer le contexte this courant
         var submitButton = new Button( {value:tapasTexts["label.submitButton"], parent:this.containerForm, id:"button_submit", className: "red_button", classNameText:"red_button_text", onClick:jQuery.proxy( this.onClickSubmit, this )} );
@@ -104,5 +128,5 @@
     requestCreateXML: function()
     {
-        var tapasForm = this.createTapasForm();
+        var tapasForm = this.createTapasObject();
         //passage de javascript a json grace au jquery
         var jsonTapasForm = $.toJSON( tapasForm );
@@ -130,4 +154,5 @@
         this.requestCreateXML();
     },
+
 
     // OTHERS ********************************************************
@@ -160,4 +185,35 @@
 
 
+    displayObservatories: function( container )
+    {
+        var paramSelect = new Object();
+        paramSelect.id = "select_observatory";
+        paramSelect.parent = container;
+        this.selectObservatories = new Select( paramSelect );
+        //ajouter select vide avec add
+        this.selectObservatories.add( "-1", "-- Select an observatory --" );
+        jQuery.each( this.jSonObservatories, jQuery.proxy( function ( i, jsonObservatory )
+        {
+            this.selectObservatories.add( jsonObservatory.id, jsonObservatory.name );
+        }, this ) );
+        this.selectObservatories.selectFirst( true );
+    },
+
+
+    displaySpectralUnits: function( container )
+    {
+        var paramSelect = new Object();
+        paramSelect.id = "select_spectral_unit";
+        paramSelect.parent = container;
+        this.selectSpectralUnits = new Select( paramSelect );
+        //ajouter select vide avec add
+        this.selectSpectralUnits.add( "-1", "-- Select unit --" );
+        jQuery.each( this.jSonSpectralUnit, jQuery.proxy( function ( i, jsonSpectralUnit )
+        {
+            this.selectSpectralUnits.add( jsonSpectralUnit.id, jsonSpectralUnit.name );
+        }, this ) );
+        this.selectSpectralUnits.selectFirst( true );
+    },
+
     showErrors: function( result )
     {
@@ -166,5 +222,5 @@
     },
 
-    createTapasForm: function()
+    createTapasObject: function()
     {
         // PREFERENCE
@@ -172,12 +228,17 @@
 
         preference.format = new Object();
-        preference.format.firstValue = $( "#1" ).val();
-        preference.format.secondValue = $( "#2" ).val();
+        //toutes les valeurs possibles
+        //preference.format.firstValue = $( "#select_formats" ).val();
+        preference.format.firstValue = this.selectFormats.getValues();
+        //la valeur selectionnee
+        preference.format.secondValue = this.selectFormats.getValue();
+
 
         var pair = new Object();
         pair.firstValue = "YES,NO";
-        pair.secondValue = "YES";
-
-        preference.rayleighExtinction = pair;
+        pair.secondValue = this.selectFormats.getValue();
+
+        preference.rayleighExtinction = new Object();
+        ;
         preference.h2oExtinction = pair;
         preference.o3Extinction = pair;
@@ -188,20 +249,10 @@
         // Observatory
         var observatory = new Object();
-        observatory.name = "SanFernandoObs.RSanFernando";
-
-        observatory.longitude = new Object();
-        observatory.longitude.min = "-180";
-        observatory.longitude.max = "180";
-        observatory.longitude.value = -118.491666666667;
-
-        observatory.latitude = new Object();
-        observatory.latitude.min = "-90";
-        observatory.latitude.max = "90";
-        observatory.latitude.value = 34.3083333333333;
-
-        observatory.altitude = new Object();
-        observatory.altitude.min = "0";
-        observatory.altitude.max = "10000";
-        observatory.altitude.value = 371;
+        //observatory.name = this.selectFormats.name;
+
+        observatory.longitude = this.longitude.value;
+        observatory.latitude = this.latitude.value;
+        observatory.altitude = this.altitude.value;
+
 
         // Los
@@ -234,5 +285,5 @@
 
         var observation = new Object();
-        observation.date = this.calendarConverter.parse( $( "#observationDate" ).val() ).getTime();
+        observation.date = this.calendarConverter.parse( $( "#iobservation_date" ).val() ).getTime();
         observation.observatory = observatory;
         observation.los = los;
@@ -251,4 +302,5 @@
         atmosphere.ecmwfFile = new Array();
         atmosphere.ecmwfFile[0] = "/home/ferron/tmp/tapas/ecmwf12.txt";
+
 
         // REQUEST
Index: /tapas/web/resources/css/tapas.css
===================================================================
--- /tapas/web/resources/css/tapas.css	(revision 439)
+++ /tapas/web/resources/css/tapas.css	(revision 440)
@@ -137,7 +137,7 @@
     -moz-border-radius-topright: 0;
     -webkit-border-radius: 0; /*#E8EFF3*//* #618EAC*/
-    background: -moz-linear-gradient(white, #F6DC12);
+    background: -moz-linear-gradient(white, #52251C);
     background: -webkit-linear-gradient(white, #F6DC12);
-    background: -ms-linear-gradient(white, #F6DC12) repeat scroll 0 0 transparent; /*For IE10*/
+    background: -ms-linear-gradient(white,#C03000 ) repeat scroll 0 0 transparent; /*For IE10*/
     filter: progid:DXImageTransform.Microsoft.gradient(GradientType = 0, startColorstr = 'white', endColorstr = '#F6DC12'); /*For IE7-8-9*/
     min-height: 400px;
Index: /tapas/web/src/com/ether/Controller.java
===================================================================
--- /tapas/web/src/com/ether/Controller.java	(revision 439)
+++ /tapas/web/src/com/ether/Controller.java	(revision 440)
@@ -7,8 +7,10 @@
 import com.ether.tapas.Observatory;
 import com.ether.tapas.Tapas;
+import com.ether.user.User;
 import com.ether.user.UserRole;
 import net.sf.json.JSONObject;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.jetbrains.annotations.NotNull;
 
 import java.util.ArrayList;
@@ -33,5 +35,4 @@
             throws WebException
     {
-
         try
         {
@@ -58,6 +59,6 @@
     /** *********************** CALLS ***************************** **/
     /** *********************************************************** **/
-    @ControllerMethod(jsonResult = true)
-    public JSONObject createUserRequest( @ParamName("jsonTapas") @Mandatory @UseJSON final Tapas javaTapas )
+    @ControllerMethod(jsonResult = true, userMandatory = true)
+    public JSONObject createUserRequest( @ParamName("jsonTapas") @Mandatory @UseJSON final Tapas javaTapas, @NotNull final User user ) // TODO rajouter parametre USER
             throws WebException
     {
@@ -65,6 +66,12 @@
             throw new WebException( WebException.WebCode.ERROR_JSON_TAPAS_IS_NULL, "Serialization error : jsonTapas is null", WebException.getExceptionThrowable() );
 
+        //TODO recuperer le USER via ControllerEther
+
         //appel a createxml
-        getTapasService().createXMLRequest( javaTapas );
+        getTapasService().createXMLRequest( javaTapas ); // en 2ieme parametre
+
+        //appel a runtime
+        //mettre une methode dans tapas service pour appel au shell system
+
 
         final JSONObject result = new JSONObject();
Index: /tapas/web/src/com/ether/ControllerEther.java
===================================================================
--- /tapas/web/src/com/ether/ControllerEther.java	(revision 439)
+++ /tapas/web/src/com/ether/ControllerEther.java	(revision 440)
@@ -120,6 +120,8 @@
             final String defaultView = ( null != methodDescription.getDefaultView() && !"".equals( methodDescription.getDefaultView() ) ) ? methodDescription.getDefaultView() : methodDescription.getView();
 
+
             if( methodDescription.isRequestMandatory() )
-                params[params.length - 1] = request;
+                params[params.length - 1] = request; //params = parametre de la methode du Controller
+
 
             if( methodDescription.isLoginMandatory() )
@@ -128,4 +130,14 @@
                 if( null == user )
                     return new ModelAndView( defaultView, "errors", "login.error.unknown" );
+            }
+
+            if (methodDescription.isUserMandatory()) {
+                final User user = (User) request.getSession().getAttribute( "SES_USER" );
+
+                if( null == user )
+                    return new ModelAndView( defaultView, "errors", "login.error.unknown" );
+                else
+                    params[params.length - 1] = user;
+
             }
 
