Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Overriding settings in GridLinker Component

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Overriding settings in GridLinker Component

    How do you override settings in a Grid Component in a GridLinker Component? I tried using the method for Grid Components themselves, and I can't get it to work. Am I doing something wrong? Is it not possible? How can I do this?

    Howard
    Howard G. Cornett, Independent Consultant

    #2
    RE: Overriding settings in GridLinker Component

    yes it is possible.

    all of the examples the sample web app demo do it. in most cases they just set the component name. but in some cases they set other properties as well.

    open any of the .a5w pages in the sample demo in the HTML editor, or in notepad. switch to source view.

    you will see code like this:

    with "variablename"
    componentName = somename
    end with

    in this block of code you can override any of the component's settings.

    the ability to override settings is a very powerful feature of components because it allows you to design one component, but then use it in many different ways.

    also, it allows you to dynamically set component properties at runtime using xbasic. this is an exceptionally powerful feature.

    Comment


      #3
      RE: Overriding settings in GridLinker Component

      Selwyn,

      Your description works great in a page with a single component, but I think the question referred to a GridLinker component. The only example of that in the demo is Orders_wItems, and it does not have a "with...." section.

      I have tried various ways to use the override in a gridLinker, but I can't figure out how to address the individual component. In one page with a parent and a child, A5 writes the follwing:

      Delete tmpl_GridLinker
      DIM tmpl_GridLinker as P
      tmpl_GridLinker = a5w_load_component("Entity_Security")
      '======compute the HTML for the Component================
      delete x_GridLinker
      dim x_GridLinker as p
      tmpl_GridLinker.request = request
      tmpl_GridLinker.session = session
      tmpl_GridLinker.response = response
      tmpl_GridLinker.serversetting = serversetting

      I have tried tmpl_Gridlinker.parentcomponentname and I've tried x_GridLinker.parentcomponentname, but neither one seems to work.

      How do you address, for example the parent component in a linked grid?

      Thanks,
      Pat
      Pat Bremkamp
      MindKicks Consulting

      Comment


        #4
        RE: Overriding settings in GridLinker Component

        Overriding settings a GridLinker component at run-time is not as simple as it is for a Grid or Dialog component.

        That's because a lot of the code that executes is hidden inside the defintion of the GridLinker component.

        Nevertheless, once you understand more about what goes on inside the GridLinker component, it is not that hard to do.

        The first step is to make sure you know what the aliases are for each of the Grid components in the GridLinker.

        To find the names of the aliases, you will need to edit the GridLinker, go to the 'Select & Link' tab and click the Edit button. A dialog will open telling you what the alias is for each component in the GridLinker.

        For example, let's look at the sample 'Orders_wItems' GridLinker component that is part of the sample web application that ships with Alpha Five. This component links the 'OrderHeader' and 'InvoiceItems' Grid components. In this case the internal alias names used for each component is the same as the component name, but it need not be.

        Let's assume that at run-time we want to change the OrderHeader component so that it only displays 3 rows of data.

        If you look at the code in the .A5W page that runs the 'Orders_wItems' component, you will see code that looks like this:

        Delete Tmpl
        DIM Tmpl as P
        tmpl = a5w_load_component("Orders_wItems")

        After the component has been loaded, the pointer variable 'tmpl' contains the definition of the GridLinker. This pointer variable has an internal property array called 'Grid_Info' that contains information about each of the linked Grids. This property array has a property called 'OverrideSettings' which contains the Xbasic necessary to overrride settings for any Grid in the GridLinker.

        So, for example, if the GridLinker links 4 different Grid components, the tmpl pointer variable will have a sub-array with four entries - one for each Grid. The problem is that you don't know which entry in the array corresponds to which Grid, so you have to execute some Xbasic to find the appropriate entry in the array.

        The following example show how this can be done:




        'find the entry in the tmpl.grid_info[] array for the component with the alias 'OrderHeader'
        dim indx as n
        indx = tmpl.grid_info.find(ut("orderheader"),"ut(componentalias)")
        'if indx " 0 then a match was found
        if indx " 0 then
        with tmpl
        With Grid_Info[1]
        .OverrideSettings = ""%code%
        rows = 3
        %code%
        end with
        end with
        end if


        This code gets places immediately after the code that loads the component. I.e. after this line:

        tmpl = a5w_load_component("Orders_wItems")

        Comment


          #5
          RE: Overriding settings in GridLinker Component

          Selwyn,

          Would this advice apply in the case of trying to filter the parent of a gridlinker with a WAS session variable?

          Thanks,

          John

          Comment


            #6
            RE: Overriding settings in GridLinker Component

            yes

            Comment

            Working...
            X