Is the content of your page (paragraph, links, list etc ) static in
nature, then you can just write it directly in html,
If it is not static in nature where do you get it from and in what form
If you have an object that is initialised with the data to populate in
you StartupPage, you can have a constructor like the following
public StartupPage(YourStartupContentObject foo)
{
add(new Label("message1", foo.getMessage1()));
add(new Label("message2", foo.getMessage2()));
add(new MultilineLabel("message2", foo.getparagraph()));
}
Or
public StartupPage()
{
YourStartupContentObject foo = fetchTheContent();
add(new Label("message1", foo.getMessage1()));
add(new Label("message2", foo.getMessage2()));
add(new MultilineLabel("message2", foo.getparagraph()));
}
Hope you get the Idea
regards
dipu
On Nov 22, 2007 3:23 PM, Gervais <[EMAIL PROTECTED]> wrote:
> Ok thanks.
>
> But y have another question. (i try to translate it corretcly).
>
> For beginning i have created an application named "Startup" with one
> page named "StartupPage".
> Below is my "StartupPage" code :
>
> # Code start
> ------------------------------------------------------------------------------------------------------
> public class StartupPage extends WebPage {
>
> private TestBean bean;
>
> public StartupPage() {
>
> bean=new TestBean();
> bean.setWelcome("Welcome text bla bla bla");
>
> add(new Label("test", new PropertyMdel(bean, "welcome") ));
>
> }
> }
> # Code end
> ------------------------------------------------------------------------------------------------------
>
> It works great but my page "StartupPage.html" must contains more than
> one welcome message.
> - Must i have one attribute (in my bean) per item to display ?
> - If i must have one attribute in my bean per item to display, it become
> a Model. If it become a model it must implements or extends a model.
> What model ?
> --> How can i correctly create a page that contains "only" paragraph,
> links and list ?
>
>
>
>
> Dipu Seminlal a écrit :
>
> > We don't do imports, we extends ! checkout markup inheritance
> >
> > http://cwiki.apache.org/WICKET/markup-inheritance.html
> >
> > regards
> > dipu
> >
> > On Nov 22, 2007 2:48 PM, Gervais <[EMAIL PROTECTED]> wrote:
> >
> >> Hy all,
> >>
> >> I'm new in the famous wicket world ! I need to start learning Wicket but
> >> i can't found docs that explain more than just doing a HelloWrold or a
> >> GuestBook.
> >> In fact i need to use Wicket with Spring but for that i first need to
> >> understand and play with wicket. So i have many questions.
> >>
> >> 1° Is there a way for stupid frenchies that don't speak english like me
> >> to talk about Wicket ? (If not sorry for my poor english)
> >>
> >>
> >> 2° How can i import other page. Like a <%@ include
> >> file="includes/menubar.inc.jsp" %> or <jsp:include
> >> page="includes/menubar.inc.jsp" flush="true" /> tag ?
> >>
> >> 3° In a big form ( with more than 20 fields ) that represnet more than
> >> one Pojo Bean how must i work ?
> >>
> >>
> >> Thanks
> >>
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> > __________ NOD32 2678 (20071122) Information __________
> >
> > This message was checked by NOD32 antivirus system.
> > http://www.eset.com
> >
> >
> >
> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]