[Seasar-user:18401] [SAStrutsでInitialize]

thomas [E-MAIL ADDRESS DELETED]
2009年 8月 29日 (土) 16:36:03 JST


Hai,

I need to use one property [pageNumber] in Form Class and also initialize
this variable to 1 at the first time.

I am using paging concept .so i have put two buttons called 「次」and「前」。If i
click any one of this function i changed pageNumber and return same page.

i can get the result.The problem is if i run the same index page the
pageNumber is having privious value.

So i need to clear this value at the first time

*[In teeda] initialize method is called at the first time.

How can i acheive in SAStruts.

Can i use any Scopes..


This is my Action Class:


public String* index()* {

        EmployeemasterCB cb = new EmployeemasterCB();
        cb.paging(1, employeemasterForm.*pageNumber*);
        employeemasterItems = employeemasterBhv.selectPage(cb);
        employeemasterForm.isNext = employeemasterItems.isExistNextPage();
        employeemasterForm.isPrev = employeemasterItems.isExistPrePage();
        return "list.jsp";
    }

    @Execute(validator = false)
    public String prev(){
        employeemasterForm.*pageNumber *-= 1;
        return "/employeemaster/";
    }

    @Execute(validator = false)
    public String next(){
        employeemasterForm.*pageNumber *+= 1;
        return "/employeemaster/";
    }





Regards,
トマス
-------------- next part --------------
HTMLの添付ファイルを保管しました...
URL: <http://ml.seasar.org/archives/seasar-user/attachments/20090829/080dfdfd/attachment.html>


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