[Seasar-user:17445] Re: [Teeda:te:include]につぃいて

thomas [E-MAIL ADDRESS DELETED]
2009年 5月 14日 (木) 19:53:38 JST


小林 さん

Thanks for your reply....I got the solution

One more thing i want to clarify..

In my project i want to use paging,so i need to include 2 include pages..

one is for search condition and another one is for paging...

without search condition my program works fine...


*employeemasterList.html*

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:te="http://www.seasar.org/teeda/extension" xml:lang="ja" lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Employee Master</title>
<link rel="stylesheet" type=" text/css" href="../../css/global.css"/>
<link rel="stylesheet" type=" text/css" href="../../css/master.css"/>
<script>
function redirect(){

    window.location = "employeemasterCreate.html"
}

function search(){
    //document.getElementById('deleteflg').value="deleteflg";
    window.location = "employeemasterList.html?deleteflg=1"
}
</script>
</head>

<body>
*<te:include te:src="/include/maintanance.html"/>*              //this file
condains search conditions

<form id="employeemasterListForm"><br/>
<input type="button" value="Create" onclick="redirect()"></input>

<br/>


<table class="container" border="1" align="center" bordercolor="#408080">
<tr class="heading">

<td><label id="employeecode"/></td>
<td><label id="employeenamekanji"/></td>
<td><label id="employeenamekana"/></td>
<td><label id="employeefirstname"/></td>
<td><label id="employeelastname"/></td>
<td><label id="dob"/></td>
<td><label id="age"/></td>
<td><label id="joiningdate"/></td>
<td><label id="designation"/></td>
<td><label id="joblevel"/></td>
<td><label id="yearofexperience"/></td>
<td><label id="postalcode"/></td>
<!--<td><label id="address1"/></td>
<td><label id="address2"/></td>-->
<td><label id="housephoneno"/></td>
<td><label id="mobilephoneno"/></td>
<td><label id="partneremploye"/></td>
</tr>
<div id="employeemasterItems">
<tr class="item">
<!--<td><input type="checkbox" id="check"/></td>-->
<td><a id="goemployeemasterCreate"
href="employeemasterDetail.html?employeecode"><span
id="employeecode"></span></a></td>
<td><span id="employeenamekanji"></span></td>
<td><span id="employeenamekana"></span></td>
<td><span id="employeefirstname"></span></td>
<td><span id="employeelastname"></span></td>
<td><span id="dob"></span></td>
<td><span id="age"></span></td>
<td><span id="joiningdate"></span></td>
<td><span id="designation"></span></td>
<td><span id="joblevel"></span></td>
<td><span id="yearofexperience"></span></td>
<td><span id="postalcode"></span></td>
<!--<td><span id="address1"></span></td>
<td><span id="address2"></span></td>-->
<td><span id="housephoneno"></span></td>
<td><span id="mobilephoneno"></span></td>
<td><span id="partneremploye"></span></td>
</tr>
</div>
</table>
<center>
<!--<input type="text" id="table" style="display:block"></input>-->
*<te:include id="tablePages" te:src="/include/pagingInc.html"/>*
//This is for paging
</center>
</form>

<table align="center"><span id="allMessages"
style="color:red;"/></table></body>
</html>
*
maintanance.html*

<html xmlns:m="http://www.seasar.org/maya">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title></title>
    </head>
    <body>
    <center>
        <form id="maintananceForm">
            <table  bordercolor="#408080">
                <tr>
                <td colspan="2">
                    <h1><label
id="maintanancescreenLabel"></label></h1></td>
                </tr>
                <tr>
                    <td><label id="tableselectLabel"></label>
                        <select id="table">
                        </select><input type="button" id="doShow"></input>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="center" height="20">
                        <span class="oneField"></span>
                    </td>
                </tr>
            </table>
            <span id="Messages"></span>
        </form>
    </center>
    </body>
</html>
*
EmployeemasterListPage.java*

public class EmployeemasterListPage extends AbstractEmployeemasterPage{

    protected Log log = LogFactory.getLog(this.getClass());

    public String empcode;
    public int employeemasterIndex;

    public List<DataInfoStringDto> deleteflgItems;

    public String deleteflg;

    public boolean check;

    public String goemployeemasterCreate;

    @Binding (bindingType = BindingType.MUST)
    public PagingIncPage pagingIncPage;

    public PropertiesUtil prop;

    public int targetPage;

    public String table;

    public MaintanancePage maintanancePage;

    public static final String PROPERTY_FILE_PATH = "parameter.properties";

    public PagingResultBean<Employeemaster> employeemasterItems;

    public EmployeemasterBhv employeemasterBhv;


    public Class prerender() {
        return null;
    }

    public Class initialize(){
        return null;
    }

    public PagingResultBean<Employeemaster> getEmployeemasterItems(){
        employeemasterItems = selectPage();
        pagingIncPage.pagingResult = employeemasterItems;
        return employeemasterItems;
    }

    public PagingResultBean<Employeemaster> selectPage() {


        System.out.println("Paging"+*maintanancePage.table*);
//this value becomes null when i click number link in *pagingInc.html*.So i
couldnt get the correct employeeList.
        EmployeemasterCB empCB = new EmployeemasterCB();
        empCB.query().setDeleteflg_Equal(false);
        if(maintanancePage.table !=null){
            if(maintanancePage.table.equals("削除のみ")){

                empCB.query().setDeleteflg_Equal(true);
            }
        }
        empCB.paging(1, targetPage);
        employeemasterBhv.selectPage(empCB);
        return employeemasterBhv.selectPage(empCB);

    }

    public Class doCreate(){
        return null;
    }

}

How can i solve this problem....

Thanks in Advance.
トマス





2009/5/14 Koichi Kobayashi <[E-MAIL ADDRESS DELETED]>

> 小林 (koichik) です.
>
> Date:    Thu, 14 May 2009 16:19:52 +0900
> From:    thomas <[E-MAIL ADDRESS DELETED]>
> To:      [E-MAIL ADDRESS DELETED]
> Subject: [Seasar-user:17442] [Teeda:te:include]につぃいて
>
> > When i use te:include tag in my teeda html,How can i get the included
> page
> > property in main page..
>
> See the last section of the following links.
>
> http://teeda.seasar.org/ja/extension/concept/layout.html
>
> Therefore, add the following property to the Main Page
> (ItemstestPage.java).
>
> public MaintanancePage maintanancePage;
>
>
> --
> <component name="koichik">
>    <property name="fullName">"Koichi Kobayashi"</property>
>    <property name="email">"[E-MAIL ADDRESS DELETED]"</property>
>    <property name="blog">"http://d.hatena.ne.jp/koichik"</property>
> </component>
>
> _______________________________________________
> Seasar-user mailing list
> [E-MAIL ADDRESS DELETED]
> https://ml.seasar.org/mailman/listinfo/seasar-user
>
-------------- next part --------------
HTMLの添付ファイルを保管しました...
URL: <http://ml.seasar.org/archives/seasar-user/attachments/20090514/f826c731/attachment.html>


Seasar-user メーリングリストの案内