PDA

View Full Version : [CLOSED] Ext.Net 2.0 - convert 1.2 version Ext.Net MVC fail



romeu
Mar 29, 2012, 3:34 PM
I have a project developed in Ext.Net 1.2 (Ext.Net.dll) also using the MVC Ext.Net (Ext.Net.MVC.dll), but now I tried to convert it to Ext.Net 2.0 does not work.
I saw the source code Ext.Net 2.0 and seems to have been built into the Ext.Net MVC to it, thus no longer needing to use Ext.Net.MVC.dll, but is not working because the class AjaxStoreResult does not exist.
How do I convert the project to version 2.0?

Daniil
Mar 29, 2012, 4:09 PM
Hi,


the class AjaxStoreResult does not exist.

Please use StoreResult.


How do I convert the project to version 2.0?

Well, there is no any automatic way to port. So, the answer - manually and step by step.

There is a lot of breaking changes. As far as we find a new one we list it in the CHANGELOG:
http://examples2.ext.net/#/Getting_Started/Release_Documents/CHANGELOG/

The examples may be helpful.
http://examples.ext.net

Searching on the Premium Help 2.x and Help 2.x forums may be helpful as well.

Here you can choose a forum for a searching request:
http://forums.ext.net/search.php?search_type=1

If the options above don't help to find an answer, you are welcome on the forum with a new forum thread with details about an issue.

romeu
Mar 29, 2012, 5:02 PM
Thanks.

I will test.


Hi,



Please use StoreResult.



Well, there is no any automatic way to port. So, the answer - manually and step by step.

There is a lot of breaking changes. As far as we find a new one we list it in the CHANGELOG:
http://examples2.ext.net/#/Getting_Started/Release_Documents/CHANGELOG/

The examples may be helpful.
http://examples.ext.net

Searching on the Premium Help 2.x and Help 2.x forums may be helpful as well.

Here you can choose a forum for a searching request:
http://forums.ext.net/search.php?search_type=1

If the options above don't help to find an answer, you are welcome on the forum with a new forum thread with details about an issue.

romeu
Mar 30, 2012, 7:29 PM
Other problems that I saw:

Class Ext.Net.RecordField there.
Class Ext.Net.Column no longer has the Header property.

I can find in the changelog that's changed, what classes do not exist or have been replaced?


Hi,



Please use StoreResult.



Well, there is no any automatic way to port. So, the answer - manually and step by step.

There is a lot of breaking changes. As far as we find a new one we list it in the CHANGELOG:
http://examples2.ext.net/#/Getting_Started/Release_Documents/CHANGELOG/

The examples may be helpful.
http://examples.ext.net

Searching on the Premium Help 2.x and Help 2.x forums may be helpful as well.

Here you can choose a forum for a searching request:
http://forums.ext.net/search.php?search_type=1

If the options above don't help to find an answer, you are welcome on the forum with a new forum thread with details about an issue.

Vladimir
Mar 30, 2012, 7:34 PM
Hi,

RecordField is renamed to ModelField
Header property of Column is renamed to Text
Please see
http://examples2.ext.net/#/GridPanel/ArrayGrid/Simple/

romeu
Mar 30, 2012, 8:32 PM
Thank you, Vladimir.

How to serialize a Column object instance?
Method Serialize() does not exist anymore in Column class.


Hi,

RecordField is renamed to ModelField
Header property of Column is renamed to Text
Please see
http://examples2.ext.net/#/GridPanel/ArrayGrid/Simple/

Vladimir
Mar 30, 2012, 8:39 PM
Please clarify purpose of column serialization
Column is component now therefore you can use ToScript and ToConfig methods

romeu
Mar 30, 2012, 9:10 PM
I have this code, which worked in version 1.2:


public ActionResult AddColumn()
{

Column c = new Column()
{
Header = "New",
DataIndex = "someDataIndex"
};

RecordField rf = new RecordField()
{
Name = "someDataIndex"
};

AjaxResult r = new AjaxResult();
r.Result = new
{
column = c.Serialize(),
field = new ClientConfig().Serialize(rf)
};

return r;
}


How to convert?


Please clarify purpose of column serialization
Column is component now therefore you can use ToScript and ToConfig methods

Daniil
Apr 01, 2012, 4:32 PM
Please use the ToConfig method.

Example

public ActionResult AddColumn()
{

Column c = new Column()
{
Text = "New",
DataIndex = "someDataIndex"
};

ModelField field = new ModelField()
{
Name = "someDataIndex"
};

AjaxResult r = new AjaxResult();
r.Result = new
{
column = c.ToConfig(),
field = new ClientConfig().Serialize(field)
};

return r;
}

romeu
Apr 02, 2012, 1:42 PM
Thanks.
I will test that code.


Please use the ToConfig method.

Example

public ActionResult AddColumn()
{

Column c = new Column()
{
Text = "New",
DataIndex = "someDataIndex"
};

ModelField field = new ModelField()
{
Name = "someDataIndex"
};

AjaxResult r = new AjaxResult();
r.Result = new
{
column = c.ToConfig(),
field = new ClientConfig().Serialize(field)
};

return r;
}