Hi Igor,

I was hoping I can create the hierarchy in the Index.html page not in the
panel itself, which I might want to reuse in other pages.

 The reason I wanted to do it like that is that I want to reuse the B panel
as a panel which always contains a feedback panel along with _random_
forms/panels etc.

Anyway, your argument is fairly decent ... thanks very much for making it
clear.

Regards,

Razvan


igor.vaynberg wrote:
> 
> in markup for B you dont have a tag with wicket:id="C" so where should
> the markup for panel C be rendered?
> 
> -igor
> 
> On Tue, Mar 3, 2009 at 4:33 PM, Dragut Razvan <[email protected]>
> wrote:
>>
>> Hi Igor,
>>
>> First, thanks answering.
>>
>> I have posted the demo code that throws this exception in a pastebin here
>> :
>>
>>  http://pastebin.com/f28244adb
>>
>> If there's anything unclear, please let me know.
>>
>> Cheers,
>>
>> Razvan
>>
>>
>> igor.vaynberg wrote:
>>>
>>> its really had to tell whats going on because your markup is being
>>> stripped, why dont you paste it all into a pastebin and send us a link
>>> to that instead.
>>>
>>> -igor
>>>
>>> On Mon, Mar 2, 2009 at 5:49 PM, Dragut Razvan  wrote:
>>>>
>>>> sorry for posting for the third time but need to make sure everything
>>>> is
>>>> visible :
>>>>
>>>>
>>>>    [C content]
>>>>
>>>>
>>>>
>>>>
>>>> Dragut Razvan wrote:
>>>>>
>>>>> there where seems that text is missing is 2 spans ... one contains the
>>>>> other one. B contains C
>>>>>
>>>>>
>>>>> Dragut Razvan wrote:
>>>>>>
>>>>>> Hi everyone,
>>>>>>
>>>>>> I am new to wicket and I am encountering a problem when I am trying
>>>>>> to
>>>>>> mix some panel inheritance and composition. I don't know whether I'm
>>>>>> doing something wrong or it is not supposed to work like that but
>>>>>> hope
>>>>>> you can help with some advice. So here's my hierarchy :
>>>>>>
>>>>>> Panel -> A -> B . This is an inheritance relationship where panel B
>>>>>> extends panel A which extends Panel.
>>>>>> Panel -> C .
>>>>>>
>>>>>> If I add panel B and panel C to a page everything works fine.
>>>>>>
>>>>>> If I am trying to add panel C to panel B ( bPanelInstance.add(C) )
>>>>>> and
>>>>>> add panel B to the page then I am getting into problems (even if C is
>>>>>> an
>>>>>> EmptyPanel instance) :
>>>>>>
>>>>>> If I have
>>>>>>
>>>>>>
>>>>>>     [C content]
>>>>>>
>>>>>>
>>>>>> I get an exception saying that the end tag for panel "b" is missing,
>>>>>> though the end tag is there. Here's a sample of my exception where
>>>>>> the
>>>>>> name "login" equates to "b" from my exmaple.
>>>>>>
>>>>>> WicketMessage: close tag not found for tag: . Component:
>>>>>> [MarkupContainer
>>>>>> [Component id = login]]
>>>>>>
>>>>>> Root cause:
>>>>>>
>>>>>> org.apache.wicket.markup.MarkupException: close tag not found for
>>>>>> tag:
>>>>>> .
>>>>>> Component: [MarkupContainer [Component id = login]]
>>>>>> at
>>>>>> org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:123)
>>>>>> at org.apache.wicket.Component.renderComponent(Component.java:2596)
>>>>>> at
>>>>>> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1521)
>>>>>> at org.apache.wicket.Component.render(Component.java:2421)
>>>>>> at
>>>>>> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1399)
>>>>>> at
>>>>>> org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1537)
>>>>>> at org.apache.wicket.Page.onRender(Page.java:1522)
>>>>>> at org.apache.wicket.Component.render(Component.java:2421)
>>>>>> at org.apache.wicket.Page.renderPage(Page.java:926)
>>>>>>
>>>>>> Adding a panel to another one works fine unless is one of my extended
>>>>>> panels, therefore I guess it's something that I am missing when I am
>>>>>> extending the panels. The way I am extending the panels is standard
>>>>>> and
>>>>>> only I only override that required constructor and nothing else.
>>>>>>
>>>>>> To summarize :
>>>>>> I have some markup inheritance with panels which works fine. I get
>>>>>> the
>>>>>> above error when I am trying to add a panel using Panel's add method
>>>>>> to
>>>>>> my extended panels. The html markup it's correct and it's not missing
>>>>>> any
>>>>>> tags. Markup inheritance is done in the simplest way by only
>>>>>> providing
>>>>>> the panel id constructor.
>>>>>>
>>>>>> Do you have any idea why this happens ? If you think it should not
>>>>>> happen, you have tried it, you do not get into this and cannot
>>>>>> reproduce
>>>>>> the error, can you provide a simple working example of this scenario
>>>>>> ?
>>>>>>
>>>>>> I am using Wicket 1.4-rc2.
>>>>>>
>>>>>> Thanks very much,
>>>>>>
>>>>>> Kind Regards,
>>>>>>
>>>>>> Razvan
>>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Markup-inheritance-and-composition-mix-tp22300927p22301004.html
>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Markup-inheritance-and-composition-mix-tp22300927p22321225.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Markup-inheritance-and-composition-mix-tp22300927p22334770.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to