User Tools

Site Tools


en:wiki:2.-desarrollo-app:2.3.-codigo:i.-herencia:start



Include-Layout Node


It allows to add nodes defined in another external XML.

Example:

The following node is put in the collection in the side where we want to include the controls.
In this node frame and group can be defined, in the case if in the file there are props that do not have this defined, we have to put them what is defined in the Include-Layout node.

    <include-layout file=<nowiki>"MisBotones.xml"</nowiki> group="1" frame="todo" />


Example collection where we use the include-layout.

   <coll name="MenuEntrada" special="true" notab="true">
      	<group name="General" id="1" />
      	<frame name="todo" width="100%" height="100%" scroll="true" />
  <prop group="1" frame="todo" name="MAP_TEXTO_01" type="T" title="Texto #1" visible="1" labelwidth="10" width="100%" />
  <prop group="1" frame="todo" name="MAP_TEXTO_02" type="T" title="Texto #2" visible="1" labelwidth="10" width="100%" />
  <prop group="1" frame="todo" name="MAP_TEXTO_03" type="T" title="Texto #3" visible="1" labelwidth="10" width="100%" />
  <include-layout file="MisBotones.xml" group="1" frame="todo" />
  <prop group="1" frame="todo" name="MAP_TEXTO_04" type="T" title="Texto #4" visible="1" labelwidth="10" width="100%" />
  <prop group="1" frame="todo" name="MAP_TEXTO_05" type="T" title="Texto #5" visible="1" labelwidth="10" width="100%" />
  </coll>


Definition of the "MisBotones.xml@ file, these files structure must be non-hierarchical .

  <?xml version="1.0" encoding="iso-8859-1"?>
  <xml>
  <prop name="MAP_SALIR" type="B" title="Salir" visible="1" method="ExecuteNode(salir)" width="100%" height="20%" labelwidth="10" tmargin="0" />
  	<salir refresh="false">
    		<action name="runscript" type="runscript">
      			<script language="javascript">
				appData.failWithMessage(-11888, "##EXITAPP##");
			</script>
    		</action>
  	</salir>
   </xml>
en/wiki/2.-desarrollo-app/2.3.-codigo/i.-herencia/start.txt · Last modified: 2018/04/24 12:19 by patricia