I have an application based on the presentation of one or more tabs. Each tab type identifies a specific activity (e.g. create an object of a specific type, like user, user profile, etc.).
Any tab type can concurrently appear one or more times at any given moment (e.g. two or more Create User tabs can be open at the same time).
For those tabs that accept inputs like the examples above, I would like to build a common "Close Confirmation Dialogue" mechanism that would be popped every time the user attempts to close a tab before saving the data while the data of the tab had been changed.
I did some tests that work OK under sterilized conditions, but when testing basic combinations the behavior begins to become strange.
The dialogue would need to return an indication of what the user selected (e.g. "Proceed with Tab Close" or "Cancel Tab Close request").
I was thinking about creating a service that would handle this, but I'm not sure if the use of a callback function (passed to the service from the tab's controller) would be suitable to return to the tab controller the selection of the user.
If possible, I am keen to find some examples on how this should be done.
Related
Using CodenameOne,
I have a Form that the user needs to fill in. All of the components, however, are actually Containers that represent custom functionality. As an example, I would have a TextField alongside a Button on a Container, and I would use that Container as a "Component". This allows me to create more advanced functionality by combining existing Components.
A good example of where this is necessary is that of a custom date entry field existing out of 3 TextFields or a combination of TextFields and ComboBoxes.
I have a "Field" that has functionality for that of a Contact Component.
This all serves as a single "Unit" in order to allow the user to choose a contact or fill in their own. Buttons open Dialog popups, etc.
My problems comes with when the user uses the Android keyboard. Should this Contact Object be the second "Field" and the user presses the 'Next' button on the Android keyboard, the App does not know what field to give focus.
Furthermore, If one of the fields are a ComboBox or a Button and the user presses next to reach that Component, the keyboard doesn't close, and instead removes the 'Next' button, replacing it with a return button or an emoticon selector.
Below is an example situation:
The user would press on the first field, the Keyboard shows up, and when the user presses next, the keyboard's Next button dissapears, as the immediate next field happens to be a Button or ComboBox.
Is there a way to change the focusing index, or omit certain fields form ever gaining focus in this way? I tried making the entire thing a Component but that doesnt allow me to combine other Components. Even if it is possible to make the parent Container a Component, how would I solve this particular issue?
The default behavior is to use the "next focus down" for this functionality so just use setNextFocusDown(nextTextField) on each one of the components. Notice that a ComboBox won't work as expected although you might want to change that to an AutoCompleteTextField which would.
Any DNN developers out there who have figured this out?
I have a user control (ascx) (DotNetNuke extension) with 4 user controls. There are buttons on the first view form to access the others.
When you access another control, you can access other controls from that control. I'm looking for the best way to redirect the user back to the previous control the user was on regardless of the 'level' of the control.
Here's an example.
1) First view form: People list
Buttons available:
2) User Addresses
3) User Downloads
4) User Videos
5) Another user related module
Let's say I choose 2) User Addresses
On that user control I have buttons to 3, 4 and 5
If I want to return to the first view control (1), I simply use DotNetNuke.Nvigation.NavigateURL and pass in the parameter of the user I was querying about. That works fine.
But now instead of going back to 1 I choose to go to 3) User Downloads
When the user hits the 'Return' button to go to the previous screen (not the browser back button; this is a button on my form) I want to go back to 2) User Addresses, not back to the first view control (1).
I've tried adding the first view control as another control in the same extension, and using EditURL to call it, but the screen shows up blank on redirect (except for the DNN menu etc).
How do I redirect a user to the previous control, not the first control of the module?
If this doesn't make sense, let me know and I'll try to explain it better.
Thanks.
You likely will want to pass a querystring parameter in the request to the various controls so that you can keep track of where they were, and how to get back.
Example:
Instead of just calling ctl=controlvalue try calling ctl=controlvalue&prevvalue=edit
THen you can wire up your Return code to use the querystring value of "prevvalue"
Chris
Check out my DNNHero.com video tutorials on Module Views, Settings & Navigation. I give code and instruction on different ways of doing module view navigation.
I decided to write a custom solution for this. It works really well, but it's a bit involved.
1) I wrote a SourceType enum to list the different forms in my application.
2) Any page can serve as the 'base page." On form load I read a property in settings for "base page url" and if it's not there yet, I write the base page's rawurl to the setting along with the enum value of which form (SourceType) it is.
3) Since sub-controls all use the same settings as the base page, whenever navigation occurs, I pass in the base page's enum value to the new form; in the new form I read the base page URL in the Page_Load of the new form and, if the current form's enum value is different from the enum value passed in (which it is), I use that base URL for the link 'back'.
4) If the user goes to another form from the second form, the process is repeated. But I pass both 'prevous' form enums to the third form so it shows two links to choose from to return to.
5) This can be repated as long as possible. One caveat: you have to remove the current form from the SourceType enum before you pass the SourceForms property back to a previous form; if you don't do this, the form you are coming from will also be listed as a 'go back to' form which you don't want.
Hope this helps someone having trouble figuring out a clean DNN redirection solution within multiple controls in a module.
If this isn't clear hit me up and I'll show some of my code.
I have to implement a wizard, where each step is a single input field.
Everything is wrapped inside an accordion with section headers.
The user, after filling the input and pressing Enter, should navigate the wizard field by field. Only the current field is editable, while the other ones are readonly (the user can anytime change a previously filled input, by clicking it, moving the current pointer to it).
I was wondering what could be the best approach to design this system, considering that the whole wizard structure changes in dependence of different user inputs.
I have found a tutorial using ui-router (http://scotch.io/tutorials/javascript/angularjs-multi-step-form-using-ui-router), with a fixed number of steps, but my requirements are to show the current input edit box inside the accordion, not in a fixed "ui-views" placeholder.
Take a look at https://github.com/JustMaier/angular-autoFields-bootstrap
It's a module that allows you to render forms from Metadata. So essentially, you can change the Metadata you provide dynamically to change the forms.
Another question for you Filemaker Pro experts. The database I am developing starts with a Main layout with a number of buttons (e.g. insert new item, show all items, etc.). Each button is associated to a script, which takes the user to the relevant layout. In each of these layouts I show the buttons in a row, and highlight the current layout with inverse colour.
My problem is that some of the buttons lead to the same layout, viewed in different modes, and I don't know how to conditionally highlight the right button.
For instance, Insert new item and Show all items take to the same layout, however in the first case the script views the layout as a form and inserts a new record, while in the second I view as a list and show all records. The layout is the same, though, so I'd need to enact a conditional formatting based on something. How do I do that, and what should I check against?
Thanks in advance for any help.
Regards.
Presumably you are currently using the formula: Get (LayoutName) to decide on your conditional formula, why not try additionally using formulas: Get(WindowMode) and Get(LayoutViewState)?
You could conditionally format the button if (which sends user to MyLayout in browse mode):
Get(WindowMode)=0 and Get(LayoutName)="MyLayout"
Or (which sends user to MyLayout in form view):
Get(LayoutViewState)=0 and Get(LayoutName)="MyLayout"
.
Other functions which may help could be Get(FoundCount) and Get(TotalRecordCount). You can see the entire list of Get functions here.
I've got a "Main Window" containing quite a few things, including, in the status bar (at the very bottom of the window), a "Support" button, which the user can use at any time to open a window containing our support phone number, along with a little chat functionality if the user prefers to chat with us.
The problem is that if the program is displaying a modal dialog, the "support" button is not clickable anymore.
Stopping using modal dialogs is not an option ; I use them because I sometimes want to force the user into performing a specific task before I can do something else in the software.
What's the best way to let the user contact the support without having to close the current modal dialog?
Modal dialogs should behave as modal dialogs, the user won't expect to be able to click a button in the main window even if it were possible.
Your best bet is to put a support button on the dialog too.
Using a shortcut key instead of a button may be an option. The functionality could be factorized into a base form class like this :
public class BaseForm : Form
{
protected override bool ProcessDialogKey(Keys keyData)
{
if (keyData == Keys.F1)
{
SupportForm f = new SupportForm ();
f.Show();
}
return base.ProcessDialogKey(keyData);
}
}
Not using modal dialogs is an option. You can disable other parts of your interface during the required interaction to get whatever it is that you need out of the user.
The solution is to avoid situations where the user 'must' do something. Modal dialogs often get in the way if, for example, the user wants to quit the application right at that moment, or see something in a backgrounded window, or refer to another part of your application. Instead of using them, design your interaction so that if there is a required action/piece of information, it's folded into the application logic.
Think about website design -- modal dialogs are very rarely found on the web, and for good reason -- they disrupt the user's workflow unnecessarily. And yet plenty of sites have 'required' information.
Don't use modal dialogs; they are a shortcut to avoid a better design.