Hi,

Well, the behaviour is different now. No NullPointerException, but instead I get "Unable to determine markup for component ..."

I have now written a simple example that demonstrates the problem, so it should 
be easier
to recreate it. It is available at 
http://www.suutari.iki.fi/downloads/markupproblem.zip

It looks like use of <wicket:extend> tag is not enough to cause the problem, but
it starts to occur when base panel has some markup that wraps the derived
child panel.

   Ari S.


----- Original Message ----- From: "Johan Compagner" <[EMAIL PROTECTED]>
To: <wicket-develop@lists.sourceforge.net>
Sent: Wednesday, February 15, 2006 11:47 PM
Subject: Re: [Wicket-develop] NullpointerException in Markup.findComponentIndex


should be fixed now. I do a instanceof check so that the right method is
being called.


On 2/15/06, Ari Suutari <[EMAIL PROTECTED]> wrote:

Hi,

I'm afraid that the fix doesn't work. The loop at Markup constructor

this.markup = new ArrayList();
for (int i=0; i < markupElements.size(); i++)
{
    addMarkupElement((MarkupElement)markupElements.get(i));
}

This ends up calling wrong addMarkupElement (ie. the one which takes
MarkupElement as
parameter). The other one accepts ComponentTag as parameter.  The problem
is that the called
method does not create the componentMap, only the one with ComponentTag
parameter does.

    Ari S.

----- Original Message -----
From: "Juergen Donnerstag" <[EMAIL PROTECTED]>
To: <wicket-develop@lists.sourceforge.net>
Sent: Wednesday, February 15, 2006 1:13 PM
Subject: Re: [Wicket-develop] NullpointerException in
Markup.findComponentIndex


> fixed
>
> On 2/15/06, Juergen Donnerstag <[EMAIL PROTECTED]> wrote:
>> I think Ari is right. Igor mentioned that problem yesterday as well
>> and I couldnt figure out what the problem was. But what Ari says makes
>> perfect sense.
>>
>> Juergen
>>
>> On 2/15/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
>> > i can add a null check there but i don't know if that really fixes
the root
>> > of the problem
>> > (why that map is not filled)
>> >
>> > would be nice to have a small example demonstrating this.
>> >
>> >
>> > johan
>> >
>> >
>> >  On 2/15/06, Ari Suutari <[EMAIL PROTECTED]> wrote:
>> > > Hi,
>> > >
>> > > Yes, a markup like this
>> > >
>> > >   <span wicket:id="linjat">
>> > >   <tr>
>> > >    <td>
>> > >     <span wicket:id="linja1"></span>
>> > >    </td>
>> > >   </tr>
>> > >   </span>
>> > >
>> > > when put into a panel, which uses <wicket:extend> doesn't work
>> > > when "linjat" is rendered via AjaxRequestTarget. "linjat" is e
>> > WebMarkupContainer
>> > > and "linja1" is a label.
>> > >
>> > >     Ari S.
>> > >
>> > > ----- Original Message -----
>> > > From: "Johan Compagner" <[EMAIL PROTECTED]>
>> > > To: < wicket-develop@lists.sourceforge.net>
>> > > Sent: Wednesday, February 15, 2006 10:55 AM
>> > > Subject: Re: [Wicket-develop] NullpointerException in
>> > Markup.findComponentIndex
>> > >
>> > >
>> > > thats strange. Does that markup doesn't have any wicket components?
>> > >
>> > > johan
>> > >
>> > >
>> > > On 2/15/06, Ari Suutari <[EMAIL PROTECTED]> wrote:
>> > > >
>> > > > Hi,
>> > > >
>> > > > I have been trying to track what causes following exception in
some of
>> > our
>> > > > wicket pages
>> > > > using ajax stuff:
>> > > >
>> > > > java.lang.NullPointerException
>> > > > at
>> > wicket.markup.Markup.findComponentIndex(Markup.java:271)
>> > > > at
>> > wicket.markup.MarkupStream.findComponentIndex(MarkupStream.java
>> > :444)
>> > > > at
>> > wicket.Component.initializeMarkupStream(Component.java:2757)
>> > > > at wicket.Component.doRender(Component.java:697)
>> > > > at
>> > wicket.ajax.AjaxRequestTarget.respondComponent(AjaxRequestTarget.java
>> > > > :187)
>> > > > at
>> > wicket.ajax.AjaxRequestTarget.respond(AjaxRequestTarget.java:135)
>> > > >
>> > > > (I'm running against today's cvs version)
>> > > >
>> > > > It looks like the componentMap member of Markup instance is null.
>> > > > Now I'm just guessing, but could it be that when Markup is
constructed
>> > > > via the "copy" constructor:
>> > > >
>> > > > Markup(final Markup markup, final List markupElements)
>> > > >
>> > > > Then the componentMap is not initialized ? At least this
constructor
>> > > > is called on pages that do not work.
>> > > >
>> > > >     Ari S.
>> > > >
>> > > >
>> > > >
>> > > > -------------------------------------------------------
>> > > > This SF.net email is sponsored by: Splunk Inc. Do you grep
through log
>> > > > files
>> > > > for problems?  Stop!  Download the new AJAX search engine that
makes
>> > > > searching your log files as easy as surfing the  web.  DOWNLOAD
SPLUNK!
>> > > >
>> >
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
>> > > > _______________________________________________
>> > > > Wicket-develop mailing list
>> > > > Wicket-develop@lists.sourceforge.net
>> > > >
>> > https://lists.sourceforge.net/lists/listinfo/wicket-develop
>> > > >
>> > >
>> > >
>> > >
>> > > -------------------------------------------------------
>> > > This SF.net email is sponsored by: Splunk Inc. Do you grep through
log
>> > files
>> > > for problems?  Stop!  Download the new AJAX search engine that
makes
>> > > searching your log files as easy as surfing the  web.  DOWNLOAD
SPLUNK!
>> > >
>> >
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
>> > > _______________________________________________
>> > > Wicket-develop mailing list
>> > > Wicket-develop@lists.sourceforge.net
>> > >
>> > https://lists.sourceforge.net/lists/listinfo/wicket-develop
>> > >
>> >
>> >
>>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
>
http://sel.as-us.falkag.net/sel?cmd_______________________________________________
> Wicket-develop mailing list
> Wicket-develop@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-develop
>
>


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Wicket-develop mailing list
Wicket-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-develop



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Wicket-develop mailing list
Wicket-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to