Get a Jumpstart with our Sample Apps
Results 1 to 11 of 11

Thread: Adding Navigation Children from SQL

  1. #1
    Member
    Real Name
    Lee Millard
    Join Date
    Jun 2017
    Location
    United Kingdom
    Posts
    15

    Default Adding Navigation Children from SQL

    Hi Guys,

    I am trying to work out how to populate a menu/navigation system from sql.

    Basically adding children/nodes from a sql table ?

    Do I have to do it in Code ?


    Thanks

    Lee

  2. #2
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    6,194

    Default Re: Adding Navigation Children from SQL

    Hey Lee,

    There are a few ways to get a menu/navigation system going in Alpha. There's a Button Menu action, a List Control Menu, a Tree Control.

    Are you working toward a web page? A Mobile App? Context is important here.

  3. #3
    Member
    Real Name
    Lee Millard
    Join Date
    Jun 2017
    Location
    United Kingdom
    Posts
    15

    Default Re: Adding Navigation Children from SQL

    Hi David,

    Its a basic intranet website to learn alpha, usually I would use php/sql.

    In Alpha I am using the built in navigation component, should I be using something else ?

    Creating a horizontal type menu with custom css looking like tabs



    Thanks

    Lee
    Last edited by leemillard; 06-23-2017 at 04:31 AM. Reason: add info

  4. #4
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,260

    Default Re: Adding Navigation Children from SQL

    alpha provided navigation system is not the greatest, that is their weak point and least attended to by them, if you ask me.
    navigation system is nothing more than an un-ordered list with css markup to look pretty. you seems knowledgeable enough and comfortable enough with your exposure in php, i am sure you can do it better. ( if you restrict all navigation end points in pages than components, i would imagine)

    ps: alpha also provides tabbed ui component, you could use that for navigation purposes exposing a5w pages, components, dialogs/ux, and reports etc.,

    ps2: you can also use dialog/ux with div below it to display the content as injected content. the dialog will only contain buttons and they will open desired component below the dialog/ux as embedded material.
    Last edited by GGandhi; 06-23-2017 at 05:31 AM.
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  5. #5
    Member
    Real Name
    Lee Millard
    Join Date
    Jun 2017
    Location
    United Kingdom
    Posts
    15

    Default Re: Adding Navigation Children from SQL

    Can I use either of these to also make the menu show the correct current page on screen too?, as well as getting the menu names from a SQL row ?
    Last edited by leemillard; 06-23-2017 at 07:24 AM. Reason: add info

  6. #6
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,260

    Default Re: Adding Navigation Children from SQL

    as well as getting the menu names from a SQL row ?
    i haven't tried so i don't know.
    Can I use either of these to also make the menu show the correct current page on screen
    if you mean that by selecting a button will a correct page load? yes it will. take a look.
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  7. #7
    Member
    Real Name
    Lee Millard
    Join Date
    Jun 2017
    Location
    United Kingdom
    Posts
    15

    Default Re: Adding Navigation Children from SQL

    No I mean if i want to highlight the current page thats already loaded on screen ?

  8. #8
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,260

    Default Re: Adding Navigation Children from SQL

    No I mean if i want to highlight the current page thats already loaded on screen ?
    the button will light up, if that is enough for you (just like the way navigation bar works, they are nothing but css)
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  9. #9
    Member
    Real Name
    Lee Millard
    Join Date
    Jun 2017
    Location
    United Kingdom
    Posts
    15

    Default Re: Adding Navigation Children from SQL

    I cannot get the navigation bar to even do that
    Last edited by leemillard; 06-23-2017 at 08:43 AM. Reason: spelling mistake

  10. #10
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,260

    Default Re: Adding Navigation Children from SQL

    I cannot get the navigation bar to even do that
    what you want to do?, what is your desire?
    i will show you in tabbed ui or ux or in general nav bar.
    if you search this board for navigation bar, you will see a commercial product used by steve, you can use it if you don't want to construct by yourself.
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  11. #11
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    6,194

    Default Re: Adding Navigation Children from SQL

    Quote Originally Posted by leemillard View Post
    Hi David,

    Its a basic intranet website to learn alpha, usually I would use php/sql.

    In Alpha I am using the built in navigation component, should I be using something else ?

    Creating a horizontal type menu with custom css looking like tabs



    Thanks

    Lee
    Here's an Alpha video showing a UX with a Tab Control.

    http://www.ajaxvideotutorials.com/V1...ActivePane.swf

    I don't think there is a Component that takes it's Tab label information from a SQL source. However, that's not hard to build... it just depends on how dynamic you want things to be.

    The attached UX contains a Tab Control with 4 Tab Panes. The "Get SQL Tab Labels" button makes an Ajax Callback to the Alpha Server which runs an Xbasic Function (found in Xbasic functions)
    The Xbasic function queries a SQL Table and formats the data into an Array of JSON Objects. The Xbasic function then returns a call to a Javascript Function (found in Javascript functions)... and includes the data.

    The Javascript function gets information about the Tab Control (e.g. the Pane Count) and then goes through a loop setting the Tab Labels.

    Since you're new to Alpha this UX demonstrates a few things:

    Ajax Callback to the server to run an Xbasic function.
    XBasic to query a SQL data source
    Return code to run a Javacsript Function with SQL Data formatted as a Javascript Array of JSON Objects.
    Attached Files Attached Files

Similar Threads

  1. Replies: 5
    Last Post: 11-16-2016, 07:37 PM
  2. List control displaying children (parent/children scenario) does not load
    By WindForce in forum Mobile & Browser Applications
    Replies: 2
    Last Post: 11-14-2016, 09:36 AM
  3. Design question: grid with linked children and grand-children
    By WindForce in forum Application Server Version 11 - Web/Browser Applications
    Replies: 2
    Last Post: 06-25-2012, 11:29 AM
  4. Insert Parent, children and grand children - how to
    By Zeke_11 in forum Application Server Version 10 - Web/Browser Applications
    Replies: 16
    Last Post: 11-11-2010, 07:54 PM
  5. adding navigation code to reset botton on grid
    By Sieward in forum Web Application Server v7
    Replies: 0
    Last Post: 02-05-2006, 07:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •