You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by ramin <ra...@gmail.com> on 2013/03/11 13:25:31 UTC

Wicket 6 Migration (ITestPanelSource and ITestPageSource)

Hi

What has ITestPanelSource and ITestPageSource been replaced with in Wicket
6?

I have a few methods (in 1.5) that return these types and don't know what to
replace them with.

Thanks



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Migration-ITestPanelSource-and-ITestPageSource-tp4657146.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket 6 Migration (ITestPanelSource and ITestPageSource)

Posted by Martin Grigorov <mg...@apache.org>.
Hi,


On Mon, Mar 11, 2013 at 3:15 PM, ramin <ra...@gmail.com> wrote:

> Thanks for the reply.
>
> I am very new to Wicket so please accept my apologies for being a bit
> confused.
>
> Say in a class I have:
>
> WicketTester t = getTester();
> t.startComponentInPage( myMethod() );
>
> and in a super class I have:
>
> ITestPanelSource myMethod(){
>
>    return new ITestPanelSource() {
>
>         @Override
>         public Panel getTestPanel(String panelId) {
>                 try {
>                         setPanel(createPanel(panelId));
>                         return getPanel();
>                 } catch (Exception e) {
>                         e.printStackTrace();
>                         fail(e.toString());
>                 }
>                 return null;
>         }
>     };
> }
>
> Are you saying I should replace ITestPanelSource with Panel?
>

Yes.
tester.startComponentInPage(MyPanel.class)
or
tester.startComponentInPage(new MyPanel("theId", another, arguments))


>
> Many thanks
> Ramin
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Migration-ITestPanelSource-and-ITestPageSource-tp4657146p4657150.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Re: Wicket 6 Migration (ITestPanelSource and ITestPageSource)

Posted by ramin <ra...@gmail.com>.
Thanks for the reply.

I am very new to Wicket so please accept my apologies for being a bit
confused.
 
Say in a class I have:

WicketTester t = getTester();  
t.startComponentInPage( myMethod() );

and in a super class I have:

ITestPanelSource myMethod(){
    
   return new ITestPanelSource() {
		
        @Override
	public Panel getTestPanel(String panelId) {
		try {
			setPanel(createPanel(panelId));
			return getPanel();
		} catch (Exception e) {
			e.printStackTrace();
			fail(e.toString());
		}
		return null;
	}
    };
}

Are you saying I should replace ITestPanelSource with Panel?

Many thanks
Ramin



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Migration-ITestPanelSource-and-ITestPageSource-tp4657146p4657150.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket 6 Migration (ITestPanelSource and ITestPageSource)

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Those were deprecated in 1.5 and completely removed in 6.0.
The replacement is #startComponentInPage().
All you have to do is to pass the panel class or instance to this new
method. Wicket will create a Page for the test for you.


On Mon, Mar 11, 2013 at 2:25 PM, ramin <ra...@gmail.com> wrote:

> Hi
>
> What has ITestPanelSource and ITestPageSource been replaced with in Wicket
> 6?
>
> I have a few methods (in 1.5) that return these types and don't know what
> to
> replace them with.
>
> Thanks
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Migration-ITestPanelSource-and-ITestPageSource-tp4657146.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>