Histórico da Página
HTML |
---|
<div id="main-content" class="wiki-content group">
<h3
id="id-6.InvocaçãodeAplicaçõeseFormuláriosnoDatasulatravésdoFluig-6.1.Objetivo">
<strong>6.1. Objective</strong>
</h3>
<p align="LEFT" class="western">
<span>Allow the possibility of opening Flex , Metadata or
Progress screens in Datasul through a link or button on the form, in
HTML forms associated to processes in Fluig. These screens will be
opened through a URL to be called in a Javascript function in the
form.</span>
</p>
<h3
id="id-6.InvocaçãodeAplicaçõeseFormuláriosnoDatasulatravésdoFluig-6.2.GuiadeProgramação">
<strong>6.2. Programming Guide</strong>
</h3>
<p align="LEFT" class="western">
<span>In an HTML form in Fluig, with a link or button to open a
screen in Datasul, an HTTP call must be used to open a new browser
window containing the form to be opened. </span>
</p>
<p align="LEFT" class="western">
<span>For Flex or Metadata forms, the "External User
Authentication" technique is used. For Progress programs, use the
"ABL External Call". Below are a few examples of URLs that allow the
opening of each of the types.</span>
</p>
<ul>
<li><p align="LEFT">
URL for direct access to a <strong>Flex Portlet</strong>:
</p></li>
</ul>
<p align="LEFT" class="western" style="margin-left: 24.0px;">
<span><a rel="nofollow">http://server:port/josso/signon/externalUserAuthentication.do?josso_cmd=external-login&type=frwk&module=fnd&program=datasul-calculatorportlet-flex&viewtype=portlet&userid=super&password=c3N6a0AxMjM</a>=</span>
</p>
<p align="LEFT" class="western" style="margin-left: 24.0px;">
<span><br /></span>
</p>
<ul>
<li><p align="LEFT">
URL to access <strong>Metadata</strong> form:
</p></li>
</ul>
<p align="LEFT" class="western" style="margin-left: 24.0px;">
<a
href="http://cassino:8180/josso/signon/externalUserAuthentication.do?josso_cmd=external-login&type=md&program=ems5.emsuni.CRUDUnidOrgan&viewtype=view&userid=super&password=c3N6a0AxMjM"
class="external-link" rel="nofollow"><span>http://</span><span> </span><span>server:port
/josso/signon/externalUserAuthentication.do?josso_cmd=external-login&type=md&program=ems5.emsuni.CRUDUnidOrgan&viewtype=view&userid=super&password=c3N6a0AxMjM</span></a><span>=</span>
</p>
<p align="LEFT" class="western"> </p>
<ul>
<li><p align="LEFT">
URL to access <strong>Progress</strong> programs:
</p></li>
</ul>
<p align="LEFT" class="western" style="margin-left: 24.0px;">
<a
href="http://cassino:8180/abl-external-call/execute?program=cd0704.w&module=cdp&user=super&password=c3N6a0AxMjM"
class="external-link" rel="nofollow">http:// server:port
/abl-external-call/execute?program=cd0704.w&module=cdp&user=super&password=c3N6a0AxMjM</a>=
</p>
<p align="LEFT" class="western" style="margin-left: 24.0px;"> </p>
<p align="LEFT" class="western" style="margin-left: 24.0px;">
<span><strong>Base URL for Flex and Metadata:</strong></span><span>
<a rel="nofollow">http://server:port/josso/signon/externalUserAuthentication.do</a>?
</span>
</p>
<p align="LEFT" class="western" style="margin-left: 24.0px;">
<span><strong>Base URL for Progress:</strong></span><span>
http:// <a href="http://serverport" class="external-link"
rel="nofollow">server: port</a> /abl-external-call/execute?
</span>
</p>
<p align="LEFT" class="western" style="margin-left: 24.0px;"> </p>
<p align="LEFT" class="western" style="margin-left: 24.0px;">
<span><strong>Flex and Metadata parameters:</strong></span>
</p>
<ul>
<ul>
<li><p align="LEFT">
<strong>josso_cmd:</strong> Command to be executed by JOSSO, in
case of external login.
</p></li>
</ul>
</ul>
<ul>
<ul>
<li><p align="LEFT">
<strong>userid:</strong> Username.
</p></li>
</ul>
</ul>
<ul>
<ul>
<li><p align="LEFT">
<strong>password:</strong> User password. It must be sent using
Base64 encode.
</p></li>
</ul>
</ul>
<ul>
<ul>
<li><p align="LEFT">
<strong>type:</strong> Program type to be opened, <strong>frwk</strong>
or <strong>md</strong>; md is for metadata type and frwk is for
framework. It is necessary to inform so that josso knows if you are
going to use the MODULE parameter or the PROGRAM parameter.
</p></li>
</ul>
</ul>
<ul>
<ul>
<li><p align="LEFT">
<strong>program:</strong> Program to be accessed, put the full
metadata program path, such as: ems5.emsuni.CRUDUnidOrgan.
</p></li>
</ul>
</ul>
<ul>
<ul>
<li><p align="LEFT">
<strong>module: </strong> Module to be accessed, only for flex
programs.
</p></li>
</ul>
</ul>
<ul>
<ul>
<li><p align="LEFT">
<strong>viewtype:</strong> Type of window that will open, which may
be:
</p>
<ul>
<li><p align="LEFT">
<span>view</span>
</p></li>
<li><p align="LEFT">
<span>portlet</span>
</p></li>
<li><p align="LEFT">
<span>window</span>
</p></li>
</ul></li>
</ul>
</ul>
<p align="LEFT" class="western" style="margin-left: 38.4px;"> </p>
<p align="LEFT" class="western" style="margin-left: 38.4px;">
<strong>Progress parameter:</strong>
</p>
<ul>
<ul>
<li><p align="LEFT">
<strong>program:</strong> Name of Progress program.
</p></li>
</ul>
</ul>
<ul>
<ul>
<li><p align="LEFT">
<strong>Module:</strong> name of the module.
</p></li>
</ul>
</ul>
<ul>
<ul>
<li><p align="LEFT">
<strong>userid:</strong> Username.
</p></li>
</ul>
</ul>
<ul>
<ul>
<li><p align="LEFT">
<strong>password:</strong> User password. It must be sent using
Base64 encode.
</p></li>
</ul>
</ul>
<p align="LEFT" class="western" style="margin-left: 48.0px;"> </p>
<p align="LEFT" class="western" style="margin-left: 38.4px;">
<span>In Fluig side, in order for a form to call to a screen on
Datasul, we can use the following example:</span>
</p>
<p> </p>
<ul>
<li style="list-style-type: none;"><ul>
<li><p align="LEFT" class="western">
<span>Assuming that in a Fluig form there is a button to
call the Progress program as follows:</span>
</p></li>
</ul></li>
</ul>
<pre class="western"> <input value="Programa" onClick="callProgress()" type="button"></pre>
<p align="LEFT" class="western" style="margin-left: 92.0px;">
<span>When the button is clicked, the callProgress() function
will be called, and it can have the following code:</span>
</p>
<pre class="western">
<br /> function callProgress () {</pre>
<pre class="western"> var url = “<a rel="nofollow">http://cassino:8180/abl-external-call/”</a> +</pre>
<pre class="western"> “execute?program=cd0704.w&module=cdp&” +</pre>
<pre class="western"> “user=super&password=c3N6a0AxMjM=";</pre>
<pre class="western"> window.open(url);</pre>
<pre class="western"> } </pre>
<p align="LEFT" class="western"> </p>
<ul>
<li class="western" style="margin-left: 32.0px;"><span>A
similar function to call a metadata form:</span></li>
</ul>
<p align="LEFT" class="western" style="margin-left: 37.4333px;"> </p>
<pre class="western"> function callMetadados () {</pre>
<pre class="western"> var url = “<a
href="http://tdn.totvs.comport" rel="nofollow">http://:port/josso/signon/</a>" +</pre>
<pre class="western"> "externalUserAuthentication.do?josso_cmd=external-login&" + </pre>
<pre class="western"> "type=md&program=ems5.emsuni.CRUDUnidOrgan&viewtype=view&" +</pre>
<pre class="western"> "userid=super&password=c3N6a0AxMjM=";</pre>
<pre class="western"> window.open(url, “Unidade Organizacional”, 800, "width=800,height=600");</pre>
<pre class="western"> }</pre>
<p align="LEFT" class="western" style="margin-left: 62.4px;">
<span>In the case of Metadata form, optionally, it can be
customized to return information to the Fluig form, using the command
</span>CALL-BACK-WINDOW-OPENER()<span>. Refer to: <span> </span></span><a
href="81789187.html"><strong>Calls to Datasul Zooms
through Forms in Fluig:</strong><span> </span></a><strong><a
href="81789187.html">ABLScript function for FreeForm Forms</a></strong><span><strong><a
href="81789187.html">4</a>.</strong></span>
</p>
<p align="LEFT" class="western" style="margin-left: 62.4px;"> </p>
<p>
<strong><br /></strong>
</p>
</div>
|
Visão Geral
Import HTML Content
Conteúdo das Ferramentas
Tarefas