Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha Premium Member
    Join Date
    Jul 2012
    Posts
    3
    Vote Rating
    0
    jpooley is on a distinguished road

      0  

    Question Unanswered: ExtJS: Stream OpenXML document to new window

    Unanswered: ExtJS: Stream OpenXML document to new window


    I will be using OpenXML to generate Powerpoint Presentations based on "scores" data POSTed in some way from an Ext.gridPanel (which I have got to work)

    I am using an MVC C# FileResult to generate my presentation:

    [HttpPost]
    public FileResult Report(GridScores scores)
    {
    // OpenXml code would go here but I am returning a demo PPT file as a proof of concept to make this example shorter
    // return GeneratePresentation(scores);
    return File(@"C:\Temp\Demo.ppt", "application/vnd.ms-powerpoint", "NewFile.ppt");
    }

    I have a button on the gridPanels TBar. What ExtJS/Javascript code should I use to:
    • Open the the presentation in a new window?
    • Present the user with a Download dialog to download the file?

  2. #2
    Sencha - Community Support Team friend's Avatar
    Join Date
    Apr 2011
    Posts
    895
    Answers
    106
    Vote Rating
    27
    friend has a spectacular aura about friend has a spectacular aura about

      0  

    Default


    You can use a Form object and specify a target in the submit method, as shown below.

    Code:
    someRenderedForm.submit({
      url: 'someUrl',
      params: {
          someRequestParam: someValue
      },
      method: 'POST',
      target: 'powerPointWindow'
    });

  3. #3
    Sencha Premium Member
    Join Date
    Jul 2012
    Posts
    3
    Vote Rating
    0
    jpooley is on a distinguished road

      0  

    Question Ensuring "somevalue" is a JSON version of my grid data

    Ensuring "somevalue" is a JSON version of my grid data


    Thanks for this, I am so close, I just can't seem to to post the data for the grid successfully.

    I have tried:
    Code:
            var encodedData = Ext.encode(Ext.pluck(grid.getStore().data.items, 'data'));
            var form = new Ext.form.Panel();
                    form.submit({
                        url: '/mycontroller/report',
                        params: encodedData,
                        jsonSubmit: true,
                        method: 'POST',
                        target: '_blank'
                    });
    and also
    Code:
            var encodedData = Ext.encode(Ext.pluck(grid.getStore().data.items, 'data'));
            var form = new Ext.form.Panel();
                    form.submit({
                        url: '/mycontroller/report',
                        params: {scores: encodedData},
                        jsonSubmit: true,
                        method: 'POST',
                        target: '_blank'
                    });
    But my data is not read into MVC action.

    Can you see what I am doing wrong?

Thread Participants: 1

Tags for this Thread