i think this is the discussion we had (juergen) in another thread.
If you write a IComponentResovler you should also write something else to be able to look up the childs components markup.
Can't we add another method on IComponentResolver? That the markupfinder can call on the parent for a child?

johan


On 8/28/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
if i understand correctly in 1.2 i can do something like this

class AnyIdAdapter extends WebMarkupContainer implements IComponentResolver {
   ....
 public final boolean resolve(MarkupContainer container, MarkupStream markupStream, ComponentTag tag)
    {
        iterator().next().render(markupStream);
        return true;
    }
}

so this webmarkup container would render any child with any id so i can do

AnyIdAdapter adapter=new AnyIdAdapter("adapter");
adapter.add(new Label("somelabel", "hi"));

<span wicket:id="adapter"><span wicket:id=" somerandomid"></span></span>

and this should work nicely, but it doesnt work in 2.0 - i get

wicket.WicketRuntimeException: Unable to find the markup for the component: item


at wicket.MarkupFragmentFinder.find(MarkupFragmentFinder.java:89)
at wicket.Component.loadMarkupStream(Component.java:663)
at wicket.Component.<init>(Component.java:629)

because MarkupFragmentFinder doesnt take IComponentResolver into account - and how could it because IComponentResolver also renders the component while MarkupFragmentFinder only locates it.

so what should we do? have some IComponentFinder interface, tweak something else?

-Igor



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
Wicket-develop mailing list
Wicket-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-develop



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-develop mailing list
Wicket-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to