Re: [Vote] Page.getVersion... shouldn't we depricate it in 1.3/2.0?

2007-02-12 Thread Jan Vermeulen

I think you should, because it can leave your page in an inconsistent state,
when calling this method while a new version is being created. So it is
better that the user of the framework has no access to this option.

Jan. 
-- 
View this message in context: 
http://www.nabble.com/Page.getVersion...-shouldn%27t-we-depricate-it-in-1.3-2.0--tf3202885.html#a8922120
Sent from the Wicket - Dev mailing list archive at Nabble.com.



Re: [Vote] Page.getVersion... shouldn't we depricate it in 1.3/2.0?

2007-02-12 Thread Jan Vermeulen


Johan Compagner wrote:
 
 or i can make it so that it returns really an page copy with that version.
 

Just some thoughts about the idea of copying a page:

I have been experimenting with making copies of pages, and there are some
tricky things to take care of. The page has internal flags that indicate
temporary state, which you might not want in the copy. And you should
manipulate the versionManager of that copy, so that it points to the correct
versionNumber.


Johan Compagner wrote:
 
 The question is what api doe we want:
 
 Page page = page.getVersion(versionnumber)
 Page page = pagemap.get(pageid,versionnumber)
 

I prefer:

Page page = pagemap.get(pageid,versionnumber)

Jan.
-- 
View this message in context: 
http://www.nabble.com/Page.getVersion...-shouldn%27t-we-depricate-it-in-1.3-2.0--tf3202885.html#a8928893
Sent from the Wicket - Dev mailing list archive at Nabble.com.



Re: [Vote] Page.getVersion... shouldn't we depricate it in 1.3/2.0?

2007-02-12 Thread Igor Vaynberg

i think we should externalize it away from the page. the page doesnt need to
know HOW it is versioned, all it needs to have is a listener for when its
state is changed and we have that through addStateChange

-igor


On 2/12/07, Johan Compagner [EMAIL PROTECTED] wrote:


or i can make it so that it returns really an page copy with that version.

But only SecondLevel can do that ofcourse i can make it so that also
AccessStack does that..
That when it sees that a page version is asked for that is not the
current.
It first makes a copy and then rollbacks the changes..

The question is what api doe we want:


Page page = page.getVersion(versionnumber)

Page page = pagemap.get(pageid,versionnumber)

johan




On 2/12/07, Jan Vermeulen [EMAIL PROTECTED] wrote:


 I think you should, because it can leave your page in an inconsistent
 state,
 when calling this method while a new version is being created. So it is
 better that the user of the framework has no access to this option.

 Jan.
 --
 View this message in context:

http://www.nabble.com/Page.getVersion...-shouldn%27t-we-depricate-it-in-1.3-2.0--tf3202885.html#a8922120
 Sent from the Wicket - Dev mailing list archive at Nabble.com.





Re: [Vote] Page.getVersion... shouldn't we depricate it in 1.3/2.0?

2007-02-12 Thread Jan Vermeulen


Jan Vermeulen wrote:
 
 And you should manipulate the versionManager of that copy, so that it
 points to the correct versionNumber.
 

Sorry, not needed. That's done by the rollback.

Jan.

-- 
View this message in context: 
http://www.nabble.com/Page.getVersion...-shouldn%27t-we-depricate-it-in-1.3-2.0--tf3202885.html#a8929000
Sent from the Wicket - Dev mailing list archive at Nabble.com.