Re: [Wicket-user] Bookmarkable links with empty href

2007-05-29 Thread Eelco Hillenius
Easiest thing for you to do is to create a custom component that does
this. Something like

public class MyBookmarkableLink extends WebMarkupContainer {

  private final Class pageClass;
  private final PageParameters parameters;

  ...

  protected void onComponentTag(final ComponentTag tag) {
String url = urlFor(pageClass, parameters);
tag.put("onclick", "window.location.href='" + url + "';return false;");
  }
}


Eelco

On 5/28/07, Alexey Maksimov <[EMAIL PROTECTED]> wrote:
> Hi,
>
> how to make a bookmarkable link in wicket to render as
>  ?
> I actually want to put a specific javascript in onclick(),
> that should work without reloading a page.
>
> Thanks in advance,
> Alexey.
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Bookmarkable links with empty href

2007-05-28 Thread Alexey Maksimov
Hi,

how to make a bookmarkable link in wicket to render as
 ?
I actually want to put a specific javascript in onclick(),
that should work without reloading a page.

Thanks in advance,
Alexey.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Bookmarkable links

2006-03-08 Thread Johan Compagner
what do you mean by " am now injecting the root context into myWicket app by explicitly setting the root context."you call ApplicationSettings.setContextPath() ?that should work fine and that path is used for everything. (or we miss something)
that contextpath shouldn't already be in youre html files of course (it can be but then it must start with / )If you don't specify the contextpath, wicket doesn't consider the path to be null!The the context path is taken for the request what is reportend by Tomcat or any other application server.
            if(getApplicationSettings().getContextPath() == null)            {                getApplicationSettings().setContextPath(request.getContextPath());            }Please give and example what you have as the input hmtl, how you configured stuff and what the output
and what you expect the output should bejohanOn 3/8/06, David Leangen <[EMAIL PROTECTED]> wrote:
I thought I'd bring this up again, just in case...> > how old is the snapshot you are using? do you have the source
> > attached? if so take a look at sourcecode for MarkupParserFactory, do> > you see the prepender added in the constructors?>> I'm using 20060227-0200.>> Yes, I did notice the PrependContextPathHandler class added to the
> filters.I finally figured out the reason for the problem I was having concerningprepending the context path to resources. Turns out that you were right:it was related to OSGi.Rather, to be more precise, the difference is that because I am using
OSGi, the context path is not set in web.xml, which is, I believe, whereWicket expects to find it. My assumption is therefore that Wicketconsidered the path to be null, so ended up translating it as "/".
Now, I did notice something odd, that I wanted to point out just incase. Due to the above, I am now injecting the root context into myWicket app by explicitly setting the root context. This effectively
solves my problems for resources, but apparently creates another for mylinks. This may be a bug.What now happens is that links are rendered as:  /contextRoot/contextRoot/linkIn other words, the context root is now being prepended twice to the
links, ever since I explicitly set the context root in my application.I don't understand why links are treated one way, and resources another.I looked at the Wicket code, but nothing jumped out at me.
Cheers,Dave---This SF.Net email is sponsored by xPML, a groundbreaking scripting languagethat extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Bookmarkable links

2006-03-07 Thread David Leangen

I thought I'd bring this up again, just in case...

> > how old is the snapshot you are using? do you have the source
> > attached? if so take a look at sourcecode for MarkupParserFactory, do
> > you see the prepender added in the constructors?
> 
> I'm using 20060227-0200.
> 
> Yes, I did notice the PrependContextPathHandler class added to the
> filters.

I finally figured out the reason for the problem I was having concerning
prepending the context path to resources. Turns out that you were right:
it was related to OSGi.

Rather, to be more precise, the difference is that because I am using
OSGi, the context path is not set in web.xml, which is, I believe, where
Wicket expects to find it. My assumption is therefore that Wicket
considered the path to be null, so ended up translating it as "/".


Now, I did notice something odd, that I wanted to point out just in
case. Due to the above, I am now injecting the root context into my
Wicket app by explicitly setting the root context. This effectively
solves my problems for resources, but apparently creates another for my
links. This may be a bug.

What now happens is that links are rendered as:

  /contextRoot/contextRoot/link

In other words, the context root is now being prepended twice to the
links, ever since I explicitly set the context root in my application.

I don't understand why links are treated one way, and resources another.

I looked at the Wicket code, but nothing jumped out at me.


Cheers,
Dave





---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Bookmarkable links

2006-03-06 Thread David Leangen

Just for the archives...

I haven't figured this out yet, but I'm going to do things differently
so will no longer look into this.




On Wed, 2006-03-01 at 16:43 +0900, David Leangen wrote:
> On Tue, 2006-02-28 at 23:32 -0800, Igor Vaynberg wrote:
> > if /context is your context path then yes.
> 
> 
> Hmmm... Well, in that case, I'll try to get my local wicket to actually
> build in Eclipse so I can set up Jetty Launcher with it and try to step
> through to see why this isn't happening as I expect...
> 
> 
> I'll let you know if I find anything.
> 
> 
> Thanks for all your patience.
> Dave
> 
> 
> 
> > On 2/28/06, David Leangen <[EMAIL PROTECTED]> wrote:
> > 
> > One thing I'd really like to know... is the behavior I'm
> > expecting what
> > should indeed be happening?
> > 
> > In other words, if I have:
> > 
> >   
> > 
> > in my markup, it should be output as:
> > 
> >   
> > 
> > ?
> 
> 
> 
> 
> ---
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Bookmarkable links

2006-02-28 Thread David Leangen

On Tue, 2006-02-28 at 23:32 -0800, Igor Vaynberg wrote:
> if /context is your context path then yes.


Hmmm... Well, in that case, I'll try to get my local wicket to actually
build in Eclipse so I can set up Jetty Launcher with it and try to step
through to see why this isn't happening as I expect...


I'll let you know if I find anything.


Thanks for all your patience.
Dave



> On 2/28/06, David Leangen <[EMAIL PROTECTED]> wrote:
> 
> One thing I'd really like to know... is the behavior I'm
> expecting what
> should indeed be happening?
> 
> In other words, if I have:
> 
>   
> 
> in my markup, it should be output as:
> 
>   
> 
> ?




---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Bookmarkable links

2006-02-28 Thread Igor Vaynberg
if /context is your context path then yes.-IgorOn 2/28/06, David Leangen <[EMAIL PROTECTED]> wrote:
On Tue, 2006-02-28 at 22:05 -0800, Igor Vaynberg wrote:> how old is the snapshot you are using? do you have the source
> attached? if so take a look at sourcecode for MarkupParserFactory, do> you see the prepender added in the constructors?I'm using 20060227-0200.Yes, I did notice the PrependContextPathHandler class added to the
filters.One thing I'd really like to know... is the behavior I'm expecting whatshould indeed be happening?In other words, if I have:  
in my markup, it should be output as:  ?---This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcastand join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Bookmarkable links

2006-02-28 Thread David Leangen

On Tue, 2006-02-28 at 22:05 -0800, Igor Vaynberg wrote:
> how old is the snapshot you are using? do you have the source
> attached? if so take a look at sourcecode for MarkupParserFactory, do
> you see the prepender added in the constructors?

I'm using 20060227-0200.

Yes, I did notice the PrependContextPathHandler class added to the
filters.


One thing I'd really like to know... is the behavior I'm expecting what
should indeed be happening?

In other words, if I have:

  

in my markup, it should be output as:

  

?






---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Bookmarkable links

2006-02-28 Thread Igor Vaynberg
the prepending is done via PrependContextPathHandler class. this
handler was not enabled by default because it was experimental. as of a
recent 1.2 snapshot it is enabled by default.

how old is the snapshot you are using? do you have the source attached?
if so take a look at sourcecode for MarkupParserFactory, do you see the
prepender added in the constructors?

-Igor
On 2/28/06, David Leangen <[EMAIL PROTECTED]> wrote:
> Wait a second do you use wicket:id tags in the>so when i see this:>> public Object getObject( final Component c )>{>if
( ContentPage.this.isLocaleJapan> ese() )>return
"styles/main_jp.css";>else>return
"styles/main_en.css";>}>> then you have to append the context path youreself.>Ok, now I know. And that does work, indeed.>  >> Then you have to do it yourself!> We don't touch urls generated by developer code.Actually, I do this (relative URL):  Ok, so you are saying that I would have to create a wicket component for
ANY image or whatever I want to include?So, this means that my authors, who know nothing about programming,can't include images unless they can get a programmer to include acomponent?If I use a relative URL, why doesn't wicket prepend the context root?
Is there a reason for this design decision? I trust the developers'design decisions, but I don't understand this one. I'm just curious asto why.Cheers,Dave---
This SF.Net email is sponsored by xPML, a groundbreaking scripting languagethat extends applications into web and mobile media. Attend the live webcastand join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user



Re: [Wicket-user] Bookmarkable links

2006-02-28 Thread David Leangen


> Wait a second do you use wicket:id tags in the 
>so when i see this:
> 
> public Object getObject( final Component c )
>{
>if ( ContentPage.this.isLocaleJapan 
> ese() )
>return "styles/main_jp.css";
>else
>return "styles/main_en.css";
>}
> 
> then you have to append the context path youreself. 
> 

Ok, now I know. And that does work, indeed.


>  
> 
> Then you have to do it yourself!
> We don't touch urls generated by developer code.

Actually, I do this (relative URL):

  

Ok, so you are saying that I would have to create a wicket component for
ANY image or whatever I want to include?

So, this means that my authors, who know nothing about programming,
can't include images unless they can get a programmer to include a
component?

If I use a relative URL, why doesn't wicket prepend the context root? 

Is there a reason for this design decision? I trust the developers'
design decisions, but I don't understand this one. I'm just curious as
to why.


Cheers,
Dave





---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Bookmarkable links

2006-02-28 Thread Johan Compagner
Wait a second do you use wicket:id tags in the and 
Then you have to do it yourself!We don't touch urls generated by developer code.so when i see this:public Object getObject( final Component c )            {                if ( ContentPage.this.isLocaleJapan
ese() )                    return "styles/main_jp.css";                else                    return "styles/main_en.css";            }then you have to append the context path youreself.
public Object getObject( final Component c )            {                if ( ContentPage.this.isLocaleJapanese() )                    return ApplicationSettings.getContextPath() + "/styles/main_jp.css";
                else                    return ApplicationSettings.getContextPath() + "/styles/main_en.css";            }Maybe you do need some test to see where the contextpath ends with like "/"
johanOn 2/28/06, David Leangen <[EMAIL PROTECTED]> wrote:
Hello!I just tried the latest snapshot (20060227-0200). Still the sameproblem, unfortunately.> what does youre html look like?> If you have non absolute paths in src or href attributes of tags then
> they will be made absolute in the latest snapshots.My (relevant) html looks like this:src="">The context root is ".temp/www", and the resulting html (for one of my
pages as an example) is as below.You'll notice that the "menu" links are properly rendered, but the imagelinks and the css are not. So, is this a "feature" or a "bug", Iwonder...
http://www.w3.org/1999/xhtml">
Page Title  
  
LSD  PubMed
  Company  Contact
BTW, the CSS is like this:
Page Titlefinal WebComponent c = new WebComponent( "css" );
final IModel model = new Model(){private static final long serialVersionUID = 1L;public Object getObject( final Component c ){if ( 
ContentPage.this.isLocaleJapanese() )return "styles/main_jp.css";elsereturn "styles/main_en.css";}};
c.add( new AttributeModifier( "href", model ) );add( c );---This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcastand join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Bookmarkable links

2006-02-28 Thread Johan Compagner
What test i do with the "/.temp/www" context path it works always.I tested in the the PrependContextPathHandlerTest we have in our unit test.And also when i do this in our FormInputApplication.init() method example:
getApplicationSettings().setContextPath("/.temp/www");Then the stylesheet is altered right:So i have no idea what goes wrong at youre place but i can't reproduce it.johan
On 2/28/06, David Leangen <[EMAIL PROTECTED]> wrote:
> hrm, maybe its a problem with our prepender. it does look like its> prepending the / but nothing after that, maybe the "." that is> screwing it up. try calling getApplicationSettings().setContextPath
> ("/.temp/www") in your application.init() method. if that works then i> will assume its a problem in our prepender and see if i can fix it.Unfortunately, still the same thing... :-(
Even if I set the context path explicitly as you mention above, only "/"is being prepended, not the entire context path.> as far as the css links go wicket will only prepend static markup in
> the .html file,  not the one you generate, so there you have to do it> manually. to put it another way, currently it is a preprocessor not a> postprocessor.So I'd need to mount this like I would with my class pages? Is that what
you're saying?Or I'd have to manually write in the context path as part of the link?Thanks so much!---This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcastand join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Bookmarkable links

2006-02-27 Thread Igor Vaynberg
On 2/27/06, David Leangen <[EMAIL PROTECTED]> wrote:
> hrm, maybe its a problem with our prepender. it does look like its> prepending the / but nothing after that, maybe the "." that is> screwing it up. try calling getApplicationSettings().setContextPath
> ("/.temp/www") in your application.init() method. if that works then i> will assume its a problem in our prepender and see if i can fix it.Unfortunately, still the same thing... :-(
could you replicate this in a quickstart project and post that. i would need to walk through it to see what is going wrong. 
> as far as the css links go wicket will only prepend static markup in> the .html file,  not the one you generate, so there you have to do it> manually. to put it another way, currently it is a preprocessor not a
> postprocessor.So I'd need to mount this like I would with my class pages? Is that whatyou're saying?Or I'd have to manually write in the context path as part of the link?
yep. youd have to append it manually if you dont want to use packaged resources. i would create a reusable subclass of attribute modifier that does this.-Igor


Re: [Wicket-user] Bookmarkable links

2006-02-27 Thread David Leangen

> hrm, maybe its a problem with our prepender. it does look like its
> prepending the / but nothing after that, maybe the "." that is
> screwing it up. try calling getApplicationSettings().setContextPath
> ("/.temp/www") in your application.init() method. if that works then i
> will assume its a problem in our prepender and see if i can fix it.

Unfortunately, still the same thing... :-(

Even if I set the context path explicitly as you mention above, only "/"
is being prepended, not the entire context path.


> as far as the css links go wicket will only prepend static markup in
> the .html file,  not the one you generate, so there you have to do it
> manually. to put it another way, currently it is a preprocessor not a
> postprocessor. 

So I'd need to mount this like I would with my class pages? Is that what
you're saying?

Or I'd have to manually write in the context path as part of the link?


Thanks so much!




---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Bookmarkable links

2006-02-27 Thread David Leangen

Hello!

I just tried the latest snapshot (20060227-0200). Still the same
problem, unfortunately.

> what does youre html look like?
> If you have non absolute paths in src or href attributes of tags then
> they will be made absolute in the latest snapshots.

My (relevant) html looks like this:













The context root is ".temp/www", and the resulting html (for one of my
pages as an example) is as below.

You'll notice that the "menu" links are properly rendered, but the image
links and the css are not. So, is this a "feature" or a "bug", I
wonder...



http://www.w3.org/1999/xhtml";>  


Page Title




  
  
  
  
  
  
  
  
  
 
  LSD
  PubMed
  Company
  Contact


  
  







BTW, the CSS is like this:



Page Title


final WebComponent c = new WebComponent( "css" );
final IModel model = new Model()
{
private static final long serialVersionUID = 1L;

public Object getObject( final Component c )
{
if ( ContentPage.this.isLocaleJapanese() )
return "styles/main_jp.css";
else
return "styles/main_en.css";
}
};
c.add( new AttributeModifier( "href", model ) );
add( c );




---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Bookmarkable links

2006-02-27 Thread Igor Vaynberg
hrm, maybe its a problem with our prepender. it does look like its prepending the / but nothing after that, maybe the "." that is screwing it up. try calling getApplicationSettings().setContextPath("/.temp/www") in your 
application.init() method. if that works then i will assume its a problem in our prepender and see if i can fix it.as far as the css links go wicket will only prepend static markup in the .html file,  not the one you generate, so there you have to do it manually. to put it another way, currently it is a preprocessor not a postprocessor.
-IgorOn 2/27/06, David Leangen <[EMAIL PROTECTED]> wrote:
Hello!I just tried the latest snapshot (20060227-0200). Still the sameproblem, unfortunately.> what does youre html look like?> If you have non absolute paths in src or href attributes of tags then
> they will be made absolute in the latest snapshots.My (relevant) html looks like this:src="">The context root is ".temp/www", and the resulting html (for one of my
pages as an example) is as below.You'll notice that the "menu" links are properly rendered, but the imagelinks and the css are not. So, is this a "feature" or a "bug", Iwonder...
http://www.w3.org/1999/xhtml">
Page Title  
  
LSD  PubMed
  Company  Contact
BTW, the CSS is like this:
Page Titlefinal WebComponent c = new WebComponent( "css" );
final IModel model = new Model(){private static final long serialVersionUID = 1L;public Object getObject( final Component c ){if ( 
ContentPage.this.isLocaleJapanese() )return "styles/main_jp.css";elsereturn "styles/main_en.css";}};
c.add( new AttributeModifier( "href", model ) );add( c );---This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcastand join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Bookmarkable links

2006-02-27 Thread Johan Compagner
what does youre html look like?If you have non absolute paths in src or href attributes of tags then they will be made absolute in the latest snapshots.i don't have any compile errors in head so don't know why you have.
On 2/27/06, David Leangen <[EMAIL PROTECTED]> wrote:
Sorry, I deleted the last post to this thread by Johan, so the order ismessed up a bit...Johan wrote something like:> If you use the latest snapshot, Wicket takes care of> resources...
I tried this, but unfortunately it does not work. My css and image filesare not prepended by the context path.I looked at the API, but (unless I misunderstood again) there does notseem to be a method of mounting resource files. Or should I mount the
directory that contains the resource files? For instance:  App.mount( "images/*", "images" );I'm not able to use CVS head to try stuff because there are builderrors...
---This SF.Net email is sponsored by xPML, a groundbreaking scripting languagethat extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Bookmarkable links

2006-02-26 Thread David Leangen

Sorry, I deleted the last post to this thread by Johan, so the order is
messed up a bit...

Johan wrote something like:

> If you use the latest snapshot, Wicket takes care of
> resources...


I tried this, but unfortunately it does not work. My css and image files
are not prepended by the context path.

I looked at the API, but (unless I misunderstood again) there does not
seem to be a method of mounting resource files. Or should I mount the
directory that contains the resource files? For instance:

  App.mount( "images/*", "images" );


I'm not able to use CVS head to try stuff because there are build
errors...






---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] Bookmarkable links (was: Added i18n page to wiki)

2006-02-26 Thread David Leangen

> > > Page(_xx).html:
> > > Take a look at this page!

> > Unfortunately, this is not acceptable. The author should
> > have no idea of context. The link must be relative to the
> > application "top" page.

> just make links like:
>
> 
>
> wicket will make those links absolute.


You're right! I was that simple...


> > Also, my css and image links break when I use mountable pages.
> > Again, it is not acceptable to have to write
> > href="/contextRoot/styles/style.css".


However, this does not fix the problem for resource files. I am assuming
that resource files must also be mountable, but I haven't yet looked into
this.


Thanks for the tip!



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Bookmarkable links (was: Added i18n page to wiki)

2006-02-26 Thread Johan Compagner
with the latest snapshots all urls that you define will be made absolute by wicketWe have to do this because of our mounting of pages.johanOn 2/26/06, 
David Leangen <[EMAIL PROTECTED]> wrote:
> > > Page(_xx).html:> > > Take a look at !> > Unfortunately, this is not acceptable. The author should> > have no idea of context. The link must be relative to the
> > application "top" page.> just make links like:>> >> wicket will make those links absolute.You're right! I was that simple...
> > Also, my css and image links break when I use mountable pages.> > Again, it is not acceptable to have to write> > href="">However, this does not fix the problem for resource files. I am assuming
that resource files must also be mountable, but I haven't yet looked intothis.Thanks for the tip!---This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcastand join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Bookmarkable links (was: Added i18n page to wiki)

2006-02-26 Thread Johan Compagner
just make links like:wicket will make those links absolute.johanOn 2/26/06, David Leangen
 <[EMAIL PROTECTED]> wrote:I finally have some time to start looking into this some more...
> Why don't you just provide some bookmarkable links to your> template designer?>> MyApplication.java:> mountBookmarkablePage("/links/coolPage", CoolPage.class);>
> Then its up to the web designer if he wants to include a link or not:>> Page(_xx).html:> Take a look at !I tried this, and it seems promising, BUT, there is a major problem to this
approach:This assumes that the root context is "/", which is not always true. Forthis to work like you suggest, the author would have to write:  Take a look at !
Unfortunately, this is not acceptable. The author should have no idea ofcontext. The link must be relative to the application "top" page.Also, my css and image links break when I use mountable pages. Again, it is
not acceptable to have to write href="">Otherwise, I very much like the idea of mountable links.WDYT?---
This SF.Net email is sponsored by xPML, a groundbreaking scripting languagethat extends applications into web and mobile media. Attend the live webcastand join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user



[Wicket-user] Bookmarkable links (was: Added i18n page to wiki)

2006-02-26 Thread David Leangen

I finally have some time to start looking into this some more...

> Why don't you just provide some bookmarkable links to your
> template designer?
>
> MyApplication.java:
> mountBookmarkablePage("/links/coolPage", CoolPage.class);
>
> Then its up to the web designer if he wants to include a link or not:
>
> Page(_xx).html:
> Take a look at this page!


I tried this, and it seems promising, BUT, there is a major problem to this
approach:

This assumes that the root context is "/", which is not always true. For
this to work like you suggest, the author would have to write:

  Take a look at this page!


Unfortunately, this is not acceptable. The author should have no idea of
context. The link must be relative to the application "top" page.

Also, my css and image links break when I use mountable pages. Again, it is
not acceptable to have to write href="/contextRoot/styles/style.css".


Otherwise, I very much like the idea of mountable links.

WDYT?





---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user