See my previous e-mail. Add

   *<title wicket:id="pageTitle">Login Page</title>*

Too Template (assuming it is a page). Also

 Label pageTitle = new Label("pageTitle", getTitle());
 this.add(pageTitle);

To template

where get Title is abstract or can ve overriden by super





On Wed, Nov 13, 2013 at 12:13 PM, mike.hua <hz...@sohu.com> wrote:

> Here is the related codes:
> Child page html:
> <?xml version="1.0" encoding="utf-8" ?>
> <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
> &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;>
> <html xmlns="http://www.w3.org/1999/xhtml";
> xmlns:wicket="http://wicket.apache.org";>
>     <head>
>         *<title wicket:id="pageTitle">Login Page</title>*
>         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
> />
>         <meta name="viewport" content="width=device-width" />
>     </head>
>     <body>
>         *<wicket:extend>
>             <div style="margin:auto;text-align:center;width:40%;">
>                 <form id="loginForm" method="post">
>                     <fieldset id="login">
>                         <legend >Login</legend>
>                         Username: <input type="text" id="username" /><br />
>                         Password: <input type="password" id="password" />
>                         <div>
>                             <input type="submit" name="login" value="login"
> />
>                         </div>
>                     </fieldset>
>                 </form>
>             </div>
>         </wicket:extend>*
>     </body>
> </html>
>
> Child page code:
> /*
>  * To change this license header, choose License Headers in Project
> Properties.
>  * To change this template file, choose Tools | Templates
>  * and open the template in the editor.
>  */
> package my_wicket;
>
> import org.apache.wicket.markup.html.basic.Label;
>
> /**
>  *
>  * @author mike
>  */
> public class ExtendsTemplatePage extends Template {
>
>     public ExtendsTemplatePage() {
>         //Label pageTitle = new Label("pageTitle", "Login Page");
>         //this.add(pageTitle);
>     }
>
>     @Override
>     protected void onInitialize() {
>         super.onInitialize();
>        * Label pageTitle = new Label("pageTitle", "Login Page");
>         this.add(pageTitle);*
>     }
> }
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/How-to-set-the-page-title-tp4662372p4662380.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Regards - Ernesto Reinaldo Barreiro

Reply via email to