Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8962895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:14:16+00:00 2026-06-15T16:14:16+00:00

See these articles for reference for the Ext.applyIf function and double pipes. http://docs.sencha.com/core/manual/content/utility.html http://homepage.ntlworld.com/kayseycarvey/controlflow4.html

  • 0

See these articles for reference for the “Ext.applyIf” function and double pipes.

http://docs.sencha.com/core/manual/content/utility.html

http://homepage.ntlworld.com/kayseycarvey/controlflow4.html

Can someone explain what this logic is doing in the ExtJS framework? I want to make sure my interpretation is correct on the first line with the pipes (especially).

        var params = Ext.applyIf(operation.params || {}, this.extraParams || {}), request;
        params = Ext.applyIf(params, this.getParams(params, operation));
        if (operation.id && !params.id) {
            params.id = operation.id;
        }

Taken from ASP.NET asmx custom server proxy class:

Ext.define('Ext.ux.AspWebAjaxProxy', {
    extend: 'Ext.data.proxy.Ajax',
    require: 'Ext.data',

    buildRequest: function (operation) {
        var params = Ext.applyIf(operation.params || {}, this.extraParams || {}), request;
        params = Ext.applyIf(params, this.getParams(params, operation));
        if (operation.id && !params.id) {
            params.id = operation.id;
        }

        params = Ext.JSON.encode(params);

        request = Ext.create('Ext.data.Request', {
            params: params,
            action: operation.action,
            records: operation.records,
            operation: operation,
            url: operation.url
        });
        request.url = this.buildUrl(request);
        operation.request = request;
        return request;
    }
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T16:14:17+00:00Added an answer on June 15, 2026 at 4:14 pm
    1. Double pipe is a javascript trick to specify defaults. Like Evan suggested it is used often to avoid null pointer issues. In the example of var a = b||{} a is guaranteed to be not null even if b is null or undefined. The default fall back makes a = {} (empty object).
    2. ApplyIf method copies properties from source to destination being careful not to overwrite any existing properties. In the following example extraParams properties are added to params properties as long as params do not have those properties defined.

      Ext.applyIf(params , extraParams )

    The actual code is:

    Ext.applyIf(operation.params || {}, this.extraParams || {}),
    

    which adds extraParams to params object carefully avoiding any null pointer issues and make sure not to overwrite params.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

See section /* Common Classes */ of this page. http://webdesign.about.com/od/css/a/master_stylesht_2.htm are these css classes
I see these terms used interchangeably as the global environment for the DOM. What
Thing is, I don't see these ENUMs producing pull-down menus in CakePHP scaffolding, so
When I study about cloud-computing, I usually see these terms: on-premise, off-premise applications. I
I have a running JVM with two threads. Is it possible to see these
I see an application have used Log.info = some info where are these logs
I have been coming across these two words more often but i didn't see
I see some app on Play Store, when install these apps auto add an
Click here to see what I mean.. What could prevent these two from sitting
See also these related resources: Does the .NET garbage collector perform predictive analysis of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.