Announcement

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

    RTL + Mobile mode + ListGrid + DataSource + Portrait cause empty grid on some smartphones like iphone

    We have a listgrid using Datasource in RTL mode in portrait, it results an empty grid on some smartphones like iphone :

    (this from my mobile iphone 6)
    Click image for larger version

Name:	lg.jpeg
Views:	159
Size:	54.0 KB
ID:	263571
    it did not work on Chrome for Iphones :

    Click image for larger version

Name:	lg.png
Views:	106
Size:	136.1 KB
ID:	263573


    it worked fine on Opera

    Click image for larger version

Name:	lg.png
Views:	102
Size:	178.9 KB
ID:	263572

    #2
    1. Let us know what product, version and skin you are using

    2. Make sure you are using the latest patched build (see Smartclient.com/builds) and tell us so

    3. Show how the problem can be reproduced, by providing a minimal, ready-to-run test case demonstrating the issue

    Please note that the above are always required when posting an issue of this kind, so make sure you include them in future posts.

    Comment


      #3
      Okay understood,
      1- we tested it on latest 12.1p dated 2020-09-09 and latest 13.0 dated 2020-09-10 give us the same problem.
      2- we are using our own skin, but we tested it on Enterprise skin too and the same problem
      2- if you open the following link on chrome for iphones mobile mode or directly from real iphone device:
      https://www.algo-erp.com/AlgoERP/?da...3688&locale=ar

      you will noticed that the grid is empty but if open it on desktop mode you will see the data or you can test it in LTR mode and it will work in all modes
      https://www.algo-erp.com/AlgoERP/?da...3688&locale=en

      Hopefully we gave you an enough information

      N.B : we are studding you Quote for five developers and we are very grateful for you help
      Last edited by albashahmad; 15 Sep 2020, 23:43.

      Comment


        #4
        So again, what we need is a minimal, ready-to-run test case demonstrating the issue. Pointing to your live app is not a minimal test case; there are many mistakes and customizations you might be making which might create a problem, so we do not analyze live applications unless you purchase consulting hours.

        Comment


          #5
          (the html rtl direction)

          After i tried to prepare use case i discovered that the setShowRecordComponents is the cause as the following :

          1- In the following test case the scoll not working:

          public class TestRTLGrid implements EntryPoint {
          public static String ATTR_NAME = "emp_name";
          public static String ATTR_SUR = "emp_surname";
          public static String ATTR_REMARK = "emp_remark";
          public void onModuleLoad() {
          ListGrid empGrid = new ListGrid();
          ListGridField empnameField = new ListGridField(EmployeeDS.ATTR_NAME, testRTLGridMessage.LANG.name(), 300);
          empnameField.setCellFormatter(new CellFormatter() {

          @Override
          public String format(Object value, ListGridRecord record, int rowNum, int colNum) {
          // TODO Auto-generated method stub
          return "<font color='blue'>" + value.toString() + "</font>";
          }
          });
          ListGridField surnameField = new ListGridField(EmployeeDS.ATTR_SUR, "SurName", 200);
          ListGridField remarksField = new ListGridField(EmployeeDS.ATTR_REMARK, "Remarks", 1000);
          ListGridField remarksField1 = new ListGridField(EmployeeDS.ATTR_REMARK + "1", "Remarks 1", 100);
          ListGridField remarksField2 = new ListGridField(EmployeeDS.ATTR_REMARK + "2", "Remarks 2", 100);
          ListGridField remarksField3 = new ListGridField(EmployeeDS.ATTR_REMARK + "3", "Remarks 3", 100);
          ListGridField remarksField4 = new ListGridField(EmployeeDS.ATTR_REMARK + "4", "Remarks 4", 100);
          Label lbl = new Label();
          ListGridRecord[] list = new ListGridRecord[3];
          ListGridRecord r1 = new ListGridRecord();
          r1.setAttribute(ATTR_NAME, testRTLGridMessage.LANG.name());
          r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
          r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
          list[0] = r1;
          r1 = new ListGridRecord();
          r1.setAttribute(ATTR_NAME, testRTLGridMessage.LANG.name());
          r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
          r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
          list[1] = r1;

          r1 = new ListGridRecord();
          r1.setAttribute(ATTR_NAME, testRTLGridMessage.LANG.name());
          r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
          r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
          list[2] = r1;

          empGrid.setFields(empnameField, surnameField, remarksField, remarksField1, remarksField2, remarksField3, remarksField4);
          empGrid.fetchData();
          empGrid.setHeight100();
          empGrid.setWidth100();
          empGrid.setShowRecordComponents(true);
          empGrid.setRecords(list);
          empGrid.draw();
          }

          }


          2- In the following test case the records disappeared :

          public class TestRTLGrid implements EntryPoint {
          public static String ATTR_NAME = "emp_name";
          public static String ATTR_SUR = "emp_surname";
          public static String ATTR_REMARK = "emp_remark";
          public void onModuleLoad() {
          ListGrid empGrid = new ListGrid();
          ListGridField empnameField = new ListGridField(EmployeeDS.ATTR_NAME, testRTLGridMessage.LANG.name(), 300);
          empnameField.setCellFormatter(new CellFormatter() {

          @Override
          public String format(Object value, ListGridRecord record, int rowNum, int colNum) {
          // TODO Auto-generated method stub
          return "<font color='blue'>" + value.toString() + "</font>";
          }
          });
          ListGridField surnameField = new ListGridField(EmployeeDS.ATTR_SUR, "SurName", 200);
          ListGridField remarksField = new ListGridField(EmployeeDS.ATTR_REMARK, "Remarks", 1000);
          ListGridField remarksField1 = new ListGridField(EmployeeDS.ATTR_REMARK + "1", "Remarks 1", 1000);
          ListGridField remarksField2 = new ListGridField(EmployeeDS.ATTR_REMARK + "2", "Remarks 2", 1000);
          ListGridField remarksField3 = new ListGridField(EmployeeDS.ATTR_REMARK + "3", "Remarks 3", 1000);
          ListGridField remarksField4 = new ListGridField(EmployeeDS.ATTR_REMARK + "4", "Remarks 4", 1000);
          Label lbl = new Label();
          ListGridRecord[] list = new ListGridRecord[3];
          ListGridRecord r1 = new ListGridRecord();
          r1.setAttribute(ATTR_NAME, testRTLGridMessage.LANG.name());
          r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
          r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
          list[0] = r1;
          r1 = new ListGridRecord();
          r1.setAttribute(ATTR_NAME, testRTLGridMessage.LANG.name());
          r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
          r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
          list[1] = r1;

          r1 = new ListGridRecord();
          r1.setAttribute(ATTR_NAME, testRTLGridMessage.LANG.name());
          r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
          r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
          list[2] = r1;

          empGrid.setFields(empnameField, surnameField, remarksField, remarksField1, remarksField2, remarksField3, remarksField4);
          empGrid.fetchData();
          empGrid.setHeight100();
          empGrid.setWidth100();
          empGrid.setShowRecordComponents(true);
          empGrid.setRecords(list);
          empGrid.draw();
          }

          }


          Comment


            #6
            Did you read the docs for showRecordComponents? It doesn’t make sense to turn this feature on unless you have also provided a way to create recordComponents. Please revisit the docs, this test case is not valid for reasons already explained there.

            Comment


              #7
              (the html rtl direction)

              The same problem after override createRecordComponent .

              After i tried to prepare use case i discovered that the setShowRecordComponents is the cause as the following :

              1- In the following test case the scoll not working:

              public class TestRTLGrid implements EntryPoint {
              public static String ATTR_NAME = "emp_name";
              public static String ATTR_SUR = "emp_surname";
              public static String ATTR_REMARK = "emp_remark";
              public void onModuleLoad() {
              ListGrid empGrid = new ListGrid() {
              @Override
              protected Canvas createRecordComponent(final ListGridRecord record, Integer colNum) {

              String fieldName = this.getFieldName(colNum);
              if (fieldName.toLowerCase().equals(EmployeeDS.ATTR_NAME)) {

              IButton button = new IButton();
              button.setHeight(18);
              button.setWidth(24);
              button.setIconSpacing(0);
              button.setIcon("[skin]/images/loading.gif");
              button.setTitle(" ");
              return button;
              }
              else
              {
              return null;
              }
              }

              };
              ListGridField empnameField = new ListGridField(EmployeeDS.ATTR_NAME, testRTLGridMessage.LANG.name(), 300);
              empnameField.setCellFormatter(new CellFormatter() {

              @Override
              public String format(Object value, ListGridRecord record, int rowNum, int colNum) {
              // TODO Auto-generated method stub
              return "<font color='blue'>" + value.toString() + "</font>";
              }
              });
              ListGridField surnameField = new ListGridField(EmployeeDS.ATTR_SUR, "SurName", 200);
              ListGridField remarksField = new ListGridField(EmployeeDS.ATTR_REMARK, "Remarks", 1000);
              ListGridField remarksField1 = new ListGridField(EmployeeDS.ATTR_REMARK + "1", "Remarks 1", 100);
              ListGridField remarksField2 = new ListGridField(EmployeeDS.ATTR_REMARK + "2", "Remarks 2", 100);
              ListGridField remarksField3 = new ListGridField(EmployeeDS.ATTR_REMARK + "3", "Remarks 3", 100);
              ListGridField remarksField4 = new ListGridField(EmployeeDS.ATTR_REMARK + "4", "Remarks 4", 100);
              Label lbl = new Label();
              ListGridRecord[] list = new ListGridRecord[3];
              ListGridRecord r1 = new ListGridRecord();
              r1.setAttribute(ATTR_NAME, testRTLGridMessage.LANG.name());
              r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
              r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
              list[0] = r1;
              r1 = new ListGridRecord();
              r1.setAttribute(ATTR_NAME, testRTLGridMessage.LANG.name());
              r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
              r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
              list[1] = r1;

              r1 = new ListGridRecord();
              r1.setAttribute(ATTR_NAME, testRTLGridMessage.LANG.name());
              r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
              r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
              list[2] = r1;

              empGrid.setFields(empnameField, surnameField, remarksField, remarksField1, remarksField2, remarksField3, remarksField4);
              empGrid.fetchData();
              empGrid.setHeight100();
              empGrid.setWidth100();
              empGrid.setShowRecordComponents(true);
              empGrid.setRecords(list);
              empGrid.draw();
              }

              }


              2- In the following test case the records disappeared :

              public class TestRTLGrid implements EntryPoint {
              public static String ATTR_NAME = "emp_name";
              public static String ATTR_SUR = "emp_surname";
              public static String ATTR_REMARK = "emp_remark";
              public void onModuleLoad() {
              ListGrid empGrid = new ListGrid() {
              @Override
              protected Canvas createRecordComponent(final ListGridRecord record, Integer colNum) {

              String fieldName = this.getFieldName(colNum);
              if (fieldName.toLowerCase().equals(EmployeeDS.ATTR_NAME)) {

              IButton button = new IButton();
              button.setHeight(18);
              button.setWidth(24);
              button.setIconSpacing(0);
              button.setIcon("[skin]/images/loading.gif");
              button.setTitle(" ");
              return button;
              }
              else
              {
              return null;
              }
              }

              };
              ListGridField empnameField = new ListGridField(EmployeeDS.ATTR_NAME, testRTLGridMessage.LANG.name(), 300);
              empnameField.setCellFormatter(new CellFormatter() {

              @Override
              public String format(Object value, ListGridRecord record, int rowNum, int colNum) {
              // TODO Auto-generated method stub
              return "<font color='blue'>" + value.toString() + "</font>";
              }
              });
              ListGridField surnameField = new ListGridField(EmployeeDS.ATTR_SUR, "SurName", 200);
              ListGridField remarksField = new ListGridField(EmployeeDS.ATTR_REMARK, "Remarks", 1000);
              ListGridField remarksField1 = new ListGridField(EmployeeDS.ATTR_REMARK + "1", "Remarks 1", 1000);
              ListGridField remarksField2 = new ListGridField(EmployeeDS.ATTR_REMARK + "2", "Remarks 2", 1000);
              ListGridField remarksField3 = new ListGridField(EmployeeDS.ATTR_REMARK + "3", "Remarks 3", 1000);
              ListGridField remarksField4 = new ListGridField(EmployeeDS.ATTR_REMARK + "4", "Remarks 4", 1000);
              Label lbl = new Label();
              ListGridRecord[] list = new ListGridRecord[3];
              ListGridRecord r1 = new ListGridRecord();
              r1.setAttribute(ATTR_NAME, testRTLGridMessage.LANG.name());
              r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
              r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
              list[0] = r1;
              r1 = new ListGridRecord();
              r1.setAttribute(ATTR_NAME, testRTLGridMessage.LANG.name());
              r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
              r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
              list[1] = r1;

              r1 = new ListGridRecord();
              r1.setAttribute(ATTR_NAME, testRTLGridMessage.LANG.name());
              r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
              r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
              list[2] = r1;

              empGrid.setFields(empnameField, surnameField, remarksField, remarksField1, remarksField2, remarksField3, remarksField4);
              empGrid.fetchData();
              empGrid.setHeight100();
              empGrid.setWidth100();
              empGrid.setShowRecordComponents(true);
              empGrid.setRecords(list);
              empGrid.draw();
              }

              }

              3- in this test case the data appeared and scroll for data works but title not scrolled with data :
              public class TestRTLGrid implements EntryPoint {
              public static String ATTR_NAME = "emp_name";
              public static String ATTR_SUR = "emp_surname";
              public static String ATTR_REMARK = "emp_remark";
              private String activeimageicone = "core/16/checked.png";
              private String uncheckedimageicone = "core/16/unchecked.png";
              private String inactiveimageicone = "core/16/inactive.png";
              private String expandimageicone = "core/16/expand.png";

              public void onModuleLoad() {
              ListGrid empGrid = new ListGrid() ;
              ListGridField empnameField = new ListGridField(EmployeeDS.ATTR_NAME, testRTLGridMessage.LANG.name(), 300);
              empnameField.setCellFormatter(new CellFormatter() {

              @Override
              public String format(Object value, ListGridRecord record, int rowNum, int colNum) {
              // TODO Auto-generated method stub
              return "<font color='blue'>" + value.toString() + "</font>";
              }
              });
              ListGridField surnameField = new ListGridField(EmployeeDS.ATTR_SUR, "SurName", 100);
              ListGridField remarksField = new ListGridField(EmployeeDS.ATTR_REMARK, "Remarks", 1000);
              ListGridField remarksField1 = new ListGridField(EmployeeDS.ATTR_REMARK + "1", "Remarks 1", 1000);
              ListGridField remarksField2 = new ListGridField(EmployeeDS.ATTR_REMARK + "2", "Remarks 2", 1000);
              ListGridField remarksField3 = new ListGridField(EmployeeDS.ATTR_REMARK + "3", "Remarks 3", 100);
              ListGridField remarksField4 = new ListGridField(EmployeeDS.ATTR_REMARK + "4", "Remarks 4", 100);
              Label lbl = new Label();
              ListGridRecord[] list = new ListGridRecord[3];
              ListGridRecord r1 = new ListGridRecord();
              r1.setAttribute(ATTR_NAME, testRTLGridMessage.LANG.name());
              r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
              r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
              list[0] = r1;
              r1 = new ListGridRecord();
              r1.setAttribute(ATTR_NAME, testRTLGridMessage.LANG.name());
              r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
              r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
              list[1] = r1;

              r1 = new ListGridRecord();
              r1.setAttribute(ATTR_NAME, testRTLGridMessage.LANG.name());
              r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
              r1.setAttribute(ATTR_SUR, testRTLGridMessage.LANG.name());
              list[2] = r1;

              empGrid.setFields(empnameField, surnameField, remarksField);
              empGrid.fetchData();
              empGrid.setHeight100();
              empGrid.setWidth100();
              //empGrid.setShowRecordComponents(true);
              empGrid.setRecords(list);
              empGrid.draw();
              }

              }



              Comment


                #8
                We can't figure out what you're trying to do and all of your test cases are nonsensical.

                Two test cases (#3 in your most recent post, and a prior one) are nonsense because you've enabled recordComponents, but there is no implementation of showRecordComponents.

                Other test cases (#1, #2) are nonsense because you are both calling setRecords() and calling fetchData() - do only one or the other, these do not make sense together.

                Finally, you're making things even worse because you are not remembering to use CODE tags (with hard brackets), which makes your code really difficult to read (all formatting is lost).

                We still can't figure out if you actually want to use recordComponents or if you just randomly turned it on and don't know what it does..

                Last chance: please thoroughly read the documentation for showRecordComponents. If it's not something you need, then don't enable it. If you need it, then explain, in your next post, exactly what you expect it to do. Remember the CODE tags, and post a single, complete, test case demonstrating a framework issue.

                If you can't do this, then please don't expect further responses from us unless and until you purchase consulting time by the hour. Sorry, but we can't keep spending time on you when you are not a customer and your test cases don't make sense.


                Comment


                  #9
                  I am sorry for disturbing i will do my best before posting again, and before i send any new post i will be your customer first :

                  Please give me a Quote for Basic support plan and Enterprise support plan and i have already a Quote for 5 Pro Developers, so we will study the three Quotes and decide quickly which better for us and make the payment.
                  Last edited by albashahmad; 20 Sep 2020, 01:48.

                  Comment

                  Working...
                  X