Well I don't think it is slow. It caches all properties, they are automatically reloaded if the properties files changes, and once in memory it is just a question of creating keys and traversing some maps. And btw if the key was found previously it doesn't traverse the properties maps anymore, it gets the value from the front-line cache right away. Can it be any faster?
The attributemodifier would only be attached if a wicket:message tag was found by the markup handler. It doesn't affect any application which doesn't use wicket:message attributes. You do have that option already. It is trivial to add a flag to WicketMessageHandler or create different ones to control it default behavior: resolve or attach AM Juergen On 9/22/06, Johan Compagner <[EMAIL PROTECTED]> wrote: > there is one other problem > Our localizer object is not the fastest thing in the world. > So i guess that thing will be called everytime? Because the components can > be attached > by any locale but the markup itself is also for one. > > I just would love to have an option that my messages are parsed once at > loading of the markup > We can have other approaches if people want messages in all strange places > by doing at at render time. > > johan > > > > On 9/22/06, Juergen Donnerstag <[EMAIL PROTECTED]> wrote: > > What if the Message markup filter (which is only executed when the > > markup is loaded) were able to add a stateless attributemodifier to > > the component tag and that AM gets automatically attached to the > > component at render time. That would mean basically no overhead at > > runtime. > > Because the very same AM gets re-used for all compent tags with > > wicket:message attribute it must be stateless. > > > > Juergen > > > > On 9/19/06, Johan Compagner < [EMAIL PROTECTED]> wrote: > > > But i want a choice that i want it on markup loading time > > > i don't want the penalty for constantly looking all the resources up > when it > > > is not needed > > > So we should support both. > > > > > > > > > johan > > > > > > > > > > > > On 9/19/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > > > You are talking about *your* use cases, while the more complex lookup > > > > mechanism came from actual requests from people. I think resource > > > > bundles work good for many cases, and I think the fact that we're able > > > > to do such lookups is a good selling point for Wicket. Also, again, > > > > while we should try to keep things simple in our implementations, it > > > > shouldn't be the major factor in deciding whether to support something > > > > or not. This feature was asked for by users, and when voted on, it got > > > > quite some plusses of users that wanted it. And now that I'm writing > > > > about localization, I thought this feature, together with > > > > <wicket:message> is actually pretty powerful. > > > > > > > > So, if we can find a reasonable way to support this, I'd be all for > it. > > > > > > > > Eelco > > > > > > > > On 9/19/06, Johan Compagner < [EMAIL PROTECTED]> wrote: > > > > > what we currently do is over complex and in all my usecases i have > > > totally > > > > > not needed > > > > > but maybe in my cases i had where real i18n was needed it was always > > > > > different > > > > > The messages where always comming from a database. Never from > property > > > > > files. > > > > > > > > > > I think the current way of walking the hierachy and so on is > extremely > > > > > complex > > > > > We should reduce the choices not extend them. Keep it simple > > > > > > > > > > johan > > > > > > > > > > > > > > > > > > > > On 9/19/06, Eelco Hillenius < [EMAIL PROTECTED] > wrote: > > > > > > I would rather not support it at all if it is that limited. Like I > > > > > > said before, we would support an advanced lookup with > <wicket:message > > > > > > key="foo"> but something very basic with <bar > wicket:message="bar=foo" > > > > > > />. I don't want to explain this to users, and I don't like the > > > > > > inconsistency. I'm for the best solution, not the easiest for us > to > > > > > > implement or maintain. > > > > > > > > > > > > Eelco > > > > > > > > > > > > > > > > > > On 9/19/06, Johan Compagner < [EMAIL PROTECTED]> wrote: > > > > > > > i think i still prefer the doing it once by loading the markup. > > > > > > > The maybe we loose some advanced localization but i find this > > > > > acceptable. > > > > > > > What options do we then loose? > > > > > > > > > > > > > > If these options work then it is fine: > > > > > > > > > > > > > > Xxxx.html > > > > > > > gets its messages from: > > > > > > > > > > > > > > Xxxx.properties > > > > > > > > > > > > > > MyApplicaiton.properties > > > > > > > > > > > > > > and there own Localization component should be able to resolve > it by > > > key > > > > > (if > > > > > > > they are comming from a database) > > > > > > > > > > > > > > johan > > > > > > > > > > > > > > > > > > > > > > > > > > > > On 9/19/06, Juergen Donnerstag < [EMAIL PROTECTED]> > > > wrote: > > > > > > > > You are mixing things here. Markup tags become component tags > if > > > they > > > > > > > > have a wicket:id. This is the only rule. <wicket:xxx > because > by > > > > > > > > default it doesn't have a wicket:id gets an id automatically > > > > > > > > (<auto>-xxx) assigned for the markup tag to become a component > > > tags. > > > > > > > > The same happens to autolinks, <body> etc and it happens at > markup > > > > > > > > load time and hence just once per component *type*. > > > > > > > > > > > > > > > > While rendering a component *instance* the resolvers are > applied > > > and > > > > > > > > in case of <span wicket:message="myMessage" > > > wicket:id="<auto>-1234"> a > > > > > > > > resolver could localize an attributes values. The resolver in > > > these > > > > > > > > case would actually be independent from any component type as > it > > > would > > > > > > > > look for wicket:message in the current tag only and on the fly > > > modify > > > > > > > > the attribute. > > > > > > > > > > > > > > > > Juergen > > > > > > > > > > > > > > > > > > > > > > > > On 9/19/06, Eelco Hillenius < [EMAIL PROTECTED] > > wrote: > > > > > > > > > On 9/18/06, Juergen Donnerstag < > [EMAIL PROTECTED] > > > > > > wrote: > > > > > > > > > > We do that already in other cases. Make it an auto > component > > > and > > > > > you > > > > > > > > > > can easily hook a resolver on it. > > > > > > > > > > > > > > > > > > That would only work for tags that are not component tags to > > > begin. > > > > > As > > > > > > > > > soon as you would decide to put wicket:id in it, it wouldn't > go > > > > > > > > > through a component resolver and would thus not be > processed, > > > right? > > > > > > > > > > > > > > > > > > Eelco > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > > > > > Take Surveys. Earn Cash. Influence the Future of IT > > > > > > > > > Join SourceForge.net's Techsay panel and you'll get the > chance > > > to > > > > > share > > > > > > > your > > > > > > > > > opinions on IT & business topics through brief surveys -- > and > > > earn > > > > > cash > > > > > > > > > > > > > > > > > > > > > > > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > > > > > > > > _______________________________________________ > > > > > > > > > Wicket-develop mailing list > > > > > > > > > Wicket-develop@lists.sourceforge.net > > > > > > > > > > > > > > > > > > > > > > > > > https://lists.sourceforge.net/lists/listinfo/wicket-develop > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > > > > Take Surveys. Earn Cash. Influence the Future of IT > > > > > > > > Join SourceForge.net's Techsay panel and you'll get the chance > to > > > > > share > > > > > > > your > > > > > > > > opinions on IT & business topics through brief surveys -- and > earn > > > > > cash > > > > > > > > > > > > > > > > > > > > > > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > > > > > > > _______________________________________________ > > > > > > > > Wicket-develop mailing list > > > > > > > > Wicket-develop@lists.sourceforge.net > > > > > > > > > > > > > > > > > > > > > > > > https://lists.sourceforge.net/lists/listinfo/wicket-develop > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > > > Take Surveys. Earn Cash. Influence the Future of IT > > > > > > > Join SourceForge.net 's Techsay panel and you'll get the chance > to > > > share > > > > > your > > > > > > > opinions on IT & business topics through brief surveys -- and > earn > > > cash > > > > > > > > > > > > > > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > > > > > > > > > > > > _______________________________________________ > > > > > > > Wicket-develop mailing list > > > > > > > Wicket-develop@lists.sourceforge.net > > > > > > > > > > > > > > > > https://lists.sourceforge.net/lists/listinfo/wicket-develop > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > > Take Surveys. Earn Cash. Influence the Future of IT > > > > > > Join SourceForge.net's Techsay panel and you'll get the chance to > > > share > > > > > your > > > > > > opinions on IT & business topics through brief surveys -- and earn > > > cash > > > > > > > > > > > > > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > > > > _______________________________________________ > > > > > > Wicket-develop mailing list > > > > > > Wicket-develop@lists.sourceforge.net > > > > > > > > > > > > > > > https://lists.sourceforge.net/lists/listinfo/wicket-develop > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > Take Surveys. Earn Cash. Influence the Future of IT > > > > > Join SourceForge.net 's Techsay panel and you'll get the chance to > share > > > your > > > > > opinions on IT & business topics through brief surveys -- and earn > cash > > > > > > > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > > > > > > > > _______________________________________________ > > > > > Wicket-develop mailing list > > > > > Wicket-develop@lists.sourceforge.net > > > > > > > > > https://lists.sourceforge.net/lists/listinfo/wicket-develop > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > Take Surveys. Earn Cash. Influence the Future of IT > > > > Join SourceForge.net's Techsay panel and you'll get the chance to > share > > > your > > > > opinions on IT & business topics through brief surveys -- and earn > cash > > > > > > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > > _______________________________________________ > > > > Wicket-develop mailing list > > > > Wicket-develop@lists.sourceforge.net > > > > > > > > https://lists.sourceforge.net/lists/listinfo/wicket-develop > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > Take Surveys. Earn Cash. Influence the Future of IT > > > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > > > opinions on IT & business topics through brief surveys -- and earn cash > > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > > > > _______________________________________________ > > > Wicket-develop mailing list > > > Wicket-develop@lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/wicket-develop > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > > opinions on IT & business topics through brief surveys -- and earn cash > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > > Wicket-develop mailing list > > Wicket-develop@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/wicket-develop > > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > Wicket-develop mailing list > Wicket-develop@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-develop > > > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-develop mailing list Wicket-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-develop