RE: Using a component resolver to provide a panel component inside an enclosure
Can you create a quickstart for this and attach it to a JIRA? Yes, created a quickstart and attached to this new JIRA issue: https://issues.apache.org/jira/browse/WICKET-2882 Regards, Chris -- Jeremy Thomerson http://www.wickettraining.com On Tue, May 18, 2010 at 9:38 PM, Chris Colman chr...@stepaheadsoftware.comwrote: Has anyone been able to use a component resolver to provide a component inside an enclosure in wicket 1.4.2 or later? It worked fine in wicket 1.4.1 but no version after that seems to work, giving the error: WicketMessage: Tag expected The markup section looks like this: wicket:enclosure child=panelContainer div class=box span wicket:id=panelContainer/span div /wicket:enclosure The resolve method of my resolver that works fine in 1.4.1 looks like this: boolean resolve(final MarkupContainer container, final MarkupStream markupStream, final ComponentTag tag) { String tagStr = tag.getId(); if (tag instanceof WicketTag) { // this resolver does not handle wicket tags return false; } Page page = container.getPage(); // One day make this an interface that can be implemented // by any component - not just pages if ( page instanceof OrganizationPage tag != null ) { OrganizationPage organizationPage = (OrganizationPage)page; // Create and initialize the component final Component component = organizationPage .createComponent(container, tagStr); if (component != null) { container.autoAdd(component); return true; } } else logger.trace(page not org page: + tag + in + container); // We were not able to handle the componentId return false; } Diagnostics shows that the createComponent method is definitely being called and the Panel with id = panelContainer is being created and returned. Perhaps in post 1.4.1 wicket we need to add this component to a different container? i.e. different to the container parameter passed to the resolve method. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Using a component resolver to provide a panel component inside an enclosure
Has anyone been able to use a component resolver to provide a component inside an enclosure in wicket 1.4.2 or later? It worked fine in wicket 1.4.1 but no version after that seems to work, giving the error: WicketMessage: Tag expected The markup section looks like this: wicket:enclosure child=panelContainer div class=box span wicket:id=panelContainer/span div /wicket:enclosure The resolve method of my resolver that works fine in 1.4.1 looks like this: boolean resolve(final MarkupContainer container, final MarkupStream markupStream, final ComponentTag tag) { String tagStr = tag.getId(); if (tag instanceof WicketTag) { // this resolver does not handle wicket tags return false; } Page page = container.getPage(); // One day make this an interface that can be implemented // by any component - not just pages if ( page instanceof OrganizationPage tag != null ) { OrganizationPage organizationPage = (OrganizationPage)page; // Create and initialize the component final Component component = organizationPage .createComponent(container, tagStr); if (component != null) { container.autoAdd(component); return true; } } else logger.trace(page not org page: + tag + in + container); // We were not able to handle the componentId return false; } Diagnostics shows that the createComponent method is definitely being called and the Panel with id = panelContainer is being created and returned. Perhaps in post 1.4.1 wicket we need to add this component to a different container? i.e. different to the container parameter passed to the resolve method. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Using a component resolver to provide a panel component inside an enclosure
Can you create a quickstart for this and attach it to a JIRA? -- Jeremy Thomerson http://www.wickettraining.com On Tue, May 18, 2010 at 9:38 PM, Chris Colman chr...@stepaheadsoftware.comwrote: Has anyone been able to use a component resolver to provide a component inside an enclosure in wicket 1.4.2 or later? It worked fine in wicket 1.4.1 but no version after that seems to work, giving the error: WicketMessage: Tag expected The markup section looks like this: wicket:enclosure child=panelContainer div class=box span wicket:id=panelContainer/span div /wicket:enclosure The resolve method of my resolver that works fine in 1.4.1 looks like this: boolean resolve(final MarkupContainer container, final MarkupStream markupStream, final ComponentTag tag) { String tagStr = tag.getId(); if (tag instanceof WicketTag) { // this resolver does not handle wicket tags return false; } Page page = container.getPage(); // One day make this an interface that can be implemented // by any component - not just pages if ( page instanceof OrganizationPage tag != null ) { OrganizationPage organizationPage = (OrganizationPage)page; // Create and initialize the component final Component component = organizationPage .createComponent(container, tagStr); if (component != null) { container.autoAdd(component); return true; } } else logger.trace(page not org page: + tag + in + container); // We were not able to handle the componentId return false; } Diagnostics shows that the createComponent method is definitely being called and the Panel with id = panelContainer is being created and returned. Perhaps in post 1.4.1 wicket we need to add this component to a different container? i.e. different to the container parameter passed to the resolve method. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org