PDA

View Full Version : [CLOSED] TextField.getValue()



supera
Jan 20, 2012, 3:07 PM
Hi

I has a store in my GridPanel bind with a WebService, and I pass a parameter 'filter' to my WebService method...



<Parameters>
<ext:StoreParameter Name="filter" Value="getDividasFilter()" Mode="Raw" />
</Parameters>


I store the code for my company in a hidden field to be passed in filter StoreParameter


<ext:Hidden runat="server" ID="txtIDEmpresa" />


However, in my script function, an error occurs saying that the getValue() is not a txtIDEmpresa method...
follows the script ... What am I doing wrong?



<script type="text/javascript" language="javascript">

function getDividasFilter() {
if (txtIDEmpresa.getValue() != "") {
sFilter = "COB_DIVIDAS.IDEmpresa=" + txtIDEmpresa.getValue() + " AND IDSituacaoCobranca>-1 AND SuperaWeb=1";
}
return sFilter;
}


Thanks for any help.

Vladimir
Jan 20, 2012, 3:56 PM
Hi,

In v2, there is the default namespace 'App', any widget will share own client id in that namespace.

You can use:

Example 1


App.txtIDEmpresa


As well, you can set empty or your custom Namespace in ResourceManager.

Also you can use the #{} syntax.

Example 2

<ext:XScript runat="server">
<script type="text/javascript">
var showValue = function () {
#{TextField1}.getValue();
};
</script>
</ext:XScript>

An <ext:XScript> control is not required when you use #{} in markup.

We will add a respective CHANGELOG item.

supera
Jan 20, 2012, 4:17 PM
Hi Vladimir...

Ok, Thanks... your suggestion works fine.

Daniil
Jan 24, 2012, 2:17 PM
We will add a respective CHANGELOG item.

Item #90:
http://examples2.ext.net/#/Getting_Started/Release_Documents/CHANGELOG/