Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Warning message causing browser to hang

    I have SmartClient v11.0p_2016-04-12/EVAL Deployment.

    Hi, I'm probably doing somwthing wrong. I have a DynamicForm with items like this:

    {
    ID: "a4",
    title: " ",
    titleColSpan: 10,
    colSpan: 40,
    width: 640,
    visibleWhen : {
    _constructor : "AdvancedCriteria",
    operator : "and",
    criteria : [{
    fieldName : "g0046",
    operator : "equals",
    value : true
    }]
    },
    type: 'text',
    editorType: 'StaticTextItem',
    shouldSaveValue: false,
    defaultValue: '<span class="section_header" style="text-align:center;">DATI LEGATI AGLI INCASSI</span>',
    showTitle: true,
    canEdit: false,
    startRow:true
    }

    I get thousands of messages like this in the console and the application hangs:

    *17:15:44.921:TMR8:WARN:DynamicForm:anagraficheDetail:AutoTest.getElement(): identifier:item[title=%20||value=%3Cspan%20class%3D%22section_header%22%20style%3D%22text-align%3Acenter%3B%22%3EDATI%20DI%20ALTRA%20NATURA%3C%24fs%24span%3E||index=158||Class=StaticTextItem] returned an item of class:TextItem

    I don't understand the meaning of this warning. Seems like the system expects a class but finds another.
    Can someone suggest what I'm doing wrong?

    Thank you.

    #2
    Hi,

    I assume that StaticTextItem is no valid editor type, but I can be wrong.
    Does this happen as well with SelecItem or TextItem instead of StaticTextItem? What is the business case you want to solve?

    Best regards
    Blama

    Comment


      #3
      Originally posted by Blama View Post
      I assume that StaticTextItem is no valid editor type, but I can be wrong.
      neither do I know if it's this the problem, but the formItem is already canEdit:false, so he may simply set readOnlyDisplay:"static"

      Comment


        #4
        StaticTextItem is a documented FormItem type in the doc. I've already set readOnlyDisplay: "static" at the form level. This problem happens in a single, albeit quite large, form.
        Other item types work flawlessly.

        Comment


          #5
          When you use editorType:"StaticTextItem" (which is valid) you indeed get a StaticTextItem - you can check this by defining a simple form and using getItem() to see the item.

          Since you seem to be getting a TextItem instead, there must be more code involved than you've shown - some other settings (we're not sure what) are causing the form to use a TextItem, or, your locator is actually looking at some other form in the page that isn't defined like this one.

          Comment


            #6
            Another strange thing is that, independently of user interaction, even if the user is not doing anything, the system continues to produce hundreds of these warning messages per second. It seems in a loop.
            I've tested with that form only so I'm sure there is no aliasing of items in other forms. The only thing is I have many of these items in the same form. It also seems that some of the visibleWhen rules are ignored or not applied correctly as I wrote in a previous post.
            I can provide the full code of the form and the datasource definition if it can be helpful.

            Comment


              #7
              Originally posted by lveronese View Post
              I can provide the full code of the form and the datasource definition if it can be helpful.
              Definitely. A runnable test case (as outlined when you create a new topic) would be ideal.

              Comment

              Working...
              X