<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 閱讀(308) 評論(0)  編輯  收藏 所屬分類: WebWork
    主站蜘蛛池模板: 亚洲精品乱码久久久久66| 亚洲AV日韩AV天堂久久| 一级人做人a爰免费视频| 中文字幕免费不卡二区| 亚洲精品日韩专区silk| 国产男女猛烈无遮挡免费视频网站| 一级做a爰片久久免费| 7777久久亚洲中文字幕蜜桃| 免费人成在线观看网站| 亚洲 日韩经典 中文字幕| 浮力影院亚洲国产第一页| 国产成人yy免费视频| 亚洲人成网站在线观看播放青青| 91av免费观看| 免费无码国产V片在线观看| 国产成人精品亚洲精品| 日本免费xxxx| a级毛片在线免费| 亚洲高清国产拍精品熟女| 国产免费131美女视频| 无码人妻精品中文字幕免费| 国产亚洲蜜芽精品久久| 亚洲婷婷在线视频| 亚洲日本va中文字幕久久| 成人免费无码大片a毛片| 亚洲视频在线免费观看| 亚洲视频精品在线观看| 五级黄18以上免费看| 亚洲sss综合天堂久久久| 亚洲精品无码成人片久久| 免费国产在线观看| 成人无码区免费A片视频WWW| 日本亚洲免费无线码| 亚洲bt加勒比一区二区| 国产亚洲精午夜久久久久久| 免费看少妇作爱视频| 91在线视频免费播放| 最近中文字幕电影大全免费版| 99视频在线观看免费| 一级成人a做片免费| 久久综合亚洲色hezyo|