That won't help because the fields must be added to the form otherwise the
submitted values will not be set properly
on the model. At least that was my experience when I tried this before.

jd

-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Auftrag von Juergen
Donnerstag
Gesendet: Mittwoch, 5. Oktober 2005 11:35
An: wicket-user@lists.sourceforge.net
Betreff: Re: [Wicket-user] Component nesting problem (bug???)


"name" and "firstname" must not be added to Form but rather to the
border component "menuBorder"

Juergen

On 10/5/05, Denzel, Jürgen <[EMAIL PROTECTED]> wrote:
> The code is based on the navmenu example. What we need is a tabbed pane,
> where each tab
> contains a form.
>
> All tabs extends this class.
>
> public abstract class AbstractTabsPage extends PageWithMenu
> {
>    private Form form;
>
>    public AbstractTabsPage(final PageParameters parameters)
>    {
>        super();
>        this.form = new Form( "tabForm" );
>        add( this.form );
>    }
>
>    public void addToForm( final Component child )
>    {
>        this.form.add( child );
>    }
>
>    public String getVariation()
>    {
>        return getRequestCycle().getRequest().getParameter( "page" );
>    }
> }
>
> A page looks e.g. like this:
>
> public class TabsPage extends AbstractTabsPage
> {
>    /**
>     * Constructor.
>     * @param parameters Page parameters
>     */
>    public Home(final PageParameters parameters)
>    {
>        super( parameters );
>        Login login = new Login();
>        addToForm( new TextField( "name", new PropertyModel( login,
> "name" ) ) );
>        addToForm( new TextField( "firstname", new PropertyModel( login,
> "firstname" ) ) );
>    }
>
> ...
> ..
> .
>
> What's wrong with this code?
> Thanks.
> jd
>
> -----Ursprüngliche Nachricht-----
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Auftrag von Eelco
> Hillenius
> Gesendet: Mittwoch, 5. Oktober 2005 08:39
> An: wicket-user@lists.sourceforge.net
> Betreff: Re: [Wicket-user] Component nesting problem (bug???)
>
>
> What does the rest of your code look like/ how do you add the inputs
> to the form to the border?
>
> Eelco
>
> On 10/5/05, Denzel, Jürgen <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I encountered the following problem when nesting components and using
the
> > <wicket:body/> tag.
> > My markup looks like this:
> >
> > <span wicket:id="menuBorder">
> > Name: <input type="text" wicket:id="name"><br>
> > Firstname: <input type="text" wicket:id="firstname"><br>
> > </span>
> >
> > The border component is this:
> >
> > <wicket:border>
> >         <span wicket:id="navigationMenu" />
> >         <div id="tabContent">
> >         <form wicket:id="menuForm">
> >                         <wicket:body/>
> >                 </form>
> >         </div>
> > </wicket:border>
> >
> > When accessing the page I get the following error:
> >
> > wicket.markup.MarkupException: Unable to find component with id 'name'
in
> > [MarkupContainer [Component id = menuBorder, page =
> > wicket.examples.navmenu.Home, path = 0:menuBorder.MenuBorder, isVisible
=
> > true, isVersioned = true]].
> >
> > I was expecting that the <wicket:body/> tag would be replaced by the
> "name"
> > and "firstname" input fields and Wicket would look
> > up these fields in the surrounding form component. In my class I added
the
> > fields to the form correctly.
> >
> > Is this supposed to be so or is it a bug.
> >
> > Greets,
> > jd
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by:
> > Power Architecture Resource Center: Free content, downloads,
discussions,
> > and more. http://solutions.newsforge.com/ibmarch.tmpl
> > _______________________________________________
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to