Skip to Content
avatar image
Former Member

Textfield Value State problem

Hi All,

I am using TextFields as cells of Table . I am setting ValueState properties of Texfields with sap.ui.core.ValueState.Error as dynamically .

My problem is  If I resize the browser window , valuStates of Textfields are being None automatically .

If do you have any solution please let me know .


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Nov 02, 2015 at 11:16 AM

    Hi Onur,

    Did you use formatter to set the value state dynamic for text field? Then there should not be any problem, even if you resize the browser window.

    Check this sample for testing: JS Bin - Collaborative JavaScript Debugging


    Sai Vellanki.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Sai Vellanki

      Hi Sai ,

      Yeah I got the idea , your solution is working very well 😊

      I just added some flag columns in my model   for each Textfields which I need to set Valuestates .

      After I have  set this flags value on change event for this TextFields.

      Finally checked value of flags onAfterRendering function like below code .

        onAfterRendering : function(){
        var oModel = this.getModel();
        var tabledata = oModel.getData();
        var oRows = this.getRows();
        for(var i=0 ; i< tabledata.length ; i++)
           if(tabledata[i].errmatnr == "X")
           if(tabledata[i].errnetwr == "X")
           if(tabledata[i].errmeins == "X")
           if(tabledata[i].errwaers == "X")

      Thanks a lot for your interest  😊

      Best regards .

      resim.PNG (10.4 kB)