2008年6月12日

          基于Timestamp的排他功能只能使用框架自動生成的SQL,自己寫的SQL,S2DAO不能識別.
          已經通過maillist和官方確認過了.要么就自已實現排他功能.

          這意味著UPDATE的話,你總是得UPDATE所有的字段.你得把所有的字段值全SET到實體中才行.

          直接用框架生成的update方法,它會自動生成SQL,不用自己寫,排他就好用.

          @S2Dao(bean = UsodMCustomMailEntity.class)
          public interface UsodMCustomMailDao extends BaseDao {
              @Arguments("entity")
              public int update(UsodMCustomMailEntity entity);
          }

          @Bean(table = "usod_m_custom_mail", timeStampProperty = "timestamp")
          public class UsodMCustomMailEntity extends BaseEntity {
              @Column("template_id")
              public String templateId;

              @Column("template_name")
              public String templateName;

              @Column("description")
              public String description;

              @Column("mail_from")
              public String mailFrom;

              @Column("mail_to")
              public String mailTo;

              ...省略...

              @Column("last_update_date")
              public Timestamp timestamp;
          }

          posted @ 2008-06-12 15:21 legendsen 閱讀(394) | 評論 (0)編輯 收藏

          teeda用a彈出/跳轉畫面,需要一點注意事項.
          正確的寫法是這樣的:
          <a id="goCustomerMailSelect" class="toolbar" href="../../view/master/customerMailSelect.html?templateId=aaa&newwindow=true" target="_blank"><span id="mailSelectHeadNameLabel" /></a>

          a的名字如果不國際化直接寫死值"XXX",OK.
          要是國際化,用<label id="mailListHeadName"/>
          就不好用,不能解析成a,所以只能換成<span id="mailSelectHeadNameLabel" />
          span不是用來顯示值的,所以ID得加上Label結尾才行.
          用<span id="mailSelectHeadName" />什么也不顯示.

          本HTML和目標HTML在不在一個文件夾,沒關系.

          這樣到customerMailSelect.html畫面時,templateId=aaa就會自動被本HTML對應的PAGE類中的屬性templateId的值替換掉.如:templateId=20013

          posted @ 2008-06-12 14:38 legendsen 閱讀(504) | 評論 (0)編輯 收藏


          2007年6月22日

          智者不銳,慧者不傲,謀者不露,強者不暴!

          posted @ 2007-06-22 11:22 legendsen 閱讀(174) | 評論 (0)編輯 收藏


          僅列出標題  

          posts - 3, comments - 0, trackbacks - 0, articles - 1

          Copyright © legendsen

          主站蜘蛛池模板: 正镶白旗| 崇左市| 江津市| 孝感市| 定安县| 九寨沟县| 望江县| 体育| 容城县| 安溪县| 洞口县| 阳谷县| 雷州市| 南召县| 仙桃市| 台州市| 淳安县| 丰县| 峨山| 望都县| 高陵县| 项城市| 长治县| 英吉沙县| 皋兰县| 义马市| 彭阳县| 开平市| 木兰县| 遂宁市| 晋州市| 宜昌市| 蒲城县| 安远县| 都匀市| 达日县| 博野县| 神池县| 乡宁县| 吴桥县| 东海县|