Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
tutorial:use_grid_controller [2015/03/12 14:29]
yarpheuil
tutorial:use_grid_controller [2015/10/05 17:52] (current)
Line 1: Line 1:
 By default, Adichatz uses <wrap adicode>​TableController</​wrap>​. However, <wrap adicode>​GridController</​wrap>​ can be also an attractive choice. ​ By default, Adichatz uses <wrap adicode>​TableController</​wrap>​. However, <wrap adicode>​GridController</​wrap>​ can be also an attractive choice. ​
 For example, create file <wrap adicode>​$projectDirectory/​resources/​xml/​model/​cutomer/​CustomerGridTI.xml</​wrap>​.\\ \\ For example, create file <wrap adicode>​$projectDirectory/​resources/​xml/​model/​cutomer/​CustomerGridTI.xml</​wrap>​.\\ \\
-<sxh xml; highlight: [3,6,7,14,15,16]; title: excerpt from 'CustomerGridT.axml' file.>+<sxh xml; highlight: [3,10,11,12,15]; title: excerpt from 'CustomerGridTI.axml' file.>
 <?xml version="​1.0"​ encoding="​UTF-8"​ standalone="​yes"?>​ <?xml version="​1.0"​ encoding="​UTF-8"​ standalone="​yes"?>​
 <​includeTree xmlns:​xsi="​http://​www.w3.org/​2001/​XMLSchema-instance"​ xsi:​noNamespaceSchemaLocation="​http://​www.adichatz.org/​xsd/​v0.8.7/​generator/​includeTree.xsd">​ <​includeTree xmlns:​xsi="​http://​www.w3.org/​2001/​XMLSchema-instance"​ xsi:​noNamespaceSchemaLocation="​http://​www.adichatz.org/​xsd/​v0.8.7/​generator/​includeTree.xsd">​
-    ​<grid rowHeaderVisible="​true"​ sortedColumn="​customerIdTC"​ entityURI="​adi://​myproject/​model.customer/​CustomerMM"​ id="​table">​ +    <grid rowHeaderVisible="​true"​ sortedColumn="​customerIdTC"​ entityURI="​adi://​myproject/​model.customer/​CustomerMM"​ id="​table">​ 
-        <​crossReferences>​ +        <​crossReferences>​ 
-            <​crossReference entitySetId="​rentals"​ description="#​BUNDLE(customer, rentals)"​ axmlDetailURI="​adi://​myproject/​model.rental/​RentalDI"​ axmlTableURI="​adi://​myproject/​model.rental/​RentalTI"​ axmlQueryURI="​adi://​myproject/​model.rental/​RentalQUERY"/>​ +            <​crossReference entitySetId="​rentals"​ description="#​MSG(customer, rentals)"​ axmlDetailURI="​adi://​myproject/​model.rental/​RentalDI"​ axmlTableURI="​adi://​myproject/​model.rental/​RentalTI"​ axmlQueryURI="​adi://​myproject/​model.rental/​RentalQUERY"/>​ 
-            <​crossReference entitySetId="​payments"​ description="#​BUNDLE(customer, payments)"​ axmlDetailURI="​adi://​myproject/​model.payment/​PaymentDI"​ axmlTableURI="​adi://​myproject/​model.payment/​PaymentTI"​ axmlQueryURI="​adi://​myproject/​model.payment/​PaymentQUERY"/>​ +            <​crossReference entitySetId="​payments"​ description="#​MSG(customer, payments)"​ axmlDetailURI="​adi://​myproject/​model.payment/​PaymentDI"​ axmlTableURI="​adi://​myproject/​model.payment/​PaymentTI"​ axmlQueryURI="​adi://​myproject/​model.payment/​PaymentQUERY"/>​ 
-        </​crossReferences>​ +        </​crossReferences>​ 
-        <include adiResourceURI="#​PARAM(CONTEXT_MENU)"​ id="​tableContextMenu"/>​ +        <include adiResourceURI="#​PARAM(CONTEXT_MENU)"​ id="​tableContextMenu"/>​ 
-        <​gridColumn property="​customerId"​ pattern="######"​ sorted="​true"​ id="​customerIdTC"/>​ +        <​gridColumn property="​customerId"​ pattern="######"​ sorted="​true"​ id="​customerIdTC"/>​ 
-        <​gridColumnGroup text="​coordinates"​ expanded="​true"​ headerFont="​JFaceResources.HEADER_FONT"​ headerWordWrap="​false"​ id="​coordinates">​ +        <​gridColumnGroup text="​coordinates"​ expanded="​true"​ headerFont="​JFaceResources.HEADER_FONT"​ headerWordWrap="​false"​ id="​coordinates">​ 
-            <​gridColumn property="​address" sorted="​true"​ id="addressTC">​ +            <​gridColumn ​summary="​true" ​property="​store" sorted="​true"​ id="storeTC">​ 
-                <​columnText>​return null != #ROW().address ​? #ROW().address.address&#​xD;​ +                <​columnText>​return null != #ROW().store ? #MSG(customer, store) + &quot;:&quot; + #ROW().store.address.city.city + &quot; - &quot; + #ROW().store.address.city.country.country ​+ &quot; (&quot; + #​ROW().store.staff.lastName + &​quot;​)&​quot; ​: &​quot;&​quot;;</​columnText>​ 
-                ​+ &​quot; ​&quot; + #​ROW().address.city.city&#xD; +            </​gridColumn>​ 
-                ​+ &quot; - &quot; + #​ROW().address.city.country.country : &​quot;&​quot;;</​columnText>​ +            <​gridColumn property="​address" sorted="​true"​ id="addressTC">​ 
-            </​gridColumn>​ +                <​columnText>​return null != #ROW().address ​? #ROW().address.address + &quot; - &quot; + #​ROW().address.city.city&#xD; + &​quot; ​&quot; + #ROW().address.city.country.country ​: &​quot;&​quot;;</​columnText>​ 
-            <​gridColumn ​summary="​true" ​property="​store" sorted="​true"​ id="storeTC">​ +            </​gridColumn>​ 
-                <​columnText>​return null != #ROW().store #​BUNDLE(customer,​ store) + &​quot;:&​quot;&#​xD;​ +        </​gridColumnGroup>​ 
-          + #ROW().store.address.city.city ​+ &quot; - &quot; + #ROW().store.address.city.country.country&#xD; +        <​gridColumn property="​firstName"​ sorted="​true"​ id="​firstNameTC"/>​ 
-          ​+ &​quot; ​(&quot; + #ROW().store.staff.lastName + &​quot;​)&​quot;&#​xD;​ +        <​gridColumn property="​lastName"​ sorted="​true"​ id="​lastNameTC"/>​ 
-          ​: &​quot;&​quot;;</​columnText>​ +        <​gridColumn property="​email"​ sorted="​true"​ id="​emailTC"/>​ 
-            </​gridColumn>​ +        <​gridColumn property="​active"​ pattern="​CHECK_ONLY"​ sorted="​true"​ id="​activeTC"/>​ 
-        </​gridColumnGroup>​ +        <​gridColumn property="​createDate"​ sorted="​true"​ id="​createDateTC"/>​ 
-        <​gridColumn property="​firstName"​ sorted="​true"​ id="​firstNameTC"/>​ +        <​gridColumn property="​lastUpdate"​ sorted="​true"​ id="​lastUpdateTC"/>​ 
-        <​gridColumn property="​lastName"​ sorted="​true"​ id="​lastNameTC"/>​ +    </​grid>​
-        <​gridColumn property="​email"​ sorted="​true"​ id="​emailTC"/>​ +
-        <​gridColumn property="​active"​ pattern="​CHECK_ONLY"​ sorted="​true"​ id="​activeTC"/>​ +
-        <​gridColumn property="​createDate"​ sorted="​true"​ id="​createDateTC"/>​ +
-        <​gridColumn property="​lastUpdate"​ sorted="​true"​ id="​lastUpdateTC"/>​ +
-    </​grid>​+
 </​includeTree>​ </​includeTree>​
 </​sxh>​\\ </​sxh>​\\
Line 37: Line 32:
 <​html><​br clear="​all"></​html>​ <​html><​br clear="​all"></​html>​
 <WRAP INDIC><​wrap adititle>​Explanations</​wrap>:​\\ <WRAP INDIC><​wrap adititle>​Explanations</​wrap>:​\\
-File <wrap adicode>​FilmDIGENERATED.axml</​wrap>​ is copied as file <wrap adicode>​FilmDI.axml</​wrap>,​ so that, if a generation process occurs, changes will not be affected.  +  ​* Line  3 - <wrap adicode>​rowHeaderVisible="​true"</​wrap>:​ a row header continaing line number is visible on the left of the grid. 
-  ​* Line 3 - <wrap adicode>​rowHeaderVisible="​true"</​wrap>:​ a row header continaing line number is visible on the left of the grid. +  * Line 10 - <wrap adicode><​gridColumnGroup text="​coordinates"​...</​wrap>:​ Column can be grouped and a toggle gives a way to expand or to collapse group of columns. 
-  * Line - <wrap adicode><​gridColumnGroup text="​coordinates"​...</​wrap>:​ Column can be grouped and a toggle gives a way to expand or to collapse group of columns. +  * Line 11 - <wrap adicode> <​gridColumn summary="​true"​...</​wrap>:​ When <wrap adicode><​gridColumnGroup</​wrap>​ collapses, this column is displayed. 
-  * Line - <wrap adicode> <​gridColumn summary="​true"​...</​wrap>:​ When <wrap adicode><​gridColumnGroup</​wrap>​ collapses, this column is displayed.+  * Lines 12 and 15: Return computed value for <wrap adicode>​store</​wrap>​ and <wrap adicode>​address</​wrap>​.  ​
 \\ \\
 <​code><​columnText>​return null != #​ROW().address ? #​ROW().address.address <​code><​columnText>​return null != #​ROW().address ? #​ROW().address.address
tutorial/use_grid_controller.1426166962.txt.gz · Last modified: 2015/09/30 16:46 (external edit)