<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆-348  評論-598  文章-0  trackbacks-0
    //Example 1: This is wrong:
    public class ViewHeadlineAction implements Action, ModelDriven {
    Headline headline 
    = new Headline();
    public Object getModel() {
    return this.headline ;
    }

    // 
    public String execute() {
    headline 
    = headlineFactory.findLatest();
    return SUCCESS;
    }

    }

    b
    //Example 2: This is correct:
    public class ViewHeadlineAction implements Action, ModelDriven {
    Headline headline 
    = new Headline();
    public Object getModel() {
    return this.headline ;
    }

    // 
    public String execute() {
    headlineFactory.updateToLatest(headline);
    return SUCCESS;
    }

    }

    Example 1 attempts to change the instance that getModel() returns. However,
    because getModel() is called before execute() and before the object is pushed
    onto the value stack, the reference that WebWork uses is the original instance, created
    by new Headline(), not the instance loaded from the HeadlineFactory. The
    second example resolves this issue by updating the existing instance rather than
    having headline point to a new instance.

    ---------------------------------------------------------
    專注移動開發(fā)

    Android, Windows Mobile, iPhone, J2ME, BlackBerry, Symbian
    posted on 2007-04-11 18:30 TiGERTiAN 閱讀(313) 評論(0)  編輯  收藏 所屬分類: WebWork
    主站蜘蛛池模板: 日本视频免费在线| 在线观看免费宅男视频| 亚洲午夜激情视频| 老司机午夜在线视频免费观| 日本一道高清不卡免费| 亚洲日本VA午夜在线影院| 午夜成年女人毛片免费观看| 久久人午夜亚洲精品无码区| 成年女人18级毛片毛片免费| 在线观看成人免费| 国产精品亚洲精品久久精品| 国产精品美女自在线观看免费| 国产亚洲欧美在线观看| 亚洲精品无码成人片在线观看| 色婷婷亚洲十月十月色天| 亚洲色精品三区二区一区| 中国国语毛片免费观看视频| www.999精品视频观看免费| 亚洲精品综合在线影院| 成人片黄网站色大片免费观看APP| 国产精品成人四虎免费视频| 黄网站在线播放视频免费观看 | 野花高清在线观看免费完整版中文| 亚洲人成激情在线播放| 国产自国产自愉自愉免费24区| 亚洲AV乱码久久精品蜜桃| 3344永久在线观看视频免费首页| 在线观看亚洲成人| 国产亚洲一卡2卡3卡4卡新区| 国产午夜亚洲精品午夜鲁丝片 | 香蕉视频在线观看免费| 国产亚洲欧洲精品| 欧亚精品一区三区免费| 亚洲一区二区三区高清| 无码人妻精品一二三区免费| 一级做a毛片免费视频| 91亚洲自偷手机在线观看| 91免费在线视频| 亚洲国产精品白丝在线观看| 全黄性性激高免费视频| 亚洲人成色4444在线观看|