Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing periods in parameter name using Ext JS Model load method
    primarykey
    data
    text
    <p>Using Ext-JS 4.1 with Spring 3.1 Controllers.</p> <p>I am trying to retrieve an object from my Spring Controller using the load() method. I read a string from a text field and send that into the load method. The string field will contain a fully qualified server name such as "company.server.com". What's happening is that the value within the Spring controllers is "company.server", in other words it drops the ".com". It I put in an additional period at the end such as "company.server.com." then it comes in properly as "company.server.com". There seems to be some sort of tokenizing going on. I used commas (,) just to see what would happen. Using commas the string came in as expected. For some reason periods (.) is causing the issue. </p> <p>Here is the Model:</p> <pre><code>Ext.define('AB.model.Server', { extend: 'Ext.data.Model', fields: [ {name:'serverName', type:'String'}, {name:'memory', type:'String'}, {name:'cpus', type:'int'} ], proxy { type: 'rest', url: '/web/user/' } }); </code></pre> <p>Here is a snippet from the form which makes the load() call:</p> <pre><code>Ext.define('AB.view.Form', { extend: 'Ext.form.Panel', .... ,{ xtype: 'button', text: 'Retrieve Information', handler: function() { Ext.ModelManager.getModel('AB.model.User').load(Ext.getCmp('serverName').getValue(), { success: function(user) { alert("Success"); } .... } </code></pre> <p>Using Firebug I see this as the URL being called:</p> <pre><code>http://myServer/web/user/company.server.com?_dc=13461612333647?id=company.server.com </code></pre> <p>So the URL has the correct server name but on the Spring Controller side the value of my parameter is "company.server".</p> <p>When I directly put the following URL directly in my web browser:</p> <pre><code>http://myServer/web/user/company.server.com/ </code></pre> <p>it works properly with the parameter in the Spring Controller being "company.server.com".</p> <p>Is this an EXT JS problem? Is a problem with EXT JS to Spring? I don't think it is a Spring issue alone since the URL directly in the browser works properly.</p> <p>UPDATE:</p> <p>When I put the following URL directly in my web browser:</p> <pre><code>http://myServer/web/user/company.server.com </code></pre> <p>it behaves the same as the EXT JS Rest call. Notice there is no ending slash (/). So maybe this is a Spring issue? Or maybe a web.xml issue?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload