Skip to Content
0
Jul 20, 2016 at 02:53 PM

Immediately change of button properties

36 Views

Hey Guys!

I have a problem...

I want to change a simple text in a Button when i click it, it sound simple, but it is not working so as i want.

I have more than one row and i instantiate for each row my new buttons in the row, the sample Button has a id to identify it.

The problem now is, when i click the button i trigger my function and set the text of this element "this.getView().byId("MYButtonID").setText("Done")".

It should change immediately the text on the button but it does not AND when i route to another page and route back to this page, ALL buttons are changed to "DONE" and not the once i clicked....

Here can you inspect my Code and my results:

That´s my view table with the buttons:

That´s how my buttons looks like in my view:

That´s my controller function at the end you will see my "setText" statement:

And that´s what i get when i run this code and reroute on this view... beacuse it wont set the text immediately

Thanks a lot!

Best regards,

Danilo

Attachments

structure.PNG (23.7 kB)
viewBttn.PNG (62.2 kB)
controllerFnc.PNG (131.5 kB)
result.PNG (9.1 kB)