1. #1
    Ext User
    Join Date
    Sep 2007
    Posts
    11
    Vote Rating
    0
    tang9528 is on a distinguished road

      0  

    Default Use HttpProxy and TreeLoader has error,how to solve the problem?thanks

    Use HttpProxy and TreeLoader has error,how to solve the problem?thanks


    PHP Code:
      try {
          
    ModelType type = new ModelType();
          
    type.root "fileInfo";
          
    type.addField("name");
          
    type.addField("size");
          
    HttpProxy proxy = new HttpProxy(new RequestBuilder(RequestBuilder.GET,"tree.js"));
          
    TreeLoader loader = new BaseTreeLoader(proxy, new JsonReader(type));
          
    TreeStore store = new TreeStore(loader);//if not this,it's ok
          
    loader.load();
       }catch(
    Exception error){
          
    Log.warn("error:" error.getMessage());//Log source from com.allen_sauer.gwt.log.client.Log
       

    PHP Code:
    tree.js
    {"fileInfo":[{"name""\u6d4b\u8bd5.doc","size"1024}, {"name""dbhelper.html","size"1024}, {"name""a+p+m","size"0}, {"name""\u4f60\u597d.pptx","size"1034}]} 
    however have such error
    PHP Code:
    Uncaught Exceptionjava.lang.RuntimeExceptionjava.lang.ClassCastException Caused byjava.lang.ClassCastExceptionnull 

    how to solve the problem?




    thanks

  2. #2
    Ext User
    Join Date
    Sep 2007
    Posts
    11
    Vote Rating
    0
    tang9528 is on a distinguished road

      0  

    Default i find a way

    i find a way


    i find

    Jsonreader.java
    Code:
    public ListLoadResult read(C loadConfig, Object data)
    TreeStore.java
    Code:
    protected void onLoad(TreeLoadEvent le) {
       .....
       for (M model : (List<M>) le.data)
       .....
    }
    le.data is ListLoadResult not List<M> lead the error.

    so,i extend the JsonReader.java


    Code:
     public ArrayList<ModelData> read(C loadConfig, Object data)

    Demo has realize

    1)rails providing json data
    2)tree node dynamic loading

    detail please access attachments.
    Attached Images
    Attached Files

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi