all you had to do was look at the source. its not that difficult to do... new propertytreecolumn(...) { public component newhreader(parent, id) { label l=super.newheader(parent,id); l.setdefaultmodelobject(getstring(l.getdefaultmodelobjectasstring()); } }
-igor On Sat, Feb 27, 2010 at 5:47 AM, DCarr <listobser...@gmail.com> wrote: > Anyone have any hints/tips/wiki page references, or are column headers > really not internationalizable? > > Thanks, > Doug. > > DCarr wrote: >> >> Hi, >> >> Is there a recommended way to set the header string in a >> PropertyTreeColumn when that string should come from a resource file? It >> doesn't take a model, so the load cannot be deferred until later; using >> getLocalizer().getString(...) results in: >> >> -WARN::org.apache.wicket.Localizer: Tried to retrieve a localized string >> for a component that has not yet been added to the page. This can sometimes >> lead to an invalid or no localized resource returned. Make sure you are not >> calling Component#getString() inside your Component's constructor. Offending >> component: [MarkupContainer [Component id = panel]] >> >> That is only a warning, but I'd prefer to not have any warnings in >> production code. >> There does not appear to be a way to set the column header value after the >> column (or the TreeTable the column is in) has been constructed. The >> TreeTable has to be added, or Wicket complains about >> >> Unable to find component with id 'xxxxx' in [MarkupContainer [Component id >> = panel]]. >> >> but I don't think TreeTable can be constructed without the column >> definitions (i.e. construct a TreeTable placeholder, and then fill in the >> column details later). >> >> Thanks, >> Doug. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org