Quantcast

(no subject)

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

(no subject)

pepone.onrez
Hello all

is posible with wicket 1.2 set a default parameter to homePage

thanks
--
play tetris http://pepone.on-rez.com/tetris


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<a href="http://ads.osdn.com/?ad_idv37&alloc_id865&op=click">http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Wicket-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wicket-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: (no subject)

Igor Vaynberg-2
if you need a default parameter why not set it in the default constructor? and have both default and pageparams constructor forward to an init method?

-Igor


On 1/13/06, pepone pepone <[hidden email]> wrote:
Hello all

is posible with wicket 1.2 set a default parameter to homePage

thanks
--
play tetris http://pepone.on-rez.com/tetris


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<a href="http://ads.osdn.com/?ad_idv37&amp;alloc_id865&amp;opclick">http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
_______________________________________________
Wicket-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: (no subject)

pepone.onrez
my Home page now is like this

public class Home extends BasePage
{
        private MainMenu mainMenu;
        private SearchPanel searchPanel;
        private HomeView homeView;
        public Home()
        {
                add(mainMenu=new MainMenu("MainMenu"));
                add(searchPanel=new SearchPanel("SearchPanel"));
                add(homeView=new HomeView("HomeView"));
        }
};

HomeView instaciate difrent panels depending of pageParameters. and
depending of what panel instaciate the panel can need to read a
diferent parameter.





On 1/13/06, Igor Vaynberg <[hidden email]> wrote:

> if you need a default parameter why not set it in the default constructor?
> and have both default and pageparams constructor forward to an init method?
>
> -Igor
>
>
>
> On 1/13/06, pepone pepone <[hidden email]> wrote:
> > Hello all
> >
> > is posible with wicket 1.2 set a default parameter to homePage
> >
> > thanks
> > --
> > play tetris http://pepone.on-rez.com/tetris
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> > for problems?  Stop!  Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> > <a href="http://ads.osdn.com/?ad_idv37&alloc_id865&opclick">http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
> > _______________________________________________
> > Wicket-user mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>


--
play tetris http://pepone.on-rez.com/tetris


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<a href="http://ads.osdn.com/?ad_idv37&alloc_id865&op=click">http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Wicket-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wicket-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: (no subject)

Igor Vaynberg-2
so something like this should work:

public class Home {
   Home() {
     PageParameters default=new PageParameters();
     default.put("......
     init(default);
   }
   Home(PageParameters params) {
      init(params);
   }

   init(PageParameters params) {
               add(mainMenu=new MainMenu("MainMenu"));
                add(searchPanel=new SearchPanel("SearchPanel"));
                add(homeView=new HomeView("HomeView"));
  }


-Igor



On 1/13/06, pepone pepone <[hidden email]> wrote:
my Home page now is like this

public class Home extends BasePage
{
        private MainMenu mainMenu;
        private SearchPanel searchPanel;
        private HomeView homeView;
        public Home()
        {
                add(mainMenu=new MainMenu("MainMenu"));
                add(searchPanel=new SearchPanel("SearchPanel"));
                add(homeView=new HomeView("HomeView"));
        }
};

HomeView instaciate difrent panels depending of pageParameters. and
depending of what panel instaciate the panel can need to read a
diferent parameter.





On 1/13/06, Igor Vaynberg <[hidden email]> wrote:

> if you need a default parameter why not set it in the default constructor?
> and have both default and pageparams constructor forward to an init method?
>
> -Igor
>
>
>
> On 1/13/06, pepone pepone < [hidden email]> wrote:
> > Hello all
> >
> > is posible with wicket 1.2 set a default parameter to homePage
> >
> > thanks
> > --
> > play tetris http://pepone.on-rez.com/tetris
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> > for problems?  Stop!  Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> > <a href="http://ads.osdn.com/?ad_idv37&amp;alloc_id865&amp;opclick">http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
> > _______________________________________________
> > Wicket-user mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>


--
play tetris http://pepone.on-rez.com/tetris


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<a href="http://ads.osdn.com/?ad_idv37&amp;alloc_id865&amp;opclick"> http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
_______________________________________________
Wicket-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: (no subject)

pepone.onrez
This not works for me with wicket-wicket-1.2-20060108

I changue my code to this

public Home()
        {
                PageParameters params=new PageParameters();
                params.put("page","Home");
                params.put("action","view");
                params.put("node","/homeDocument.html");
                init(params);
        }
       
        public Home(PageParameters params) {
                init(params);
        }
       
        public void init(PageParameters params) {
                add(mainMenu=new MainMenu("MainMenu"));
                add(searchPanel=new SearchPanel("SearchPanel"));
                add(homeView=new HomeView("HomeView"));
        }

now when i go to
http://localhost:8080/oz-portal/app?bookmarkablePage=oz.web.html.portal.Home&action=view&node=%2FhomeDocument.html&page=Home
page rendres ok

but when go to http://localhost:8080/oz-portal/app i get this exception

wicket.WicketRuntimeException: Could not create home page
    at wicket.request.compound.DefaultRequestTargetResolverStrategy.resolveHomePageTarget(DefaultRequestTargetResolverStrategy.java:334)
    at wicket.request.compound.DefaultRequestTargetResolverStrategy.resolve(DefaultRequestTargetResolverStrategy.java:101)
    at wicket.request.compound.AbstractCompoundRequestCycleProcessor.resolve(AbstractCompoundRequestCycleProcessor.java:48)
    at wicket.RequestCycle.step(RequestCycle.java:951)
    at wicket.RequestCycle.steps(RequestCycle.java:1057)
    at wicket.RequestCycle.request(RequestCycle.java:534)
    at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:199)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:596)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
    at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
    at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
    at org.mortbay.http.HttpServer.service(HttpServer.java:909)
    at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
    at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
    at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
    at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
    at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
    at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
Caused by: wicket.WicketRuntimeException: Can't instantiate page using
constructor public oz.web.html.portal.Home(wicket.PageParameters) and
argument
    at wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:156)
    at wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:84)
    at wicket.request.compound.DefaultRequestTargetResolverStrategy.resolveHomePageTarget(DefaultRequestTargetResolverStrategy.java:318)
    ... 21 more
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
    at wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:142)
    ... 23 more
Caused by: java.lang.NullPointerException
    at oz.web.html.portal.HomeView.getView(Unknown Source)
    at oz.web.html.portal.WidgetStack.<init>(Unknown Source)
    at oz.web.html.portal.HomeView.<init>(Unknown Source)
    at oz.web.html.portal.Home.init(Unknown Source)
    at oz.web.html.portal.Home.<init>(Unknown Source)
    ... 28 more
On 1/13/06, Igor Vaynberg <[hidden email]> wrote:

> so something like this should work:
>
> public class Home {
>    Home() {
>      PageParameters default=new PageParameters();
>      default.put("......
>      init(default);
>    }
>    Home(PageParameters params) {
>       init(params);
>    }
>
>    init(PageParameters params) {
>                add(mainMenu=new MainMenu("MainMenu"));
>                 add(searchPanel=new
> SearchPanel("SearchPanel"));
>                  add(homeView=new HomeView("HomeView"));
>   }
>
>
> -Igor
>
>
>
>
> On 1/13/06, pepone pepone < [hidden email]> wrote:
> >
> > my Home page now is like this
> >
> > public class Home extends BasePage
> > {
> >         private MainMenu mainMenu;
> >         private SearchPanel searchPanel;
> >         private HomeView homeView;
> >         public Home()
> >         {
> >                 add(mainMenu=new MainMenu("MainMenu"));
> >                 add(searchPanel=new
> SearchPanel("SearchPanel"));
> >                 add(homeView=new HomeView("HomeView"));
> >         }
> > };
> >
> > HomeView instaciate difrent panels depending of pageParameters. and
> > depending of what panel instaciate the panel can need to read a
> > diferent parameter.
> >
> >
> >
> >
> >
> > On 1/13/06, Igor Vaynberg <[hidden email]> wrote:
> > > if you need a default parameter why not set it in the default
> constructor?
> > > and have both default and pageparams constructor forward to an init
> method?
> > >
> > > -Igor
> > >
> > >
> > >
> > > On 1/13/06, pepone pepone < [hidden email]> wrote:
> > > > Hello all
> > > >
> > > > is posible with wicket 1.2 set a default parameter to homePage
> > > >
> > > > thanks
> > > > --
> > > > play tetris http://pepone.on-rez.com/tetris
> > > >
> > > >
> > > >
> -------------------------------------------------------
> > > > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> > > files
> > > > for problems?  Stop!  Download the new AJAX search engine that makes
> > > > searching your log files as easy as surfing the  web.  DOWNLOAD
> SPLUNK!
> > > > <a href="http://ads.osdn.com/?ad_idv37&alloc_id865&opclick">http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
> > > > _______________________________________________
> > > > Wicket-user mailing list
> > > > [hidden email]
> > > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > >
> > >
> > >
> >
> >
> > --
> > play tetris http://pepone.on-rez.com/tetris
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> > for problems?  Stop!  Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> > <a href="http://ads.osdn.com/?ad_idv37&alloc_id865&opclick">http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
> > _______________________________________________
> > Wicket-user mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>


--
play tetris http://pepone.on-rez.com/tetris


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<a href="http://ads.osdn.com/?ad_idv37&alloc_id865&op=click">http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Wicket-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wicket-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: (no subject)

Igor Vaynberg-2
hmm
looks like the constructor with PageParameters is still being called instead of the default Home() constructor

Caused by: wicket.WicketRuntimeException: Can't instantiate page using
constructor public oz.web.html.portal.Home (wicket.PageParameters) and
argument

i think this is an incorrect behaviour. if no page params are specified the default constructor should be used.

-Igor



On 1/13/06, pepone pepone <[hidden email]> wrote:
This not works for me with wicket-wicket-1.2-20060108

I changue my code to this

public Home()
        {
                PageParameters params=new PageParameters();
                params.put("page","Home");
                params.put("action","view");
                params.put("node","/homeDocument.html");
                init(params);
        }

        public Home(PageParameters params) {
                init(params);
        }

        public void init(PageParameters params) {
                add(mainMenu=new MainMenu("MainMenu"));
                add(searchPanel=new SearchPanel("SearchPanel"));
                add(homeView=new HomeView("HomeView"));
        }

now when i go to
http://localhost:8080/oz-portal/app?bookmarkablePage=oz.web.html.portal.Home&action=view&node=%2FhomeDocument.html&page=Home
page rendres ok

but when go to http://localhost:8080/oz-portal/app i get this exception

wicket.WicketRuntimeException: Could not create home page
    at wicket.request.compound.DefaultRequestTargetResolverStrategy.resolveHomePageTarget(DefaultRequestTargetResolverStrategy.java :334)
    at wicket.request.compound.DefaultRequestTargetResolverStrategy.resolve(DefaultRequestTargetResolverStrategy.java:101)
    at wicket.request.compound.AbstractCompoundRequestCycleProcessor.resolve(AbstractCompoundRequestCycleProcessor.java :48)
    at wicket.RequestCycle.step(RequestCycle.java:951)
    at wicket.RequestCycle.steps(RequestCycle.java:1057)
    at wicket.RequestCycle.request(RequestCycle.java:534)
    at wicket.protocol.http.WicketServlet.doGet (WicketServlet.java:199)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:596)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
    at org.mortbay.jetty.servlet.ServletHolder.handle (ServletHolder.java:428)
    at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
    at org.mortbay.http.HttpContext.handle (HttpContext.java:1530)
    at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
    at org.mortbay.http.HttpServer.service (HttpServer.java:909)
    at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
    at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
    at org.mortbay.http.HttpConnection.handle (HttpConnection.java:833)
    at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
    at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
    at org.mortbay.util.ThreadPool$PoolThread.run (ThreadPool.java:534)
Caused by: wicket.WicketRuntimeException: Can't instantiate page using
constructor public oz.web.html.portal.Home(wicket.PageParameters) and
argument
    at wicket.session.DefaultPageFactory.newPage (DefaultPageFactory.java:156)
    at wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:84)
    at wicket.request.compound.DefaultRequestTargetResolverStrategy.resolveHomePageTarget(DefaultRequestTargetResolverStrategy.java :318)
    ... 21 more
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
    at wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:142)
    ... 23 more
Caused by: java.lang.NullPointerException
    at oz.web.html.portal.HomeView.getView(Unknown Source)
    at oz.web.html.portal.WidgetStack .<init>(Unknown Source)
    at oz.web.html.portal.HomeView.<init>(Unknown Source)
    at oz.web.html.portal.Home.init(Unknown Source)
    at oz.web.html.portal.Home.<init>(Unknown Source)
    ... 28 more
On 1/13/06, Igor Vaynberg <[hidden email]> wrote:

> so something like this should work:
>
> public class Home {
>    Home() {
>      PageParameters default=new PageParameters();
>      default.put("......
>      init(default);
>    }
>    Home(PageParameters params) {
>       init(params);
>    }
>
>    init(PageParameters params) {
>                add(mainMenu=new MainMenu("MainMenu"));
>                 add(searchPanel=new
> SearchPanel("SearchPanel"));
>                  add(homeView=new HomeView("HomeView"));
>   }
>
>
> -Igor
>
>
>
>
> On 1/13/06, pepone pepone < [hidden email]> wrote:
> >
> > my Home page now is like this
> >
> > public class Home extends BasePage
> > {
> >         private MainMenu mainMenu;
> >         private SearchPanel searchPanel;
> >         private HomeView homeView;
> >         public Home()
> >         {
> >                 add(mainMenu=new MainMenu("MainMenu"));
> >                 add(searchPanel=new
> SearchPanel("SearchPanel"));
> >                 add(homeView=new HomeView("HomeView"));
> >         }
> > };
> >
> > HomeView instaciate difrent panels depending of pageParameters. and
> > depending of what panel instaciate the panel can need to read a
> > diferent parameter.
> >
> >
> >
> >
> >
> > On 1/13/06, Igor Vaynberg <[hidden email]> wrote:
> > > if you need a default parameter why not set it in the default
> constructor?
> > > and have both default and pageparams constructor forward to an init
> method?
> > >
> > > -Igor
> > >
> > >
> > >
> > > On 1/13/06, pepone pepone < [hidden email]> wrote:

> > > > Hello all
> > > >
> > > > is posible with wicket 1.2 set a default parameter to homePage
> > > >
> > > > thanks
> > > > --
> > > > play tetris http://pepone.on-rez.com/tetris
> > > >
> > > >
> > > >
> -------------------------------------------------------
> > > > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> > > files
> > > > for problems?  Stop!  Download the new AJAX search engine that makes
> > > > searching your log files as easy as surfing the  web.  DOWNLOAD
> SPLUNK!
> > > > <a href="http://ads.osdn.com/?ad_idv37&amp;alloc_id865&amp;opclick">http://ads.osdn.com/?ad_idv37&alloc_id865&opclick

> > > > _______________________________________________
> > > > Wicket-user mailing list
> > > > [hidden email]
> > > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > >
> > >
> > >
> >
> >
> > --
> > play tetris http://pepone.on-rez.com/tetris
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> > for problems?  Stop!  Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> > <a href="http://ads.osdn.com/?ad_idv37&amp;alloc_id865&amp;opclick"> http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
> > _______________________________________________
> > Wicket-user mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>


--
play tetris http://pepone.on-rez.com/tetris


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<a href="http://ads.osdn.com/?ad_idv37&amp;alloc_id865&amp;opclick">http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
_______________________________________________
Wicket-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: (no subject)

pepone.onrez
Must i open a bug for this issue?
On 1/14/06, Igor Vaynberg <[hidden email]> wrote:

> hmm
> looks like the constructor with PageParameters is still being called instead
> of the default Home() constructor
>
> Caused by: wicket.WicketRuntimeException: Can't instantiate page using
> constructor public oz.web.html.portal.Home (wicket.PageParameters) and
> argument
>
> i think this is an incorrect behaviour. if no page params are specified the
> default constructor should be used.
>
> -Igor
>
>
>
>
> On 1/13/06, pepone pepone <[hidden email]> wrote:
> >
> > This not works for me with wicket-wicket-1.2-20060108
> >
> > I changue my code to this
> >
> > public Home()
> >         {
> >                 PageParameters params=new PageParameters();
> >                 params.put("page","Home");
> >                 params.put("action","view");
> >                 params.put("node","/homeDocument.html");
> >                 init(params);
> >         }
> >
> >         public Home(PageParameters params) {
> >                 init(params);
> >         }
> >
> >         public void init(PageParameters params) {
> >                 add(mainMenu=new MainMenu("MainMenu"));
> >                 add(searchPanel=new
> SearchPanel("SearchPanel"));
> >                 add(homeView=new HomeView("HomeView"));
> >         }
> >
> > now when i go to
> >
> http://localhost:8080/oz-portal/app?bookmarkablePage=oz.web.html.portal.Home&action=view&node=%2FhomeDocument.html&page=Home
> > page rendres ok
> >
> > but when go to http://localhost:8080/oz-portal/app i get
> this exception
> >
> > wicket.WicketRuntimeException: Could not create home page
> >     at
> wicket.request.compound.DefaultRequestTargetResolverStrategy.resolveHomePageTarget(DefaultRequestTargetResolverStrategy.java
> :334)
> >     at
> wicket.request.compound.DefaultRequestTargetResolverStrategy.resolve(DefaultRequestTargetResolverStrategy.java:101)
> >     at
> wicket.request.compound.AbstractCompoundRequestCycleProcessor.resolve(AbstractCompoundRequestCycleProcessor.java
> :48)
> >     at wicket.RequestCycle.step(RequestCycle.java:951)
> >     at wicket.RequestCycle.steps(RequestCycle.java:1057)
> >     at wicket.RequestCycle.request(RequestCycle.java:534)
> >     at wicket.protocol.http.WicketServlet.doGet
> (WicketServlet.java:199)
> >     at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:596)
> >     at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> >     at org.mortbay.jetty.servlet.ServletHolder.handle
> (ServletHolder.java:428)
> >     at
> org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473)
> >     at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
> >     at org.mortbay.http.HttpContext.handle
> (HttpContext.java:1530)
> >     at
> org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
> >     at
> org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
> >     at org.mortbay.http.HttpServer.service
> (HttpServer.java:909)
> >     at
> org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
> >     at
> org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
> >     at org.mortbay.http.HttpConnection.handle
> (HttpConnection.java:833)
> >     at
> org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
> >     at
> org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
> >     at org.mortbay.util.ThreadPool$PoolThread.run
> (ThreadPool.java:534)
> > Caused by: wicket.WicketRuntimeException: Can't instantiate page using
> > constructor public oz.web.html.portal.Home(wicket.PageParameters) and
> > argument
> >     at wicket.session.DefaultPageFactory.newPage
> (DefaultPageFactory.java:156)
> >     at
> wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:84)
> >     at
> wicket.request.compound.DefaultRequestTargetResolverStrategy.resolveHomePageTarget(DefaultRequestTargetResolverStrategy.java
> :318)
> >     ... 21 more
> > Caused by: java.lang.reflect.InvocationTargetException
> >     at
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> >     at
> sun.reflect.NativeConstructorAccessorImpl.newInstance
> (NativeConstructorAccessorImpl.java:39)
> >     at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> >     at
> java.lang.reflect.Constructor.newInstance(Constructor.java:274)
> >     at
> wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:142)
> >     ... 23 more
> > Caused by: java.lang.NullPointerException
> >     at oz.web.html.portal.HomeView.getView(Unknown
> Source)
> >     at oz.web.html.portal.WidgetStack .<init>(Unknown Source)
> >     at oz.web.html.portal.HomeView.<init>(Unknown Source)
> >     at oz.web.html.portal.Home.init(Unknown Source)
> >     at oz.web.html.portal.Home.<init>(Unknown Source)
> >     ... 28 more
> > On 1/13/06, Igor Vaynberg <[hidden email]> wrote:
> > > so something like this should work:
> > >
> > > public class Home {
> > >    Home() {
> > >      PageParameters default=new PageParameters();
> > >      default.put("......
> > >      init(default);
> > >    }
> > >    Home(PageParameters params) {
> > >       init(params);
> > >    }
> > >
> > >    init(PageParameters params) {
> > >                add(mainMenu=new MainMenu("MainMenu"));
> > >                 add(searchPanel=new
> > > SearchPanel("SearchPanel"));
> > >                  add(homeView=new
> HomeView("HomeView"));
> > >   }
> > >
> > >
> > > -Igor
> > >
> > >
> > >
> > >
> > > On 1/13/06, pepone pepone < [hidden email]> wrote:
> > > >
> > > > my Home page now is like this
> > > >
> > > > public class Home extends BasePage
> > > > {
> > > >         private MainMenu mainMenu;
> > > >         private SearchPanel searchPanel;
> > > >         private HomeView homeView;
> > > >         public Home()
> > > >         {
> > > >                 add(mainMenu=new MainMenu("MainMenu"));
> > > >                 add(searchPanel=new
> > > SearchPanel("SearchPanel"));
> > > >                 add(homeView=new HomeView("HomeView"));
> > > >         }
> > > > };
> > > >
> > > > HomeView instaciate difrent panels depending of pageParameters. and
> > > > depending of what panel instaciate the panel can need to read a
> > > > diferent parameter.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On 1/13/06, Igor Vaynberg <[hidden email]> wrote:
> > > > > if you need a default parameter why not set it in the default
> > > constructor?
> > > > > and have both default and pageparams constructor forward to an init
> > > method?
> > > > >
> > > > > -Igor
> > > > >
> > > > >
> > > > >
> > > > > On 1/13/06, pepone pepone < [hidden email]> wrote:
> > > > > > Hello all
> > > > > >
> > > > > > is posible with wicket 1.2 set a default parameter to homePage
> > > > > >
> > > > > > thanks
> > > > > > --
> > > > > > play tetris http://pepone.on-rez.com/tetris
> > > > > >
> > > > > >
> > > > > >
> > > -------------------------------------------------------
> > > > > > This SF.net email is sponsored by: Splunk Inc. Do you grep through
> log
> > > > > files
> > > > > > for problems?  Stop!  Download the new AJAX search engine that
> makes
> > > > > > searching your log files as easy as surfing the  web.  DOWNLOAD
> > > SPLUNK!
> > > > > >
> <a href="http://ads.osdn.com/?ad_idv37&alloc_id865&opclick">http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
> > > > > > _______________________________________________
> > > > > > Wicket-user mailing list
> > > > > > [hidden email]
> > > > > >
> > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > play tetris http://pepone.on-rez.com/tetris
> > > >
> > > >
> > > >
> -------------------------------------------------------
> > > > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> > > files
> > > > for problems?  Stop!  Download the new AJAX search engine that makes
> > > > searching your log files as easy as surfing the  web.  DOWNLOAD
> SPLUNK!
> > > > <a href="http://ads.osdn.com/?ad_idv37&alloc_id865&opclick">http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
> > > > _______________________________________________
> > > > Wicket-user mailing list
> > > > [hidden email]
> > > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > >
> > >
> > >
> >
> >
> > --
> > play tetris http://pepone.on-rez.com/tetris
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> > for problems?  Stop!  Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> > <a href="http://ads.osdn.com/?ad_idv37&alloc_id865&opclick">http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
> > _______________________________________________
> > Wicket-user mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>


--
play tetris http://pepone.on-rez.com/tetris


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<a href="http://ads.osdn.com/?ad_idv37&alloc_id865&op=click">http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Wicket-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wicket-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: (no subject)

Igor Vaynberg-2
im fixing it right now
will prob have it fixed before you open the bug :)

-Igor


On 1/13/06, pepone pepone <[hidden email]> wrote:
Must i open a bug for this issue?
On 1/14/06, Igor Vaynberg < [hidden email]> wrote:
> hmm
> looks like the constructor with PageParameters is still being called instead
> of the default Home() constructor
>

> Caused by: wicket.WicketRuntimeException: Can't instantiate page using
> constructor public oz.web.html.portal.Home (wicket.PageParameters) and
> argument
>
> i think this is an incorrect behaviour. if no page params are specified the
> default constructor should be used.
>
> -Igor
>
>
>
>
> On 1/13/06, pepone pepone <[hidden email]> wrote:
> >
> > This not works for me with wicket-wicket-1.2-20060108
> >
> > I changue my code to this
> >
> > public Home()
> >         {
> >                 PageParameters params=new PageParameters();
> >                 params.put("page","Home");
> >                 params.put("action","view");
> >                 params.put("node","/homeDocument.html");
> >                 init(params);
> >         }
> >
> >         public Home(PageParameters params) {
> >                 init(params);
> >         }
> >
> >         public void init(PageParameters params) {
> >                 add(mainMenu=new MainMenu("MainMenu"));
> >                 add(searchPanel=new
> SearchPanel("SearchPanel"));
> >                 add(homeView=new HomeView("HomeView"));
> >         }
> >
> > now when i go to
> >
> http://localhost:8080/oz-portal/app?bookmarkablePage=oz.web.html.portal.Home&action=view&node=%2FhomeDocument.html&page=Home
> > page rendres ok
> >
> > but when go to http://localhost:8080/oz-portal/app i get
> this exception
> >
> > wicket.WicketRuntimeException: Could not create home page
> >     at
> wicket.request.compound.DefaultRequestTargetResolverStrategy.resolveHomePageTarget (DefaultRequestTargetResolverStrategy.java
> :334)
> >     at
> wicket.request.compound.DefaultRequestTargetResolverStrategy.resolve(DefaultRequestTargetResolverStrategy.java:101)
> >     at
> wicket.request.compound.AbstractCompoundRequestCycleProcessor.resolve(AbstractCompoundRequestCycleProcessor.java

> :48)
> >     at wicket.RequestCycle.step(RequestCycle.java:951)
> >     at wicket.RequestCycle.steps (RequestCycle.java:1057)
> >     at wicket.RequestCycle.request(RequestCycle.java:534)
> >     at wicket.protocol.http.WicketServlet.doGet
> (WicketServlet.java:199)
> >     at
> javax.servlet.http.HttpServlet.service (HttpServlet.java:596)
> >     at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> >     at org.mortbay.jetty.servlet.ServletHolder.handle
> (ServletHolder.java:428)
> >     at
> org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473)
> >     at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
> >     at org.mortbay.http.HttpContext.handle
> (HttpContext.java:1530)
> >     at
> org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
> >     at
> org.mortbay.http.HttpContext.handle(HttpContext.java :1482)
> >     at org.mortbay.http.HttpServer.service
> (HttpServer.java:909)
> >     at
> org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
> >     at
> org.mortbay.http.HttpConnection.handleNext (HttpConnection.java:982)
> >     at org.mortbay.http.HttpConnection.handle
> (HttpConnection.java:833)
> >     at
> org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
> >     at

> org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
> >     at org.mortbay.util.ThreadPool$PoolThread.run
> (ThreadPool.java:534)
> > Caused by: wicket.WicketRuntimeException : Can't instantiate page using
> > constructor public oz.web.html.portal.Home(wicket.PageParameters) and
> > argument
> >     at wicket.session.DefaultPageFactory.newPage
> (DefaultPageFactory.java :156)
> >     at
> wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:84)
> >     at
> wicket.request.compound.DefaultRequestTargetResolverStrategy.resolveHomePageTarget(DefaultRequestTargetResolverStrategy.java
> :318)
> >     ... 21 more
> > Caused by: java.lang.reflect.InvocationTargetException
> >     at
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> >     at

> sun.reflect.NativeConstructorAccessorImpl.newInstance
> (NativeConstructorAccessorImpl.java:39)
> >     at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java :27)
> >     at
> java.lang.reflect.Constructor.newInstance(Constructor.java:274)
> >     at
> wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:142)
> >     ... 23 more
> > Caused by: java.lang.NullPointerException
> >     at oz.web.html.portal.HomeView.getView(Unknown
> Source)
> >     at oz.web.html.portal.WidgetStack .<init>(Unknown Source)
> >     at oz.web.html.portal.HomeView.<init>(Unknown Source)
> >     at oz.web.html.portal.Home.init(Unknown Source)
> >     at oz.web.html.portal.Home.<init>(Unknown Source)
> >     ... 28 more
> > On 1/13/06, Igor Vaynberg <[hidden email]> wrote:
> > > so something like this should work:
> > >
> > > public class Home {
> > >    Home() {
> > >      PageParameters default=new PageParameters();
> > >      default.put("......
> > >      init(default);
> > >    }
> > >    Home(PageParameters params) {
> > >       init(params);
> > >    }
> > >
> > >    init(PageParameters params) {
> > >                add(mainMenu=new MainMenu("MainMenu"));
> > >                 add(searchPanel=new
> > > SearchPanel("SearchPanel"));
> > >                  add(homeView=new
> HomeView("HomeView"));
> > >   }
> > >
> > >
> > > -Igor
> > >
> > >
> > >
> > >
> > > On 1/13/06, pepone pepone < [hidden email]> wrote:
> > > >
> > > > my Home page now is like this
> > > >
> > > > public class Home extends BasePage
> > > > {
> > > >         private MainMenu mainMenu;
> > > >         private SearchPanel searchPanel;

> > > >         private HomeView homeView;
> > > >         public Home()
> > > >         {
> > > >                 add(mainMenu=new MainMenu("MainMenu"));
> > > >                 add(searchPanel=new
> > > SearchPanel("SearchPanel"));
> > > >                 add(homeView=new HomeView("HomeView"));
> > > >         }
> > > > };
> > > >
> > > > HomeView instaciate difrent panels depending of pageParameters. and
> > > > depending of what panel instaciate the panel can need to read a
> > > > diferent parameter.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On 1/13/06, Igor Vaynberg <[hidden email]> wrote:
> > > > > if you need a default parameter why not set it in the default
> > > constructor?
> > > > > and have both default and pageparams constructor forward to an init
> > > method?
> > > > >
> > > > > -Igor
> > > > >
> > > > >
> > > > >
> > > > > On 1/13/06, pepone pepone < [hidden email]> wrote:
> > > > > > Hello all
> > > > > >
> > > > > > is posible with wicket 1.2 set a default parameter to homePage
> > > > > >
> > > > > > thanks
> > > > > > --
> > > > > > play tetris http://pepone.on-rez.com/tetris
> > > > > >
> > > > > >
> > > > > >
> > > -------------------------------------------------------
> > > > > > This SF.net email is sponsored by: Splunk Inc. Do you grep through
> log
> > > > > files
> > > > > > for problems?  Stop!  Download the new AJAX search engine that
> makes
> > > > > > searching your log files as easy as surfing the  web.  DOWNLOAD
> > > SPLUNK!
> > > > > >
> <a href="http://ads.osdn.com/?ad_idv37&amp;alloc_id865&amp;opclick">http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
> > > > > > _______________________________________________
> > > > > > Wicket-user mailing list
> > > > > > [hidden email]
> > > > > >
> > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > play tetris http://pepone.on-rez.com/tetris
> > > >
> > > >
> > > >
> -------------------------------------------------------
> > > > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> > > files
> > > > for problems?  Stop!  Download the new AJAX search engine that makes
> > > > searching your log files as easy as surfing the  web.  DOWNLOAD
> SPLUNK!
> > > > <a href="http://ads.osdn.com/?ad_idv37&amp;alloc_id865&amp;opclick">http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
> > > > _______________________________________________
> > > > Wicket-user mailing list
> > > > [hidden email]
> > > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > >
> > >
> > >
> >
> >
> > --
> > play tetris http://pepone.on-rez.com/tetris
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> > for problems?  Stop!  Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> > <a href="http://ads.osdn.com/?ad_idv37&amp;alloc_id865&amp;opclick">http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
> > _______________________________________________
> > Wicket-user mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>


--
play tetris http://pepone.on-rez.com/tetris


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<a href="http://ads.osdn.com/?ad_idv37&amp;alloc_id865&amp;opclick"> http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
_______________________________________________
Wicket-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: (no subject)

Igor Vaynberg-2
argh, maybe not. i fixed it, but that it broke a lof of tests. looks like this bug has been around for a while and weve come to depend on wicket working like it is. i am going to start a thread on it in devel list.

meantime change your page to do this:
public Home()
        {
> >                 init(constructDefaultParams());
        }
> >
> >         public Home(PageParameters params) {
                    if (params.size()==0) { init(constructDefaultParams()); }
                    else { init(params); }
> >         }



-Igor


On 1/13/06, Igor Vaynberg <[hidden email]> wrote:
im fixing it right now
will prob have it fixed before you open the bug :)


-Igor


On 1/13/06, pepone pepone <[hidden email]> wrote:
Must i open a bug for this issue?
On 1/14/06, Igor Vaynberg < [hidden email]> wrote:
> hmm
> looks like the constructor with PageParameters is still being called instead
> of the default Home() constructor
>

> Caused by: wicket.WicketRuntimeException: Can't instantiate page using
> constructor public oz.web.html.portal.Home (wicket.PageParameters) and
> argument
>
> i think this is an incorrect behaviour. if no page params are specified the
> default constructor should be used.
>
> -Igor
>
>
>
>
> On 1/13/06, pepone pepone <[hidden email]> wrote:
> >
> > This not works for me with wicket-wicket-1.2-20060108
> >
> > I changue my code to this
> >
> > public Home()
> >         {
> >                 PageParameters params=new PageParameters();
> >                 params.put("page","Home");
> >                 params.put("action","view");
> >                 params.put("node","/homeDocument.html");
> >                 init(params);
> >         }
> >
> >         public Home(PageParameters params) {
> >                 init(params);
> >         }
> >
> >         public void init(PageParameters params) {

> >                 add(mainMenu=new MainMenu("MainMenu"));
> >                 add(searchPanel=new
> SearchPanel("SearchPanel"));
> >                 add(homeView=new HomeView("HomeView"));
> >         }
> >
> > now when i go to
> >
> <a href="http://localhost:8080/oz-portal/app?bookmarkablePage=oz.web.html.portal.Home&amp;action=view&amp;node=%2FhomeDocument.html&amp;page=Home" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://localhost:8080/oz-portal/app?bookmarkablePage=oz.web.html.portal.Home&action=view&node=%2FhomeDocument.html&page=Home
> > page rendres ok
> >
> > but when go to <a href="http://localhost:8080/oz-portal/app" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://localhost:8080/oz-portal/app i get
> this exception
> >
> > wicket.WicketRuntimeException: Could not create home page
> >     at
> wicket.request.compound.DefaultRequestTargetResolverStrategy.resolveHomePageTarget (DefaultRequestTargetResolverStrategy.java
> :334)
> >     at
> wicket.request.compound.DefaultRequestTargetResolverStrategy.resolve(DefaultRequestTargetResolverStrategy.java:101)
> >     at
> wicket.request.compound.AbstractCompoundRequestCycleProcessor.resolve(AbstractCompoundRequestCycleProcessor.java

> :48)
> >     at wicket.RequestCycle.step(RequestCycle.java:951)
> >     at wicket.RequestCycle.steps (RequestCycle.java:1057)
> >     at wicket.RequestCycle.request(RequestCycle.java:534)
> >     at wicket.protocol.http.WicketServlet.doGet
> (WicketServlet.java:199)
> >     at
> javax.servlet.http.HttpServlet.service (HttpServlet.java:596)
> >     at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> >     at org.mortbay.jetty.servlet.ServletHolder.handle
> (ServletHolder.java:428)
> >     at
> org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473)
> >     at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
> >     at org.mortbay.http.HttpContext.handle
> (HttpContext.java:1530)
> >     at
> org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
> >     at
> org.mortbay.http.HttpContext.handle(HttpContext.java :1482)
> >     at org.mortbay.http.HttpServer.service
> (HttpServer.java:909)
> >     at
> org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
> >     at
> org.mortbay.http.HttpConnection.handleNext (HttpConnection.java:982)
> >     at org.mortbay.http.HttpConnection.handle
> (HttpConnection.java:833)
> >     at
> org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
> >     at

> org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
> >     at org.mortbay.util.ThreadPool$PoolThread.run
> (ThreadPool.java:534)
> > Caused by: wicket.WicketRuntimeException : Can't instantiate page using
> > constructor public oz.web.html.portal.Home(wicket.PageParameters) and
> > argument
> >     at wicket.session.DefaultPageFactory.newPage
> (DefaultPageFactory.java :156)
> >     at
> wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:84)
> >     at
> wicket.request.compound.DefaultRequestTargetResolverStrategy.resolveHomePageTarget(DefaultRequestTargetResolverStrategy.java
> :318)
> >     ... 21 more
> > Caused by: java.lang.reflect.InvocationTargetException
> >     at
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> >     at

> sun.reflect.NativeConstructorAccessorImpl.newInstance
> (NativeConstructorAccessorImpl.java:39)
> >     at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java :27)
> >     at
> java.lang.reflect.Constructor.newInstance(Constructor.java:274)
> >     at
> wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:142)
> >     ... 23 more
> > Caused by: java.lang.NullPointerException
> >     at oz.web.html.portal.HomeView.getView(Unknown
> Source)
> >     at oz.web.html.portal.WidgetStack .<init>(Unknown Source)
> >     at oz.web.html.portal.HomeView.<init>(Unknown Source)

> >     at oz.web.html.portal.Home.init(Unknown Source)
> >     at oz.web.html.portal.Home.<init>(Unknown Source)
> >     ... 28 more
> > On 1/13/06, Igor Vaynberg <[hidden email]> wrote:
> > > so something like this should work:
> > >
> > > public class Home {
> > >    Home() {
> > >      PageParameters default=new PageParameters();
> > >      default.put("......
> > >      init(default);
> > >    }
> > >    Home(PageParameters params) {
> > >       init(params);
> > >    }
> > >
> > >    init(PageParameters params) {
> > >                add(mainMenu=new MainMenu("MainMenu"));
> > >                 add(searchPanel=new
> > > SearchPanel("SearchPanel"));
> > >                  add(homeView=new
> HomeView("HomeView"));
> > >   }
> > >
> > >
> > > -Igor
> > >
> > >
> > >
> > >
> > > On 1/13/06, pepone pepone < [hidden email]> wrote:
> > > >
> > > > my Home page now is like this
> > > >
> > > > public class Home extends BasePage
> > > > {
> > > >         private MainMenu mainMenu;
> > > >         private SearchPanel searchPanel;

> > > >         private HomeView homeView;
> > > >         public Home()
> > > >         {
> > > >                 add(mainMenu=new MainMenu("MainMenu"));
> > > >                 add(searchPanel=new
> > > SearchPanel("SearchPanel"));
> > > >                 add(homeView=new HomeView("HomeView"));
> > > >         }
> > > > };
> > > >
> > > > HomeView instaciate difrent panels depending of pageParameters. and
> > > > depending of what panel instaciate the panel can need to read a
> > > > diferent parameter.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On 1/13/06, Igor Vaynberg <[hidden email]> wrote:
> > > > > if you need a default parameter why not set it in the default
> > > constructor?
> > > > > and have both default and pageparams constructor forward to an init
> > > method?
> > > > >
> > > > > -Igor
> > > > >
> > > > >
> > > > >
> > > > > On 1/13/06, pepone pepone < [hidden email]> wrote:
> > > > > > Hello all
> > > > > >
> > > > > > is posible with wicket 1.2 set a default parameter to homePage
> > > > > >
> > > > > > thanks
> > > > > > --
> > > > > > play tetris <a href="http://pepone.on-rez.com/tetris" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://pepone.on-rez.com/tetris
> > > > > >
> > > > > >
> > > > > >
> > > -------------------------------------------------------
> > > > > > This SF.net email is sponsored by: Splunk Inc. Do you grep through
> log
> > > > > files
> > > > > > for problems?  Stop!  Download the new AJAX search engine that
> makes
> > > > > > searching your log files as easy as surfing the  web.  DOWNLOAD
> > > SPLUNK!
> > > > > >
> <a href="http://ads.osdn.com/?ad_idv37&amp;alloc_id%16865&amp;opclick" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
> > > > > > _______________________________________________
> > > > > > Wicket-user mailing list
> > > > > > [hidden email]
> > > > > >
> > >
> <a href="https://lists.sourceforge.net/lists/listinfo/wicket-user" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > play tetris <a href="http://pepone.on-rez.com/tetris" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://pepone.on-rez.com/tetris
> > > >
> > > >
> > > >
> -------------------------------------------------------
> > > > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> > > files
> > > > for problems?  Stop!  Download the new AJAX search engine that makes
> > > > searching your log files as easy as surfing the  web.  DOWNLOAD
> SPLUNK!
> > > > <a href="http://ads.osdn.com/?ad_idv37&amp;alloc_id%16865&amp;opclick" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
> > > > _______________________________________________
> > > > Wicket-user mailing list
> > > > [hidden email]
> > > >
> <a href="https://lists.sourceforge.net/lists/listinfo/wicket-user" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > >
> > >
> > >
> >
> >
> > --
> > play tetris <a href="http://pepone.on-rez.com/tetris" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://pepone.on-rez.com/tetris
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> > for problems?  Stop!  Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> > <a href="http://ads.osdn.com/?ad_idv37&amp;alloc_id%16865&amp;opclick" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
> > _______________________________________________
> > Wicket-user mailing list
> > [hidden email]
> > <a href="https://lists.sourceforge.net/lists/listinfo/wicket-user" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>


--
play tetris <a href="http://pepone.on-rez.com/tetris" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://pepone.on-rez.com/tetris


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<a href="http://ads.osdn.com/?ad_idv37&amp;alloc_id%16865&amp;opclick" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
_______________________________________________
Wicket-user mailing list
[hidden email]
<a href="https://lists.sourceforge.net/lists/listinfo/wicket-user" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">https://lists.sourceforge.net/lists/listinfo/wicket-user


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: (no subject)

Igor Vaynberg-2
ok i just checked in a fix. had to touch most of the tests but its done.

-Igor


On 1/13/06, Igor Vaynberg <[hidden email]> wrote:
argh, maybe not. i fixed it, but that it broke a lof of tests. looks like this bug has been around for a while and weve come to depend on wicket working like it is. i am going to start a thread on it in devel list.

meantime change your page to do this:
public Home()
        {
> >                 init(constructDefaultParams());
        }
> >
> >         public Home(PageParameters params) {
                    if (params.size()==0) { init(constructDefaultParams()); }
                    else { init(params); }
> >         }



-Igor



On 1/13/06, Igor Vaynberg <[hidden email]> wrote:
im fixing it right now
will prob have it fixed before you open the bug :)


-Igor


On 1/13/06, pepone pepone <[hidden email]> wrote:
Must i open a bug for this issue?
On 1/14/06, Igor Vaynberg < [hidden email]> wrote:
> hmm
> looks like the constructor with PageParameters is still being called instead
> of the default Home() constructor
>

> Caused by: wicket.WicketRuntimeException: Can't instantiate page using
> constructor public oz.web.html.portal.Home (wicket.PageParameters) and
> argument
>
> i think this is an incorrect behaviour. if no page params are specified the
> default constructor should be used.
>
> -Igor
>
>
>
>
> On 1/13/06, pepone pepone <[hidden email]> wrote:
> >
> > This not works for me with wicket-wicket-1.2-20060108
> >
> > I changue my code to this
> >
> > public Home()
> >         {
> >                 PageParameters params=new PageParameters();
> >                 params.put("page","Home");
> >                 params.put("action","view");
> >                 params.put("node","/homeDocument.html");
> >                 init(params);
> >         }
> >
> >         public Home(PageParameters params) {
> >                 init(params);
> >         }
> >
> >         public void init(PageParameters params) {

> >                 add(mainMenu=new MainMenu("MainMenu"));
> >                 add(searchPanel=new
> SearchPanel("SearchPanel"));
> >                 add(homeView=new HomeView("HomeView"));
> >         }
> >
> > now when i go to
> >
> <a href="http://localhost:8080/oz-portal/app?bookmarkablePage=oz.web.html.portal.Home&amp;action=view&amp;node=%2FhomeDocument.html&amp;page=Home" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://localhost:8080/oz-portal/app?bookmarkablePage=oz.web.html.portal.Home&action=view&node=%2FhomeDocument.html&page=Home
> > page rendres ok
> >
> > but when go to <a href="http://localhost:8080/oz-portal/app" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://localhost:8080/oz-portal/app i get
> this exception
> >
> > wicket.WicketRuntimeException: Could not create home page
> >     at
> wicket.request.compound.DefaultRequestTargetResolverStrategy.resolveHomePageTarget (DefaultRequestTargetResolverStrategy.java
> :334)
> >     at
> wicket.request.compound.DefaultRequestTargetResolverStrategy.resolve(DefaultRequestTargetResolverStrategy.java:101)
> >     at
> wicket.request.compound.AbstractCompoundRequestCycleProcessor.resolve(AbstractCompoundRequestCycleProcessor.java

> :48)
> >     at wicket.RequestCycle.step(RequestCycle.java:951)
> >     at wicket.RequestCycle.steps (RequestCycle.java:1057)
> >     at wicket.RequestCycle.request(RequestCycle.java:534)
> >     at wicket.protocol.http.WicketServlet.doGet
> (WicketServlet.java:199)
> >     at
> javax.servlet.http.HttpServlet.service (HttpServlet.java:596)
> >     at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> >     at org.mortbay.jetty.servlet.ServletHolder.handle
> (ServletHolder.java:428)
> >     at
> org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473)
> >     at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
> >     at org.mortbay.http.HttpContext.handle
> (HttpContext.java:1530)
> >     at
> org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
> >     at
> org.mortbay.http.HttpContext.handle(HttpContext.java :1482)
> >     at org.mortbay.http.HttpServer.service
> (HttpServer.java:909)
> >     at
> org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
> >     at
> org.mortbay.http.HttpConnection.handleNext (HttpConnection.java:982)
> >     at org.mortbay.http.HttpConnection.handle
> (HttpConnection.java:833)
> >     at
> org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
> >     at

> org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
> >     at org.mortbay.util.ThreadPool$PoolThread.run
> (ThreadPool.java:534)
> > Caused by: wicket.WicketRuntimeException : Can't instantiate page using
> > constructor public oz.web.html.portal.Home(wicket.PageParameters) and
> > argument
> >     at wicket.session.DefaultPageFactory.newPage
> (DefaultPageFactory.java :156)
> >     at
> wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:84)
> >     at
> wicket.request.compound.DefaultRequestTargetResolverStrategy.resolveHomePageTarget(DefaultRequestTargetResolverStrategy.java
> :318)
> >     ... 21 more
> > Caused by: java.lang.reflect.InvocationTargetException
> >     at
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> >     at

> sun.reflect.NativeConstructorAccessorImpl.newInstance
> (NativeConstructorAccessorImpl.java:39)
> >     at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java :27)
> >     at
> java.lang.reflect.Constructor.newInstance(Constructor.java:274)
> >     at
> wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:142)
> >     ... 23 more
> > Caused by: java.lang.NullPointerException
> >     at oz.web.html.portal.HomeView.getView(Unknown
> Source)
> >     at oz.web.html.portal.WidgetStack .<init>(Unknown Source)
> >     at oz.web.html.portal.HomeView.<init>(Unknown Source)

> >     at oz.web.html.portal.Home.init(Unknown Source)
> >     at oz.web.html.portal.Home.<init>(Unknown Source)
> >     ... 28 more
> > On 1/13/06, Igor Vaynberg <[hidden email]> wrote:
> > > so something like this should work:
> > >
> > > public class Home {
> > >    Home() {
> > >      PageParameters default=new PageParameters();
> > >      default.put("......
> > >      init(default);
> > >    }
> > >    Home(PageParameters params) {
> > >       init(params);
> > >    }
> > >
> > >    init(PageParameters params) {
> > >                add(mainMenu=new MainMenu("MainMenu"));
> > >                 add(searchPanel=new
> > > SearchPanel("SearchPanel"));
> > >                  add(homeView=new
> HomeView("HomeView"));
> > >   }
> > >
> > >
> > > -Igor
> > >
> > >
> > >
> > >
> > > On 1/13/06, pepone pepone < [hidden email]> wrote:
> > > >
> > > > my Home page now is like this
> > > >
> > > > public class Home extends BasePage
> > > > {
> > > >         private MainMenu mainMenu;
> > > >         private SearchPanel searchPanel;

> > > >         private HomeView homeView;
> > > >         public Home()
> > > >         {
> > > >                 add(mainMenu=new MainMenu("MainMenu"));
> > > >                 add(searchPanel=new
> > > SearchPanel("SearchPanel"));
> > > >                 add(homeView=new HomeView("HomeView"));
> > > >         }
> > > > };
> > > >
> > > > HomeView instaciate difrent panels depending of pageParameters. and
> > > > depending of what panel instaciate the panel can need to read a
> > > > diferent parameter.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On 1/13/06, Igor Vaynberg <[hidden email]> wrote:
> > > > > if you need a default parameter why not set it in the default
> > > constructor?
> > > > > and have both default and pageparams constructor forward to an init
> > > method?
> > > > >
> > > > > -Igor
> > > > >
> > > > >
> > > > >
> > > > > On 1/13/06, pepone pepone < [hidden email]> wrote:
> > > > > > Hello all
> > > > > >
> > > > > > is posible with wicket 1.2 set a default parameter to homePage
> > > > > >
> > > > > > thanks
> > > > > > --
> > > > > > play tetris <a href="http://pepone.on-rez.com/tetris" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://pepone.on-rez.com/tetris
> > > > > >
> > > > > >
> > > > > >
> > > -------------------------------------------------------
> > > > > > This SF.net email is sponsored by: Splunk Inc. Do you grep through
> log
> > > > > files
> > > > > > for problems?  Stop!  Download the new AJAX search engine that
> makes
> > > > > > searching your log files as easy as surfing the  web.  DOWNLOAD
> > > SPLUNK!
> > > > > >
> <a href="http://ads.osdn.com/?ad_idv37&amp;alloc_id%16865&amp;opclick" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
> > > > > > _______________________________________________
> > > > > > Wicket-user mailing list
> > > > > > [hidden email]
> > > > > >
> > >
> <a href="https://lists.sourceforge.net/lists/listinfo/wicket-user" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > play tetris <a href="http://pepone.on-rez.com/tetris" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://pepone.on-rez.com/tetris
> > > >
> > > >
> > > >
> -------------------------------------------------------
> > > > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> > > files
> > > > for problems?  Stop!  Download the new AJAX search engine that makes
> > > > searching your log files as easy as surfing the  web.  DOWNLOAD
> SPLUNK!
> > > > <a href="http://ads.osdn.com/?ad_idv37&amp;alloc_id%16865&amp;opclick" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
> > > > _______________________________________________
> > > > Wicket-user mailing list
> > > > [hidden email]
> > > >
> <a href="https://lists.sourceforge.net/lists/listinfo/wicket-user" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > >
> > >
> > >
> >
> >
> > --
> > play tetris <a href="http://pepone.on-rez.com/tetris" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://pepone.on-rez.com/tetris
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> > for problems?  Stop!  Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> > <a href="http://ads.osdn.com/?ad_idv37&amp;alloc_id%16865&amp;opclick" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
> > _______________________________________________
> > Wicket-user mailing list
> > [hidden email]
> > <a href="https://lists.sourceforge.net/lists/listinfo/wicket-user" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>


--
play tetris <a href="http://pepone.on-rez.com/tetris" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://pepone.on-rez.com/tetris


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<a href="http://ads.osdn.com/?ad_idv37&amp;alloc_id%16865&amp;opclick" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
_______________________________________________
Wicket-user mailing list
[hidden email]
<a href="https://lists.sourceforge.net/lists/listinfo/wicket-user" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">https://lists.sourceforge.net/lists/listinfo/wicket-user



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: (no subject)

Timo Stamm
In reply to this post by pepone.onrez
pepone pepone schrieb:
> This not works for me with wicket-wicket-1.2-20060108

As a workaround, you can simply subclass this page and call the super
constructor with default parameters in the constructor:


public class HomePage extends MyBasePageWhichRequiresParameters {
        static PageParameters params = new PageParameters();
        {
                params.put("page","Home");
                params.put("action","view");
                params.put("node","/homeDocument.html");
        }

        public HomePage() {
                super(params);
        }
}



Timo


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Wicket-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wicket-user
Loading...