Assuming you are using 1.3.
Make your page implement IHeaderContributor
class MyPage extends WebPage implements IHeaderContributor {
public void renderHead(final IHeaderResponse response) {
response.renderString("<style type=\"text/css\"> body {
background-image: url("...") } </style>");
}
}
Just beware that the background image URL must be either absolute, or is
considered relative to the page URL.
-Matej
On 9/1/07, Johannes Schneider <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I want to add a custom background image for each page. This image should
> be configurable using Java code (random), so I can't use a style sheet.
> Adding a section like
>
> <style type="text/css">
> //custom code here
> </style>
>
> to the head could solve the problem. Could anybody point me to a small
> example showing how to achieve this?
>
>
>
> Thanks,
>
> Johannes Schneider
>
>