Ignore:
Timestamp:
03/05/12 16:23:47 (12 years ago)
Author:
vmipsl
Message:

serialization javascript --> toJson
récupération json en objet java dans le controller

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tapas/web/src/com/ether/Controller.java

    r389 r396  
    44import com.ether.annotation.Mandatory; 
    55import com.ether.annotation.ParamName; 
     6import com.ether.annotation.UseJSON; 
    67import net.sf.json.JSONObject; 
    78import org.apache.commons.logging.Log; 
     
    1112 
    1213import java.util.HashMap; 
    13 import java.util.List; 
    1414import java.util.Map; 
    1515 
    1616/** 
    1717 * @author vmipsl 
    18  * @date 17 feb 2011 
     18 * @date 05 march 2012 
    1919 */ 
    2020public class Controller 
     
    2424    /** *********************************************************** **/ 
    2525    /** *********************** VIEWS ***************************** **/ 
    26     /** 
    27      * ********************************************************** * 
    28      */ 
     26    /** *********************************************************** **/ 
    2927    @ControllerMethod(view = VIEW_INIT) 
    3028    public Map<String, Object> home() 
     
    3735    /** *********************************************************** **/ 
    3836    /** *********************** CALLS ***************************** **/ 
    39     /** 
    40      * ********************************************************** * 
    41      */ 
    42  
     37    /** *********************************************************** **/ 
    4338    @ControllerMethod(jsonResult = true) 
    44     public JSONObject createUserRequest( @ParamName("input1") final String input1, @ParamName("input2") final String input2 ) 
     39    public JSONObject createUserRequest( @ParamName("jsonFormXML") @Mandatory @UseJSON final FormXML jsonFormXML ) 
    4540            throws ServiceException 
    4641    { 
    47  
    4842        //appel a createxml 
    4943        _tapasService.createXMLRequest(); 
    5044 
    51  
    5245        final JSONObject result = new JSONObject(); 
    53         result.put( "result","SUCCESS" ); 
     46        result.put( "result", "SUCCESS" ); 
    5447        return result; 
    5548    } 
Note: See TracChangeset for help on using the changeset viewer.