In my app, a client can have multiple cases. I have had it set up so the cases are displayed in a list. On selection from the list, the case info page is opened in an on page div. It has been working fine but I have never liked that each case is closed when the next opens. This creates difficulty when a user needs to go back and forth between cases. It is time consuming and the "place" they were at on the closed case is lost.
I have tried two solutions to get the cases to load into a dynamic panel on a tab band panel navigator. With both I am running into issues which I believe are related to the naming of the dynamic panel.
1. Using action JS with the UX set to open in a dynamic panel. It opens the first case fine, but the second won't open I believe because a panel with the same name that is set in the Action JS builder already exists. Can the panel name be set dynamically in the builder the way a tabbed UI "title" can be set with {FieldName} in the builder? I have tried so far without success. Using a variable for the name and title of the dynamic panel in the Open UX builder would be perfect.
2. Using a custom JS function to create the dynamic panel per the code in the AA documentation which I pasted below. The panel is being created fine and the name and title, which are easily set with a variable, seems to take as the [variablePanelNavigatorName].setActivePanel([variablePanelName]) is working. However, the Action JS to open a UX into a named panel is not working with the variable name. Even when I hard code the panel name in the builder, is not. It does open in a panel that is opened with the component. Also, if it did open, there would have to be a way to dynamically set the panel name open UX dialog.
Any suggestion to make this work?
Here is the code template from the documentation I am using for the custom JS add panel function.
I have tried two solutions to get the cases to load into a dynamic panel on a tab band panel navigator. With both I am running into issues which I believe are related to the naming of the dynamic panel.
1. Using action JS with the UX set to open in a dynamic panel. It opens the first case fine, but the second won't open I believe because a panel with the same name that is set in the Action JS builder already exists. Can the panel name be set dynamically in the builder the way a tabbed UI "title" can be set with {FieldName} in the builder? I have tried so far without success. Using a variable for the name and title of the dynamic panel in the Open UX builder would be perfect.
2. Using a custom JS function to create the dynamic panel per the code in the AA documentation which I pasted below. The panel is being created fine and the name and title, which are easily set with a variable, seems to take as the [variablePanelNavigatorName].setActivePanel([variablePanelName]) is working. However, the Action JS to open a UX into a named panel is not working with the variable name. Even when I hard code the panel name in the builder, is not. It does open in a panel that is opened with the component. Also, if it did open, there would have to be a way to dynamically set the panel name open UX dialog.
Any suggestion to make this work?
Here is the code template from the documentation I am using for the custom JS add panel function.
Code:
function addPanel() { var id = {dialog.object}.getValue('panelNum'); if(id=='') { alert('Please type a number in the textbox before clicking the button.'); return false; } //specify a unique name for the new Panel. var panelName = 'NEWPANEL_' + id; var panelTitle = 'Pane' + id; //define a new Panel Card var myNewPanelCard = new A5.PanelCard({ theme : '(dialog.style)', body: { content: { type: 'html', src: 'this is my new panel text for:' + panelName } } }) //get a pointer to the Panel Navigator where the new Panel will be added var pNav = {dialog.object}.panelGet('PANELNAVIGATOR_1'); //add the new Panel Card to the Panel Navigator pNav.addPanel({ name: panelName, title: panelTitle, src: myNewPanelCard }); //optionally set focus to the Panel just added. pNav.setActivePanel(panelName); }