update rootpath of pathfield based on the dropdown value
Hello,
I want to update the rootpath of pathfield in authoring dialog based on other filed value (dropdown selection). Appreciated for quick pointers on this.
Thanks.
Hello,
I want to update the rootpath of pathfield in authoring dialog based on other filed value (dropdown selection). Appreciated for quick pointers on this.
Thanks.
I did not find solution at https://helpx.adobe.com/experience-manager/using/jstl.html.
But i have fixed the problem as below. When user click on path field it will open a browse dialog (At back-end, in pathfield.js it will invoke a "onTriggerClick" function. In that function it will check if browseDialog object is null or not. If yes it will create new browseDialog (configs based on the rootPath property configured in dialog.xml, if nothing set, by default takes /content) and shown to user.
As per my requirement, when i change the dropdown value in authoring dialog, path field rootpath should be changed. After i changed the dropdown value, click on path field will again trigger "onTriggerCallFunction function" . As per below code it should change the rootPath. But it will not change the rootpath and show the previous value. Because "onTriggerCallFunction" will not create new browsedialog, it will show the same browsedialog crated with previous value. One way to fix this add "parhfiledObj.browseDialog=null" after setting the treeRoot in if statement
var selectValue = pane.find(...);
var pathfiledObj = panel.find(....)
if (selectValue == "c1"){pathfiledObj.treeRoot.name="/content....")}
Fix: pathfiledObj.browseDialog=null
if (selectValue == "c1"){pathfiledObj.treeRoot.name="/content....");pathfiledObj.browseDialog=null;}
Let me know for more details
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.