Re: better way to strip wicket markup / tags per page?

2009-09-30 Thread Antoine van Wel
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




Re: better way to strip wicket markup / tags per page?

2009-09-30 Thread Pedro Santos
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.comwrote:

 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


better way to strip wicket markup / tags per page?

2009-09-29 Thread Antoine van Wel
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


Re: better way to strip wicket markup / tags per page?

2009-09-29 Thread Marat Radchenko

 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



Re: better way to strip wicket markup / tags per page?

2009-09-29 Thread Antoine van Wel
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
 




-- 

--8--8--
take your photos everywhere you go - http://www.memolio.com
--8--8--
We don't see things as they are, we see things as we are. - Anais Nin
Whether you think you can or whether you think you can't, you're right. -
Henry Ford
--8--8--


RE: better way to strip wicket markup / tags per page?

2009-09-29 Thread Craig McIlwee
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
 




--

--8--8--
take your photos everywhere you go - http://www.memolio.com
--8--8--
We don't see things as they are, we see things as we are. - Anais Nin
Whether you think you can or whether you think you can't, you're right. -
Henry Ford
--8--8--



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: better way to strip wicket markup / tags per page?

2009-09-29 Thread Pedro Santos
on the wiki[1] it is described how to get rid of wicket markup such as
wicket:id attributes on a page basis
page basis is an specific page on your project, or you want to strip wicket
tags to all pages?

you can override application init method and put your configuration lines:
getMarkupSettings().setStripWicketTags(true);

or create your BasiPageParentWithoutWicketTagsSuperclass for those specific
pages extensions...

On Tue, Sep 29, 2009 at 8:40 AM, Antoine van Wel
antoine.van@gmail.comwrote:

 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




-- 
Pedro Henrique Oliveira dos Santos