I don't know if this is the recommended way, but there is a
urlFor(ResourceReference) method in Component,
so you can store the (mounted) ResourceReference in the application,
then access it in the Component which
needs the URL and call urlFor() with the reference.
If any Wicket developer reads this, I think the whole resource/shared
resource thing needs some clarification.
E.g. is ResourceReference a SharedResourceReference? If yes, why is
there no method
mount(String, ResourceReference)?
Robin.
On 07.07.2009, at 16:42, Mathias Nilsson wrote:
Hi,
I just need to be clear on some things. When reading the doc on
Resource it
states that "Resources themselves do not currently have URLs.
Instead, they
are referred to by components that have URLs."
Let's say I have created a mypanel that extends panel. I implement
my own
DynamicWebresource and I make it available by doing
Application
.get().getSharedResources().add( mypanel.class.getName() , new
MyDynamicResource());
Does this mean that I can make an Ajax request to getPage().urlFor(
mypanel.class.getName() ) and return the getData() of
DynamicWebResource.ResourceState in MyDynamicResource?
The reason why I'm asking is that some browsers does not get the url
for the
panel.
// Mathias
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]