Hi. Can you give some idea how to use query result to satisfy a functional restriction in application.? For example i have a query that checks user privileges and returns 0 or 1. Based on returned value I need some buttons to be visible and the others to be hidden. How to implement this?

asked 08 Apr '13, 05:18

Javid%20Hasanov's gravatar image

Javid Hasanov
16
accept rate: 0%


Hi Javid,

To implement this, you can use postInitialize event of the panel. This event triggers only once, just after the initialization of the panel. In this event, you can hide necessary buttons existing in this panel using api_component.setVisible API and satisfy the functional restriction.

You may think about why defining a postInitialize event for every single panel to be functionally restricted and why not to hide all buttons existing in the application(in all panels) when the user just logged in for example. The answer is the following:

Formspider doesn't initialize(load) the entire application when it's started, instead, it initializes a panel(screen) when it's necessary, it's one of the performance related advantages that Formspider provides.

In Formspider, the initialization of a panel is necessary when it's displayed on the screen for the first time or when any of the components existing in this panel or the panel itself is accessed through an API call. Therefore, if you hide a button component existing in a panel just at the start of the application, you will cause this panel to be initialized too early (and possibly unnecessarily since it may not be displayed on the screen).

Therefore, the best place to satisfy the functional restrictions is the postIntialize event of the panel since it triggers only once and only when it's necessary, when your panel is initialized.

Hope this helps,
Ibrahim

link

answered 08 Apr '13, 06:39

Ibrahim%20Sandalli's gravatar image

Ibrahim Sand... ♦♦
1.5k5
accept rate: 25%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×27
×4
×1

Asked: 08 Apr '13, 05:18

Seen: 1,119 times

Last updated: 08 Apr '13, 06:39


© Copyright Gerger 2017