Tapestry Multiple Forms

    void onPrepareFromSearchCustomers() {
        // Any setting up of editable objects or fields on this form should be done in here.
    }

    void onPrepareFromSearchSuppliers() {
        // Any setting up of editable objects or fields on this form should be done in here.
    }

    Object onSuccessFromSearchCustomers() {
        page2.set(SearchType.CUSTOMERS, customerName);
        return page2;
    }

    Object onSuccessFromSearchSuppliers() {
        page2.set(SearchType.SUPPLIERS, supplierName);
        return page2;
    }

java代码

 

        <form t:type="form" t:id="searchcustomers">
            <t:errors/>
            Customer Name: 
            <input t:type="TextField" t:id="customerName" t:validate="required, maxlength=10" size="10"/> 
            <input type="submit" value="Search Customers"/>
        </form><br/>
        
        <form t:type="form" t:id="searchsuppliers">
            <t:errors/>
            Supplier Name: 
            <input t:type="TextField" t:id="supplierName" t:validate="required, maxlength=10" size="10"/> 
            <input type="submit" value="Search Suppliers"/>
        </form>

tml代码

posted @ 2013-04-03 23:17  VoctrALs  阅读(158)  评论(0编辑  收藏  举报