Nov 29, 2011, 7:51 AM
Unwanted changes in strings when filling formpanel fields with values by directmethod
Hi!
In having a Grid that has a listener on doubleclick on rows to open a window with a number of fields and fill these with values from codebehind in a directmethod.
The directmethod looks like this:
The string contains special variable holders that look like this ${varName} or #{varName} ... The ones that start with ${ gets changed to Ext.get(varName) and the ones named #{ gets changed to Ext.select(varName) ... Very strange things going on...
What i wonder is if there is a way to stop Ext.net from changing these two so i can save the correct values on the server side?
//Trinodia
In having a Grid that has a listener on doubleclick on rows to open a window with a number of fields and fill these with values from codebehind in a directmethod.
The directmethod looks like this:
[DirectMethod()]
public void EditPage()
{
string id = RowSelectionModel1.SelectedRecordID;
int intId = 0;
int.TryParse(id, out intId);
PageTemplate page = PageTemplateBLL.GetById(intId);
if (page != null)
{
pageDescription.Text = page.Description;
pageTitle.Text = page.Title;
pageContentXML.Text = page.ContentXML;
pageOrder.Text = page.PageOrder.ToString();
pageCount.Text = page.PageCount.ToString();
PrintTemplateId.Text = page.fk_PrintTemplateId.ToString();
PageId.Text = page.Id.ToString();
PageTemplateGroup.Text = page.PageTemplateGroup.ToString();
cbIncludeInTemplate.Checked = page.IncludeInTemplate;
PageEditorWindow.Show();
}
else
{
X.Msg.Alert("Error...", "Ingen sida hittad som matchar raden du dubbelklickade på...").Show();
}
}
The field ContentXML is the field with a long text that gets weird encoding on the way from server side to client side. The string contains special variable holders that look like this ${varName} or #{varName} ... The ones that start with ${ gets changed to Ext.get(varName) and the ones named #{ gets changed to Ext.select(varName) ... Very strange things going on...
What i wonder is if there is a way to stop Ext.net from changing these two so i can save the correct values on the server side?
//Trinodia