Hi Folks. I’ve been using a set of nav buttons on my forms and simply copying them from form to form - so far.
I’m ready to create a universal nav bar now with the usual (Next Prev Edit New Delete etc). I cant seem to get the principles of how this would work clear in my head!
I figured that since this works:
var curr_cont = forms.frm_component_detail_detail.controller.getSelectedIndex();
controller.setSelectedIndex(curr_cont+1); (for my ‘next’ button)
That this would too:
var curr_cont=currentcontroller.getSelectedIndex();
currentcontroller.setSelectedIndex(curr_cont+1);
sadly not? I’ve obviously got the wrong concept of what currentcontroller does?
I have also been investigating getMethodTriggerFormName as a means to making these buttons universal ala:
var form_name = application.getMethodTriggerFormName();
var curr_cont = forms[form_name].controller.getSelectedIndex();
forms[form_name].controller.setSelectedIndex(curr_cont+1);
and this works on the form where the buttons are currently pasted, but I’m concerned how this works when they are on a form on a tabpanel and then pasted into another form.
In the above circumstance (form with nav buttons in a tab, pasted onto another form), which is the controller and if I use application.getMethodTriggerFormName(); which form name will I get?
Am I ‘barking up the wrong tree’ here?