Results 1 to 6 of 6

Thread: Standard form section

  1. #1
    Senior Member
    Join Date
    Jan 2014
    Posts
    351

    Standard form section

    Hi Lianja developers

    I have 20+ pages that will have a common read only form section followed by a grid section that is unique to that page. May I know if there is a better way to build the standard form section for each of 20+ pages so that it is easily maintainable when I need to change the form section, it is only need to be changed in one place instead in all the 20+ pages?

    Your advice is much appreciated

    Thanks & Best Regards

  2. #2
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    1,969
    Hi TH,

    If you make it a canvas section you can save it as a visual component and use that on all 20+ pages. The directions for how to do that are in the release notes (below). You can use Anchors to get adjustments in response to screen widith.

    ******** from Release Notes

    Productivity improvement: Now supports visual components. You design these in the canvas designer and then save as a visual component which can be used as a custom gadget, embedded in a cell of a grid or embedded in a cell of a formgrid section.
    - Visual components are saved into the lib:/components/component_library/component_name directory as JavaScript code so that they can be used in Desktop, Web and Mobile Apps..
    - When you save a canvas section as a visual component the JavaScript code is automatically generated.
    - The name of the component is specified in the canvas section "VisualComponent Details" attributes.
    - You should not edit this code as it will be generated automatically every time you save changes.
    - You can reference components using the notation component:/component_lib.component_name.
    - It is best practice to make your component libraries unique to your organization e.g. com_yourcompany. This will allow them to be used by other developers without causing any name clashes.
    - When generating Web and Mobile Apps visual components are included in the index.html file so there is no need to deploy them specifically.
    - Visual components can also be used in custom section and custom gadget code. You simply call the constructor function in JavaScript like this:

    mycomponent = yourcomponentlib_componentname();

    ***********

    Your other alternative is to write custom code to create a form section. There's an example of this in example_smartgrid on the rightmost cell of the grid in readonly mode. If you put the code in your app's main library file, it can be used everywhere.

    Tip: most or all of the code you need will be generated if you save a form section as a component. You will see the similarity to what is in the code in example_smartgrid. That way, you can change the section you use as the source of the component, grab the code you need out of there, substitute that in your main library file, and all 20+ form sections will change.

    Hank
    Last edited by HankFay; 2019-12-25 at 21:17.

  3. #3
    Senior Member
    Join Date
    Jan 2014
    Posts
    351
    Hi Hank

    Thanks for the great productivity tip!!

    BTW, wishing all a very Happy and blessed New Year!!!

    Thanks & Best Regards

  4. #4
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,808
    There something coming which will enable this functionality but I don't want to advertise this yet as its not yet ready.
    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
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    1,969
    HI TH,

    Thanks for the kind wishes. Likewise (and again in 30 days, also).

    Hank

  6. #6
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    1,969
    Hi Barry,

    That's great!

    Hank

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