Similiar to this post
(http://apache-wicket.1842946.n4.nabble.com/Enclosure-changes-in-1-5-tp3822819p3822819.html)
I've got the same error message using the enclosure-tag and a transparent
WebContainer. I’ve just converted some working 1.4.18 code to 1.5.2 and got
the same error:

org.apache.wicket.WicketRuntimeException: Could not find child with id:
paymentOptionsPanel in the wicket:enclosure
            at
org.apache.wicket.markup.html.internal.Enclosure.checkChildComponent(Enclosure.java:232)
            at
org.apache.wicket.markup.html.internal.Enclosure.getChildComponent(Enclosure.java:211)
            at
org.apache.wicket.markup.html.internal.Enclosure.onInitialize(Enclosure.java:127)
            at
org.apache.wicket.Component.fireInitialize(Component.java:919)

Markup:

<table wicket:id="table_wrapper">
        <tbody>
                <wicket:enclosure child="column:info">
                        <tr>
                                <td wicket:id="column">
                                        <div>
[Info]
</div>
                                </td>
                        </tr>
                </wicket:enclosure>
                <tr>
                        <td>
                                <div wicket:id="list">[Item List]</div>
                        </td>
                </tr>
        </tbody>
</table>

Java Code:

final TransparentMarkupContainer table_wrapper = new
TransparentMarkupContainer("table_wrapper");
// additional stuff goes here
add(table_wrapper);
                
final WebMarkupContainer column = new WebMarkupContainer("column");
// addition stuff goes here
add(column);
column.add( new Label( "info", getInfoModel() )
{
        private static final long serialVersionUID = 1L;

        @Override
        public boolean isVisible()
        {
                // some logic
                return getInfoModel()!=null && !Strings.isEmpty(
getInfoModel().getObject() );
        }
});
                
add( new Label( "list", new Model<String>("Test Items") ) );

The code worked fine on 1.4 (with a WebMarkupContainer and
isTransparent()-method retuning true) which makes me wonder if this is a
bug. If I would change the component hierarchy without using a transparent
WebContainer this would work as expected. Any ideas?
Thanks in advance for any help, 
  Dirk



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Enclosures-and-transparent-WebContainer-tp3935753p3935753.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

Reply via email to