no clean solution seems to be possible. Inheritance seems to be clean
On Wed, Sep 30, 2009 at 4:03 AM, Antoine van Wel <antoine.van....@gmail.com>wrote: > Craig: didn't consider that. So, no clean solution seems to be possible. > > Pedro: yes I was talking about having the wicket-tags turned on for the > application except for a certain (xml) page, since it is causing parse > errors in the xml there. > > > Antoine > > On Tue, Sep 29, 2009 at 9:23 PM, Craig McIlwee < > craig.mcil...@openroadsconsulting.com> wrote: > > > I don't see how this can work reliably when there is more than 1 user, > > AFAIK wicket has no synchronization in place that prevents 2 pages from > > going through the render phase at the same time. So if one page finishes > > rendering and changes the setting to false while another page has just > > started rendering (e.g. the line immediately after change the setting to > > true) then that page will render with the wrong value. > > > > Craig > > > > -----Original Message----- > > From: Antoine van Wel [mailto:antoine.van....@gmail.com] > > Sent: Tuesday, September 29, 2009 9:03 AM > > To: users@wicket.apache.org > > Subject: Re: better way to strip wicket markup / tags per page? > > > > Thanks for the lightning fast reply. > > > > Yes it works fine under development. Still I don't like it - after all > > these > > statements are also executed during production mode, and even though they > > can't do any harm there, I'd rather not see them there at all. More a > > matter > > of personal taste I guess. > > > > Anyway I have something in mind to improve it according to my taste. Will > > implement that when I got time... This is not really an urgent issue to > me. > > Thanks anyway for the reply - I'm assuming now there really is no other > way > > to do this than temporarily changing the global settings. > > > > > > Antoine > > > > > > On Tue, Sep 29, 2009 at 7:46 PM, Marat Radchenko < > > slonopotamusor...@gmail.com> wrote: > > > > > > > > > > In some situations during development... > > > > > > With that in mind, this solution is absolutely ok. > > > > > > 2009/9/29 Antoine van Wel <antoine.van....@gmail.com> > > > > > > > Hi, > > > > > > > > on the wiki[1] it is described how to get rid of wicket markup such > as > > > > wicket:id attributes on a page basis. > > > > The solution looks like a dirty hack to me which may go wrong when > for > > > > instance exceptions occur. Does anybody know of a better way? > > > > > > > > For completeness sake, here is the code duplicated from the wiki: > > > > > > > > private boolean stripTags; > > > > > > > > public TestPage() { > > > > stripTags = > > > > Application.get().getMarkupSettings().getStripWicketTags(); > > > > } > > > > @Override > > > > protected void onBeforeRender() { > > > > > Application.get().getMarkupSettings().setStripWicketTags(true); > > > > } > > > > @Override > > > > protected void onAfterRender() { > > > > > > > Application.get().getMarkupSettings().setStripWicketTags(stripTags); > > > > } > > > > > > > > > > > > > > > > Thanks in advance, > > > > > > > > Antoine. > > > > > > > > > > > > References: > > > > [1] > > > > > > > > > > http://cwiki.apache.org/WICKET/how-to-remove-wicket-markup-from-output.html > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > -- Pedro Henrique Oliveira dos Santos