Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    21
    Vote Rating
    1
    andyboxer is on a distinguished road

      0  

    Default 2.0.0.000268 - Ext.data.proxy.Server-cfg-extraParams as object

    I have defined MyAppData singleton with global setting 'channel'
    Code:
    Ext.application({
     ...
        launch: function() {
            Ext.define('MyAppData', {
                singleton: true,
                channel: 'CH01'
            });
        }
    });
    This parameter I'd like to set as extraParams:
    Code:
    extraParams: {
        channel: MyAppData.channel
    }
    but designer quotes the whole value of extraParams:
    Code:
    extraParams: '{ channel: MyAppData.channel }'

    so instead of object I pass each symbol of a string as a separate parameter and as such fail to load data



    Please note that this is also valid for the api property and so it is not possible to set values as stated in section "3.1 API" of Ext Direct and Grid Part 2 tutorial.
    Last edited by andyboxer; 13 Mar 2012 at 3:23 AM. Reason: Same problem with other property

  2. #2
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,485
    Vote Rating
    135
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default

    We don't yet support variables.

    {channel: 124}

    Would work fine.

    I recommend setting these in an override.
    Aaron Conran
    @aconran

  3. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    21
    Vote Rating
    1
    andyboxer is on a distinguished road

      0  

    Default

    Ok, but also it is not possible to correctly set style:
    if I input { border-style: 'solid' } I get
    Code:
    style: '{ border-style: \'solid\' }',
    if I remove dash and input { borderstyle: 'solid' } I get
    Code:
    style: {
        borderstyle: 'solid'
    }

  4. #4
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,485
    Vote Rating
    135
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default

    If the left hand side of the object has a - in it, you would need to use quotes around it

    Try {"border-style": "solid"}
    Aaron Conran
    @aconran

  5. #5
    Sencha User
    Join Date
    Dec 2011
    Posts
    21
    Vote Rating
    1
    andyboxer is on a distinguished road

      0  

    Default

    Thanks a lot!

  6. #6
    Sencha User
    Join Date
    Sep 2011
    Posts
    26
    Vote Rating
    0
    pulliags is on a distinguished road

      0  

    Default

    I don't mean to highjack the thread, but you say you don't support variables yet. I need to pass a LastName and FirstName to a web service using the AjaxProxy. If I hard code the LastName and FirstName in the web service, then I'm able to return the data using the proxy without passing the data. How would I actually pass in the LastName and FirstName from a search screen to the web service using Designer 2.0? Thanks!! Gregg

  7. #7
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,485
    Vote Rating
    135
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default

    Gregg you can implement this via an override and/or provide this behavior when a user clicks/taps something like a Button to login.
    Aaron Conran
    @aconran

  8. #8
    Sencha User
    Join Date
    Sep 2011
    Posts
    26
    Vote Rating
    0
    pulliags is on a distinguished road

      0  

    Default

    Quote Originally Posted by aconran View Post
    Gregg you can implement this via an override and/or provide this behavior when a user clicks/taps something like a Button to login.
    Aaron, that's exactly what I'm looking for, but I don't have enough experience with Sencha Designer 2.0 to know where to begin. I've set up the proxy, but I don't know how to set up the button or how to pass the params to my web service. Are there any examples out there that would show how to do this? Thanks so much for taking the time to respond.

  9. #9
    Sencha User
    Join Date
    Sep 2011
    Posts
    26
    Vote Rating
    0
    pulliags is on a distinguished road

      0  

    Default

    Aaron, just wanted to add a couple of things. What you suggest with a button is exactly what I'm trying to do. I have two text boxes for the user to enter data and a button to submit the data...What I need to do is take this data and pass it to a web service which will then return data to populate a list. I've followed the "Working With Data in Sencha Designer" by Jason Johnston...it's a great little tutorial, but it works with a file on your localhost. I need to be able to accept data from the user and pass that data as parameters to my web service. I did a test using the web service by hard coding parameters on the web service end and everything worked fine in Sencha Designer...it's just trying to get the parameters from text boxes to the web service I'm having trouble with. Really just wish there was a tutorial out there like the one Jason did that addressed this. Any help in the right direction would be appreciated. Thanks!! Gregg

  10. #10
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,485
    Vote Rating
    135
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default

    Quote Originally Posted by pulliags View Post
    Really just wish there was a tutorial out there like the one Jason did that addressed this.
    This is a great idea for a tutorial.

    Have you checked out Phil Strong's CityBars tutorial with Designer? This shows calling the Yelp API and passing additional params.
    http://www.sencha.com/forum/showthre...-at-Designer-2
    Aaron Conran
    @aconran

Thread Participants: 2

Tags for this Thread