• Great piece of code!

    By Marcus Laubli 2 decades ago

    Jon,



    This is a great idea that shows how nicely Domino does AJAX! Thanks for the work.



    I have two questions:



    1) How do I hide menu options? I did look into this a little further and am a little frustrated. I think what we have to do is figure out how we can refresh the Outline entries in the current UI context. Is there some way I can help?



    I did try the simplest way I could think of! I put an @Contains(form ; "$$ViewTemplate") formula into the hide when of the Outline. Nope, that was too basic. Didnt work!



    2) I'm trying to integrate this code into a database where I'm using Jake Howlett's Validator 3.1 and the NamePicker. For some reason when I add your .css and .js entries into the $$HttpHead field, your libraries aren't loading correctly. So my question is: what do I have to do to load your JavaScript files in the $$HTTPHead field, instead of in the subform?



    Marcus

    • By Jon Hart 2 decades ago

      To answer your questions, (I hope):


      1. To hide items on the menu you add a Hide/when on the outline & specify your conditions for hiding showing different items. I use this when username="anonymous" I hide the items that pertain to employees only & then when they log in I hide based on roles ;o) You do have to remember that it is RETRIEVING the items through AJAX. If you want to play with multiple outlines & dynamically show an outline based on the context of the UI you may have better results ;o)


      2. This is set up mainly to work with viewtemplates or search templates. I have not tried to make it work with an editable form as I did not have a need to do it at the time. I may try to work on this in the upcoming months to come up with a solution. If you make any headway on this, please let me know & I will give credit where credit is due! ;o)



        Thanks,



        Jon