Quantcast

[MIIGRATE 1.5] Where is "getSharedResources().putClassAlias(...)"

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

[MIIGRATE 1.5] Where is "getSharedResources().putClassAlias(...)"

akarypid
Hello,

Here's my next question regarding migration to 1.5. I used to publish  
dynamic image resources (retrieved from DB) as follows:

        protected void init() {
                super.init();
                getSharedResources().putClassAlias(org.apache.wicket.Application.class,
                        "global");
                getSharedResources().add("images", new ImageResources());
        }

The above would let my image resource reply to the URL:

        http://host/resources/global/images?params=...

In 1.5, the SharedResources class no longer has a "putClassAlias()"  
method, so apparently there's something new.

How do we go about doing this with 1.5?

Thanks in advance!

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

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

Re: [MIIGRATE 1.5] Where is "getSharedResources().putClassAlias(...)"

Martin Grigorov-4
Please create a ticket.

On Sun, Apr 24, 2011 at 12:36 PM, Alexandros Karypidis
<[hidden email]> wrote:

> Hello,
>
> Here's my next question regarding migration to 1.5. I used to publish
> dynamic image resources (retrieved from DB) as follows:
>
>        protected void init() {
>                super.init();
>
>  getSharedResources().putClassAlias(org.apache.wicket.Application.class,
>                        "global");
>                getSharedResources().add("images", new ImageResources());
>        }
>
> The above would let my image resource reply to the URL:
>
>        http://host/resources/global/images?params=...
>
> In 1.5, the SharedResources class no longer has a "putClassAlias()" method,
> so apparently there's something new.
>
> How do we go about doing this with 1.5?
>
> Thanks in advance!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

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

Re: [MIIGRATE 1.5] Where is "getSharedResources().putClassAlias(...)"

akarypid
Posted:

        https://issues.apache.org/jira/browse/WICKET-3640

for investigation. Is there really no alternative to this with Wicket 1.5?

On Mon, 25 Apr 2011 09:19:02 +0300, Martin Grigorov <[hidden email]>  
wrote:

> Please create a ticket.
>
> On Sun, Apr 24, 2011 at 12:36 PM, Alexandros Karypidis
> <[hidden email]> wrote:
>> Hello,
>>
>> Here's my next question regarding migration to 1.5. I used to publish
>> dynamic image resources (retrieved from DB) as follows:
>>
>>        protected void init() {
>>                super.init();
>>
>>  getSharedResources().putClassAlias(org.apache.wicket.Application.class,
>>                        "global");
>>                getSharedResources().add("images", new ImageResources());
>>        }
>>
>> The above would let my image resource reply to the URL:
>>
>>        http://host/resources/global/images?params=...
>>
>> In 1.5, the SharedResources class no longer has a "putClassAlias()"  
>> method,
>> so apparently there's something new.
>>
>> How do we go about doing this with 1.5?
>>
>> Thanks in advance!
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

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

Re: [MIIGRATE 1.5] Where is "getSharedResources().putClassAlias(...)"

akarypid
Just for future reference:

As explained by Martin in the ticket, turns out that now one must:

        mountResoruce("/path/to/resource", ResourceReference);

So in my case it's simply:

        mountResource("imgres", new ResourceReference(Application.class,
                        "imgres") {
                private static final long serialVersionUID = 1L;
                ImageResources imgres = new ImageResources();
       
                @Override
                public IResource getResource() {
                        return imgres;
                }
        });

Kind regards,
Alex

On Mon, 25 Apr 2011 13:13:22 +0300, Alexandros Karypidis  
<[hidden email]> wrote:

> Posted:
>
> https://issues.apache.org/jira/browse/WICKET-3640
>
> for investigation. Is there really no alternative to this with Wicket  
> 1.5?
>
> On Mon, 25 Apr 2011 09:19:02 +0300, Martin Grigorov  
> <[hidden email]> wrote:
>
>> Please create a ticket.
>>
>> On Sun, Apr 24, 2011 at 12:36 PM, Alexandros Karypidis
>> <[hidden email]> wrote:
>>> Hello,
>>>
>>> Here's my next question regarding migration to 1.5. I used to publish
>>> dynamic image resources (retrieved from DB) as follows:
>>>
>>>        protected void init() {
>>>                super.init();
>>>
>>>  getSharedResources().putClassAlias(org.apache.wicket.Application.class,
>>>                        "global");
>>>                getSharedResources().add("images", new  
>>> ImageResources());
>>>        }
>>>
>>> The above would let my image resource reply to the URL:
>>>
>>>        http://host/resources/global/images?params=...
>>>
>>> In 1.5, the SharedResources class no longer has a "putClassAlias()"  
>>> method,
>>> so apparently there's something new.
>>>
>>> How do we go about doing this with 1.5?
>>>
>>> Thanks in advance!
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...