I'm not sure where I have to set the index for a web app rsp. for a section?
Could I change the index (order) in a canvas section interactively (f.e. by a click event...) ?
Is there an example?
Thanks!
Georg
I'm not sure where I have to set the index for a web app rsp. for a section?
Could I change the index (order) in a canvas section interactively (f.e. by a click event...) ?
Is there an example?
Thanks!
Georg
Hi Geog,
You can change the orderby attribute dynamically on a section if required.
https://www.lianja.com/doc/index.php...ion_Attributes
After changing it you will need navigate to the first record then refresh the section.
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
2 additional questions:
- Where should I write the start order? In page_ready()?
- My canvas (web) app has several tabs of the same data record.
Have I to write the ORDERBY for every tab?
Thanks!
Georg
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
Hi Georg,
it’s a section attribute. That doc link I sent you shows you how to set it dynamically.
What is it you are wanting to search for in code? There’s a lot of attributes that are set declaratively that are not needed changed dynamically.
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
it’s a section attribute. That doc link I sent you shows you how to set it dynamically.
What is it you are wanting to search for in code? There’s a lot of attributes that are set declaratively that are not needed changed dynamically.
---
That is certainly correct!
However, some of the documentation doesn't work for me (or I misunderstand it).
So sometimes I'd like to know how my problems are solved in any of your examples.
An example:
I want to change the caption of a button(page1.section1.field1). So I think I would have to use the Caption attribute to do this.
An example from the documentation for programmatically changing an attribute seems to be "Caption":
1. In the attributes of the "Caption" form item, I first enter "Yesterday" manually, for example, which is also displayed on the button.
2. I'm trying to change this label with with
Lianja.get("page1.section1.field1").setAttribute(" caption","Today");
Unfortunately, this does not change the inscription on the button.
Also, "Yesterday" is still displayed in the list of attributes.
3. I ask for the caption attribute with
var cButton = Lianja.get("page1.section1.field1").getAttribute(" caption");
messageBox(cButton);
And to my amazement, messageBox returns "Today", although "Yesterday"
is still displayed in the attributes list.
So that would be one of the reasons reasons to search in the examples!
In the meantime, I found out by "trial and error" that the following does work:
page1.section1.field1.text = "Today";
und
var cButton = page1.section1.field1.text;
messageBox(cButton);
Georg
Hi Georg,
I'm sorry to hear that you are having a problem understanding the basics of a "formitem" in a canvas section so although this is all covered extensively in the online documentation let me summarize this for you so you don't waste time in the future.
----
An App consists of pages. Pages are made up of Sections. Form and Canvas sections are made up of FormItems. We call these collectively "UI Elements" or "Visual Elements".
Attributes are available at formitem (Field, Gadget, Canvas Section Advanced Control) or Section level to configure the appearance of formitems.
These attributes may apply to the formitem's Caption or its Data.
When you add a formitem to a canvas section or a form section you are adding a caption and its related data.
This article explains how to reference and interact with formitems.
https://www.lianja.com/doc/index.php...a_Object_Model
So, to change the caption in code rather than declaratively you would do this:
Code:Lianja.get("page1.section1.field1").caption = "hello world"
To change the data you would do this:
Code:Lianja.get("page1.section1.field1").text = "new text"
However, some UI elements have no caption, they only have data. CommandButton is one of those UI elements. So to change the text for a CommandButton you need to reference the data of the formitem.
I hope that clarifies things to you.
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
Hi Barry,
thank you! All you wrote was clear to me exept
>> Some UI elements have no caption, they only have data. *CommandButton* is one of those UI elements <<
Georg
P.S. My intention of my post #7 was to show that the following seems not logical to me:
If I fill in "caption" in the listing of attributes this text appears onto the button instead "caption" were missing or not usable. Not so by ....caption = "new text";
Last edited by gcjm; 2022-01-18 at 22:51.
Bookmarks