Mar 11, 2011, 9:34 AM
[CLOSED] RemoteValidation ExtraParams are ignored
Looking at the HTTP trace, I see that the extra params aren't included in the request at all:
Is this a bug or am I missing something?
submitDirectEventConfig={"config":{"serviceParams":"{\"id\":\"Registration\",\"value\":510}"}}
&__EVENTTARGET=ResourceManager1
&__EVENTARGUMENT=Registration|postback|remotevalidation
&Registration_Value=510
&Registration=Euronext
&Registration_SelIndex=9
Here's the form markup: <form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server">
</ext:ResourceManager>
<ext:Store runat="server" ID="StoreRegistration">
<Reader>
<ext:JsonReader>
<Fields>
<ext:RecordField Name="RegistrationId" Type="Int" />
<ext:RecordField Name="RegistrationName" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
<ext:FormPanel ID="FormPanel1"
runat="server"
Title="Remote Validation Form"
Padding="5"
Frame="true"
LabelWidth="250"
Width="500"
DefaultAnchor="-20">
<Items>
<ext:ComboBox runat="server" ID="Registration" DataIndex="RegistrationId" FieldLabel="Registration name" StoreID="StoreRegistration"
ValueField="RegistrationId" DisplayField="RegistrationName" Editable="false" AllowBlank="false" IsRemoteValidation="true">
<Listeners>
<Select Handler="this.remoteValidate();"/>
<AfterRender Handler="this.rvConfig.remoteValidated = true;this.rvConfig.remoteValid = true;" />
</Listeners>
<RemoteValidation OnValidation="CheckDuplicateRegistration">
<ExtraParams>
<ext:Parameter Name="PersonRegId" Value="400" />
<ext:Parameter Name="PersonId" Value="4164" />
</ExtraParams>
</RemoteValidation>
</ext:ComboBox>
</ext:FormPanel>
</form>
And the code for the event handler: protected void CheckDuplicateRegistration(object sender, RemoteValidationEventArgs e)
{
if (e.Value != null)
{
if (e.ExtraParams.Count > 0)
{
.
.
.
.
}
}
}
I can see from the page source that the extraparams are included in the combo's config:{
id:"Registration",
xtype:"combo",
fieldLabel:"Registration name",
dataIndex:"RegistrationId",
isRemoteValidation:true,
remoteValidationOptions:{
extraParams:{
"PersonRegId":"400",
"PersonId":"4164"
}
},
allowBlank:false,
editable:false,
displayField:"RegistrationName",
hiddenName:"Registration_Value",
triggerAction:"all",
valueField:"RegistrationId",
store:StoreRegistration,
submitValue:true,
listeners:{
select:{
fn:function(item,
record,
index) {
this.remoteValidate();
}
}
}
}
But for some strange reason they don't get included in the request.Is this a bug or am I missing something?
Last edited by Daniil; Mar 11, 2011 at 3:44 PM.
Reason: [CLOSED]