1 Reply Latest reply: Jul 10, 2013 1:23 PM by Matt Sevin-Oracle RSS

    Define max & min instance

    1001745

      Hi Experts,

       

      I have a requirement in OPA to collect a minimum of 1 entity detail and up to maximum 7 entity details. Once user reaches 7 entities "Add Instance" button should get disabled. Is this possible?

       

      Thanks,

      Vinay

        • 1. Re: Define max & min instance
          Matt Sevin-Oracle

          Assuming you are trying to stay on a single screen (i.e. not an approach in which only one entity instance is added per screen), then you could modify the velocity template.  Add a check to verify you are on the screen which is collecting the desired entities (i.e. screen name/title or custom field on screen) Depending on the exact behavior you are after, you could disable/hide the submit button until at least one instance has been added and also disable the add instance button once the maximum number has been reached. Another option is to leave all buttons as is and pick off the submit action, perform the check on number of instances and render a message (in a pop-up?) indicating the problem - i.e. prevent processing the submit action until the checks are satisfied.

           

          After building a project, you can find the velocity templates in release\web-determinations\WEB-INF\classes\templates

          Oracle Web Determinations Template Reference: Oracle Web Determinations Template Reference Guide

          The velocity developers guide is available at: http://docs.oracle.com/html/E38272_01/Content/Technical%20Reference/Velocity_Templates_DG.htm