1. #121
    Sencha User Gunmen's Avatar
    Join Date
    Jul 2007
    Posts
    305
    Vote Rating
    0
    Gunmen is on a distinguished road

      0  

    Arrow


    Hi Evan!

    Never give up!

    I installed Visual Studio and found out that Visual Web Developer Express was not the problem. After trying all kind of options I found the solution. I use multiple .js files to structure my work and did not add Ext.Direct.addProvider(Ext.app.USER_API); in the first loaded file but in my last loaded (main) .js file. So, now I can use your group router code.


    Next problem. When I submit a form, how can I use the funtions / options: isValid, waitTitle, waitMsg, success, and failure?

    This is my old way of working... and is not working anymore / yet:
    Code:
     
    handler:function(){
    if(Ext.getCmp('f_login').getForm().isValid()){
    Ext.getCmp('f_login').getForm().submit({
     
    waitTitle:'Connecting',
    waitMsg:'Connect...',
    success:function(form, action){
     
    r = Ext.util.JSON.decode(action.response.responseText);
    // ...
    },
    failure:function(form, action){
    // ...
    EDIT: have it working! Gonna love ExtJS!

    Thank you!

  2. #122
    Sencha User Gunmen's Avatar
    Join Date
    Jul 2007
    Posts
    305
    Vote Rating
    0
    Gunmen is on a distinguished road

      0  

    Cool


    Also to Evan: I tried to use the most recent version of Newtonsoft.Json.dll. However, this version is not working. Therefor we have to use your distributed version of Newtonsoft.Json.
    Just to inform you in case you didnt know.

  3. #123
    Sencha User Gunmen's Avatar
    Join Date
    Jul 2007
    Posts
    305
    Vote Rating
    0
    Gunmen is on a distinguished road

      0  

    Smile Call for examples: dataview, paging, and reader

    Call for examples: dataview, paging, and reader


    Hi Evan!

    Still going strong? I need some assistance of you...

    I have made a lot of progress with extjs and your router code. Now, I want to display data in a panel with a pagingtoolbar. The data must be visualised with a template, as shown like in this extjs dataview example.

    I have several questions: Do I need a json store or a reader? How do I connect the store/reader with your .NET Router code? And, how to apply the pagingtoolbar with a total record counter? How to send parameters to fine tune the query?

    Unfortunately, your .NET Router example does not include a dataview, paging, or json reader example -and- I'm not that die hard developer as most of you. With some good examples, reading the docs and forum posts I can make big steps (as I did in the past).

    Evan, do you want to help me -and others- further with new examples (in the area of dataview, paging, and reader)? An update of your .NET Router will be highly appreciated. It will also save a lot of questions and 'drop outs'.

    Awaiting your reply,

    Thanks you very much!
    Last edited by Gunmen; 14 Feb 2010 at 10:39 AM. Reason: Added parameter question

  4. #124
    Sencha User
    Join Date
    Dec 2009
    Location
    Gdansk, Poland
    Posts
    23
    Vote Rating
    0
    stalek is on a distinguished road

      0  

    Default


    Hi Gunmen,
    I think I have a solution for your problem with the newest Newtosoft.JSON library. See my post here:
    http://www.extjs.com/forum/showthread.php?t=91953

    Regards,
    Alex

  5. #125
    Sencha User Gunmen's Avatar
    Join Date
    Jul 2007
    Posts
    305
    Vote Rating
    0
    Gunmen is on a distinguished road

      0  

    Default


    Quote Originally Posted by stalek View Post
    Hi Gunmen,
    I think I have a solution for your problem with the newest Newtosoft.JSON library. See my post here:
    http://www.extjs.com/forum/showthread.php?t=91953

    Regards,
    Alex
    Hi Stalek, I doubt that because I added the newest Newtosoft.JSON library in Evan's project and the compilation of that project resulted in an error. Did does not happen with the original distributed library.

  6. #126
    Sencha User
    Join Date
    Dec 2009
    Location
    Gdansk, Poland
    Posts
    23
    Vote Rating
    0
    stalek is on a distinguished road

      0  

    Default


    Hi Gunmen,
    I took the newest version of Direct (currently it's in version 0.6) and I see your problem.

    To solve it do 2 steps:

    - modify ResultConverter.cs file (class) by appending serializer parameter on third position.
    It should look like in the code snippet below:

    Code:
    internal class ResultConverter : JsonConverter
    	{
    
            public override bool CanConvert(Type objectType)
            {
                //always return true
                return true;
            }
    
            public override object ReadJson(JsonReader reader, Type objectType, JsonSerializer serializer)
            {
                //no custom reading here
                throw new NotImplementedException();
            }
    
            public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
            {
                JContainer o = value as JContainer;
                if (o != null)
                {
                    writer.WriteRawValue(o.ToString(Formatting.None));
                }
                else
                {
                    writer.WriteValue(value);
                }
            }
    	}
    - apply the change from my post about the problem with DirectProcessor.Execute method.
    I mean this code snippet:

    Code:
    // ...
                else
                {
                    UTF8Encoding encoding = new UTF8Encoding();
                    string json = encoding.GetString(httpRequest.BinaryRead(httpRequest.TotalBytes));
    
                    List<DirectRequest> requests = new List<DirectRequest>();
    
                    try
                    {
                        requests = JsonConvert.DeserializeObject<List<DirectRequest>>(json);
                    }
                    catch
                    {
                    }
    
                    if (requests.Count > 0)
                    {
                        foreach (DirectRequest request in requests)
                        {
                            responses.Add(DirectProcessor.ProcessRequest(provider, request));
                        }
                    }
                    else
                    {
                        responses.Add(DirectProcessor.ProcessRequest(provider, JsonConvert.DeserializeObject<DirectRequest>(json)));
                    }
                }
    Should work, because it works on my machine
    Does it mean that I earned "Works On My Machine" certificate ?

    Regards,
    Alek

  7. #127
    Sencha User Gunmen's Avatar
    Join Date
    Jul 2007
    Posts
    305
    Vote Rating
    0
    Gunmen is on a distinguished road

      0  

    Talking


    Hi Alek, thanks for your support. I will give this a try. Certificate? I have given you a reputation point.


    I also hope that Evan will reply -someday- to keep his work up to date for new and ambitious users.

  8. #128
    Sencha User
    Join Date
    Dec 2009
    Location
    Gdansk, Poland
    Posts
    23
    Vote Rating
    0
    stalek is on a distinguished road

      0  

    Default


    Hi Gunmen,
    please comment/remove such attribute in file DirectResponse.cs to make things working also:
    Code:
    [JsonConverter(typeof(ResultConverter))]
    Regards,
    Alek

  9. #129
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,111
    Vote Rating
    503
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    UPDATE!

    New router is out, the link in the first post has been updated.

    Includes:

    1) Added aliasing
    2) Added timeout/retries/namespace options
    3) Added autoNamespace option, for creating the namespace of your router eg. MyApp.MyRouter. This defaults to true
    4) Added several converters to transform data more easily
    5) Added the ability to specify custom converters
    6) Added the ParseAsJson attribute, which lets you get the method data as either a JObject or JArray.
    7) Redid all of the examples
    8) Added the new JSON.NET library
    9) A few other minor things
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  10. #130
    Ext JS Premium Member
    Join Date
    Aug 2009
    Posts
    111
    Vote Rating
    1
    Whatty is on a distinguished road

      0  

    Default


    Evan,

    I updated the previous verion of the 0.6 router to include Spring integration and annotated session support.

    Unfortunately this required that I modify the base classes of the ExtDirect to accomplish this.

    Now that you have updated the base library I need to execute this integration again, obviously not a good situation to be in.

    I have attached my source so that you can take a look at what I have done, in particular in the class DirectProvider I have attached hooks so that I can delegate creation of the DirectActions to the Spring framework, falling through to the original code if the object is not managed by Spring, I have also added session support through annotation similar in nature to the DirectJNgine support on the Java (yes I work on both platforms at the same time).

    It would be nice to provide an API / configuration option for ExtDirect such that object lifecycle / creation could be delegated to an external framework (such as Spring) otherwise the default would apply. This way as the ExtDirect framework evolves, any external integrations would not have to re-integrate. (I face a similar problem on the Java side with DirectJNgine and have already posted a similar response to Pagullo update http://www.extjs.com/forum/showthrea...084#post437084 6:53 pm - coincidentally posted yesterday as well).

    Please take a look and let me know what you think and how we could potentially proceed in allowing this type of external integration into the base ExtDirect framework.

    Whatty
    Attached Files

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar