Opening up MarkupContainer#renderNext and Markup#Markup?

View: New views
4 Messages — Rating Filter:   Alert me  

Opening up MarkupContainer#renderNext and Markup#Markup?

by Erik van Oosten :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I am writing a Swing like layout manager (with MIG layout manager's API
as inspiration). The layout manager will generate HTML, but also has the
ability to override this with HTML defined by the user. I have a
prototype that does this. It takes elements from the current
Markupstream, adds the elements that are missing, and then some more to
facilitate the layouting (well the last step is next on my todo list).
These elements are then put in a new markupstream that is used to drive
onComponentTagBody of the layout component.

For this to work I had to open up 2 things:
- org.apache.wicket.markup.Markup#Markup(): from default to public
  I could have written my own implementation of IMarkup, but that seems
a bit overkill as I need exactly what is in Markup.

- org.apache.wicket.MarkupContainer#renderNext(MarkupStream): from
private to protected (don't care if it stays final)
  My onComponentTagBody implementation is loosely based on method
org.apache.wicket.MarkupContainer#renderAssociatedMarkup(String,String).
One of the methods I need to call to render children seems to be renderNext.

Could these two be opened up?

Regards,
     Erik.


--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


Re: Opening up MarkupContainer#renderNext and Markup#Markup?

by Juergen Donnerstag :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I don't mind open up both, as long as renderNext() stays final and we
tag it as "THIS IS WICKET INTERNAL".

-Juergen

On Wed, Jun 17, 2009 at 5:46 PM, Erik van Oosten<e.vanoosten@...> wrote:

> Hi,
>
> I am writing a Swing like layout manager (with MIG layout manager's API as
> inspiration). The layout manager will generate HTML, but also has the
> ability to override this with HTML defined by the user. I have a prototype
> that does this. It takes elements from the current Markupstream, adds the
> elements that are missing, and then some more to facilitate the layouting
> (well the last step is next on my todo list). These elements are then put in
> a new markupstream that is used to drive onComponentTagBody of the layout
> component.
>
> For this to work I had to open up 2 things:
> - org.apache.wicket.markup.Markup#Markup(): from default to public
>  I could have written my own implementation of IMarkup, but that seems a bit
> overkill as I need exactly what is in Markup.
>
> - org.apache.wicket.MarkupContainer#renderNext(MarkupStream): from private
> to protected (don't care if it stays final)
>  My onComponentTagBody implementation is loosely based on method
> org.apache.wicket.MarkupContainer#renderAssociatedMarkup(String,String). One
> of the methods I need to call to render children seems to be renderNext.
>
> Could these two be opened up?
>
> Regards,
>    Erik.
>
>
> --
> Erik van Oosten
> http://www.day-to-day-stuff.blogspot.com/
>
>

Re: Opening up MarkupContainer#renderNext and Markup#Markup?

by Erik van Oosten :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks.
I'll create a Jira issue.

Regards,
    Erik.


Juergen Donnerstag wrote:
> I don't mind open up both, as long as renderNext() stays final and we
> tag it as "THIS IS WICKET INTERNAL".
>
> -Juergen
>  


Re: Opening up MarkupContainer#renderNext and Markup#Markup?

by Erik van Oosten :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Done (with patch):
https://issues.apache.org/jira/browse/WICKET-2332

I'd appreciate it if this can make it before 1.4 goes final.

Regards,
    Erik.


On Wed, 17 Jun 2009 19:29:45 +0200, Erik van Oosten <e.vanoosten@...>
wrote:

> Thanks.
> I'll create a Jira issue.
>
> Regards,
>     Erik.
>
>
> Juergen Donnerstag wrote:
>> I don't mind open up both, as long as renderNext() stays final and we
>> tag it as "THIS IS WICKET INTERNAL".
>>
>> -Juergen
>>