0 Replies Latest reply on Jun 2, 2011 5:36 AM by 866066

    get String from ListView.ites

    866066
      I have httpDataSource that is flexible setting query depend on date in computer. and then i have listView that take items value in sequence datatype from url httpDataSource to fill my label text in String data type. I converted listView.items to String in function seqToString. Return value of seqToString named result be value of my label. My problem i wanna get value item in string my label in first event clik but i cann't. I can get value my label in second click. Please somebody help me. This is my code event Click

      function btnOkLoginOnMouseClickedAtLogin(event: javafx.scene.input.MouseEvent): Void {
      seqToString();
      }

      And then function convert value of ListView.items to String to get label value in Text :
      function seqToString():String{

      httpdata.url = "{URL}&query=SELECT%20e%20FROM%20News%20e%20where%20e.lastDate<%22{now}%22";

      def tes : ListView = ListView {
      items : bind for(record in httpdata.getDataSource("news").getRecordSet().all()) record.getString("content");
      };

      System.out.println({tes.items.toString()});
      for ( item in tes.items){
      result = "{result}...{item.toString()}";
      }
      return result;
      }

      Please somebody help me. Thank you before and i'm sorry my English is not good enough.