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 阅读(370) | 评论 (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 阅读(482) | 评论 (0)编辑 收藏


2007年6月22日

智者不锐,慧者不傲,谋者不露,强者不暴!

posted @ 2007-06-22 11:22 legendsen 阅读(161) | 评论 (0)编辑 收藏


仅列出标题  

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

Copyright © legendsen