On Sun, Feb 20, 2011 at 7:35 PM, Paolo <[email protected]> wrote:
> How can I write something into the HTML page, from Java code.
> A similar fast metod like in javascript to write in HTML:
>
> document.write("Hello word");
>
> It is userfull for conditional messagge like:
>
> If (sum==5) { document.write("It is right!") }
>
If this were a sum of something else dynamic on the page, it should be done
in a model because other things can change the value while on that page.
Doing it, for instance, an AbstractReadOnlyModel would ensure that the
calculation is always current.
> or it may be userfull for an simple email antispam system, like in
> javascript:
>
> document.write("irresi"+"stiblecam"+"@"+"gma"+"il.com");
>
This makes absolutely no sense. If you had document.write on the server
side, your example would be writing the email address out in its complete
form to be rendered on the client.
--
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket? Use Brix! http://brixcms.org*