View Command

Use view for generate html tags for gride of data. in fact, this command use in two level hierarchy data.

1
2
3
<basis core="view" groupcol="">
   [...]
</basis>

Important

The view command inherit from Renderable Commands base class.

Attributes:

groupcol string optional [##-notaion

Determine column name in data source that use in grouping data for generate second level. default value for groupcol is prpid.

Note

For see more Information about [##-notaion,see [## Notation

Example

1# Create simple command

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
<basis  core="view" datamembername="db.users" groupcol="team-name">

   <layout>
     <ul>
         @child
     </ul>
   </layout>

   <face level="1">
     <li>
         @team-name
         <ul>
             @child
         </ul>
     </li>
   </face>

   <face level="2">
     <li>@fname - @lname</li>
   </face>

</basis>

Data source db.users is:

db.users

id

managerid

fname

lname

team-name

1

-1

s.alireza

qamsari

team-a

2

1

amir

jalali

team-b

3

1

akbar

karimi

team-a

Result is:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
<ul>
     <li>
         team-a
         <ul>
             <li>s.alireza - qamsari</li>
             <li>akbar - karimi</li>
         </ul>
     </li>
     <li>
         team-b
         <ul>
             <li>amir - jalali</li>
         </ul>
     </li>
</ul>