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

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

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

    千里冰封
    JAVA 濃香四溢
    posts - 151,comments - 2801,trackbacks - 0
    看一下blogjava的發(fā)帖風(fēng)格,以及使用.呵呵

    這個博客不錯,以后就呆在這里了,發(fā)一段代碼看看效果.
      1/*
      2 * Page1.java
      3 *
      4 * Created on 2007年8月29日, 下午2:15
      5 * Copyright hadeslee
      6 */

      7package testvisual;
      8
      9import com.sun.rave.web.ui.appbase.AbstractPageBean;
     10import com.sun.webui.jsf.component.Body;
     11import com.sun.webui.jsf.component.Button;
     12import com.sun.webui.jsf.component.Form;
     13import com.sun.webui.jsf.component.Head;
     14import com.sun.webui.jsf.component.Html;
     15import com.sun.webui.jsf.component.Link;
     16import com.sun.webui.jsf.component.Message;
     17import com.sun.webui.jsf.component.Page;
     18import com.sun.webui.jsf.component.StaticText;
     19import com.sun.webui.jsf.component.TextField;
     20import javax.faces.FacesException;
     21import javax.faces.event.ValueChangeEvent;
     22import javax.faces.validator.LengthValidator;
     23
     24/**
     25 * <p>Page bean that corresponds to a similarly named JSP page.  This
     26 * class contains component definitions (and initialization code) for
     27 * all components that you have defined on this page, as well as
     28 * lifecycle methods and event handlers where you may add behavior
     29 * to respond to incoming events.</p>
     30 */

     31public class Page1 extends AbstractPageBean {
     32    // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
     33    private int __placeholder;
     34    
     35    /**
     36     * <p>Automatically managed component initialization.  <strong>WARNING:</strong>
     37     * This method is automatically generated, so any user-specified code inserted
     38     * here is subject to being replaced.</p>
     39     */

     40    private void _init() throws Exception {
     41        lengthValidator1.setMaximum(10);
     42        lengthValidator1.setMinimum(1);
     43        lengthValidator2.setMaximum(5);
     44        lengthValidator2.setMinimum(1);
     45    }

     46    
     47    private Page page1 = new Page();
     48    
     49    public Page getPage1() {
     50        return page1;
     51    }

     52    
     53    public void setPage1(Page p) {
     54        this.page1 = p;
     55    }

     56    
     57    private Html html1 = new Html();
     58    
     59    public Html getHtml1() {
     60        return html1;
     61    }

     62    
     63    public void setHtml1(Html h) {
     64        this.html1 = h;
     65    }

     66    
     67    private Head head1 = new Head();
     68    
     69    public Head getHead1() {
     70        return head1;
     71    }

     72    
     73    public void setHead1(Head h) {
     74        this.head1 = h;
     75    }

     76    
     77    private Link link1 = new Link();
     78    
     79    public Link getLink1() {
     80        return link1;
     81    }

     82    
     83    public void setLink1(Link l) {
     84        this.link1 = l;
     85    }

     86    
     87    private Body body1 = new Body();
     88    
     89    public Body getBody1() {
     90        return body1;
     91    }

     92    
     93    public void setBody1(Body b) {
     94        this.body1 = b;
     95    }

     96    
     97    private Form form1 = new Form();
     98    
     99    public Form getForm1() {
    100        return form1;
    101    }

    102    
    103    public void setForm1(Form f) {
    104        this.form1 = f;
    105    }

    106
    107    private Button button1 = new Button();
    108
    109    public Button getButton1() {
    110        return button1;
    111    }

    112
    113    public void setButton1(Button b) {
    114        this.button1 = b;
    115    }

    116
    117    private LengthValidator lengthValidator1 = new LengthValidator();
    118
    119    public LengthValidator getLengthValidator1() {
    120        return lengthValidator1;
    121    }

    122
    123    public void setLengthValidator1(LengthValidator lv) {
    124        this.lengthValidator1 = lv;
    125    }

    126
    127    private Message message1 = new Message();
    128
    129    public Message getMessage1() {
    130        return message1;
    131    }

    132
    133    public void setMessage1(Message m) {
    134        this.message1 = m;
    135    }

    136
    137    private TextField textField1 = new TextField();
    138
    139    public TextField getTextField1() {
    140        return textField1;
    141    }

    142
    143    public void setTextField1(TextField tf) {
    144        this.textField1 = tf;
    145    }

    146
    147    private LengthValidator lengthValidator2 = new LengthValidator();
    148
    149    public LengthValidator getLengthValidator2() {
    150        return lengthValidator2;
    151    }

    152
    153    public void setLengthValidator2(LengthValidator lv) {
    154        this.lengthValidator2 = lv;
    155    }

    156    
    157    // </editor-fold>
    158    
    159    /**
    160     * <p>Construct a new Page bean instance.</p>
    161     */

    162    public Page1() {
    163    }

    164    
    165    /**
    166     * <p>Callback method that is called whenever a page is navigated to,
    167     * either directly via a URL, or indirectly via page navigation.
    168     * Customize this method to acquire resources that will be needed
    169     * for event handlers and lifecycle methods, whether or not this
    170     * page is performing post back processing.</p>
    171     *
    172     * <p>Note that, if the current request is a postback, the property
    173     * values of the components do <strong>not</strong> represent any
    174     * values submitted with this request.  Instead, they represent the
    175     * property values that were saved for this view when it was rendered.</p>
    176     */

    177    public void init() {
    178        // Perform initializations inherited from our superclass
    179        super.init();
    180        // Perform application initialization that must complete
    181        // *before* managed components are initialized
    182        // TODO - add your own initialiation code here
    183        
    184        // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
    185        // Initialize automatically managed components
    186        // *Note* - this logic should NOT be modified
    187        try {
    188            _init();
    189        }
     catch (Exception e) {
    190            log("Page1 Initialization Failure", e);
    191            throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
    192        }

    193        
    194        // </editor-fold>
    195        // Perform application initialization that must complete
    196        // *after* managed components are initialized
    197        // TODO - add your own initialization code here
    198    }

    199    
    200    /**
    201     * <p>Callback method that is called after the component tree has been
    202     * restored, but before any event processing takes place.  This method
    203     * will <strong>only</strong> be called on a postback request that
    204     * is processing a form submit.  Customize this method to allocate
    205     * resources that will be required in your event handlers.</p>
    206     */

    207    public void preprocess() {
    208    }

    209    
    210    /**
    211     * <p>Callback method that is called just before rendering takes place.
    212     * This method will <strong>only</strong> be called for the page that
    213     * will actually be rendered (and not, for example, on a page that
    214     * handled a postback and then navigated to a different page).  Customize
    215     * this method to allocate resources that will be required for rendering
    216     * this page.</p>
    217     */

    218    public void prerender() {
    219    }

    220    
    221    /**
    222     * <p>Callback method that is called after rendering is completed for
    223     * this request, if <code>init()</code> was called (regardless of whether
    224     * or not this was the page that was actually rendered).  Customize this
    225     * method to release resources acquired in the <code>init()</code>,
    226     * <code>preprocess()</code>, or <code>prerender()</code> methods (or
    227     * acquired during execution of an event handler).</p>
    228     */

    229    public void destroy() {
    230    }

    231
    232    /**
    233     * <p>返回對已限定范圍的數(shù)據(jù) Bean 的引用。</p>
    234     */

    235    protected SessionBean1 getSessionBean1() {
    236        return (SessionBean1)getBean("SessionBean1");
    237    }

    238
    239    /**
    240     * <p>返回對已限定范圍的數(shù)據(jù) Bean 的引用。</p>
    241     */

    242    protected RequestBean1 getRequestBean1() {
    243        return (RequestBean1)getBean("RequestBean1");
    244    }

    245
    246    /**
    247     * <p>返回對已限定范圍的數(shù)據(jù) Bean 的引用。</p>
    248     */

    249    protected ApplicationBean1 getApplicationBean1() {
    250        return (ApplicationBean1)getBean("ApplicationBean1");
    251    }

    252
    253    public String button1_action() {
    254        // 待做事項:處理操作。返回的值是一個導(dǎo)航
    255        // 如果名稱為 null,則返回到同一頁。
    256        return "地址";
    257    }

    258
    259    public void textField1_processValueChange(ValueChangeEvent event) {
    260        // 待做事項:替換為您的代碼
    261        System.out.println("看看會調(diào)用嗎:"+event.getOldValue());
    262    }

    263}

    264
    265



    盡管千里冰封
    依然擁有晴空

    你我共同品味JAVA的濃香.
    posted on 2007-08-30 09:16 千里冰封 閱讀(617) 評論(1)  編輯  收藏

    FeedBack:
    # re: 第一篇文章,試一下
    2007-09-19 11:18 | 千里冰封
    呵呵,看看自己的第一篇,挺好玩的  回復(fù)  更多評論
      

    只有注冊用戶登錄后才能發(fā)表評論。


    網(wǎng)站導(dǎo)航:
     
    主站蜘蛛池模板: 久久久久亚洲AV无码去区首| 亚洲第一网站免费视频| 中文字幕久久亚洲一区| 国产亚洲av人片在线观看| 亚洲乱码精品久久久久..| 亚洲AV日韩精品久久久久久| 亚洲熟妇av一区| 亚洲日韩AV一区二区三区中文| 最近中文字幕无吗高清免费视频| 久久久久国色AV免费观看性色| 国内自产少妇自拍区免费| www亚洲一级视频com| 亚洲国产精品一区二区成人片国内| 亚洲AV无码乱码精品国产| 伊人亚洲综合青草青草久热| 亚洲Av熟妇高潮30p| 亚洲不卡影院午夜在线观看| 亚洲一区二区三区免费在线观看 | 亚洲一区精品视频在线| 亚洲暴爽av人人爽日日碰| 人人公开免费超级碰碰碰视频| 亚洲6080yy久久无码产自国产 | 亚洲精品乱码久久久久蜜桃| 成年免费a级毛片| 久久久久久夜精品精品免费啦| 国产成人无码精品久久久久免费| 男女作爱在线播放免费网站| 大学生一级毛片免费看| 亚洲免费日韩无码系列| 亚洲黄网在线观看| 香蕉视频免费在线播放| 无码中文字幕av免费放dvd| 成人性生交视频免费观看| 亚洲一区二区三区香蕉| 亚洲91精品麻豆国产系列在线| 四虎国产精品永免费| 亚洲成人在线免费观看| 亚洲av无码天堂一区二区三区| 亚洲视频在线观看一区| 黄页网站在线视频免费| 国产乱子精品免费视观看片|