Unless and until the dialog box is the same and it's just about adding/removing more fields from the dialog box , it should be pretty much possible by adding "preFilters" and then using the count returned by that API to hide/remove those fields under the preFilter sections. Basically a if/else check under the preFilters block.
If it's about triggering a new dialog box all together , then it might require you to do little more work . This might not be supported by the widget right now as Jessica pointed out. Thanks, Pranav On Thu, Jul 25, 2013 at 11:23 PM, Jessica Wang <jessica.w...@citrix.com>wrote: > Ian, > I don't think current widget code support it (that calls different dialogs > for Add action depending on count number in listView). > > Brian, > Please confirm it. > > Jessica > > -----Original Message----- > From: Ian Duffy [mailto:i...@ianduffy.ie] > Sent: Thursday, July 25, 2013 7:36 AM > To: CloudStack Dev > Subject: Switch dialog actions based on result from API call. > > Hi, > > How would I go about modifying the UI to allow me to change the "Add > Account" screen to: > > 1) When listLdapConfigurations returns a count of less than 1 the > default cloudstack add account screen is given. > 2) When listLdapConfigurations returns a count of greater than one my > custom LDAP add account screen is given. > > What I have so far can be seen at: > > https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;a=blob;f=ui/scripts/accounts.js;h=e3e28e47a305bb53151a6e7c749cad355b872736;hb=ldapplugin > > Thanks, > Ian >