You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Heshani <he...@gmail.com> on 2014/01/29 07:00:33 UTC

Is there an equivalent for ResourceReference in wicket 6

I'm migrating wicket from 1.4 to 6.13. Read that the ResourceReference class
has been removed in 1.5 version. 
Does anyone know whether there is an equivalent to achieve the same
functionality? 

 container.getHeaderResponse().renderJavascriptReference(
                    new ResourceReference(FansTable.class, "fanspage.js"));

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Is-there-an-equivalent-for-ResourceReference-in-wicket-6-tp4664014.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: Is there an equivalent for ResourceReference in wicket 6

Posted by th...@jarnot.de.
Try this:

         
container.getHeaderResponse().render(JavaScriptHeaderItem.forReference (
                 new ResourceReference(FansTable.class, "fanspage.js")));



Am 29.01.2014 07:00, schrieb Heshani:
> I'm migrating wicket from 1.4 to 6.13. Read that the ResourceReference 
> class
> has been removed in 1.5 version.
> Does anyone know whether there is an equivalent to achieve the same
> functionality?
> 
>  container.getHeaderResponse().renderJavascriptReference(
>                     new ResourceReference(FansTable.class, 
> "fanspage.js"));
> 
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Is-there-an-equivalent-for-ResourceReference-in-wicket-6-tp4664014.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

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


Re: Is there an equivalent for ResourceReference in wicket 6

Posted by Simon B <si...@gmail.com>.
Hello Martin, 

Thanks for the heads up, I'll definitely make that change in my project, 

Cheers

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Is-there-an-equivalent-for-ResourceReference-in-wicket-6-tp4664014p4664041.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: Is there an equivalent for ResourceReference in wicket 6

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

Read http://wicketinaction.com/2012/07/wicket-6-resource-management/
I am not sure where you read that ResourceReference is removed. It is still
around.

@Simon: renderHead(HtmlHeaderContainer) is an internal thingy that is
hidden from you in Wicket 7. You should use renderHead(IHeaderResponse) in
your apps.

Martin Grigorov
Wicket Training and Consulting


On Wed, Jan 29, 2014 at 10:56 AM, Simon B <si...@gmail.com> wrote:

> Hello,
>
> I override the renderHead(HtmlHeaderContainer) method if its a Panel and
> renderHead(IHeaderResponse) if its a WebPage :
>
> So in the case of a Panel,  I guess it would be something like:
>
>
> Hope that helps.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Is-there-an-equivalent-for-ResourceReference-in-wicket-6-tp4664014p4664024.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: Is there an equivalent for ResourceReference in wicket 6

Posted by Heshani <he...@gmail.com>.
Thanks it worked!

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Is-there-an-equivalent-for-ResourceReference-in-wicket-6-tp4664014p4664083.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: Is there an equivalent for ResourceReference in wicket 6

Posted by Simon B <si...@gmail.com>.
Hello, 

I override the renderHead(HtmlHeaderContainer) method if its a Panel and
renderHead(IHeaderResponse) if its a WebPage : 

So in the case of a Panel,  I guess it would be something like: 


Hope that helps.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Is-there-an-equivalent-for-ResourceReference-in-wicket-6-tp4664014p4664024.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