The map is converted to PageParameters. Previous a home page was always constructed with empty PageParameters (or what the request just happens to have in that example) Now the map's values are also inserted into the page parameters and then the homepage is constructed with those.
ALL the pages you construct after the HomePage can be constructed
with youre own PageParameters see IPageFactory.newPage() methods.
Why can't i do the same with the homepage???
Why shouldn't we be able to do the same thing as we would do with all the pages that are
constructed after the homepage?
It is just very easy to have. No more special subclasses as Juergen has.
I hate cast every where in the code.. I have seen this so often that i call a method from
a framework and suddenly i get a classcast exception because they are trying to cast it
somewhere deep in the code because they expect something else.
I stumbled on the usecase because i had to implement a application that is completely
made of a plugins. And the core (that has the basic things like a homepage) plugin needs
to be configured from another web plugin.
So there i set the homepage of the core and i want to configure somethings for that homepage
So the most logical thing is to use PageParameters for that..
johan
Jonathan Locke wrote:
i think i'm only partly getting what each of you are saying.
i think i'm -1 on this change, but i'd like to understand johan's reasoning first...
i don't really see the implementation details of home page construction as something that belongs in application settings. can you explain why it is that you want to put these values in app settings? is there some reason why these values can't be set in your home page's constructor? and if you're trying to make your home page xml-configurable, why not just use the Xml class to do that in your home page's constructor?
btw, i haven't really looked at the source code, but the home page really should take PageParameters still even though they aren't used because the page is bookmarkable.
Johan Compagner wrote:
Where does that getHomePageDefaults come from?
IApplication doesn't have this method.
So it is an implementation of youre own? That you have to Cast to?
That is not what i want. The Page can be used by Any application i want
Then there shouldn't be any dependencies on an implementation if IApplication!
johan
Juergen Donnerstag wrote:
As I've already written. Clean simple, no uncessary changes to the core.
class MyPage extends Page { public MyPage() {
param = ((MyApplication)getApplication()).getHomePageDefaults();
}
Juergen
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop
