You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h4 id="_function_getdisplaycontext"><a class="anchor" href="#_function_getdisplaycontext"></a>24.5.7. Function getDisplayContext</h4>
7654
7678
<div class="paragraph">
7655
7679
<p>To adapt the template content to the display context it is possible to get from OperatorFabric the page context where the template will be rendered by calling the javascript function getDisplayContext(). The function returns a string with one of the following values :</p>
<h4 id="_function_getentitiesallowedtorespond"><a class="anchor" href="#_function_getentitiesallowedtorespond"></a>24.5.6. Function getEntitiesAllowedToRespond</h4>
7701
+
<h4 id="_function_getentitiesallowedtorespond"><a class="anchor" href="#_function_getentitiesallowedtorespond"></a>24.5.8. Function getEntitiesAllowedToRespond</h4>
7678
7702
<div class="paragraph">
7679
7703
<p>If inside your template, you want to get the ids of the entities allowed to send a response, you can call the method getEntitiesAllowedToRespond. This method returns an array containing the ids.</p>
<h4 id="_function_getentitiesusableforuserresponse"><a class="anchor" href="#_function_getentitiesusableforuserresponse"></a>24.5.7. Function getEntitiesUsableForUserResponse</h4>
7712
+
<h4 id="_function_getentitiesusableforuserresponse"><a class="anchor" href="#_function_getentitiesusableforuserresponse"></a>24.5.9. Function getEntitiesUsableForUserResponse</h4>
7689
7713
<div class="paragraph">
7690
7714
<p>If inside your template, you want to get the ids of the entities the user can answer on behalf of, you can call the method getEntitiesUsableForUserResponse. This method will return an array containing the entities' ids.</p>
<h4 id="_function_isuserallowedtorespond"><a class="anchor" href="#_function_isuserallowedtorespond"></a>24.5.9. Function isUserAllowedToRespond</h4>
7734
+
<h4 id="_function_isuserallowedtorespond"><a class="anchor" href="#_function_isuserallowedtorespond"></a>24.5.11. Function isUserAllowedToRespond</h4>
7711
7735
<div class="paragraph">
7712
7736
<p>The template can know if the current user has the permission to send a response to the current card by calling the isUserAllowedToRespond() function.
<h4 id="_function_isusermemberofanentityrequiredtorespond"><a class="anchor" href="#_function_isusermemberofanentityrequiredtorespond"></a>24.5.10. Function isUserMemberOfAnEntityRequiredToRespond</h4>
7747
+
<h4 id="_function_isusermemberofanentityrequiredtorespond"><a class="anchor" href="#_function_isusermemberofanentityrequiredtorespond"></a>24.5.12. Function isUserMemberOfAnEntityRequiredToRespond</h4>
7724
7748
<div class="paragraph">
7725
7749
<p>The template can know if the current user is member of an Entity required to respond by calling the isUserMemberOfAnEntityRequiredToRespond function.
7726
7750
An example of usage can be found in the file <a href="https://github.com/opfab/operatorfabric-core/tree/master/src/test/resources/bundles/defaultProcess_V1/template/question.handlebars">src/test/resources/bundles/defaultProcess_V1/template/question.handlebars</a>.</p>
@@ -7732,7 +7756,7 @@ <h4 id="_function_isusermemberofanentityrequiredtorespond"><a class="anchor" hre
7732
7756
</div>
7733
7757
</div>
7734
7758
<div class="sect3">
7735
-
<h4 id="_function_listentoresponselock"><a class="anchor" href="#_function_listentoresponselock"></a>24.5.11. Function listenToResponseLock</h4>
7759
+
<h4 id="_function_listentoresponselock"><a class="anchor" href="#_function_listentoresponselock"></a>24.5.13. Function listenToResponseLock</h4>
7736
7760
<div class="paragraph">
7737
7761
<p>Register a function to be informed when template is locked (i.e. user has responded to the current card)</p>
<h4 id="_function_listentolttdexpired"><a class="anchor" href="#_function_listentolttdexpired"></a>24.5.14. Function listenToLttdExpired</h4>
7792
+
<h4 id="_function_listentolttdexpired"><a class="anchor" href="#_function_listentolttdexpired"></a>24.5.16. Function listenToLttdExpired</h4>
7769
7793
<div class="paragraph">
7770
7794
<p>If the card has a last time to decide (lttd) configured, when the time is expired this information can be received by the template by registering a listener.</p>
<h4 id="_function_listentoscreensize"><a class="anchor" href="#_function_listentoscreensize"></a>24.5.16. Function listenToScreenSize</h4>
7817
+
<h4 id="_function_listentoscreensize"><a class="anchor" href="#_function_listentoscreensize"></a>24.5.18. Function listenToScreenSize</h4>
7794
7818
<div class="paragraph">
7795
7819
<p>To adapt the template content on screen size it is possible to receive from OperatorFabric information on the size of the window where the template will be rendered. To receive screen size information you need to implement a listener function which will receive as input a string parameter with one of the following values :</p>
<h4 id="_function_listentotemplaterenderingcomplete"><a class="anchor" href="#_function_listentotemplaterenderingcomplete"></a>24.5.17. Function listenToTemplateRenderingComplete</h4>
7841
+
<h4 id="_function_listentotemplaterenderingcomplete"><a class="anchor" href="#_function_listentotemplaterenderingcomplete"></a>24.5.19. Function listenToTemplateRenderingComplete</h4>
7818
7842
<div class="paragraph">
7819
7843
<p>It is possible to be informed when opfab has finished all tasks regarding rendering template by registering a listener function .The function will be called after the call of the other listener (applyChildCard, lockAnswer ,lttdExpired and screenSize)</p>
<h4 id="_function_registerfunctiontogetuserresponse"><a class="anchor" href="#_function_registerfunctiontogetuserresponse"></a>24.5.18. Function registerFunctionToGetUserResponse</h4>
7855
+
<h4 id="_function_registerfunctiontogetuserresponse"><a class="anchor" href="#_function_registerfunctiontogetuserresponse"></a>24.5.20. Function registerFunctionToGetUserResponse</h4>
7832
7856
<div class="paragraph">
7833
7857
<p>Register the template function to call to get user response. This function will be called by opfab when user clicks on the "send response" button. More explanation can be found in the <a href="#response_cards">response card chapter</a>.</p>
0 commit comments