[CLOSED] RTE with new config property

  1. #1

    [CLOSED] RTE with new config property

    I created an IconCombo class that inherits from ComboBox. *It has an extra IconClsField property. *After upgrade to v0.8, I am getting the following server error:

    "Token PropertyName in state Property would result in an invalid JavaScript object."
    
    ** at Newtonsoft.Json.JsonWriter.AutoComplete(JsonToken tokenBeingWritten)
    ** at Newtonsoft.Json.JsonTextWriter.WritePropertyName(String name)
    ** at Coolite.Ext.Web.ClientConfig.WriteValue(String name, Object value) in C:\Program Files\Coolite\SVN\toolkit\Coolite.Ext.Web\Core\ClientConfig.cs:line 503
    ** at Coolite.Ext.Web.ClientConfig.ToExtConfig(PropertyInfo property, Object obj, ClientConfigAttribute attr, Object defaultValue) in C:\Program Files\Coolite\SVN\toolkit\Coolite.Ext.Web\Core\ClientConfig.cs:line 445
    ** at Coolite.Ext.Web.ClientConfig.Process(Object obj) in C:\Program Files\Coolite\SVN\toolkit\Coolite.Ext.Web\Core\ClientConfig.cs:line 169


    The extra property:


    ** * * *<ClientConfig()> _
    ** * * *<Category("Config Options")> _
    ** * * *<DefaultValue("")> _
    ** * * *<Description("The underlying data icon to bind to this ComboBox.")> _
    ** * * *Public Property IconClsField() As String
    ** * * * * *Get
    ** * * * * * * *Return If(DirectCast(Me.ViewState("IconClsField"), String), "icon")
    ** * * * * *End Get
    ** * * * * *Set(ByVal value As String)
    ** * * * * * * *Me.ViewState("IconClsField") = value
    ** * * * * *End Set
    ** * * *End Property

  2. #2

    RE: [CLOSED] RTE with new config property

    *Fixed it. *There was a change in how Items collection was serialized to the client. *Had to make some changes to my IconComboBox class to handle that.
  3. #3

    RE: [CLOSED] RTE with new config property

    Hi Jacky,

    Glad to hear you got it figured out.*


    Please feel free to post details of the solution if you could... or what had changed between the releases.


    Geoffrey McGill
    Founder
  4. #4

    RE: [CLOSED] RTE with new config property

    I am having this exact same issue - is there any chance you could post some information about how you fixed it? this seems to be the only thing on google in relation to it...
  5. #5

    RE: [CLOSED] RTE with new config property



    I overrode the ItemsToStore property as follows:




    Protected Overrides ReadOnly Property ItemsToStore() As String


    Get


    Dim sw = New IO.StringWriter


    Dim jw = New Newtonsoft.Json.JsonTextWriter(sw)


    Dim converter = New IconComboItemCollectionJsonConverter()


    converter.WriteJson(jw, Me.IconItems)


    Return sw.GetStringBuilder().ToString()


    End Get


    End Property
  6. #6

    RE: [CLOSED] RTE with new config property

    Sorry man - dont want to sound a bit spesh - but where does that property live?
  7. #7

    RE: [CLOSED] RTE with new config property

    It's in the base class I believe. Coolite.Ext.Web.ComboBox. You should be able to find it in the source code. Are you trying to create an IconCombo too?
  8. #8

    RE: [CLOSED] RTE with new config property

    Ah no, I'm using newtonsoft, castle and ext but not coolite - unfortunately.


  9. #9

    RE: [CLOSED] RTE with new config property

    Oh...my issue was specific to Coolite. Not sure if this applies to your issue.
  10. #10

    RE: [CLOSED] RTE with new config property

    I think it has to do with the custom converter - i'll have a look at that...

Similar Threads

  1. [CLOSED] About Web.config
    By showingg in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 14, 2012, 7:22 AM
  2. Replies: 3
    Last Post: Dec 15, 2011, 12:18 PM
  3. Replies: 2
    Last Post: Dec 15, 2011, 11:58 AM
  4. [CLOSED] how to set panel html property as javascript property
    By kenanhancer in forum 1.x Legacy Premium Help
    Replies: 10
    Last Post: Jan 05, 2011, 6:45 PM
  5. change textfield config property
    By [WP]joju in forum 1.x Help
    Replies: 2
    Last Post: Dec 01, 2009, 12:28 AM

Posting Permissions