Jump Control [message #552] |
Mon, 22 January 2007 00:16 ![Go to next message Go to next message](/theme/default/images/down.png) |
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 message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
AJM
Messages: 2361 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.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
Re: Jump Control [message #2475 is a reply to message #2474] |
Sun, 04 April 2010 06:44 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
AJM
Messages: 2361 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.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
Re: Jump Control [message #2477 is a reply to message #2476] |
Sun, 04 April 2010 14:51 ![Go to previous message Go to previous message](/theme/default/images/up.png) |
AJM
Messages: 2361 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.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|