当前位置: 首页 > 工具软件 > AtLeap > 使用案例 >

atleap学习笔记

安泰平
2023-12-01
开会讨论议题如下:

----------------------------
前段时间学习总结:
----------------------------
1.tile definition:
    1)所有的non-virtual  tile definition 在tiles-config.xml 中定义, 注意在定义tile definition的时候,tile definition 也有inherit关系。
    2)virtual tile definition : 在生成一个CotentPage的时候选中virtual的时候会产生一个virtual tile definition, 这个virtual tile definition 没有在tile-config.xml中定义,runtime的时候产生的。
    3)命名规则:
        .core.actionPage.list   这个tile definition    意味着 core 目录下有个actionPage子目录,list才是actionPage目录下的一个资源
   

2.layout 必须来源于 tile definition:
    1) layout 肯定来源于一个 tile definition (non-virtual tile definition, virtual tile definition), 一个tile definition 只能有一个layout和它对应,否则会报告如下错误:
        * Layout with the same definition or name already exists.
     2)layout 目前拥有: core layout (abstract类)----- 用于admin console   fields有: title,key,words,description,annotation,header,footer,,body[0],body[1],leftBlock[0],leftBlock[1],
                  front -end layout  (子类是front-end layout) ---   fields有: title,key,words,description,annotation,header,footer,,body[0],body[1],leftBlock[0],leftBlock[1],
                  index-page layout (父类是front-end layout) ---  field: body
    3)注意目前只有 front -end layout 和 index-page layout  有tile container:
        front -end layout 和 index-page layout 目前一共有四个tile container,在tiles-config.xml中如下定义:
    <putList name="leftLayoutBlocksList" container="true" description="Left layout block list">
            <add value=".frontend.menu" />
            </putList>
            <putList name="leftLayoutIndexedBlocksList" container="true" description="Left layout indexed block list">
            <add value=".frontend.indexedBlock" />
            </putList>
            <putList name="rightLayoutBlocksList" container="true" description="Right layout block list">
            <add value=".searchForm" />
            <add value=".frontendSwitchLocaleForm" />
     </putList>
            <putList name="rightLayoutIndexedBlocksList" container="true" description="Right layout indexed block list">
            </putList>
        实际上是layout包含了四个部分: leftBlockList,  leftIndexedBlockList,  rightBlockList, rightIndexedBlockList. 好好理解它。
        每个tile container中又包含一个available component,一个inavailable component. 每个component可以包含一个或者多个tile definition.For each container on this page there are two lists: list of available components (those that may be included into container but not included yet) and list of included components (those that already included). You can move components between these two lists and change container content.
        available component中的tile definition 将会在layout中显示出来,inavailable component中的tile definition 不会在layout 中显示出来。
       
    4)Layout may be declared virtual. For virtual layout, definition will be used as a parent, virtual definition will be created which extends it. Virtual layouts are useful when you need several layouts based on same definition but having distinct tile containers or menu config. Layout can have its own set of content fields which may be overridden on pages. Some fields may be common for all pages and do not need to be overridden. Descendant layouts may override fields of their parent.
    5)layout也有inherit关系,根据他的 tile definition 来的。
    6)Layout may be declared virtual. Virtual layout's definition is virtual: it does not exist in config files, but created at runtime. This definition extends definition specified as a parent. Virtual layouts may be useful, if you need several layouts based on same definition but having distinct menu structure and/or another tile containers state. Note, that for virtual layout there's no sense to have distinct main definition and definition for content pages, because latter does not extend former. If you need virtual layout, set same value for both definitions.
    virtual layout的好处:
    因为一个tile definition 只能有一个layout和它对应,如果一个需要几个 layout 来源一个tile definition的话,就可以创建几个virtual layout来源同一个tile definition.
    在你创建这个virtual layout的同时,也产生了一个virtual tile definition.

    layout                <---->              一一对应的 tile definition
    virtual layout   <---->             一一对应的 virtual tile definition
    virtual tile definition 继承--->   tile definition

    7)non-abstract layout 专门用于ContentPage, Non-abstract和abstract Layout都可以用于ActionPage.

3.ContentPage:
    1)There is a "one-to-many" relationship between layouts and content pages, which means that there are many content pages based on one layout.In other words, there is a direct dependency between layouts and content pages which saved in persistent storage and can be changed in application run-time.Unlike content pages, action pages have no such dependency and there is no strict relationship between action pages and layouts.
    2)ContentPage只能使用non-abstract layout
    3)命名规则:
        /catalog/page1  这个URI  意味着 catalog目录下的一个资源page1
   
4.ActionPage:
    1) 我知道首先必须写好一个struts的action, 然后在struts-config.xml中注册一个URI, 然后在admin console中再利用这个URI来再一次注册这个actionPage.
    2)ActionPage可以使用所有的layout(包括abstract layout,non-abstract layout)

5. Page field :
    1)Fields may be overridden on upper layers: layout may override fields of parent layout, page may override fields of layout on which it is based. Some fields do not need to be overridden, e.g. if their values are the same for all pages.
    2)

6.Sequence(pages or content resources):  a lot of questions
    1). Primary sequences - these are sequences that are explicitly created on a Layout or Action Page.
    2). Overriden sequences - these sequences just override primary sequences (such sequences may be created on Layouts, Action Pages and Content Pages).

----------------------------
当前面临问题:
----------------------------
1.Content Page:
    1) 不同于ActionPage:
    2)ContentPage 可以由用户自己定义页面中各个部分:
2.ActionPage:
    1)ActionPage中的page field有什么用呢?
    2)
3.Sequence 不知道是什么东西?
4.Links Menu, Files Menu,  Images Menu, Resource Links Menu, Page Links Menu  有什么用处?怎么用?
5.ContentPage,ActionPage 和这个menu之间的相互关系又是什么呢?

----------------------------
自由讨论:
----------------------------

 类似资料: