You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Tito <nj...@gmail.com> on 2011/04/14 13:19:17 UTC

Css url unexpected change

I have a page with an external css file wich is linked from html file. I
mean, path is relative but hard.
I guess wicket rewrite urls but here is the strange thing:

I have a form with standar validation like a required field. I submit
without adding information and all work, then again I click submit and
unexpectedly my css path changed.

Originally was rsrc/screen.css and later ../rsrc/screen.css where obviously
the file is not and consequently my page lost all design.

Thanks

Tito

Re: Css url unexpected change

Posted by Tito <nj...@gmail.com>.
Thanks!
I solved it using another url mounting strategy.

2011/4/14 Martin Grigorov <mg...@apache.org>

> This is how Wicket works.
> You need to pick one of the options I enumerated in my first mail.
>
> On Thu, Apr 14, 2011 at 2:41 PM, Tito <nj...@gmail.com> wrote:
>
> > Sorry, I understood your expression. But, I mean if it is my mistake or
> > could be a wicket bug... Because I can't see anything rare in the code.
> >
> > 2011/4/14 Martin Grigorov <mg...@apache.org>
> >
> > > Yes. By "fix" I meant that it will break it.
> > > Wicket tries to fix all relative urls. Since you don't use absolute
> > > (http://,,,,)
> > > or context relative one (/css/my.css) Wicket touches your resource url
> as
> > > well.
> > >
> > > On Thu, Apr 14, 2011 at 1:45 PM, Tito <nj...@gmail.com> wrote:
> > >
> > > > Yes, I know that wicket do that. But in my case wicket breaks it. Is
> it
> > > > posible?
> > > >
> > > > 2011/4/14 Martin Grigorov <mg...@apache.org>
> > > >
> > > > > Either use absolute url, or context relative or use
> ResourceReference
> > > to
> > > > > setup it.
> > > > > Otherwise Wicket will try to "fix" it for you.
> > > > >
> > > > > On Thu, Apr 14, 2011 at 1:19 PM, Tito <nj...@gmail.com> wrote:
> > > > >
> > > > > > I have a page with an external css file wich is linked from html
> > > file.
> > > > I
> > > > > > mean, path is relative but hard.
> > > > > > I guess wicket rewrite urls but here is the strange thing:
> > > > > >
> > > > > > I have a form with standar validation like a required field. I
> > submit
> > > > > > without adding information and all work, then again I click
> submit
> > > and
> > > > > > unexpectedly my css path changed.
> > > > > >
> > > > > > Originally was rsrc/screen.css and later ../rsrc/screen.css where
> > > > > obviously
> > > > > > the file is not and consequently my page lost all design.
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > > Tito
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Martin Grigorov
> > > > > jWeekend
> > > > > Training, Consulting, Development
> > > > > http://jWeekend.com <http://jweekend.com/>
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Martin Grigorov
> > > jWeekend
> > > Training, Consulting, Development
> > > http://jWeekend.com <http://jweekend.com/>
> > >
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>
>

Re: Css url unexpected change

Posted by Martin Grigorov <mg...@apache.org>.
This is how Wicket works.
You need to pick one of the options I enumerated in my first mail.

On Thu, Apr 14, 2011 at 2:41 PM, Tito <nj...@gmail.com> wrote:

> Sorry, I understood your expression. But, I mean if it is my mistake or
> could be a wicket bug... Because I can't see anything rare in the code.
>
> 2011/4/14 Martin Grigorov <mg...@apache.org>
>
> > Yes. By "fix" I meant that it will break it.
> > Wicket tries to fix all relative urls. Since you don't use absolute
> > (http://,,,,)
> > or context relative one (/css/my.css) Wicket touches your resource url as
> > well.
> >
> > On Thu, Apr 14, 2011 at 1:45 PM, Tito <nj...@gmail.com> wrote:
> >
> > > Yes, I know that wicket do that. But in my case wicket breaks it. Is it
> > > posible?
> > >
> > > 2011/4/14 Martin Grigorov <mg...@apache.org>
> > >
> > > > Either use absolute url, or context relative or use ResourceReference
> > to
> > > > setup it.
> > > > Otherwise Wicket will try to "fix" it for you.
> > > >
> > > > On Thu, Apr 14, 2011 at 1:19 PM, Tito <nj...@gmail.com> wrote:
> > > >
> > > > > I have a page with an external css file wich is linked from html
> > file.
> > > I
> > > > > mean, path is relative but hard.
> > > > > I guess wicket rewrite urls but here is the strange thing:
> > > > >
> > > > > I have a form with standar validation like a required field. I
> submit
> > > > > without adding information and all work, then again I click submit
> > and
> > > > > unexpectedly my css path changed.
> > > > >
> > > > > Originally was rsrc/screen.css and later ../rsrc/screen.css where
> > > > obviously
> > > > > the file is not and consequently my page lost all design.
> > > > >
> > > > > Thanks
> > > > >
> > > > > Tito
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Martin Grigorov
> > > > jWeekend
> > > > Training, Consulting, Development
> > > > http://jWeekend.com <http://jweekend.com/>
> > > >
> > >
> >
> >
> >
> > --
> > Martin Grigorov
> > jWeekend
> > Training, Consulting, Development
> > http://jWeekend.com <http://jweekend.com/>
> >
>



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

Re: Css url unexpected change

Posted by Tito <nj...@gmail.com>.
Sorry, I understood your expression. But, I mean if it is my mistake or
could be a wicket bug... Because I can't see anything rare in the code.

2011/4/14 Martin Grigorov <mg...@apache.org>

> Yes. By "fix" I meant that it will break it.
> Wicket tries to fix all relative urls. Since you don't use absolute
> (http://,,,,)
> or context relative one (/css/my.css) Wicket touches your resource url as
> well.
>
> On Thu, Apr 14, 2011 at 1:45 PM, Tito <nj...@gmail.com> wrote:
>
> > Yes, I know that wicket do that. But in my case wicket breaks it. Is it
> > posible?
> >
> > 2011/4/14 Martin Grigorov <mg...@apache.org>
> >
> > > Either use absolute url, or context relative or use ResourceReference
> to
> > > setup it.
> > > Otherwise Wicket will try to "fix" it for you.
> > >
> > > On Thu, Apr 14, 2011 at 1:19 PM, Tito <nj...@gmail.com> wrote:
> > >
> > > > I have a page with an external css file wich is linked from html
> file.
> > I
> > > > mean, path is relative but hard.
> > > > I guess wicket rewrite urls but here is the strange thing:
> > > >
> > > > I have a form with standar validation like a required field. I submit
> > > > without adding information and all work, then again I click submit
> and
> > > > unexpectedly my css path changed.
> > > >
> > > > Originally was rsrc/screen.css and later ../rsrc/screen.css where
> > > obviously
> > > > the file is not and consequently my page lost all design.
> > > >
> > > > Thanks
> > > >
> > > > Tito
> > > >
> > >
> > >
> > >
> > > --
> > > Martin Grigorov
> > > jWeekend
> > > Training, Consulting, Development
> > > http://jWeekend.com <http://jweekend.com/>
> > >
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>
>

Re: Css url unexpected change

Posted by Martin Grigorov <mg...@apache.org>.
Yes. By "fix" I meant that it will break it.
Wicket tries to fix all relative urls. Since you don't use absolute
(http://,,,,)
or context relative one (/css/my.css) Wicket touches your resource url as
well.

On Thu, Apr 14, 2011 at 1:45 PM, Tito <nj...@gmail.com> wrote:

> Yes, I know that wicket do that. But in my case wicket breaks it. Is it
> posible?
>
> 2011/4/14 Martin Grigorov <mg...@apache.org>
>
> > Either use absolute url, or context relative or use ResourceReference to
> > setup it.
> > Otherwise Wicket will try to "fix" it for you.
> >
> > On Thu, Apr 14, 2011 at 1:19 PM, Tito <nj...@gmail.com> wrote:
> >
> > > I have a page with an external css file wich is linked from html file.
> I
> > > mean, path is relative but hard.
> > > I guess wicket rewrite urls but here is the strange thing:
> > >
> > > I have a form with standar validation like a required field. I submit
> > > without adding information and all work, then again I click submit and
> > > unexpectedly my css path changed.
> > >
> > > Originally was rsrc/screen.css and later ../rsrc/screen.css where
> > obviously
> > > the file is not and consequently my page lost all design.
> > >
> > > Thanks
> > >
> > > Tito
> > >
> >
> >
> >
> > --
> > Martin Grigorov
> > jWeekend
> > Training, Consulting, Development
> > http://jWeekend.com <http://jweekend.com/>
> >
>



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

Re: Css url unexpected change

Posted by Tito <nj...@gmail.com>.
Yes, I know that wicket do that. But in my case wicket breaks it. Is it
posible?

2011/4/14 Martin Grigorov <mg...@apache.org>

> Either use absolute url, or context relative or use ResourceReference to
> setup it.
> Otherwise Wicket will try to "fix" it for you.
>
> On Thu, Apr 14, 2011 at 1:19 PM, Tito <nj...@gmail.com> wrote:
>
> > I have a page with an external css file wich is linked from html file. I
> > mean, path is relative but hard.
> > I guess wicket rewrite urls but here is the strange thing:
> >
> > I have a form with standar validation like a required field. I submit
> > without adding information and all work, then again I click submit and
> > unexpectedly my css path changed.
> >
> > Originally was rsrc/screen.css and later ../rsrc/screen.css where
> obviously
> > the file is not and consequently my page lost all design.
> >
> > Thanks
> >
> > Tito
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>
>

Re: Css url unexpected change

Posted by Martin Grigorov <mg...@apache.org>.
Either use absolute url, or context relative or use ResourceReference to
setup it.
Otherwise Wicket will try to "fix" it for you.

On Thu, Apr 14, 2011 at 1:19 PM, Tito <nj...@gmail.com> wrote:

> I have a page with an external css file wich is linked from html file. I
> mean, path is relative but hard.
> I guess wicket rewrite urls but here is the strange thing:
>
> I have a form with standar validation like a required field. I submit
> without adding information and all work, then again I click submit and
> unexpectedly my css path changed.
>
> Originally was rsrc/screen.css and later ../rsrc/screen.css where obviously
> the file is not and consequently my page lost all design.
>
> Thanks
>
> Tito
>



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