Portal Extension

The Frontal html2flex library introduces an important behaviour in the development of your application, that is the portal\modular extension.

Frontal Module

A Frontal module can be inserted everywhere in your code and it has its own lifecycle and a module context associated. To introduce a Frontal module it's necessary declare a fmodule tag with it's id attribute, mandatory in order to refer the module.

From an html point the fmodule tag has the same caratheristics as the div tag, and so it is a real container and it could be assigned all the attributes and style behaviours of the div tag.

The Frontal module gives the power to be the final point of a server interaction; the developer, both in the form and in the a tag, can declare what is the Frontal module that receives the server response, and it will be the only part of your application that will be refreshed; this is a clear portlet behaviour.

Portal Example

Think about, for example, to have two modules, one for the filling of some particular criteria parameters in order to make a data research, and the other one that visualizes the results; the first one could be wrote in order to have, in the form tag, the module name of the second module, which receives and shows the results of the research.
Here is the example code of the modular extension.

<html style="height:100%">

 <body style="height:100%">

     Portal Research Example

     <fmodule id="params_module" style="width:100%">

         Insert your parameters

         <form id="search_form" action="search.php" fmodule="results_module" method="POST">

             <table style="width:100%">

                 <tr style="width:100%">

                     <td>Name:</td>

                     <td><input name="name_input" type="text"/></td>

                 </tr>

                 <tr style="width:100%">

                     <td>Lastname:</td>

                     <td><input name="lastname_input" type="text"/></td>

                 </tr>

             </table>

             <input type="submit" value="Search" onClick="ctx.getComp('search_form').submit()"/>

         </form>

     </fmodule>

     <fmodule id="results_module" style="height:100%;width:100%">

         Results

         <table style="height:100%;width:100%">

             <tr style="height:100%;width:100%">

                 <td>Results of the research</td>

             </tr>

         </table>

     </fmodule>

 </body>

</html>