That markup stream position shouldn't be tested at all!!
That is the problem.
i want something like: RequestCycle.isFullRender() that is set when a page starts to render itself.
We are now always setting the markupstream position in the markupstream (after the first time)
I want to turn that around. Always get the markupstream position from the stream but only set it
if we are in partial render.
Then the current problems people have when using the same tag twice is not a problem
Resetting the markupstream postion code doesn't also have to be there anymore. Because it always goes right.
(if you do a partial render before a full render then it will go wrong anyway/always)
And ajax partial render also works for components that are used twice. Only the last markupstream position is used
And if people can live with that then they can use that if they want to. Fine by me
And maybe for 90% of the usecases that component wouldn't even be used in partial rendering.
johan
On 11/15/05, Juergen Donnerstag <[EMAIL PROTECTED]> wrote:
> it does solve problems!
> Current applications don't break for example.
right. Current application don't break. Which problem are you trying to solve?
>
> And i do find this better. Set the markup stream when you are in full
> render. And only Reuse it on partial render.
That is no different to what we currently do
fullRender == (markupStreamPosition < 0)
> Then you don't have to listen you don't have to do anything different then
> in 1.1
> that is just much cleaner.
> And knowing that you are in full render is pretty straigh forward (if the
> render starts in a page or maybe panel)
>
Except for the
if (this.markupStreamPosition < 0)
{
// Remember the position while rendering the component the first
// time
this.markupStreamPosition = markupStream.getCurrentIndex();
}
else
{
// Re-set the markups index to the beginning of the component tag
markupStream.setCurrentIndex(this.markupStreamPosition);
}
we don't do anything different than in 1.1. Though the same changes
were necessary for Panel, Border and ListView, due to the way they
work.
And your solution doesn't take markup reloading into account.
Actually the only thing your are proposing is to add
private boolean isFullRender()
{
return markupStreamPosition < 0;
}
Juergen
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28&alloc_id845&opclick
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop
