2008/10/13 Mead Lai <[EMAIL PROTECTED]>:
> yes, have any clue?
> public class Page {
>private int num;
>private int size = Constant.PAGE_SIZE;
>private int volume;
>
>
>private int index;// current page
>public Page(){
>
>}
>
> public int getIndex() {
>return this.
--- On Mon, 10/13/08, Lukasz Lenart wrote:
> Yes, you can use them like that, only remeber to have
> public getters and setters (for Page and for Index)
For Struts 2.1.3, at least, you can actually use public properties w/o the
s/getters. Whether or not that's a good idea is, of course, a differe
yes, have any clue?
public class Page {
private int num;
private int size = Constant.PAGE_SIZE;
private int volume;
private int index;// current page
public Page(){
}
public int getIndex() {
return this.index >= 0 ? this.index : 0;
}
public void setIn
2008/10/13 Mead Lai <[EMAIL PROTECTED]>:
> well, It's not work,
> It throw NullPointException at following line:
> System.out.println("##index" + this.page.getIndex());
> It seems page object haven't been created?
Does your Page class has default constructor?
Regards
--
Lukasz
http://www.le
well, It's not work,
It throw NullPointException at following line:
System.out.println("##index" + this.page.getIndex());
It seems page object haven't been created?
full code:
public class myAction{
private Page page;
public Page getPage() {
return page;
}
public void s
2008/10/13 Mead Lai <[EMAIL PROTECTED]>:
> I have added public getters and setters methods.
> but how to write the struts tag
>
>
> 12
>
>
> can I use to set model properties?
Yes, you can use them like that, only remeber to have public getters
and setters (for Page and for Index)
Regards
--
;
}
}
--BestRegards,
Mead
On Mon, Oct 13, 2008 at 4:15 PM, Lukasz Lenart <[EMAIL PROTECTED]
> wrote:
> 2008/10/13 Mead Lai <[EMAIL PROTECTED]>:
> > How to pass params with 'URL herf'?
> > well, the params data wanne pass to Model's property.
> > such,
2008/10/13 Mead Lai <[EMAIL PROTECTED]>:
> How to pass params with 'URL herf'?
> well, the params data wanne pass to Model's property.
> such, I have a "page" object in myAction, with get and set method.
>
> public class myAction{
> private P
How to pass params with 'URL herf'?
well, the params data wanne pass to Model's property.
such, I have a "page" object in myAction, with get and set method.
public class myAction{
private Page page;
}
public class Page{
public int index;
public int next;
}
my struts t
How to pass params with 'URL herf'?
well, the params data wanne pass to Model's property.
such, I have a "page" object in myAction, with get and set method.
public class myAction{
private Page page;
}
public class Page{
public int index;
public int next;
}
my str
10 matches
Mail list logo