Results 1 to 7 of 7

Thread: How is it made: Page styling example

  1. #1
    Junior Member
    Join Date
    Jun 2012
    Posts
    7

    How is it made: Page styling example

    I want to create something like the Page styling example but I can't figure it out how it works. I want to have a vertical grid for products. If the user clicks on the item the form on the right side will change and show the information.

    The right side I can figure out, but I can't recall how the left side is build. I even can't change something in it.

    Can somebody please explain how this is build.

    Erwin de Rooy

  2. #2
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,840
    Hi Erwin,

    The 'Page Styling App' (example_pagestyling) has a Navigation Panel (the left hand side) based on a SQL Select statement.

    If you look in the Page Attributes, you can see how it and the Selection delegate are defined. This can also be seen in the 'NavPanel App' (example_navpanel).

    For alternative App navigation methods, this may also be of interest: Understanding Lianja UI Navigation.

    Name:  example_pagestyling.jpg
Views: 688
Size:  115.6 KB

    Regards,

    Yvonne

  3. #3
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,840
    If you make changes to an App and then want to go back to an earlier version or the original, use the Versions workspace to access and restore previous files. You will find the App definition (the .lianja file) and any script files (.prg, .js etc.) you have altered and saved listed by date. Double-click a file name to view it in the Editor and click the 'Restore from backup' button to restore it.

    Name:  versions.jpg
Views: 606
Size:  94.2 KB

    Regards,

    Yvonne

  4. #4
    Junior Member
    Join Date
    Jun 2012
    Posts
    7
    Thanks for your quick reply. I must say I'm just a beginner. I've tried to make something like that with the demo "Example dynamic Grid cell colors". I've added a menu on the left side. I just wanted to fill this navigation with order ID's, so I made the query, but the navigation doesn't fill with the data from the database. Am I missing something?

    Name:  voorbeeldmenu.jpg
Views: 246
Size:  81.3 KB

  5. #5
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,840
    Hi Erwin,

    Make sure you use the actual column name from the table (not the caption/description) in the SQL Select statement. This needs to be:

    Code:
    select orderid from orders
    and also in the 'Item sync expression':

    Code:
    orders.orderid
    Regards,

    Yvonne

  6. #6
    Junior Member
    Join Date
    Jun 2012
    Posts
    7
    I've noticed it. I first tried that but the data didn't showup. I've changed it again, closed program, startup again, and now it's showing the data. When I use the refresh button it doesn't show any changes I make. Maybe I've got some cache problems?

    Now I want to change the data on the right side of the form when I double click in the navigation. How can I manage this? When I work horizontaly I can link these fields to each other. How can I do this with the navigation?
    Name:  voorbeeldmenu1.jpg
Views: 251
Size:  73.7 KB

  7. #7
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,840
    Hi Erwin,

    If you look back at the Page Attributes in the example_pagestyling App, you will see the Selection delegate. This determines what happens when you click (or double-click if you have Double click to select set to True) in the Navigation Panel.

    Name:  SelectionDelegate.jpg
Views: 524
Size:  118.8 KB

    Here, it is set to:

    Code:
    $("section:section1?action=search&text={}")
    This is an 'inline delegate' to select section1 and search for the value you have selected in the Navigation Panel, passed as {}. To perform the search, the section1 section must have a Search field set that matches the value you are going to pass. Here it is the customers.companyname field and the field has its Search field attribute set to True.

    Name:  SearchField.jpg
Views: 615
Size:  115.4 KB

    Regards,

    Yvonne

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