Hi,

I solved problem. Of course I should use model.
I have done it as follow:

ModelClass.java
public class ModelClass extends LoadableDetachableModel{
    public Date load() {
          GregorianCalendar gc = new GregorianCalendar();
              return gc.getTime();

        }
}


Data.java
public class Data extends Panel{

    public Data(String id) {
     super(id);

     add(new Label("data",new ModelClass()));
    }
}

Best regards,
Rafal Laczek

Dnia 10-02-2010 o godz. 23:30 Rafał Laczek <rafal_lac...@wp.pl> 
napisał(a):
> Hi,
> 
> Bellow I give you wicket panel and its markup html.
> There is no data returned by getFormat()and in browser I can see only
> static description "Today is" from markup.'
> 
> Please help!
> 
> Best regards,
> Rafal Laczek
> 
> 
> Data.java
> public class Data extends Panel{
> 
>     public Data(String id) {
>      super(id);
> 
>       add(new Label("data"){
>           public Date getFormat() {
>           GregorianCalendar gc = new GregorianCalendar();
>               return gc.getTime();
>           }
>           
>         });
>     }
> }
> 
> 
> Data.html
> <body>
>    <wicket:panel>
>     Today is: <div wicket:id="data"></div>
>    </wicket:panel>
>   </body>


-- 
You received this message because you are subscribed to the Google
Groups "Java EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en

Reply via email to