<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.

    ---------------------------------------------------------
    專注移動開發

    Android, Windows Mobile, iPhone, J2ME, BlackBerry, Symbian
    posted on 2007-04-11 18:30 TiGERTiAN 閱讀(313) 評論(0)  編輯  收藏 所屬分類: WebWork
    主站蜘蛛池模板: 亚洲精品视频免费看| 青青草97国产精品免费观看| 性无码免费一区二区三区在线| 中文字幕无码精品亚洲资源网| 一级做a爱片特黄在线观看免费看| 亚洲国产成人久久精品99| 另类小说亚洲色图| 亚洲AV网站在线观看| 日本中文字幕免费看| 色久悠悠婷婷综合在线亚洲| 精品无码一级毛片免费视频观看 | 亚洲人成人伊人成综合网无码| 久久不见久久见中文字幕免费 | 亚洲最新中文字幕| 在线免费观看一级毛片| 久久精品国产亚洲AV天海翼| 亚洲国产成人久久综合野外| 日韩毛片在线免费观看| 亚洲精品制服丝袜四区| 亚洲网站在线免费观看| 亚洲欧美一区二区三区日产| 亚洲国产精品国产自在在线| a级大片免费观看| 亚洲天堂福利视频| 国产精品国产免费无码专区不卡| 一区二区三区在线免费观看视频| 亚洲色欲久久久综合网| 久久国产乱子伦免费精品| 伊人久久五月丁香综合中文亚洲| 免费国产a国产片高清| 国产一级黄片儿免费看| 亚洲乱码在线视频| 亚洲精品国产精品乱码不卞 | 亚洲jjzzjjzz在线观看| 国产又大又黑又粗免费视频| 中文成人久久久久影院免费观看 | 久久国产精品萌白酱免费| 亚洲综合久久久久久中文字幕| 国产精品高清全国免费观看| 免费观看一区二区三区| 亚洲日韩国产一区二区三区在线|