You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Eyal Golan <eg...@gmail.com> on 2010/04/15 13:43:47 UTC

resources folder / package

Hello to you all,
it's been a very long time since I wrote here.
I have a question regarding folder locations.
I am working with WiQuery and it is unbelievable great.
Also the support there (thanks indiana ;) )

In WiQuery there are 'themes' and the location of the CSS and images is in a
separate folder called 'resources' , which has the same structure as of the
Java classes themselves.
I wanted to do the same in my project without success.

Should I configure something other than just put the same hierarchy?

thanks for the help.

My question is
Eyal Golan
egolan74@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary

Re: resources folder / package

Posted by Cemal Bayramoglu <jW...@cabouge.com>.
Eyal,

This is not to do with Wickets resource loading. Its got to do with
how you set up your build mechanism, and in particular, which files,
from which folders you tell it to include in the creation of the
"target" (folders or archives).

In other words, you need to tell Maven or Ant or your IDE etc, which
folders are "source" folders (and maybe even which files.types of
fıles in them) so it knows you need these packaged up ready for
deployment/use at runtime.

If you are using Maven, see how the LegUp [1]  POMs specify this. Or,
in Eclipse, mark the relevant folders as "source folders" (right-click
on the folder and you'll see the context-menu option for this).

Make sense?

Regards - Cemal
jWeekend
OO & Java Technologies, Wicket
Consulting, Development, Training
http://jWeekend.com

[1] http://jweekend.co.uk/dev/LegUp


On 15 April 2010 22:11, Eyal Golan <eg...@gmail.com> wrote:
> hi,
> thanks.
> I know this, but my question was different.
> I saw in some projects that the JS and CSS files are in the same hierarchy
> as the class that is used for their scope, but the main folder is different.
>
> Example:
> I have a Java class: com.myCompany.ResourceScope.java
> it is located under src.
> I have a file called MyCss.css, which is located under com.myCompany
> but it is located under resources folder.
> both src and resources are under the same project.
>
> in the projects I saw, you can call for this resource reference with the
> ResourceScope class.
>
> I tried to do the same without success.
>
> Any thoughts?
>
>
> Eyal Golan
> egolan74@gmail.com
>
> Visit: http://jvdrums.sourceforge.net/
> LinkedIn: http://www.linkedin.com/in/egolan74
>
> P  Save a tree. Please don't print this e-mail unless it's really necessary
>
>
> On Thu, Apr 15, 2010 at 4:46 PM, Sigmar Muuga <me...@gmail.com> wrote:
>
>> You can define packages and put all CSS / JS files into them. Note that
>> there must be some class also along with them, it may be an empty class.
>>
>> Then you can reference these resources using that class declaration.
>>
>> Note that if your css uses images, then you have to put correct paths into
>> that css.
>>
>> Sigmar
>>
>> On Thu, Apr 15, 2010 at 2:43 PM, Eyal Golan <eg...@gmail.com> wrote:
>>
>> > Hello to you all,
>> > it's been a very long time since I wrote here.
>> > I have a question regarding folder locations.
>> > I am working with WiQuery and it is unbelievable great.
>> > Also the support there (thanks indiana ;) )
>> >
>> > In WiQuery there are 'themes' and the location of the CSS and images is
>> in
>> > a
>> > separate folder called 'resources' , which has the same structure as of
>> the
>> > Java classes themselves.
>> > I wanted to do the same in my project without success.
>> >
>> > Should I configure something other than just put the same hierarchy?
>> >
>> > thanks for the help.
>> >
>> > My question is
>> > Eyal Golan
>> > egolan74@gmail.com
>> >
>> > Visit: http://jvdrums.sourceforge.net/
>> > LinkedIn: http://www.linkedin.com/in/egolan74
>> >
>> > P  Save a tree. Please don't print this e-mail unless it's really
>> necessary
>> >
>>
>

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


Re: resources folder / package

Posted by Eyal Golan <eg...@gmail.com>.
thanks Cemal and Apple.
i think i got it.
Will test it on Sunday.


Eyal Golan
egolan74@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary


On Fri, Apr 16, 2010 at 5:13 AM, Apple Grew <ap...@gmail.com> wrote:

> @Eyal
>
> Maybe you would like to have a look at this thread.
>
> http://n4.nabble.com/resource-css-loading-td1878209.html
>
> Regards,
> Apple Grew
> my blog @ http://blog.applegrew.com/
>
>
> On Fri, Apr 16, 2010 at 2:41 AM, Eyal Golan <eg...@gmail.com> wrote:
>
> > hi,
> > thanks.
> > I know this, but my question was different.
> > I saw in some projects that the JS and CSS files are in the same
> hierarchy
> > as the class that is used for their scope, but the main folder is
> > different.
> >
> > Example:
> > I have a Java class: com.myCompany.ResourceScope.java
> > it is located under src.
> > I have a file called MyCss.css, which is located under com.myCompany
> > but it is located under resources folder.
> > both src and resources are under the same project.
> >
> > in the projects I saw, you can call for this resource reference with the
> > ResourceScope class.
> >
> > I tried to do the same without success.
> >
> > Any thoughts?
> >
> >
> > Eyal Golan
> > egolan74@gmail.com
> >
> > Visit: http://jvdrums.sourceforge.net/
> > LinkedIn: http://www.linkedin.com/in/egolan74
> >
> > P  Save a tree. Please don't print this e-mail unless it's really
> necessary
> >
> >
> > On Thu, Apr 15, 2010 at 4:46 PM, Sigmar Muuga <me...@gmail.com>
> wrote:
> >
> > > You can define packages and put all CSS / JS files into them. Note that
> > > there must be some class also along with them, it may be an empty
> class.
> > >
> > > Then you can reference these resources using that class declaration.
> > >
> > > Note that if your css uses images, then you have to put correct paths
> > into
> > > that css.
> > >
> > > Sigmar
> > >
> > > On Thu, Apr 15, 2010 at 2:43 PM, Eyal Golan <eg...@gmail.com>
> wrote:
> > >
> > > > Hello to you all,
> > > > it's been a very long time since I wrote here.
> > > > I have a question regarding folder locations.
> > > > I am working with WiQuery and it is unbelievable great.
> > > > Also the support there (thanks indiana ;) )
> > > >
> > > > In WiQuery there are 'themes' and the location of the CSS and images
> is
> > > in
> > > > a
> > > > separate folder called 'resources' , which has the same structure as
> of
> > > the
> > > > Java classes themselves.
> > > > I wanted to do the same in my project without success.
> > > >
> > > > Should I configure something other than just put the same hierarchy?
> > > >
> > > > thanks for the help.
> > > >
> > > > My question is
> > > > Eyal Golan
> > > > egolan74@gmail.com
> > > >
> > > > Visit: http://jvdrums.sourceforge.net/
> > > > LinkedIn: http://www.linkedin.com/in/egolan74
> > > >
> > > > P  Save a tree. Please don't print this e-mail unless it's really
> > > necessary
> > > >
> > >
> >
>

Re: resources folder / package

Posted by Apple Grew <ap...@gmail.com>.
@Eyal

Maybe you would like to have a look at this thread.

http://n4.nabble.com/resource-css-loading-td1878209.html

Regards,
Apple Grew
my blog @ http://blog.applegrew.com/


On Fri, Apr 16, 2010 at 2:41 AM, Eyal Golan <eg...@gmail.com> wrote:

> hi,
> thanks.
> I know this, but my question was different.
> I saw in some projects that the JS and CSS files are in the same hierarchy
> as the class that is used for their scope, but the main folder is
> different.
>
> Example:
> I have a Java class: com.myCompany.ResourceScope.java
> it is located under src.
> I have a file called MyCss.css, which is located under com.myCompany
> but it is located under resources folder.
> both src and resources are under the same project.
>
> in the projects I saw, you can call for this resource reference with the
> ResourceScope class.
>
> I tried to do the same without success.
>
> Any thoughts?
>
>
> Eyal Golan
> egolan74@gmail.com
>
> Visit: http://jvdrums.sourceforge.net/
> LinkedIn: http://www.linkedin.com/in/egolan74
>
> P  Save a tree. Please don't print this e-mail unless it's really necessary
>
>
> On Thu, Apr 15, 2010 at 4:46 PM, Sigmar Muuga <me...@gmail.com> wrote:
>
> > You can define packages and put all CSS / JS files into them. Note that
> > there must be some class also along with them, it may be an empty class.
> >
> > Then you can reference these resources using that class declaration.
> >
> > Note that if your css uses images, then you have to put correct paths
> into
> > that css.
> >
> > Sigmar
> >
> > On Thu, Apr 15, 2010 at 2:43 PM, Eyal Golan <eg...@gmail.com> wrote:
> >
> > > Hello to you all,
> > > it's been a very long time since I wrote here.
> > > I have a question regarding folder locations.
> > > I am working with WiQuery and it is unbelievable great.
> > > Also the support there (thanks indiana ;) )
> > >
> > > In WiQuery there are 'themes' and the location of the CSS and images is
> > in
> > > a
> > > separate folder called 'resources' , which has the same structure as of
> > the
> > > Java classes themselves.
> > > I wanted to do the same in my project without success.
> > >
> > > Should I configure something other than just put the same hierarchy?
> > >
> > > thanks for the help.
> > >
> > > My question is
> > > Eyal Golan
> > > egolan74@gmail.com
> > >
> > > Visit: http://jvdrums.sourceforge.net/
> > > LinkedIn: http://www.linkedin.com/in/egolan74
> > >
> > > P  Save a tree. Please don't print this e-mail unless it's really
> > necessary
> > >
> >
>

Re: resources folder / package

Posted by Eyal Golan <eg...@gmail.com>.
hi,
thanks.
I know this, but my question was different.
I saw in some projects that the JS and CSS files are in the same hierarchy
as the class that is used for their scope, but the main folder is different.

Example:
I have a Java class: com.myCompany.ResourceScope.java
it is located under src.
I have a file called MyCss.css, which is located under com.myCompany
but it is located under resources folder.
both src and resources are under the same project.

in the projects I saw, you can call for this resource reference with the
ResourceScope class.

I tried to do the same without success.

Any thoughts?


Eyal Golan
egolan74@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary


On Thu, Apr 15, 2010 at 4:46 PM, Sigmar Muuga <me...@gmail.com> wrote:

> You can define packages and put all CSS / JS files into them. Note that
> there must be some class also along with them, it may be an empty class.
>
> Then you can reference these resources using that class declaration.
>
> Note that if your css uses images, then you have to put correct paths into
> that css.
>
> Sigmar
>
> On Thu, Apr 15, 2010 at 2:43 PM, Eyal Golan <eg...@gmail.com> wrote:
>
> > Hello to you all,
> > it's been a very long time since I wrote here.
> > I have a question regarding folder locations.
> > I am working with WiQuery and it is unbelievable great.
> > Also the support there (thanks indiana ;) )
> >
> > In WiQuery there are 'themes' and the location of the CSS and images is
> in
> > a
> > separate folder called 'resources' , which has the same structure as of
> the
> > Java classes themselves.
> > I wanted to do the same in my project without success.
> >
> > Should I configure something other than just put the same hierarchy?
> >
> > thanks for the help.
> >
> > My question is
> > Eyal Golan
> > egolan74@gmail.com
> >
> > Visit: http://jvdrums.sourceforge.net/
> > LinkedIn: http://www.linkedin.com/in/egolan74
> >
> > P  Save a tree. Please don't print this e-mail unless it's really
> necessary
> >
>

Re: resources folder / package

Posted by Sigmar Muuga <me...@gmail.com>.
You can define packages and put all CSS / JS files into them. Note that
there must be some class also along with them, it may be an empty class.

Then you can reference these resources using that class declaration.

Note that if your css uses images, then you have to put correct paths into
that css.

Sigmar

On Thu, Apr 15, 2010 at 2:43 PM, Eyal Golan <eg...@gmail.com> wrote:

> Hello to you all,
> it's been a very long time since I wrote here.
> I have a question regarding folder locations.
> I am working with WiQuery and it is unbelievable great.
> Also the support there (thanks indiana ;) )
>
> In WiQuery there are 'themes' and the location of the CSS and images is in
> a
> separate folder called 'resources' , which has the same structure as of the
> Java classes themselves.
> I wanted to do the same in my project without success.
>
> Should I configure something other than just put the same hierarchy?
>
> thanks for the help.
>
> My question is
> Eyal Golan
> egolan74@gmail.com
>
> Visit: http://jvdrums.sourceforge.net/
> LinkedIn: http://www.linkedin.com/in/egolan74
>
> P  Save a tree. Please don't print this e-mail unless it's really necessary
>