Hi,

actually I hoped that there was a general way. Because the Decorator is not
designed for special cases. 

My actual problem is that I have a Page which contains a panel and some
simple stuff: Table, Text etc.
Now I want to wrap (decorate) this page with a special menu. This menu is
used by some (but not all) other pages. Again, this decorated stuff I want
to decorate again with a special menu. So I have something like
MenuBClass(MenuAClass(MyClass)). In another page I want to wrap as follows:
MenuAClass(MenuBClass(MyClass)). i.e. another combination.

With inheritance it doesn't work, because you specify where the subclasses
have to appear in the html.



jthomerson wrote:
> 
> I suppose since the original answer was not adequate for your needs,
> you need to explain your needs to a greater level of detail rather
> than assuming that Igor (or other core devs) don't know what a
> commonly-used programming pattern is.  More detail please?
> 
> According to the definition of "decorator pattern" within your article:
> 
> "In object-oriented programming, the decorator pattern is a design
> pattern that allows new/additional behaviour to be added to an
> existing class dynamically."
> 
> In this case, any Wicket Behavior class would fit this definition.
> Borders also fit the definition, although they typically deal more
> with markup than "behavior".  Of course, in your original email, you
> alluded to wanting to decorate markup, not behavior.
> 
> So, please explain your needs.  There are indeed quite a few ways to
> apply this pattern within Wicket.
> 
> --
> Jeremy Thomerson
> http://www.wickettraining.com
> 
> 
> 
> 
> On Tue, Jun 23, 2009 at 2:09 PM, ptrash<[email protected]> wrote:
>>
>> Isn't there a way to use the decorator pattern (see
>> http://en.wikipedia.org/wiki/Decorator_pattern Decorator Pattern )?
>>
>>
>>
>>
>> igor.vaynberg wrote:
>>>
>>> thats what borders do.
>>>
>>> -igor
>>>
>>> On Mon, Jun 22, 2009 at 1:20 PM, Pi Trash<[email protected]> wrote:
>>>> Hi,
>>>>
>>>> is there a way to decorate a panel? with inheritance it doesn't work,
>>>> because you have to say explicitly in the super html where the child
>>>> content will be put into.
>>>> ______________________________________________________
>>>> GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
>>>> Jetzt freischalten unter http://movieflat.web.de
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [email protected]
>>>> For additional commands, e-mail: [email protected]
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Apply-Decorator-Pattern-to-Panels-tp24154678p24171350.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]
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Apply-Decorator-Pattern-to-Panels-tp24154678p24179470.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