Html Resources Configuration in WebApplication subclasses

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Html Resources Configuration in WebApplication subclasses

Bruno Borges
I don't like the way wicket put together Java classes with HTML resources (in the same package structure).

Even if I move the structure to another path, like WEB-INF/html, I must reproduce all the package tree, and then add a resource folder in my init() WebApplication subclass.

I was wondering if is it possible to implement a feature where we can map a hole package tree to a simple directory, and from there, respect the sub packages. Please follow my toughs:

This is how I'm doing right now:

src/com/foo/view/pages/IndexPage.java
src/com/foo/view/panels/BannerPanel.java
webapp/WEB-INF/html/com/foo/view/panels/BannerPanel.html
webapp/WEB-INF/html/com/foo/view/pages/IndexPage.html

And this is how I'd like to do without hacks and Java code:

src/com/foo/view/pages/IndexPage.java
src/com/foo/view/panels/BannerPanel.java
webapp/WEB-INF/html/panels/BannerPanel.html
webapp/WEB-INF/html/pages/IndexPage.html

This means that the package "com.foo.view" is mapped to the resource directory "WEB-INF/html".

This sounds a good idea, specially for huge projects that will need to modularize their interfaces.

src/com/foo/moduleA/view/[pages/panels]/[Classes]  -->  webapp/WEB-INF/html/moduleA/[pages/panels]/[Htmls]

This reduce the path size and our designers will love it. :)

This can maybe be implemented like this:

getResourceSettings().addResourceMappingPackage("com.foo.moduleA", "/WEB-INF/html/moduleA");

And all resources beneath from html/moduleA will need to follow the rest of the package structure.

I like wicket, because it gives designers the possibility to don't worry about java taglibs, <%= hell code %> and other things. Of course, I like it because the rest of its features :o)

But out-of-the-box, it's not easy to say: Designers, access the "source" folder and edit only the html files and don't mess up with the directories. They must have some independence :)

Regards,

--
Bruno Borges
[hidden email]
Sun Certified Java Programmer for 1.4
Sun Certified Web Component Developer for 1.4

Reply | Threaded
Open this post in threaded view
|

Re: Html Resources Configuration in WebApplication subclasses

jdonnerstag
please see wicket-example  customresourceloading

Juergen

On 3/29/06, Bruno Borges <[hidden email]> wrote:

> I don't like the way wicket put together Java classes with HTML resources
> (in the same package structure).
>
> Even if I move the structure to another path, like WEB-INF/html, I must
> reproduce all the package tree, and then add a resource folder in my init()
> WebApplication subclass.
>
> I was wondering if is it possible to implement a feature where we can map a
> hole package tree to a simple directory, and from there, respect the sub
> packages. Please follow my toughs:
>
> This is how I'm doing right now:
>
> src/com/foo/view/pages/IndexPage.java
> src/com/foo/view/panels/BannerPanel.java
> webapp/WEB-INF/html/com/foo/view/panels/BannerPanel.html
> webapp/WEB-INF/html/com/foo/view/pages/IndexPage.html
>
> And this is how I'd like to do without hacks and Java code:
>
>  src/com/foo/view/pages/IndexPage.java
> src/com/foo/view/panels/BannerPanel.java
> webapp/WEB-INF/html/panels/BannerPanel.html
>  webapp/WEB-INF/html/pages/IndexPage.html
>
> This means that the package "com.foo.view" is mapped to the resource
> directory "WEB-INF/html".
>
> This sounds a good idea, specially for huge projects that will need to
> modularize their interfaces.
>
> src/com/foo/moduleA/view/[pages/panels]/[Classes]  -->
> webapp/WEB-INF/html/moduleA/[pages/panels]/[Htmls]
>
> This reduce the path size and our designers will love it. :)
>
> This can maybe be implemented like this:
>
> getResourceSettings().addResourceMappingPackage("com.foo.moduleA",
> "/WEB-INF/html/moduleA");
>
>  And all resources beneath from html/moduleA will need to follow the rest of
> the package structure.
>
> I like wicket, because it gives designers the possibility to don't worry
> about java taglibs, <%= hell code %> and other things. Of course, I like it
> because the rest of its features :o)
>
> But out-of-the-box, it's not easy to say: Designers, access the "source"
> folder and edit only the html files and don't mess up with the directories.
> They must have some independence :)
>
> Regards,
>
> --
> Bruno Borges
> [hidden email]
> Sun Certified Java Programmer for 1.4
> Sun Certified Web Component Developer for 1.4
>


-------------------------------------------------------
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!
<a href="http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642">http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Wicket-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wicket-user
Reply | Threaded
Open this post in threaded view
|

Re: Html Resources Configuration in WebApplication subclasses

Vincent Jenks
Is there a performance hit for customizing the location of the html files?  I thought I had read that somewhere in the wiki, once upon a time.

On 3/29/06, Juergen Donnerstag <[hidden email]> wrote:
please see wicket-example  customresourceloading

Juergen

On 3/29/06, Bruno Borges <[hidden email]> wrote:

> I don't like the way wicket put together Java classes with HTML resources
> (in the same package structure).
>
> Even if I move the structure to another path, like WEB-INF/html, I must
> reproduce all the package tree, and then add a resource folder in my init()
> WebApplication subclass.
>
> I was wondering if is it possible to implement a feature where we can map a
> hole package tree to a simple directory, and from there, respect the sub
> packages. Please follow my toughs:
>
> This is how I'm doing right now:
>
> src/com/foo/view/pages/IndexPage.java
> src/com/foo/view/panels/BannerPanel.java
> webapp/WEB-INF/html/com/foo/view/panels/BannerPanel.html
> webapp/WEB-INF/html/com/foo/view/pages/IndexPage.html
>
> And this is how I'd like to do without hacks and Java code:
>
>  src/com/foo/view/pages/IndexPage.java
> src/com/foo/view/panels/BannerPanel.java
> webapp/WEB-INF/html/panels/BannerPanel.html
>  webapp/WEB-INF/html/pages/IndexPage.html
>
> This means that the package "com.foo.view" is mapped to the resource
> directory "WEB-INF/html".
>
> This sounds a good idea, specially for huge projects that will need to
> modularize their interfaces.
>
> src/com/foo/moduleA/view/[pages/panels]/[Classes]  -->
> webapp/WEB-INF/html/moduleA/[pages/panels]/[Htmls]
>
> This reduce the path size and our designers will love it. :)
>
> This can maybe be implemented like this:
>
> getResourceSettings().addResourceMappingPackage("com.foo.moduleA",
> "/WEB-INF/html/moduleA");
>
>  And all resources beneath from html/moduleA will need to follow the rest of
> the package structure.
>
> I like wicket, because it gives designers the possibility to don't worry
> about java taglibs, <%= hell code %> and other things. Of course, I like it
> because the rest of its features :o)
>
> But out-of-the-box, it's not easy to say: Designers, access the "source"
> folder and edit only the html files and don't mess up with the directories.
> They must have some independence :)
>
> Regards,
>
> --
> Bruno Borges
> [hidden email]
> Sun Certified Java Programmer for 1.4
> Sun Certified Web Component Developer for 1.4
>


-------------------------------------------------------
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!
<a href="http://sel.as-us.falkag.net/sel?cmdlnk&amp;kid0944&amp;bid$1720&amp;dat1642">http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
_______________________________________________
Wicket-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply | Threaded
Open this post in threaded view
|

Re: Html Resources Configuration in WebApplication subclasses

jdonnerstag
not that I can think of

Juergen

On 3/29/06, Vincent Jenks <[hidden email]> wrote:

> Is there a performance hit for customizing the location of the html files?
> I thought I had read that somewhere in the wiki, once upon a time.
>
>
> On 3/29/06, Juergen Donnerstag <[hidden email]> wrote:
> >
>  please see wicket-example  customresourceloading
>
> Juergen
>
> On 3/29/06, Bruno Borges <[hidden email]> wrote:
> > I don't like the way wicket put together Java classes with HTML resources
> > (in the same package structure).
> >
> > Even if I move the structure to another path, like WEB-INF/html, I must
> > reproduce all the package tree, and then add a resource folder in my
> init()
> > WebApplication subclass.
> >
> > I was wondering if is it possible to implement a feature where we can map
> a
> > hole package tree to a simple directory, and from there, respect the sub
> > packages. Please follow my toughs:
> >
> > This is how I'm doing right now:
> >
> > src/com/foo/view/pages/IndexPage.java
> > src/com/foo/view/panels/BannerPanel.java
> > webapp/WEB-INF/html/com/foo/view/panels/BannerPanel.html
> > webapp/WEB-INF/html/com/foo/view/pages/IndexPage.html
> >
> > And this is how I'd like to do without hacks and Java code:
> >
> >  src/com/foo/view/pages/IndexPage.java
> > src/com/foo/view/panels/BannerPanel.java
> > webapp/WEB-INF/html/panels/BannerPanel.html
> >  webapp/WEB-INF/html/pages/IndexPage.html
> >
> > This means that the package "com.foo.view" is mapped to the resource
> > directory "WEB-INF/html".
> >
> > This sounds a good idea, specially for huge projects that will need to
> > modularize their interfaces.
> >
> > src/com/foo/moduleA/view/[pages/panels]/[Classes]  -->
> > webapp/WEB-INF/html/moduleA/[pages/panels]/[Htmls]
> >
> > This reduce the path size and our designers will love it. :)
> >
> > This can maybe be implemented like this:
> >
> >
> getResourceSettings().addResourceMappingPackage("com.foo.moduleA",
> > "/WEB-INF/html/moduleA");
> >
> >  And all resources beneath from html/moduleA will need to follow the rest
> of
> > the package structure.
> >
> > I like wicket, because it gives designers the possibility to don't worry
> > about java taglibs, <%= hell code %> and other things. Of course, I like
> it
> > because the rest of its features :o)
> >
> > But out-of-the-box, it's not easy to say: Designers, access the "source"
> > folder and edit only the html files and don't mess up with the
> directories.
> > They must have some independence :)
> >
> > Regards,
> >
> > --
> > Bruno Borges
> > [hidden email]
> > Sun Certified Java Programmer for 1.4
> > Sun Certified Web Component Developer for 1.4
> >
>
>
> -------------------------------------------------------
> 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!
> <a href="http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642">http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
> _______________________________________________
> Wicket-user mailing list
> [hidden email]
>  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!
<a href="http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642">http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Wicket-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wicket-user
Reply | Threaded
Open this post in threaded view
|

Re: Html Resources Configuration in WebApplication subclasses

Bruno Borges
I got it. From the Wicket-Example. :)

Thank you

On 3/29/06, Juergen Donnerstag <[hidden email]> wrote:
not that I can think of

Juergen

On 3/29/06, Vincent Jenks < [hidden email]> wrote:
> Is there a performance hit for customizing the location of the html files?
> I thought I had read that somewhere in the wiki, once upon a time.
>
>
> On 3/29/06, Juergen Donnerstag <[hidden email]> wrote:
> >
>  please see wicket-example  customresourceloading
>

> Juergen
>
> On 3/29/06, Bruno Borges <[hidden email]> wrote:
> > I don't like the way wicket put together Java classes with HTML resources
> > (in the same package structure).
> >
> > Even if I move the structure to another path, like WEB-INF/html, I must
> > reproduce all the package tree, and then add a resource folder in my
> init()
> > WebApplication subclass.
> >
> > I was wondering if is it possible to implement a feature where we can map
> a
> > hole package tree to a simple directory, and from there, respect the sub
> > packages. Please follow my toughs:
> >
> > This is how I'm doing right now:
> >
> > src/com/foo/view/pages/IndexPage.java
> > src/com/foo/view/panels/BannerPanel.java
> > webapp/WEB-INF/html/com/foo/view/panels/BannerPanel.html
> > webapp/WEB-INF/html/com/foo/view/pages/IndexPage.html
> >
> > And this is how I'd like to do without hacks and Java code:
> >
> >  src/com/foo/view/pages/IndexPage.java
> > src/com/foo/view/panels/BannerPanel.java
> > webapp/WEB-INF/html/panels/BannerPanel.html
> >  webapp/WEB-INF/html/pages/IndexPage.html
> >
> > This means that the package "com.foo.view" is mapped to the resource
> > directory "WEB-INF/html".
> >
> > This sounds a good idea, specially for huge projects that will need to
> > modularize their interfaces.
> >
> > src/com/foo/moduleA/view/[pages/panels]/[Classes]  -->
> > webapp/WEB-INF/html/moduleA/[pages/panels]/[Htmls]
> >
> > This reduce the path size and our designers will love it. :)
> >
> > This can maybe be implemented like this:
> >
> >
> getResourceSettings().addResourceMappingPackage("com.foo.moduleA",
> > "/WEB-INF/html/moduleA");
> >
> >  And all resources beneath from html/moduleA will need to follow the rest
> of
> > the package structure.
> >
> > I like wicket, because it gives designers the possibility to don't worry
> > about java taglibs, <%= hell code %> and other things. Of course, I like
> it
> > because the rest of its features :o)
> >
> > But out-of-the-box, it's not easy to say: Designers, access the "source"
> > folder and edit only the html files and don't mess up with the
> directories.
> > They must have some independence :)
> >
> > Regards,
> >
> > --
> > Bruno Borges
> > [hidden email]
> > Sun Certified Java Programmer for 1.4
> > Sun Certified Web Component Developer for 1.4
> >
>
>
> -------------------------------------------------------

> 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!
> <a href="http://sel.as-us.falkag.net/sel?cmdlnk&amp;kid0944&amp;bid$1720&amp;dat1642">http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
> _______________________________________________
> Wicket-user mailing list
> [hidden email]
>   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!
<a href="http://sel.as-us.falkag.net/sel?cmdlnk&amp;kid0944&amp;bid$1720&amp;dat1642"> http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
_______________________________________________
Wicket-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wicket-user



--
Bruno Borges
[hidden email]
Sun Certified Java Programmer for 1.4
Sun Certified Web Component Developer for 1.4