Upgrade v1.7 -> v2.3 - BREAKING_CHANGES

  1. #1

    Upgrade v1.7 -> v2.3 - BREAKING_CHANGES

    Here I will collect changes not mentioned in the document.
    -------------------------------------------------------------------


    1. Panel's HideLabel was removed. Also I found usage of HideLabels on FormPanel - don't know if there really was such a property. I think that this should be added to p.64
    2. TabPanel (and, probably, all Panels) have lost ClearCls property and I don't know which one can be used instead of it. I guess I just don't need it anymore.
    3. Old TreeNode's AllowChildren no longer exists. I guess, new Node's Leaf property will do the trick.
    4. LabelBase lost it's Field properties like LabelAlign, FieldLabel, etc. Therefor HyperLink and Label lost them also. Should be wrapped into the FieldContainer. Also DisplayField can be used instead of Label.
    5. All XXXClass properties were renamed to XXXCls, I guess. Well, not everywhere and not all, but Slider's DisabledClass was renamed to DisabledCls, i.e.
    6. FieldSet lost HideLabel property - is it because FieldSet is AbstractContainer now, not the Panel?
    7. FieldSet lost IsFormField property? Well, it was used in the our code and no errors and warnings were raised. I guess I just can remove it. If I need to add Label to it - I just can wrap it into FieldContainer.
    8. NumberField lost RenderToForm property and I don't know what for was this property and what shall I use instead of it.
    9. TextArea lost TextMode(?). Well, don't know why, but this property was used previously...
    Last edited by geoffrey.mcgill; Nov 14, 2013 at 6:38 PM. Reason: formatting
  2. #2
    Thank you for taking the time to post these missing BREAKINGCHANGES.txt item.

    We are reviewing each of them and will be adding to the document.
    Geoffrey McGill
    Founder
  3. #3
    Well, even wrongly defined borders can cause such a problems...

    In API
    Ext.Net API
    AbstractComponent.Border Property

    Specifies the border for this component. The border can be a single numeric value to apply to all sides or it can be a CSS style specification for each style, for example: '10 5 3 10'.

    [Meta()]
    [ConfigOption()]
    [DirectEventUpdate(MethodName="SetBorder")]
    [Category("3. AbstractComponent")]
    [DefaultValue(null)]
    [Description("Specifies the border for this component. The border can be a single numeric value to apply to all sides or it can be a CSS style specification for each style, for example: '10 5 3 10'.")]
    public virtual Nullable<bool> Border {get; set;}
    Well, is it bool or int? There is no autocomplete in designer so I believe that it should be set as string just like in the description.
    But there is a incosistency with the server-side definition (bool?) and (!) a lot of exceptios is raised when it is set to "1" in designer [CODE]Border="1"./CODE]
    The exception is catched.
    Cannot create an object of type 'System.Nullable`1[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' from its string representation '1' for the 'Border' property.
    Well... It's bad...
    Last edited by Hlodvig; Nov 15, 2013 at 6:28 AM.
  4. #4
    Well, is it bool or int?
    It is bool? as you see in source code

    There is no autocomplete in designer so I believe that it should be set as string just like in the description.
    No, VS doesn't show autocomplete for nullable types, it is VS issue

    For string representation please use BorderSpec property
  5. #5
    39. Panel .Header has been renamed to .PreventHeader.

    Example

    //Old
    <ext:Panel runat="server" Header="false">

    //New
    <ext:Panel runat="server" PreventHeader="true">
    But I don't see any changes neither in API, nor in code. Header property is still there.
    Last edited by Hlodvig; Nov 15, 2013 at 7:42 AM.
  6. #6
    Quote Originally Posted by Vladimir View Post
    It is bool? as you see in source code
    I see, I guess API docs should be changed in that case?

    Quote Originally Posted by Vladimir View Post
    No, VS doesn't show autocomplete for nullable types, it is VS issue
    Didn't know. Thanks.
  7. #7
    Oops. Found this thread http://forums.ext.net/showthread.php?24647
    I guess I'll continue there.
  8. #8
    Re: AbstractComponent.Border docs

    Thank you for the suggestion. The docs has been changed to:
    Specify false to turn off the border for this component.
    1. Panel's HideLabel was removed. Also I found usage of HideLabels on FormPanel - don't know if there really was such a property. I think that this should be added to p.64
    I redid the #64 item:
    64. All the FieldLabel-related properties - FieldLabel, HideLabel, LabelAlign, LabelPad, LabelSeparator, LabelStyle, LabelWidth, ClearCls -
    are now supposed to be used only with Fields (inheritors of the Field class) or FieldContainers (inheritors of the FieldContainerBase class).

    In v1.x it was possible to set up FieldLabel for a Panel (for example), it is no longer possible in v2.x. If you need it, you should use a separate component like DisplayField for a label.
    As for HideLabels I added the new item:
    182. The HideLabels property has been removed. Now if you don't define a FieldLabel for a field, it just won't appear.
    Or you can use a field's HideLabel property. Also you can set up HideLabel for all the fields inside a container by means of container's Defaults or FormPanel's FieldDefaults.
    Go ahead.

    2. TabPanel (and, probably, all Panels) have lost ClearCls property and I don't know which one can be used instead of it. I guess I just don't need it anymore.
    It is related to the FieldLabel functionality.
    http://docs.sencha.com/extjs/3.4.0/#...t-cfg-clearCls
    http://docs.sencha.com/extjs/4.2.1/#...e-cfg-clearCls

    I added it to the #64 item.

    3. Old TreeNode's AllowChildren no longer exists. I guess, new Node's Leaf property will do the trick.
    I think you are right. I update the #78 item.
    78. TreeNode has been renamed to Node. Leaf nodes requires Leaf="true" to be set up.
    Also the Leaf property should be used instead of removed AllowChildren property.
    4. LabelBase lost it's Field properties like LabelAlign, FieldLabel, etc. Therefor HyperLink and Label lost them also. Should be wrapped into the FieldContainer.
    I added the following phrase for #64:
    Please note that LabelBase (respectively, Label and HyperLink) has lost those properties as well. As a solution you can wrap it in a FieldContainer or try to use a DisplayField instead.
    Also DisplayField can be used instead of Label.
    Could you, please, clarify why?

    5. All XXXClass properties were renamed to XXXCls, I guess. Well, not everywhere and not all, but Slider's DisabledClass was renamed to DisabledCls, i.e.
    I added the following to #70:
    Actually, almost all the properties and methods ending with "Class" where it means a CSS class have been renamed to end with "Cls".

    For example: TriggerClass, FocusClass, FieldClass, OverClass, DisabledClass, HasClass, SelectedClass, GroupClass, ActiveClass, SetIconClass, GetIconClass,
    AddClassOnOver, AddClassOnFocus, AddClassOnClick, InvalidClass, RadioClass, ReplaceClass, EmptyClass, AddRowClass, RemoveRowClass, TdClass.

    BodyCssClass has been renamed to BodyCls.

    SelectedRowClass has been renamed to SelectedItemCls.
    6. FieldSet lost HideLabel property - is it because FieldSet is AbstractContainer now, not the Panel?
    I think it should be addressed by #64 now.

    7. FieldSet lost IsFormField property? Well, it was used in the our code and no errors and warnings were raised. I guess I just can remove it.
    I added #183:

    183. The Component's IsFormField property has been removed. Now a component must be an inheritor of Field (JavaScript Ext.form.field.Field class) to be treated as a field.
    If I need to add Label to it - I just can wrap it into FieldContainer.
    Correct.

    8. NumberField lost RenderToForm property and I don't know what for was this property and what shall I use instead of it.
    I don't see such a property in NumberField in v1.x. It is in MenuBase and it is still there in v2.x.

    9. TextArea lost TextMode(?). Well, don't know why, but this property was used previously...
    I don't see such a property in TextArea in v1.x.

    Re: PreventHeader vs Header

    Thank you for the caught. Briefly, it was actual at some point, but I think we can forget about it now and I will just remove this item the log and just replace it with the #183 above (to do not break numbering).


    Thank you very much for all the suggestions. I am committing the updated file to the trunk and will update it online.
  9. #9
    Quote Originally Posted by Daniil View Post
    Also DisplayField can be used instead of Label.
    Could you, please, clarify why?
    It's related to the case when Label was used as a form field to just show the text to get label aligned with all fields labels and the text aligned to all fields values - it just some text aligned to all fields. DisplayField do just the same. Don't ask me why they didn't do so in first place :-) anyway I use DisplayField now instead of wrapping label into FieldContainer.

    Quote Originally Posted by Daniil View Post
    8. NumberField lost RenderToForm property and I don't know what for was this property and what shall I use instead of it.
    I don't see such a property in NumberField in v1.x. It is in MenuBase and it is still there in v2.x.

    9. TextArea lost TextMode(?). Well, don't know why, but this property was used previously...
    I don't see such a property in TextArea in v1.x.
    Hm, maybe they was there in v1.3? Again, I received the code written 2 years ago by some guys with the usage of Ext.net v1.3. Maybe it just too much was changed or they just mis-used some things...
  10. #10
    Quote Originally Posted by Hlodvig View Post
    Quote Originally Posted by Daniil View Post
    Also DisplayField can be used instead of Label.
    Could you, please, clarify why?
    It's related to the case when Label was used as a form field to just show the text to get label aligned with all fields labels and the text aligned to all fields values - it just some text aligned to all fields. DisplayField do just the same. Don't ask me why they didn't do so in first place :-) anyway I use DisplayField now instead of wrapping label into FieldContainer.
    Oh, I read "DisplayField canNOT be used instead..." and asked you to clarify. Yes, it can be used instead for good.

    Quote Originally Posted by Hlodvig View Post
    Hm, maybe they was there in v1.3? Again, I received the code written 2 years ago by some guys with the usage of Ext.net v1.3. Maybe it just too much was changed or they just mis-used some things...
    I don't see it in v1.3 as well...

Similar Threads

  1. [CLOSED] How to Upgrade from 1.x to 2.x
    By hidaextnet in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 22, 2013, 3:05 PM
  2. Replies: 7
    Last Post: Apr 29, 2013, 7:06 AM
  3. Replies: 5
    Last Post: Jan 12, 2012, 7:55 PM
  4. Upgrade fee to v2
    By Richardt in forum Licensing
    Replies: 1
    Last Post: Jul 15, 2011, 3:37 PM
  5. 2.0 upgrade fee
    By T3rryChan in forum Licensing
    Replies: 1
    Last Post: Jun 29, 2011, 3:40 PM

Posting Permissions