Results 1 to 7 of 7

Thread: Editbox text filled in manually and by property

  1. #1
    Senior Member
    Join Date
    Feb 2012
    Location
    Germany, near Jena and Weimar
    Posts
    213

    Editbox text filled in manually and by property

    Development view (and Web view):

    I have an Editbox in a Canvas Section and I type in it "Bla bla bla" .
    Then I click "Save Changes" button. So my text is saved into the table field (varchar) which is connected with the Editbox.

    But if a have a button (maybe field1) with a click event function containing
    lianja.get("page1.section1.field1").text="Bla bla bla";
    then the text will be inserted (I see it!) into the Editbox but it will not be saved when I click "save" and the former text of the editbox appears.

    What could be wrong?
    asks Georg

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,719
    Blog Entries
    17
    Hi Georg

    you need to update the cursor that the editbox is bound to.

    Changing the text programatically will not do that.
    Last edited by barrymavin; 2022-01-11 at 22:40.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  3. #3
    Senior Member
    Join Date
    Feb 2012
    Location
    Germany, near Jena and Weimar
    Posts
    213
    Quote Originally Posted by barrymavin View Post
    you need to update the cursor that the editbox is bound to.
    Thank you Barry,
    but sorry, I don't know what to do.

    With other fields (f.e. normal textboxes), the problem doesn't not exist
    and I didn't observe it in my earlier apps (and Lianja versions)

    Georg

  4. #4
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,719
    Blog Entries
    17
    Hi Georg,

    Thats all working for me.

    Name:  Screen Shot 2022-01-12 at 12.03.08 PM.jpg
Views: 42
Size:  45.8 KB

    I did "Click" the "Edit" first, assign the new text, then click "Save".

    Thats a canvas section with an Editbox.

    I did not need to update the the cursor as it was done for me.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  5. #5
    Senior Member
    Join Date
    Feb 2012
    Location
    Germany, near Jena and Weimar
    Posts
    213
    Hi Barry,

    sorry it doesn't work.

    With another little app ("gotteslob"), there is the same problem.
    I appended a package file.
    There is a button "write by program" with should write a little text into the editbox.
    It works but you cannot save it.

    Thank you
    Georg
    Attached Files Attached Files

  6. #6
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,719
    Blog Entries
    17
    Hi Georg,

    Thats working for me in the web.

    Are you referring to in a desktop app?

    Click image for larger version. 

Name:	Screen Shot 2022-01-13 at 1.41.44 PM.jpg 
Views:	39 
Size:	42.2 KB 
ID:	2729

    To work in desktop and web you need to do this in your click delegate:

    Code:
    function page1_section2_field1_click()
    {
    	 Lianja.get("page1.section2.field11").text = "Hallo Georg";
    	 Lianja.getCursor("INHALT_GOTTESLOB").setData("DATEIEN", "Hallo Georg");
    };
    I have fixed this in Lianja 6.4.
    Last edited by barrymavin; 2022-01-13 at 00:52.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  7. #7
    Senior Member
    Join Date
    Feb 2012
    Location
    Germany, near Jena and Weimar
    Posts
    213
    Quote Originally Posted by barrymavin View Post
    Hi Georg,

    Thats working for me in the web.

    Are you referring to in a desktop app?

    Click image for larger version. 

Name:	Screen Shot 2022-01-13 at 1.41.44 PM.jpg 
Views:	39 
Size:	42.2 KB 
ID:	2729

    To work in desktop and web you need to do this in your click delegate:

    Code:
    function page1_section2_field1_click()
    {
    	 Lianja.get("page1.section2.field11").text = "Hallo Georg";
    	 Lianja.getCursor("INHALT_GOTTESLOB").setData("DATEIEN", "Hallo Georg");
    };
    I have fixed this in Lianja 6.4.
    Hallo Barry,

    thank you for the temp. solution. It works for me in desktop and web app.

    Georg

Tags for this Thread

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us