Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Menu and Security » Jump Control
Jump Control [message #552] Mon, 22 January 2007 00:16 Go to next message
ljkbrost is currently offline  ljkbrost
Messages: 59
Registered: April 2006
Member
I am working with a system where I would like to have a dash board with quick links to perform common actions. Specifically I would like to have a simple drop down box with a 'add' button that will broker the call to the add screen for that particular record type.

If my system has people, departments, and companies, I would like the 'go' button to automatically jump the interface forward to the 'Add people', 'Add departments', or 'Add Company' screens. Once the record is added it would be best to be in the 'list' view for that record type.

I understand that from working with the framework that after the 'add' operation the system always jumps back to the previous screen. To accomplish this, I would have to map the 'go' button to jump to the 'list' screen and then instantly redirect to the 'add' screen. This way things unwind the way I would like them to.

Are there any helper functions that would help be perform this navigation? Or do I have to override the std.listN.inc screen to automatically redirect?

Any help in this area would be helpful.

Thanks,


Kyle Brost
----
Re: Jump Control [message #554 is a reply to message #552] Mon, 22 January 2007 05:47 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2363
Registered: April 2006
Location: Surrey, UK
Senior Member
If you want to jump to the ADD screen and then return to the LIST screen you must call the LIST screen first, but there is a way to do this without seeing the LIST screen until after the ADD has been processed.

- Create a new entry on MNU_TASK for the list screen which re-uses the current LIST script.
- For this new task set 'Initial Passthru' to the ADD screen, and set 'Keep Data on Exit' to NO.
- On your dropdown control point to this new LIST task, not the old one.

The idea behind 'Initial Passthru' is that when the task is run for the first time it does nothing but suspend itself and immediately pass control to the passthru task. When that passthru task terminates it goes back to the previous task which is the LIST screen. Because this is being re-activated, not initialised, it will ignore 'Initial Passthru' and show itself.

The idea behind 'Keep Data on Exit' is that when the task terminates (by disappearing from the 'breadcrumbs' area) its details remain in memory instead of being dropped. This means that when you select this task again it will automatically resume with its previous settings for search criteria, sort order and page number.


Re: Jump Control [message #2474 is a reply to message #554] Sat, 03 April 2010 16:22 Go to previous messageGo to next message
ljkbrost is currently offline  ljkbrost
Messages: 59
Registered: April 2006
Member
Hi Tony,

I have another 'jump' related question.

I would like to have users log into the system and then be immediately sent to an "add1/upd1" screen. When the hit submit or cancel, I want them to get the normal menu screen that they would see.

I have tried to modify the start task to be my 'add1' task and the system returns to that screen every time you press cancel/submit. Which makes sense because it's at the top of the stack.

I have tried to modify the 'menu.php' to automatically call scriptNext('myadd1'), but I get the same effect.

I have tried to modify the 'menu.php' with the "append2ScriptSequence(...)" but it does not appear to do anything.

Is there any way to do it with the existing structure? If not, is there any suggestion where/how I should start coding my 'hack'?

Thanks,


Kyle Brost
----
Re: Jump Control [message #2475 is a reply to message #2474] Sun, 04 April 2010 06:44 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2363
Registered: April 2006
Location: Surrey, UK
Senior Member
Firstly, you should not be able to set a role's start task to anything other than a menu. The popup in the 'Add Role' and 'Update Role' screens will only allow you to choose from the list of available menus.

Secondly, I have managed to achieve what you want by making use of the existing 'initial passthru' feature and using it on the 'menu' (Home Page) task. This has required some little tweaks in a few scripts, but it appears to work OK.

If you specify an 'initial passthru' task on the Home Page then this task will be activated after the logon screen has been processed and before the initial menu (Home Page) is displayed.

Try the attached scripts and let me know what you think.


Re: Jump Control [message #2476 is a reply to message #2475] Sun, 04 April 2010 13:02 Go to previous messageGo to next message
ljkbrost is currently offline  ljkbrost
Messages: 59
Registered: April 2006
Member
Hi Tony,

That seems to have gotten me a lot closer to what I need to do.

What is the difference between the MENU type of task and the PROC type of task named 'menu'?

I think I have been using them wrong. Usually I create a couple of MENUs for each user type and then set their starting task to the MENU. I don't ever set it to the 'menu' task. Is that wrong?

Thanks,


Kyle Brost
----
Re: Jump Control [message #2477 is a reply to message #2476] Sun, 04 April 2010 14:51 Go to previous message
AJM is currently offline  AJM
Messages: 2363
Registered: April 2006
Location: Surrey, UK
Senior Member
When you create a task of type 'menu' you are defining the options that will appear in the Menu Bar when that task is selected. There can be as many of these menus as you like, each with its own set of options.

However, when a menu is selected there is only ever one script which is executed, and that is menu.php. Although this has an entry on the MNU_TASK table with a type of 'PROC' it is never called directly.


Previous Topic: Control visibility of records
Next Topic: Login problems
Goto Forum:
  


Current Time: Sun Nov 03 03:15:38 EST 2024

Total time taken to generate the page: 0.01161 seconds