We could do that, only if all the web pages stay in the same package, but imagine that in a modularized project or even with sub-modules!

So, how about some code like this:

class IndexPage extends WebPage {

    public String getResourcePage() {
        return "Index.html";
    }
}

And to complete:

class PetShopApp extends WebApplication {

    public String getPagesRootPath() {
        return "/WEB-INF/html/";
    }
}

Regards,
Bruno Borges

Date: Mon, 20 Mar 2006 08:56:30 +0100
From: "Dirk Markert" <[EMAIL PROTECTED]>
To: [email protected]
Subject: Re: [Wicket-user] Images, Flashs, _javascript_s, CSSs and other resources
Reply-To: [email protected]

------=_Part_9855_22859891.1142841390656
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Why don't you include

<wicket:remove>
<base href="" href="file:///C:/Docs%20and%20Settings/you/your-project/src/webap="> file:///C:/Docs%20and%20Settings/you/your-project/src/webap=
p/"
/>
</wicket:remove>

in your html head.

Dirk

2006/3/18, Thomas Singer <[EMAIL PROTECTED] >:
>
> Hi Bruno,
>
> I'm with you. Please take a look at issue 1448195 in the wicket tracker
> (
> http://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D1448195&grou=
p_id=3D119783&atid=3D684978
> ).
>
> --
> Best regards,
> Thomas Singer
>
>
> Bruno Borges schrieb:
> > In the case of static resources, the problem is that, as you show, if m=
y
> > web designer opens the Index.html he'll not see the images in his
> > WYSIWYG editor.
> >
> > Thanks.
> >
> >     From: "Martijn Dashorst" <[EMAIL PROTECTED]
> >     <mailto:[EMAIL PROTECTED] >>
> >     To: [email protected]
> >     <mailto:[email protected] >
> >     Subject: Re: [Wicket-user] Images, Flashs, _javascript_s, CSSs and
> >     other resources
> >     Reply-To: [email protected]
> >     <mailto:[email protected]>
> >
> >     There are several possibilities here.
> >
> >     Dynamic approach
> >     Needed in the following cases:
> >      - resource needs to be generated
> >      - resource comes from external, non-web system (database, etc)
> >      - resource must be filtered (component id's subsitution, etc)
> >      - resource must be packaged with your component
> >
> >     Static approach
> >     Needed in the following cases:
> >      - absolute performance requirements -> static resources served by
> >     webserver, not servlet
> >      - static files, no special requirement for dynamic content
> >      - ?
> >
> >     In the dynamic approach the resources need either to be registered
> >     at load
> >     time (this will change I think), or generated on the fly as needed.
> >     Resourc=3D
> >     e
> >     source files should be available on the classpath, but need not be
> >     (provide
> >     your own resolver).
> >
> >     In the static approach, you put the files in the webroot and thus
> >     have them
> >     available to link from your pages.
> >
> >     com.foo.Index.html
> >     <html>
> >     <head>
> >     <style src="" type=3D3D"text/css"></style>
> >     <script src="">> >     type=3D3D"text/_javascript_"></script>
> >     </head>
> >     <body>
> >     </body>
> >     </html>
> >
> >     and directories:
> >
> >     src/webapp/style/style.css
> >     src/webapp/prototype/prototype.js
> >     src/webapp/WEB-INF/web.xml
> >     src/main/java/com/foo/Index.html
> >     src/main/java/com/foo/Index.java
> >
> >     Not complete, but a start.
> >
> >     Martijn
> >
> >     On 3/17/06, Bruno Borges < [EMAIL PROTECTED]
> >     <mailto:[EMAIL PROTECTED]>> wrote:
> >      >
> >      > I've seen some threads in the mailing-list archive, and for I
> >     understand,
> >      > there's no common way to deal with resources like those in the
> >     subject.
> >      >
> >      > Could you guys please list what's the best approaches to deal
> >     with images=3D
> >     ,
> >      > so programmers and designers can work together without any
> >     problem? I wan=3D
> >     na
> >      > see developers coding the html files, and designers specifying
> >     images in
> >      > these pages, so the images can be displayed in the same way at
> >     developmen=3D
> >     t
> >      > time (WYSIWYG HTML Editors) and at runtime.
> >      >
> >      > The same question for _javascript_ files (.js) and stylesheet file=
s
> >     (.css).
> >      >
> >      > And after that, we could put all information together and submit
> >     to the
> >      > Wiki.
> >      >
> >      > Thank you!
> >      >
> >      > --
> >      > Bruno Borges - SCJP 1.4
> >      > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>

--
Bruno Borges - SCJP 1.4
[EMAIL PROTECTED]

Reply via email to