Hi,
I was actually trying to use getPageParameters() as well, and it was
returning null too...
The reason I want to use it is, I have a base page which adds a context
panel fragment in the page, which it gets by an abstract method
getContextPanel(). Now in the sub page I wanted to use the
in FirstLogin.java ---
PageParameters params = new PageParameters();
System.out.print(pid= + params.getKey(pid));--the output is
null;how to get the parameter?
What are you doing here exactly?
Are you creating the PageParameters yourself?? in the FirstLogin page?
That is
Stephan, what you want is not PageParameters.getKey(id), but
PageParameters.getInt(id);
@zhangjunfeng:
PageParameters params = new PageParameters();
System.out.print(pid= + params.getKey(pid));--the output is null
yes, the output is null, you just created a new, empty page parameters
thanks,but there is no method of Page.getPageParameters(), how to use it ?
may you show me in detial ?
Stephan, what you want is not PageParameters.getKey(id), but
PageParameters.getInt(id);
PageParameters params = new PageParameters();
System.out.print(pid= +
Yes there is, it's in Page.java at line 319
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Donnerstag, 6. März 2008 03:11
To: users@wicket.apache.org
Subject: Re:RE: getPageParameters() NullPointer
thanks,but there is no method
Hi all,
I'm experiencing a problem using getPageParameters().
The parameter id is passed to MyPage:
setResponsePage(MyPage.class, new PageParameters(id=+evalId));
In the constructor of MyPage I try to access the parameter id:
Integer evalId = Integer.parseInt(getPageParameters().getKey(id));
Stating the obvious, but did you check if the parameter was actually present
in the URL?
Martijn
On 1/22/08, Stephan Koch [EMAIL PROTECTED] wrote:
Hi all,
I'm experiencing a problem using getPageParameters().
The parameter id is passed to MyPage:
setResponsePage(MyPage.class, new
OK,
hangon...
You need to define a constructor *taking* a pageparameters object.
In that object you can find the parameters.
Martijn
On 1/22/08, Martijn Dashorst [EMAIL PROTECTED] wrote:
Stating the obvious, but did you check if the parameter was actually
present in the URL?
Martijn
On
Betreff: Re: getPageParameters() NullPointer
Stating the obvious, but did you check if the parameter was actually present
in the URL?
Martijn
On 1/22/08, Stephan Koch [EMAIL PROTECTED] wrote:
Hi all,
I'm experiencing a problem using getPageParameters().
The parameter id is passed to MyPage
That was easy ;)
Thanks for your help.
Stephan
-Ursprüngliche Nachricht-
Von: Martijn Dashorst [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 22. Januar 2008 12:13
An: users@wicket.apache.org
Betreff: Re: getPageParameters() NullPointer
OK,
hangon...
You need to define a constructor
10 matches
Mail list logo